Skip to content

perf(security): drop the Snapshot drift sections the pre-flight check already covers - #1435

Merged
potiuk merged 1 commit into
mainfrom
optimize/security-1-snapshot-drift
Sep 27, 2026
Merged

potiuk merged 1 commit into
mainfrom
optimize/security-1-snapshot-drift

Conversation

@potiuk

@potiuk potiuk commented Sep 27, 2026

Copy link
Copy Markdown
Member

First of a four-PR stack applying the #1342 recipe to the security family (#1344).

Summary

  • Eleven security skills carried a hand-written Snapshot drift section that told the agent to compare .apache-magpie.local.lock with .apache-magpie.lock on every run. The generated pre-flight block already does that in code (setup_preflight's snapshot-drift finding), so the prose was a second, weaker copy loaded on every invocation. This PR deletes it: ~250 lines, ~2.4k tokens across the family.
  • The prose also covered a method or URL mismatch (a full re-install, not an upgrade), which the checker never compared. So that nothing is lost, setup_preflight now compares method and url alongside ref and commit, and its step-2 rule sends that case to /magpie-setup. New test: test_a_snapshot_method_or_url_mismatch_is_drift.
  • The prose's third case, an svn-zip SHA-512 anchor mismatch, is checked at fetch time by setup. The lock records no SHA, so there was never a per-run check to preserve.

Type of change

  • Skill change: 11 × plugins/magpie-security/skills/*/SKILL.md
  • Python package: tools/setup-preflight (via its symlink into plugins/magpie-setup/skills/setup/setup_preflight)

Test plan

  • prek run --all-files passes, including lychee over the whole tree
  • tools/setup-preflight pytest: 75 passed, including the new test
  • skill-and-tool-validate green
  • Eval inputs: no step_heading covers a deleted section. A checker that extracts every security eval's step section from main and from this branch reports 71 of 71 byte-identical.

Stack

  1. this PR: drop Snapshot drift
  2. split oversized SKILL.md files into siblings
  3. one safe-create recipe, board-recipe pointers
  4. trim the security-model-* always-on descriptions

Part of #1344.

Generated-by: Claude Code (Opus 5.5)

🤖 Generated with Claude Code

@potiuk potiuk added family:security security-* skills family:setup setup-* skills labels Sep 27, 2026
@potiuk
potiuk added this pull request to stack #1439 September 27, 2026 20:58
@github-actions github-actions Bot added the substrate:setup Tool substrate: adopter-side setup state resolved at runtime (lock parsing, floors, fingerprints) label Sep 27, 2026
…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
potiuk force-pushed the optimize/security-1-snapshot-drift branch from 185a79a to 8d72a70 Compare September 27, 2026 23:32
@potiuk
potiuk merged commit 5e4622b into main Sep 27, 2026
11 checks passed
@potiuk
potiuk deleted the optimize/security-1-snapshot-drift branch September 27, 2026 23:38
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

family:security security-* skills family:setup setup-* skills substrate:setup Tool substrate: adopter-side setup state resolved at runtime (lock parsing, floors, fingerprints)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant