Repository navigation
Raise the plugin version so the guard fix of #49 reaches the cache - #53
Merged
Merged
Conversation
Claude Code and Codex cache the plugin per version and run the hooks from that copy. #49 changed bin/kb-guard without a new version, so after kb update the cached 0.11.2 guard was still the old one. 0.11.3 makes the hosts copy the plugin again. A test now compares the branch with origin/main: when bin/, hooks/, skills/ or types/ change, the version must go up. CI fetches the full history for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Intent
Make the
kb-guardfix of #49 reach machines that have the plugin, and stop the same mistake with a test and a rule: whenbin/,hooks/,skills/ortypes/change, the plugin version must go up.Drift
tests/plugin_cache.json) with the version and a hash of the files./simplifyfound a gap: you could write the new hash with the old version, and the test passed. I replaced it with a compare againstorigin/main. The test now starts git, so it isslowand CI needsfetch-depth: 0.kb-guardcould hand over to the code clone, asbin/kbdoes. Then guard fixes reach users with no bump. That changes what the guard does, so it is a separate task.Decisions
origin/main. On a PR, CI checks out the merge commit, so the base is the currentmain. Two PRs that both raise to the same version are caught there.CIset), a missingorigin/mainfails the test. Locally it skips.hooks/*.test.tsxis left out: a test-only change needs no new version.Evidence
Before (after
kb updatetodcb39c8):The guard in this session still denied a
drive.py hookprompt that the #49 guard allows.After:
test_a_change_to_the_cached_files_raises_the_versionpasses, also withCI=true.bin/kb-guardand the version set back to 0.11.2:/code-reviewfix to "is not above")scripts/test --all:1727 passed in 77.31s.claude plugin updatewrites the0.11.3cache, and itsbin/kb-guardis the same as the code clone's.Reading map
Tests changed:
tests/test_plugin.py(new test, no assertion removed)Config:
.claude-plugin/plugin.json,.codex-plugin/plugin.json(version),.github/workflows/test.yml(fetch-depth: 0)🤖 Generated with Claude Code