Repository navigation
Conversation
Claude Code pins plugin installs to a commit SHA and never auto-updates them, so a plugin-channel install can silently run months-old skills and hooks. The pre-tool hook now compares the running plugin's version against the local marketplace clone's marketplace.json and prints one warn-only stderr line with the exact remedy, rate-limited to once per day via a stamp file. Zero network, grep/sed only, exit code unchanged, and gated on the script's own path under */plugins/cache/* so repo-local dev copies never warn. Docs: README install note, /release checklist distinction between claude plugin update and /plugin marketplace update, and plugin-updates.md recipe corrections. Fixes #784
6 tasks
admarble
added a commit
that referenced
this pull request
Jul 19, 2026
… compare, coverage (#789) Closes the three non-blocking gaps flagged during #784's QA: - Locate the marketplace clone by scanning plugins/marketplaces/*/ for the clone that declares the sequant plugin, instead of hardcoding a "sequant" directory name Claude Code may not use. - Compare versions semver-aware (pure awk, no sort -V): warn only when the install is strictly behind the marketplace, so an ahead cache or a lexicographic mismatch (1.20.3 vs 1.9.0) no longer mis-warns. - Add regression guards: the staleness block invokes no network command (all three mirrors), and the generated marketplace README keeps the no-auto-update note from #787. #784 behavior preserved: warn-once/day via stamp, exit code untouched, repo-local dev copies silent, three hook mirrors byte-identical. Fixes #788
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
pre-tool.sh(all three mirrors) now compares the running plugin's version against the local marketplace clone'smarketplace.jsonand prints one warn-only stderr line with the exact remedy (claude plugin update sequant@sequant+ restart note). Zero network, grep/sed only, rate-limited to once per day via a stamp file, gated on the script's own path under*/plugins/cache/*so repo-local dev copies never warn. The tool call is never blocked and the exit code is unchanged.__tests__/plugin-staleness-warning.integration.test.ts: 7 scenarios × 3 hook mirrors, staging each copy into a simulated Claude Code cache layout — warn-once, exact-remedy, block-preservation, stamp rate limit, and all four no-op cases./releaseskill checklist distinction betweenclaude plugin update(installed plugin) and/plugin marketplace update(listing only, 3 skill mirrors), generated marketplace README note,plugin-updates.mdrecipe corrections, CHANGELOG entry.AC Verification
hooks/pre-tool.shstaleness block; 21 integration testsTest plan
vitest run __tests__/plugin-staleness-warning.integration.test.ts— 21/21vitest run __tests__/pre-tool-hook.integration.test.ts— 183/183 (no regression from the insertion)npm run build/npm run lint/npm run lint:skill-calls— cleannpm run prepare:marketplaceregenerated artifact carries the noteQA verdict: READY_FOR_MERGE (review on the issue)
Closes #784
🤖 Generated with Claude Code