Repository navigation
fix(setup): make the pre-flight checker and upgrade work for method: local - #1414
Merged
Merged
Conversation
…local The framework checkout self-adopts with `method: local`, and install.md writes `source: skills/` into its lock. The checker's lock parser rejected that key, so every skill's pre-flight in this checkout failed with `unknown key: 'source'`. Accepting it exposed the next fault: `method: local` fell through to `unknown-method` and routed to the snapshot-drift section, which proposes `/magpie-setup upgrade`, which cannot help. The skills are the working tree, so there is nothing to drift; the checker now returns no project findings for it. The memoised project verdict was keyed only on the lock files and the plugin listing, so a checker refreshed by `upgrade` kept serving the previous code's answer for up to fifteen minutes. The key now includes the checker's own core.py and lockfile.py. upgrade.md Step 0 gains the `method: local` branch: refresh the pre-flight checker from the in-repo package and stop, rather than routing a missing local lock into a snapshot recovery. Generated-by: Claude Opus 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
method: local), every skill's pre-flight failed withunknown key: 'source':install.mdwritessource: skills/into the lock and the checker's parser rejected it.method: localfell through tounknown-methodand was routed to the snapshot-drift section, proposing/magpie-setup upgrade— which has nothing to do for a local checkout, so the loop never closed. The checker now returns no project findings formethod: local: the skills are the working tree.upgradekept serving the old verdict for up to 15 minutes. The cache key now includescore.pyandlockfile.py.upgrade.mdStep 0 gains amethod: localbranch: refresh the pre-flight checker from the in-repo package and stop, instead of treating the absent local lock as a snapshot to recover.Type of change
plugins/magpie-setup/skills/setup/upgrade.md) — prose branch only, no eval suite forsetuptools/setup-preflight)Test plan
prek run --all-filespassesuv run pytest(75 passed, 3 new regression tests),ruff check,ruff format,mypyclean forsetup-preflightPYTHONPATH=.apache-magpie-local python3 -m setup_preflight --skill optimize-skill …in this checkout now returns only the machine-scopeisolated-setup-changedfinding, where before it exited 2RFC-AI-0004 compliance
upgradeformethod: localonly refreshes the gitignored checker copyGenerative AI disclosure
Prepared with Claude Code (Claude Opus 5); reviewed by the submitter.
🤖 Generated with Claude Code