Make HookDef carry enforcement_strength metadata#4145
Merged
Trecek merged 1 commit intoJun 28, 2026
Merged
Conversation
Add an enforcement_strength: dict[str, str] field to HookDef carrying
per-backend enforcement classification. Populate all 33 HOOK_REGISTRY
entries with {claude_code, codex} keys based on matcher classification:
OS-native-only matchers are 'hard' (10 entries), MCP-containing /
SessionStart matchers are 'soft' (23 entries). The codex key mirrors
the entry's codex_status value.
Include enforcement_strength in _canonical_registry_payload for hash
sensitivity and bump format_version from 2 to 3.
Add 9 unit tests covering field presence, default value, completeness,
value validation, codex/codex_status parity, hash sensitivity,
format_version, round-trip, and payload inclusion.
Regenerate registry.sha256 and update hook_event_format_snapshot.json
fixture; remove the deferred _staleness_note.
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
Add an
enforcement_strength: dict[str, str]field toHookDefwithfield(default_factory=dict). Update_canonical_registry_payloadto include the field in the hash computation. Bumpformat_versionfrom 2 to 3. Populate all 33HOOK_REGISTRYentries with{"claude_code": "<hard|soft>", "codex": "<codex_status_value>"}based on matcher classification. Add unit tests for field presence, default value, round-trip, hash sensitivity, payload completeness, and classification correctness. Regenerateregistry.sha256and update thehook_event_format_snapshot.jsonfixture.Closes #4039
Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260628-110552-838218/.autoskillit/temp/make-plan/t5_p5_a6_wp1_enforcement_strength_plan_2026-06-28_111500.md🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown