Repository navigation
Description
Problem
Follow-up to #784 (merged in #787). The plugin-staleness warning in pre-tool.sh shipped with four known, non-blocking gaps flagged during QA. This issue hardens the check and closes the test-coverage holes.
Gaps
-
Hardcoded marketplace directory name. The check derives the clone path as
…/plugins/marketplaces/sequant/.claude-plugin/marketplace.json, assuming Claude Code names the marketplace dirsequant. If a given Claude Code version names it differently (e.g. after the source slug), the check silently no-ops. The existing test stages that exact name, so it passes by construction and cannot catch a divergent real-world name. -
String-inequality version compare, not semver. The check warns whenever installed
!=marketplace. A cache that is ahead of the marketplace would print "is stale," which is wrong. Warn only when the installed version is strictly behind. -
Zero-network is by construction, not asserted. No test guards against a future edit introducing
curl/gh/git/ncinto the staleness block. -
prepare-marketplace.tsno-auto-update note has no regression guard. The generated marketplace README note (added in feat(#784): warn when the installed plugin cache is stale #787) is verified only by manual regeneration; nothing prevents the template from silently dropping it.
Acceptance Criteria
- AC-1: The check locates the marketplace clone by scanning
plugins/marketplaces/*/.claude-plugin/marketplace.jsonand selecting the one whose JSON declares thesequantplugin — no hardcoded directory name. Still zero-network, grep/sed only, and a no-op when no matching clone exists. - AC-2: The warning fires only when the installed version is strictly behind the marketplace version (semver-aware numeric compare, pure awk — no
sort -Vdependency). Equal or ahead → silent no-op. - AC-3: A test asserts the staleness block contains no network-invoking commands (
curl,wget,gh,git,nc,ping), across all three hook mirrors. - AC-4: A test asserts the generated marketplace README (from
prepare-marketplace.ts) contains the no-auto-update note and theclaude plugin updatecommand. - AC-5: Existing feat(hooks): warn when the installed plugin cache is stale — plugin-channel installs never auto-update #784 behavior preserved: warn-once/day via stamp, exit code unchanged, repo-local dev copies never warn, all three hook mirrors byte-identical.
Activity
docs: sync reference/feature docs for the next release (#792)