Repository navigation
feat(setup): propose a bump when an organization moves a curated pin - #2384
Merged
potiuk merged 2 commits intoNov 26, 2026
Merged
Conversation
An organization moves a curated skill-source pin when the source tags a newer version, but a project's own pin moves only when the project bumps it, and nothing told the project. - setup_preflight.skill_sources compares the trust list with the organization's catalogue in the snapshot setup update has just put in place, offline: moved, same, tag-moved, adopter-ahead, not-comparable, not-curated or declined. It reads versions exactly as the drift check does, and a test keeps the two in step. - update Step 6f, before the re-fetch, asks about each moved pin; on a yes it edits the trust list and the sources lock and stages both with git add, never committing, and the re-fetch verifies the new tag. On a no it records the curated ref under skill_source_pins in this checkout's reconciled.json, so the same bump is not proposed again until the curator moves past it. A moved tag is a warning, never a re-pin. - skill-sources.md names this as the one trust-list edit Magpie proposes; the organization-adapters spec describes it. - A new eval suite, setup/step-update-source-pin, covers a moved pin, a bump declined before, a moved tag (with an instruction planted in the catalogue) and an independent project. Generated-by: Claude Opus 5
From the adversarial review of the pin-move notice: - A bump the operator accepts is staged and nothing is fetched from it in that run: setup skill-sources fetches and verifies the new version once the adopter has committed it, so the trust gate holds and a failed verification never leaves a half-applied pin behind. - The parser reads every documented descriptor form: an inline comment, an indented list item and a bare id: mapping, and it scopes each entry's keys by indent so a nested block or a later entry never bleeds in. - An archive (svn-zip) pin compares and bumps its sha512; a curated pin with no anchor to move to is not-comparable. Rows now carry anchor_key, anchor and curated_anchor. - A decline also covers a curated version below the one declined. - The catalogue falls back to an adopter-local organization's, and both commands run with PYTHONPATH set to the installed pre-flight checker, as every other pre-flight call does. - The eval checks that nothing is fetched before the commit. Generated-by: Claude Opus 5
potiuk
force-pushed
the
feat/incubator-pin-notice
branch
from
November 26, 2026 22:15
7c29bc8 to
89820a7
Compare
potiuk
enabled stacked auto-merge (squash)
November 26, 2026 22:17
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
Stacked on #2383: review and merge that one first. This PR's diff is only the pin-move notice.
An organization moves a curated skill-source pin when the source tags a newer version (for the ASF, when the Incubator tags a new
releasecheck), but a project's own pin in<project-config>/skill-sources.mdmoves only when the project bumps it, and nothing told the project.setup_preflight.skill_sources pinscompares the trust list with the organization's catalogue in the snapshotsetup updatehas just put in place, so it needs no network. Per trusted id it reports:moved(same skill, a higher curated version): propose the bump;same;adopter-ahead;not-comparable(no<name>-<version>ref, different names, or a curated pin with no anchor to move to);not-curated(the project's own full descriptor, or an id the catalogue does not carry);tag-moved(same ref, a different anchor): a warning, never a re-pin;declined:moved, but the operator kept their pin over a curated version at least this new before.The anchor is whichever the source uses:
commitfor a git tag,sha512for an archive. The parser reads every documented descriptor form (an inline# comment, an indented list item, a bareid:mapping) and scopes each entry's keys by indent. Versions are read exactly ascheck-skill-source-drift.pyreads them, and a test keeps the two patterns in step.updateStep 6f, item 0, before the re-fetch: for eachmovedpin, it shows the change and asks.refand anchor and the source's.apache-magpie.sources.lockblock, and stages both withgit add, never committing. Nothing is fetched from that pin in the same run:/magpie-setup skill-sourcesfetches the new version and verifies it against the new anchor once the adopter has committed the bump, so the trust gate holds and a failed check never leaves a half-applied pin.skill_sources declinerecords the curated ref underskill_source_pinsin this checkout's ownreconciled.json(a linked worktree inherits it), so the bump is not proposed again until the curator moves past it.organizations/<org>/skill-sources.md, or, for an organization Magpie does not ship, the adopter-local one under.apache-magpie-overrides/organizations/<org>/. Both commands run withPYTHONPATHset to the installed pre-flight checker, like every other pre-flight call inupdate.setup skill-sourcesnames this as the one trust-list edit Magpie proposes; adding a source and committing a pin stay the adopter's acts. Theorganization-adaptersspec describes it.Type of change
plugins/magpie-setup/skills/setup/setup_preflight/skill_sources.py, new)update.mdStep 6f,skill-sources.md)organization-adapters.md)Test plan
prek run --all-files --skip workspace-pytestandprek run workspace-pytest --from-ref origin/main --to-ref HEADon the top of the stacktools/setup-preflight/tests/test_skill_sources.py, 26 tests: every state; every documented descriptor form, and a nested block never bleeding into its entry or the next; archive pins compared bysha512; a curated pin with no anchor not proposed; commented template examples declaring nothing; no catalogue meaningnot-curated; a decline holding until the curator moves past it (and covering a lower curated version), keeping every other stamp key, never overwriting an unparsable stamp, and inherited by a linked worktree; the shipped ASF catalogue parsing; the version pattern matching the drift check's; the CLIsetup/step-update-source-pin, 4/4: a moved pin proposed and staged, never committed and never fetched before the commit, with a no recorded; a bump declined before staying quiet; a moved tag warned about and never re-pinned, despite an instruction planted in the catalogue to re-pin; an independent project with its own descriptor skippedPYTHONPATH, descriptor forms the parser missed, archive (sha512) pins, the adopter-local catalogue and a decline below the declined versionRFC-AI-0004 compliance
reconciled.jsonin the checkout's own layer.🤖 Generated with Claude Code