Skip to content

feat(hooks): support Claude model-switch events - #1469

Merged
avifenesh merged 8 commits into
mainfrom
automation/weekly-maintenance-2026-08-30
Aug 29, 2026
Merged

feat(hooks): support Claude model-switch events#1469
avifenesh merged 8 commits into
mainfrom
automation/weekly-maintenance-2026-08-30

Conversation

@avifenesh

Copy link
Copy Markdown
Collaborator

Summary

Verification

  • UPDATE_BASELINES=true scripts/check-tool-releases.sh (ok=12 new=0 skipped=0)
  • node scripts/sync-rule-bookkeeping.js --check
  • focused hook schema and validator regression tests
  • cargo test --workspace --all-features
  • cargo fmt --all -- --check
  • CLAUDE.md / AGENTS.md byte identity

Covers #1458, #1459, #1460, #1461, #1462, #1463.
Closes #1464
Closes #1465
Closes #1466
Closes #1467
Closes #1468

avifenesh and others added 5 commits August 30, 2026 00:13
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>

@revuto-review revuto-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/PostModelSwitch are added to VALID_EVENTS and MATCHER_EVENTS and correctly kept out of PROMPT_EVENTS, NO_MATCHER_EVENTS, and TOOL_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 Updated advance to 2026-08-30.
  • knowledge-base/rules.json and crates/agnix-rules/rules.json remain byte-identical; no new rule ID, so no locale-key or t! 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.

Comment thread knowledge-base/VALIDATION-RULES.md

@revuto-review revuto-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an auto review done by revuto.


Revuto completed the review and found no evidence-backed concerns.

@revuto-review revuto-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an auto review done by revuto.


Found one inventory parity issue in the refreshed research row.

Comment thread knowledge-base/RESEARCH-TRACKING.md Outdated

@revuto-review revuto-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/PostModelSwitch added to VALID_EVENTS (now 33) and MATCHER_EVENTS; CC-HK-002 prompt/agent disallowed lists updated consistently; known_matcher_values (CC-HK-025) returns None for the new events, so open-ended model-name matchers are not falsely validated against an allowlist; PROMPT_EVENTS unchanged, 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 Updated bump and a dated triage row.
  • Research inventory parity: the previously flagged OpenCode drift is fixed at head — the row now carries .mcp.json and MCP, and rule_parity.rs enforces it going forward. Claude/Codex/Cursor/amp rows each match their baseline config_surfaces and 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.

Comment thread knowledge-base/VALIDATION-RULES.md

@revuto-review revuto-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an auto review done by revuto.


Revuto completed the review and found no evidence-backed concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant