feat(hooks): support Claude model-switch events - #1469
Conversation
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.85.12 to 2.86.7. - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](taiki-e/install-action@b20dedc...b6ff580) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-version: 2.86.7 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) from 1.0.195 to 1.0.206. - [Release notes](https://github.com/anthropics/claude-code-action/releases) - [Commits](anthropics/claude-code-action@d40ddef...1f291e1) --- updated-dependencies: - dependency-name: anthropics/claude-code-action dependency-version: 1.0.206 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.7.0 to 6.0.0. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@b6effb0...dd06d9c) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
There was a problem hiding this comment.
This is an auto review done by revuto.
Reviewed the full diff: hooks schema change, tests, baseline/CHANGELOG/RESEARCH-TRACKING triple, regenerated rule metadata, and the consolidated dependency bumps.
What checks out:
PreModelSwitch/PostModelSwitchare added toVALID_EVENTSandMATCHER_EVENTSand correctly kept out ofPROMPT_EVENTS,NO_MATCHER_EVENTS, andTOOL_EVENTS— consistent with the v2.1.251 triage note (model-name matchers; command/HTTP/MCP-tool hooks only). The CC-HK-002 disallowed-event test additions mirror that.- Three-file baseline contract holds: all five advanced tools (Claude Code, Codex CLI, OpenCode, Cursor, amp) have the baseline bump, a CHANGELOG mention, and a RESEARCH-TRACKING row-date bump, plus the header
Last Updatedadvance to 2026-08-30. knowledge-base/rules.jsonandcrates/agnix-rules/rules.jsonremain byte-identical; no new rule ID, so no locale-key ort!obligations.
One small doc/validator mismatch to fix (inline comment): the CC-HK-001 requirement line still says "31 valid names" after this PR grew the list to 33.
There was a problem hiding this comment.
This is an auto review done by revuto.
Revuto completed the review and found no evidence-backed concerns.
There was a problem hiding this comment.
This is an auto review done by revuto.
Found one inventory parity issue in the refreshed research row.
There was a problem hiding this comment.
This is an auto review done by revuto.
Reviewed the full diff at head (45889d4), which includes the follow-ups from the earlier review rounds.
Verified clean:
- Hooks schema:
PreModelSwitch/PostModelSwitchadded toVALID_EVENTS(now 33) andMATCHER_EVENTS;CC-HK-002prompt/agent disallowed lists updated consistently;known_matcher_values(CC-HK-025) returnsNonefor the new events, so open-ended model-name matchers are not falsely validated against an allowlist;PROMPT_EVENTSunchanged, matching the triage note that these events accept command/HTTP/MCP-tool hooks only. New regression test covers CC-HK-001 acceptance with a model matcher. - Three-file baseline contract: all five baseline bumps (claude-code v2.1.251, codex rust-v0.151.0, opencode v1.18.25, cursor 3.18.9, amp) have matching CHANGELOG entries and RESEARCH-TRACKING row refreshes, plus the header
Last Updatedbump and a dated triage row. - Research inventory parity: the previously flagged OpenCode drift is fixed at head — the row now carries
.mcp.jsonandMCP, andrule_parity.rsenforces it going forward. Claude/Codex/Cursor/amp rows each match their baselineconfig_surfacesand live rule families (Codex MCP/CDX-REQ surfaces present). - Dependency consolidation: both CodeQL steps bumped together to 4.37.8; uuid 1.26.0 is within the workspace
"1"requirement; no CI-only flags touched the Pages deploy path.
One remaining nit (inline): the CC-HK-001 **Source** line in knowledge-base/VALIDATION-RULES.md still ends at v2.1.219 while both rules.json mirrors and the generated website doc now cite the v2.1.251 release for the two new events. Minor, but it leaves the knowledge-base mirror of the rule's evidence one step behind the source of truth.
There was a problem hiding this comment.
This is an auto review done by revuto.
Revuto completed the review and found no evidence-backed concerns.
Summary
PreModelSwitchandPostModelSwitchevents under existingCC-HK-001Verification
UPDATE_BASELINES=true scripts/check-tool-releases.sh(ok=12 new=0 skipped=0)node scripts/sync-rule-bookkeeping.js --checkcargo test --workspace --all-featurescargo fmt --all -- --checkCovers #1458, #1459, #1460, #1461, #1462, #1463.
Closes #1464
Closes #1465
Closes #1466
Closes #1467
Closes #1468