Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "PreToolUse hook に read-only / exact-executor fast-path と telemetry dedupe を追加し、read-only 操作の hook ノイズを削減する"
change_kind: mixedParent Issue
なし(単独改善)
Parent Goal Ref
- Goal: 既に allowlist で read-only と判定される操作の hook 出力・重複検査を減らす(security relaxation はしない)
- Desired Destination: mutating / unknown command は既存 fail-closed chain のまま、read-only と exact controlled executor だけが fast-path を通る状態
Current Validated Scope
scripts/agent-guards/pretool_fastpath_classifier.py(新規)で readonly_display / exact_controlled_executor / mutation_or_unknown を早期分類- classifier は独立 PreToolUse hook として追加せず、既存 guard(local_main_branch_guard / worktree_scope_guard)から共有ライブラリとして import される
- hook boundary manifest(
.codex/hooks.jsonを含む)への classification / fail policy / stdout-stderr contract 追記 - classifier テスト追加
Remaining Parent Gaps
- controlled executor command id の拡張(issue metadata mutation)は別 Issue で扱う
- hook 実行時間の CI ベンチ常設化は、budget 検証の結果を見て follow-up 判断
Outcome
pretool_fastpath_classifier.py が read-only command / exact controlled executor / mutation_or_unknown を決定論的に分類し、read-only 操作では冗長な hook status message が dedupe され、mutating / unknown は既存 fail-closed hook chain を無変更で通過し、分類・fail policy が manifest とテストで固定された状態。
Background
.codex/hooks.json では Bash の PreToolUse に local main guard、worktree guard、agent guardrail、session recording、CI/test advisory が連鎖し、read-only 操作でも複数 hook の status 出力が transcript に露出する。hook boundary docs は、non-blocking の hook failure でも transcript に露出して agent 判断を汚染し得ると明記している。worktree_scope_guard.py は read-only を worktree unresolved でも allow する分類を既に持つため、fast-path はこの既存分類を明示的に再利用し、新たな allow を作らない。
classifier は既存 hook の内部で呼び出される共有 module として実装し、.claude/settings.json / .codex/hooks.json に独立 PreToolUse hook として登録しない(hook topology を増やさない)。read-only 判定は、local_main_branch_guard と worktree_scope_guard の両方が read-only と判定する交差集合(intersection)のみを readonly_display とし、片方でも unknown / mutating / cleanup / metadata mutation と判定する場合は mutation_or_unknown とする。
gh api は method・field flag・endpoint を token-level で検証し、default POST 化する flag が存在する場合は mutation_or_unknown とする。gh issue / gh pr の --web / -w は browser side effect を持つため readonly_display から除外する。
分類語彙として exact_controlled_executor_shape(canonical executor path + exact argv shape のみに一致)と exact_controlled_executor_authorized(shape に加え command_id が ALL_COMMAND_IDS に属し、repo binding・input namespace shape・stable policy_hash が計算可能であることを満たす)を区別する。この条件を満たさない controlled executor lookalike は mutation_or_unknown に分類する。fast-path と telemetry dedupe の根拠にできるのは exact_controlled_executor_authorized のみとする。
local_main_branch_guard.py の controlled skill mutation executor allow は現在 REASON_DETERMINISTIC_CHECKER を返しているが、telemetry hash logging の歪みを防ぐため独立 reason_code controlled_skill_mutation_executor に分離する。
In Scope
pretool_fastpath_classifier.py新規追加。readonly_display(gh issue view/gh issue list/gh pr view/git status/git diff/rg等、--web/-wを除く)、exact_controlled_executor_authorized(skill_runtime_exec.py/controlled_skill_mutation_exec.pyの exact 呼び出し)、mutation_or_unknown(既存 chain 無変更、exact_controlled_executor_shape のみで authorized 条件を満たさないものを含む)の 3 分類- read-only 判定は local_main_branch_guard と worktree_scope_guard の交差集合として計算する(片方でも unknown/mutating/cleanup/metadata mutation なら mutation_or_unknown)
gh apiの method / field flag / endpoint token-level 検証(POST 化 flag 存在時は mutation_or_unknown)- read-only 分類時の telemetry dedupe(bounded fast-path summary のみ)
- exact_controlled_executor_authorized 分類時の registry/policy hash 記録(raw command body / secret-like value を出さない)
local_main_branch_guard.pyの controlled skill mutation executor allow reason をcontrolled_skill_mutation_executorとして独立させる- hook boundary manifest(
docs/dev/hook-boundaries.md)とscripts/check_hook_boundaries.pyの検証対象に.codex/hooks.jsonを追加し、fast-path 契約を追記 - classifier テスト(must-fastpath / must-not-fastpath 両軸)追加と
.github/ci/python-test-plan.json登録
Out of Scope
- 既存 fail-closed guard(local_main_branch_guard / worktree_scope_guard)の判定緩和
- mutating command の分類変更
- controlled executor の command id 追加
- 独立 PreToolUse hook としての classifier 登録(hook topology 追加)
Acceptance Criteria
- AC1: read-only command(
gh issue view/git status/rg)は readonly_display に分類され、bounded fast-path summary のみを残す - AC2: mutating / unknown command は mutation_or_unknown に分類され、既存 fail-closed hook chain を無変更で通る
- AC3: exact_controlled_executor_authorized 呼び出しは registry/policy hash を記録し、raw command body や secret-like value を transcript 出力に含めない。exact_controlled_executor_shape のみで authorized 条件を満たさない呼び出しは mutation_or_unknown に分類される
- AC4: hook boundary manifest(
.codex/hooks.jsonを含む)に fast-path の classification / fail policy / stdout-stderr contract が記載されている - AC5: read-only command の classifier 実行時間がテストで設定した budget 以下である
- AC6: classifier は独立 PreToolUse hook として登録されず、
.claude/settings.json/.codex/hooks.jsonの hook 数(topology)が本変更前後で変わらないことをcheck_hook_boundaries.pyで検証できる - AC7: readonly_display は local_main_branch_guard と worktree_scope_guard の交差集合のみに分類され、片方でも unknown/mutating/cleanup/metadata mutation と判定するケースは mutation_or_unknown に分類される。
gh apiは POST 化 flag 存在時に mutation_or_unknown、gh issue/gh prの--web/-wは readonly_display から除外される - AC8:
local_main_branch_guard.pyの controlled skill mutation executor allow が独立 reason_codecontrolled_skill_mutation_executorを返す
Verification Commands
# AC1
$ uv run --locked pytest scripts/agent-guards/tests/test_pretool_fastpath_classifier.py -k test_ac1_readonly_display_bounded_summary -q
# AC2
$ uv run --locked pytest scripts/agent-guards/tests/test_pretool_fastpath_classifier.py -k test_ac2_mutation_or_unknown_existing_chain_unchanged -q
# AC3
$ uv run --locked pytest scripts/agent-guards/tests/test_pretool_fastpath_classifier.py -k test_ac3_exact_executor_hash_no_raw_body -q
# AC4
$ uv run --locked pytest scripts/agent-guards/tests/test_pretool_fastpath_classifier.py -k test_ac4_hook_boundary_manifest_fastpath_contract -q
# AC5
$ uv run --locked pytest scripts/agent-guards/tests/test_pretool_fastpath_classifier.py -k test_ac5_readonly_classification_within_budget -q
# AC6
$ uv run --locked pytest scripts/agent-guards/tests/test_pretool_fastpath_classifier.py -k test_ac6_no_new_hook_topology -q
# AC7
$ uv run --locked pytest scripts/agent-guards/tests/test_pretool_fastpath_classifier.py -k test_ac7_readonly_intersection_and_gh_api_token_check -q
# AC8
$ uv run --locked pytest scripts/agent-guards/tests/test_pretool_fastpath_classifier.py -k test_ac8_controlled_skill_mutation_executor_reason_code -qRuntime Verification Applicability
- decision: immediate
applicable_acs: AC1, AC2, AC3, AC4, AC5, AC6, AC7, AC8
execution_environment: repo checkout worktree(uv run --locked pytestが利用可能な環境)
skip_conditions: 実装前(scripts/agent-guards/pretool_fastpath_classifier.pyとscripts/agent-guards/tests/test_pretool_fastpath_classifier.pyが未作成)の段階では file-not-found による baseline fail(expected baseline fail)を許容する。実装後は SKIP しない。
fallback_policy: baseline fail を弱める/AC・VC を緩めることは禁止する。実装後も VC が fail する場合は Stop Condition として扱う。
artifact_requirements:uv run --locked pytestの stdout/exit code を実行証跡として保存する - AC1〜AC8 の VC はいずれも未作成の specific test file(
scripts/agent-guards/tests/test_pretool_fastpath_classifier.py)を参照するuv run --locked pytest呼び出しであり、実装前は file-not-found による baseline fail(expected baseline fail)を返す。 - 実装 PR で classifier とテストファイルが作成された時点で、同一 VC が実行可能になり pass/fail を判定できるため deferred/not_applicable ではない。
- baseline fail は本文の欠陥を示すものではなく、実装前段階として想定された状態である。
Allowed Paths
- scripts/agent-guards/pretool_fastpath_classifier.py
- scripts/agent-guards/tests/test_pretool_fastpath_classifier.py
- scripts/agent-guards/local_main_branch_guard.py
- .claude/hooks/worktree_scope_guard.py
- .claude/hooks/tests/test_local_main_branch_guard.py
- tests/codex/test_local_main_branch_guard.py
- scripts/check_hook_boundaries.py
- .codex/hooks.json
- .claude/settings.json
- docs/dev/hook-boundaries.md
- .github/ci/python-test-plan.json
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Scope Delta(任意)
N/A
Dependencies / Precondition
- 実装: local_main_branch_guard の raw gh issue edit/comment allowlist を controlled executor lane へ移行して deprecate する #1291(raw
gh issue edit/gh issue commentallowlist の controlled executor lane 一本化)が移行中であり、本 Issue の fast-path はこの二重認可(raw allowlist と controlled executor lane が並存する)状態を迂回してはならない。実装: local_main_branch_guard の raw gh issue edit/comment allowlist を controlled executor lane へ移行して deprecate する #1291 の移行完了前に fast-path が raw allowlist 側の command を誤って exact_controlled_executor_authorized に分類しないことを実装・テストで担保する(実装: Issue metadata mutation を worktree ではなく controlled metadata executor 経由にする #1284 の scope 分離も参照)。
Notes for Reviewer
- 本 Issue は security relaxation ではない。fast-path は既存 allowlist の read-only 分類を再利用するのみで、新規 allow を導入しない
- fail-closed guard の変更を含むため、must-block / must-allow 両軸の adversarial テストを必須とする
- timing テスト(budget 検証)は parallel 実行と干渉しないよう serial lane 分離を検討する
tests/codex/test_local_main_branch_guard.pyは Allowed Paths に追加する。fix: raw issue metadata mutation を controlled executor に一本化 #1298(raw issue metadata mutation の controlled executor 一本化)が main へマージされたことで本 PR とのマージ時に AC8 の reason_code 分離(REASON_DETERMINISTIC_CHECKER→REASON_CONTROLLED_SKILL_MUTATION_EXECUTOR)を前提としない古い assertion が同ファイルの Codex flavor テストにも存在することが判明した。.claude/hooks/tests/test_local_main_branch_guard.pyと同じ AC8 帰結のassertion 1 箇所(controlled_skill_mutation_exec.py呼び出しの reason_code 期待値)のみを更新する変更に限定する- worktree scope guard の実体ファイルは
.claude/hooks/worktree_scope_guard.pyであり(scripts/agent-guards/配下には存在しない)、Allowed Paths はこの実パスを指す - AC8 の reason_code 分離(
REASON_DETERMINISTIC_CHECKER→controlled_skill_mutation_executor)に伴い、.claude/hooks/tests/test_local_main_branch_guard.py内で controlled_skill_mutation_exec の allow がREASON_DETERMINISTIC_CHECKERを返すことを検証している既存 assertion(1 箇所)を新 reason_code に更新する。これは AC8 が意図する contract 変更の直接帰結であり、既存テストの大規模改変には該当しない - Allowed Paths / AC 中の python-test-plan 参照は
.github/ci/python-test-plan.jsonが正本でありscripts/python-test-plan.jsonは存在しない(誤記修正済み)
Activity
squne121 commentedon Jul 2, 2026
総合判定
Issue #1289 の方向性自体は妥当です。
PreToolUseの read-only 系コマンドで毎回重い guard と status 出力が走るのは運用ノイズです。ただし、現 Issue 本文のまま実装すると、fast-path が「ノイズ削減」ではなく「既存 fail-closed hook chain の実質的な迂回」になる危険が高いです。特に致命的なのは、Issue が「read-only / exact-executor fast-path」と言っている一方で、現在のリポジトリには
local_main_branch_guard.py、worktree_scope_guard.py、controlled executor policy、Claude hook topology、Codex hook topology の間で判定責務が分散しており、どの判定を SSOT として fast-path 化するのかが固定されていない点です。Issue #1289 自体はコメント 0 件で、追加の人間補足はありません。 直前の親文脈に近い Issue #1284 は、metadata mutation を controlled executor lane に移す設計で、#1289 を「PreToolUse hook chain の read-only fast-path / telemetry dedupe 最適化」として明示的に別スコープへ分離しています。 さらに #1291 では raw
gh issue edit/commentallowlist を controlled executor lane へ一本化する follow-up が立っており、#1289 の fast-path はこの移行中の二重認可状態を踏み抜く可能性があります。Blocker 1: 「fast-path が何を skip するのか」が未定義
Claude Code hooks の公式仕様では、tool event は matcher と
ifで handler 起動を絞り込むモデルです。ifがマッチしなければ handler を spawn しない一方、ifなしでは matched group 内の handler が走る、という説明になっています。([Claude Platform Docs]1) また、PreToolUseの JSON decision control はhookSpecificOutput.permissionDecisionのallow/deny/ask/deferなどであり、既存の後続 hook handler を条件付きで「まとめて skip する」ための明示 API としては説明されていません。([Claude Platform Docs]1)リポジトリ側を見ると、Claude の
.claude/settings.jsonではPreToolUseにsecret_boundary_guard、local_main_branch_guard、worktree_scope_guard、guard-japanese-prose、rtk_boundary_shadow_guard、ci_test_performance_advisoryが並んでいます。 Codex 側の.codex/hooks.jsonも BashPreToolUseに複数 hook を持ち、各 hook にstatusMessageが設定されています。したがって、
pretool_fastpath_classifier.pyを先頭に足すだけでは、むしろ hook が 1 個増えてノイズが増える可能性があります。Issue #1289 には、少なくとも次のいずれかを AC に追加すべきです。if条件で read-only command では重い handler を spawn しない。現状の Issue 本文はこの選択をしていないため、実装者が「fast-path summary を出すだけ」の実装をしても AC を満たしたように見えてしまいます。これは merge blocker です。
Blocker 2: read-only 判定が既に split-brain している
local_main_branch_guard.pyの read-only allowlist は広く、rg、grep、git status/log/show/diff/...、git branch --show-current、git ls-files、git worktree list、gh issue view/list、gh pr view/list/statusを read-only として扱います。 一方、worktree_scope_guard.pyの_classify_ghはgh issue viewとgh pr viewは read-only にしますが、gh issue listやgh pr list/statusは同じ扱いではありません。逆方向のズレもあります。
worktree_scope_guard.pyはgh apiを GET default / 明示 GET / field flag の有無で分類し、default GET や explicit GET without field を read-only とみなします。 しかしlocal_main_branch_guard.py側はgh apiを issue comment endpoint の GET にほぼ限定して allow しています。 GitHub CLI 公式 manual でもgh apiは通常 GET ですが、field parameter を付けると POST に切り替わるとされており、ここは token-level に閉じた分類が必要です。(GitHub CLI)Issue #1289 が「既存 allowlist で read-only」と言うなら、どの allowlist かを固定しなければなりません。敵対的には、実装者が
local_main_branch_guard.is_readonly_command()をそのまま使い、worktree_scope_guardが unknown と扱う command を fast-path skip してしまう実装が成立します。推奨 AC は次です。
gh issue view --webは公式 manual 上もブラウザを開く動作です。([GitHub CLI]3)gh issue list --webも browser 表示です。([GitHub CLI]4) これは read-only display ではなく side-effectful / interactive として扱うべきです。Blocker 3: exact controlled executor 判定が「argv 形状のみ」なので、fast-path の根拠として弱い
controlled_skill_mutation_policy.pyは shared policy としてworktree_scope_guard.pyとlocal_main_branch_guard.pyから使われる設計です。 ただしis_controlled_skill_mutation_exec_command()は、executor script の canonical path と argv shape を検証する関数で、semantic constraints は executor 側で enforce するという設計になっています。 実際、executor 本体はargs.command_id not in ALL_COMMAND_IDSを runtime validation で拒否します。これは通常の guard allow としては成立します。executor 自体が fail-closed するからです。しかし #1289 の classifier がこの関数だけを根拠に
exact_controlled_executorと分類し、後続 telemetry や guard を skip / dedupe するなら、未知の--command-idも「exact executor」として扱われる余地があります。PR #1295 の説明でも、新 3 command id は「executor script identity + argv 形状のみを検証するため、追加 allowlist entry なしで同じ allow 経路に乗る」と説明されています。#1289 の AC3 は「exact controlled executor logs registry/policy hash」としていますが、現在の controlled mutation lane は registry というより Python dict policy が中心です。
skill_runtime_exec.py側には registry load / registry validation がありますが、controlled metadata executor 側はCONTROLLED_SKILL_MUTATION_COMMAND_POLICYと executor validation が中心です。したがって分類語彙を分けるべきです。
また、
local_main_branch_guard.pyでは controlled skill mutation executor を allow する箇所が、reason としてREASON_DETERMINISTIC_CHECKERを返しています。 #1289 が telemetry dedupe をするなら、ここはcontrolled_skill_mutation_executorの独立 reason_code に直さないと、hash logging と分類結果が歪みます。Blocker 4: hook boundary manifest と validator の対象が Claude 側だけ
docs/dev/hook-boundaries.mdは.claude/settings.jsonhook topology の SSOT として書かれており、scripts/check_hook_boundaries.pyが manifest と.claude/settings.jsonを構造照合する設計です。 実装もDOCS_PATH = docs/dev/hook-boundaries.md、SETTINGS_PATH = .claude/settings.jsonに固定されています。一方 #1289 は
.codex/hooks.jsonと.claude/settings.jsonの両方を wire 対象にしています。Codex 側の topology はこの manifest checker の照合対象ではありません。さらに validator の classification vocabulary はblocker,telemetry,warning,mode_dependentに固定されています。 新たにfast_pathのような分類を足すなら validator 更新が必要ですが、#1289 の Allowed Paths にはscripts/check_hook_boundaries.pyが含まれていません。これは stop condition 相当です。対応案は二択です。
pretool_fastpath_classifierを既存 vocabulary のwarningまたはtelemetryとして表現し、authorization ではないことを明記する。scripts/check_hook_boundaries.pyを追加する。後者を選ぶなら、Codex hook manifest の構造照合も新規に入れないと片手落ちです。
Blocker 5: test plan の path が Issue 本文と実リポジトリで一致していない
#1289 の Allowed Paths は
scripts/python-test-plan.jsonを挙げていますが、リポジトリの実 SSOT は.github/ci/python-test-plan.jsonです。loader もDEFAULT_PLAN_PATH = .github/ci/python-test-plan.jsonに固定されています。 実際の plan は.github/ci/python-test-plan.jsonで、scripts/agent-guards/tests/は既に target に含まれています。つまり、新規テストを
scripts/agent-guards/tests/に置くだけなら個別登録は不要です。逆に、AC5 の「execution time within test budget」を安定化するために serial lane /parallel_excludeを触るなら、実際に触るべきファイルは.github/ci/python-test-plan.jsonであり、現 Issue の Allowed Paths 外です。pytest-xdist は
-nで複数 worker を使い、-n 0で xdist を無効化できます。(pytest-xdist) 現 plan は workers 4 /loadscope/parallel_exclude: []です。 wall-clock 性能を strict に測るテストを通常 lane に入れると flaky 化します。性能 AC は「subprocess を呼ばない純粋関数であること」「fixture 上の分類が O(tokens) であること」「統計的な wall-clock ではなく import 回数・subprocess 呼び出しゼロを検証すること」に寄せるべきです。Major:
secret_boundary_guardを fast-path で迂回してはいけないClaude 側の最初の
PreToolUseはsecret_boundary_guard.shで、matcher はBash|Read|Write|Edit|Grep|Glob|MultiEditです。 #1289 の例は Bash のgh issue view,git status,rgですが、Issue が「PreToolUse hook」と広く言っているため、実装者が Read/Grep/Glob まで fast-path 対象に拡張する危険があります。これは明確に禁止すべきです。read-only display は「Bash command の中でも token-level に display-only と証明できるもの」だけに限定し、Read/Grep/Glob は secret boundary の対象として残すべきです。Bash の
rgであっても、stdout に secret-like path/value が出る可能性はあります。少なくとも classifier の stdout/stderr は silent または bounded hash-only にすべきで、raw command、raw cwd、raw file path、raw transcript を出してはいけません。既存 manifest も blocker hook でno_raw_command,no_raw_secret_like_value,no_raw_transcriptを要求しています。Major: telemetry dedupe の schema が必要
「dedupe」と言うなら、dedupe key と出力契約が必要です。既存 manifest では
local_main_branch_guardとworktree_scope_guardは allow 時 stdout silent です。 一方、ci_test_performance_advisoryは Claude のhookSpecificOutput.additionalContext形式で advisory を出す warning hook です。#1289 の classifier は、次のような固定 schema を持つべきです。
重要なのは、
chain_actionを入れることです。これがないと、「分類した」だけなのか「後続 hook を省いた」のかがレビュー不能になります。Major: related PR #1295 から見るべき教訓
PR #1295 は #1284 の実装 PR で、controlled metadata executor lane の追加、raw
gh issue edit/commentblock 維持、stale-write/readback/postcondition を主張しています。 その PR コメントでは、検証レポートは PASS を出した一方、レビュー側は Allowed Paths gate failure と日本語 prose check failure を blocker としてREQUEST_CHANGESにしています。#1289 でも同じ事故が起きる可能性が高いです。Issue 本文の Allowed Paths と実 SSOT がズレており、manifest checker の対象外で Codex hook を触ろうとしているからです。実装前に Issue contract を修正しないと、実装 PR 側で「Scope Delta 開示済みだが gate fail_closed」という状態になります。
推奨する Issue #1289 の修正文
この Issue は、実装前に少なくとも次の文言へ絞るべきです。
最終レビュー結論
この Issue は Ready for implementation ではありません。
現状のままなら、実装 PR は「fast-path の名で既存 guard の split-brain を固定化する」か、「classifier を追加しただけで telemetry dedupe できていない」かのどちらかになりやすいです。
実装に進める最低条件は、次の 4 点です。
if化」のどれかに固定する。local_main_branch_guardとworktree_scope_guardの交差集合に限定する。scripts/python-test-plan.jsonという誤った Allowed Path を直し、必要なら.github/ci/python-test-plan.jsonとscripts/check_hook_boundaries.pyを Allowed Paths に追加する。squne121 commentedon Jul 2, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jul 2, 2026
Contract Review Result
squne121 commentedon Jul 2, 2026
Contract Review Result
前コメントの go(body_sha256: cf4c1dfb…)は Allowed Paths 訂正(worktree scope guard 実パス化・AC8 関連テストファイル追加)後の本文更新により supersede される。本コメントが最新の contract snapshot である。
squne121 commentedon Jul 2, 2026
実装完了: PR #1299(Draft, MERGEABLE, head 6e07458)
scripts/agent-guards/pretool_fastpath_classifier.py新規追加(readonly_display / exact_controlled_executor_authorized / mutation_or_unknown の 3 分類、独立 PreToolUse hook として非登録)local_main_branch_guard.pyStep 13.6 の controlled skill mutation executor allow を独立 reason_codecontrolled_skill_mutation_executorに分離(AC8)docs/dev/hook-boundaries.md/.codex/hooks.jsonに fast-path contract を追記、check_hook_boundaries.pyの検証対象に.codex/hooks.jsonを追加scripts/agent-guards/tests/test_pretool_fastpath_classifier.py新規追加(AC1〜AC8、must-fastpath / must-not-fastpath 両軸).claude/hooks/tests/test_local_main_branch_guard.pyの既存 assertion 1 箇所のみ新 reason_code に更新(Notes for Reviewer 記載範囲)検証: AC1〜AC8 VC すべて PASS、
scripts/agent-guards/tests/+.claude/hooks/tests/686 件無破壊、check_hook_boundaries.pydrift なし、pnpm typecheck/lint/test/build すべて green。Closes #1289
fix: Ruff F401 未使用 import を削除 (#1289)
fix: hook-boundaries.md 新設見出しに日本語併記を追加 (#1289)
fix: PR #1299 レビュー指摘の fix_delta を適用(Issue #1289)
fix: main merge後の reason_code 分離テストを #1298 の raw allowlist 一本化と整合させる …
squne121 commentedon Jul 3, 2026
Contract Review Result
Scope Delta:
tests/codex/test_local_main_branch_guard.pyを Allowed Paths に追加(#1298 マージ後の AC8 reason_code assertion 整合のため)。前コメント(body_sha256: 530298d5…)を supersede する。