Repository navigation
perf(security): drop the Snapshot drift sections the pre-flight check already covers - #1435
Merged
Merged
Conversation
…heck already covers Eleven security skills carried a hand-written "Snapshot drift" section telling the agent to compare the local and committed lock files at the top of every run. The generated pre-flight block does that in code (setup_preflight's snapshot-drift finding), so the prose was a second, weaker copy paid for on every invocation. The prose also covered a method or URL mismatch, which the checker did not compare. The checker now compares method and url alongside ref and commit, and its step-2 rule routes that case to a full re-install, so dropping the prose loses nothing. About 250 lines and roughly 2.4k tokens across the family. Generated-by: Claude Code (Opus 5.5)
potiuk
force-pushed
the
optimize/security-1-snapshot-drift
branch
from
September 27, 2026 23:32
185a79a to
8d72a70
Compare
This was referenced Sep 28, 2026
potiuk
added a commit
that referenced
this pull request
Sep 29, 2026
…ck already covers (#1470) #1435 removed these from the security skills. The same prose remained in 37 other skills and siblings across the pr-management, release-management, issue, contributor-growth, repo-health, pairing, setup and utilities families: compare .apache-magpie.local.lock with .apache-magpie.lock and propose `setup upgrade`. The generated pre-flight block does that in code, including the method/URL case since #1435, and stops the run where the prose only suggested. - The sections are removed, and the Step 0 "Drift check — see Snapshot drift above" items and the adopter-config pointers now say the pre-flight block reports snapshot drift. - write-skill's init_skill.py no longer scaffolds the section. - Kept on purpose: isolated-setup-install and isolated-setup-update, whose evals grade their own drift step, and status, which renders drift in its dashboard. About 480 lines removed. Generated-by: Claude Code (Opus 5.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.
First of a four-PR stack applying the #1342 recipe to the security family (#1344).
Summary
.apache-magpie.local.lockwith.apache-magpie.lockon every run. The generated pre-flight block already does that in code (setup_preflight'ssnapshot-driftfinding), so the prose was a second, weaker copy loaded on every invocation. This PR deletes it: ~250 lines, ~2.4k tokens across the family.setup_preflightnow comparesmethodandurlalongsiderefandcommit, and itsstep-2rule sends that case to/magpie-setup. New test:test_a_snapshot_method_or_url_mismatch_is_drift.svn-zipSHA-512 anchor mismatch, is checked at fetch time bysetup. The lock records no SHA, so there was never a per-run check to preserve.Type of change
plugins/magpie-security/skills/*/SKILL.mdtools/setup-preflight(via its symlink intoplugins/magpie-setup/skills/setup/setup_preflight)Test plan
prek run --all-filespasses, including lychee over the whole treetools/setup-preflightpytest: 75 passed, including the new testskill-and-tool-validategreenstep_headingcovers a deleted section. A checker that extracts every security eval's step section frommainand from this branch reports 71 of 71 byte-identical.Stack
SKILL.mdfiles into siblingssecurity-model-*always-on descriptionsPart of #1344.
Generated-by: Claude Code (Opus 5.5)
🤖 Generated with Claude Code