Repository navigation
fix(kaizen): git hooks require Kaizen core behind an explicit pointer; parity test with the resolver (4.1.2) - #41
Merged
Merged
Conversation
…; parity test with the resolver The hooks accepted any file named by git config kaizen.cli or $KAIZEN_CLI; they now check its plugin.json like the kaizen-ops resolver and refuse a wrong pointer with its path. The lookup stays self-contained in each (hooks run before anything can be imported); a kaizen-ops test runs both on the same fake worlds and requires the same answer. Kaizen 4.1.2. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012iZk6aQ3fhJy4jrZhfWtaf
4 of 5 tasks
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
Finding #4 of the core/ops split review: the Kaizen core lookup is written twice — in the git hook templates and in the kaizen-ops resolver.
.githooks/and must find core before they can import anything.git config kaizen.cli/$KAIZEN_CLImust point to Kaizen core (itsplugin.jsonnameskaizen); a wrong pointer is refused with its path, never replaced by the cache. Before, any existing file was run.plugins/kaizen-ops/tests/parity.test.mjs: runs the hooks'node -elookup andfindCoreon the same fake worlds (numeric semver order, foreign cache entries, decoy marketplace, explicit pointers right/wrong/missing, git config over env) and requires the same answer. Both templates must carry the same lookup. The resolver's sibling checkout is the one deliberate difference.Test plan
node --test plugins/kaizen/tests/*.test.mjs plugins/kaizen-ops/tests/*.test.mjs→ 206 pass, 0 failKAIZEN_CLI→ non-Kaizen case (the divergence), passes with the fixTMPDIRthrough a symlink (macOS/var→/private/var)Generated by Claude Code