fix(brain): qualify the reviewed 4.3.26 lifecycle hook contract - #224
Merged
Merged
Conversation
Brain 4.3.26 legitimately declares eight hook events (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, PreCompact, SessionEnd). The inspector only knew the exact 4.3.17 two-event contract, so every current install reported "Automatic hook declarations differ from the exact 4.3.17 continuity contract" as a Runtime WARN. Add a second exact, deep-equal contract (4.3.26-lifecycle) alongside the existing ones. It stays version-agnostic and rejects any altered, added or removed hook, matcher, command or timeout, so a future upstream change still warns until reviewed. The fallback message now names both reviewed contracts.
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
4.3.26-lifecycle, next to the existing two. It is version-agnostic and rejects any altered, added or removed hook, matcher, command or timeout, so future upstream hook changes still warn until reviewed.Notes
PreToolUsedecision-gatethat can refuse Write/Edit untilsearch_ruvnetis consulted, and aStopgrounding gate.Testing
pnpm run checkpasses (typecheck, lint, lint:cc, lint:md, build, full test suite).~/.claudeinstall now inspects as4.3.26-lifecyclewith no issues.🤖 Generated with Claude Code