Repository navigation
fix: raw issue metadata mutation を controlled executor に一本化 - #1298
Conversation
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-1298/ The preview will be removed when this PR is closed. |
TEST_VERDICT:
result: FAIL
mergeable: MERGEABLE
merge_state_status: BEHIND
branch_behind_main: true
baseline_only: false
verification_commands_pass: 2
verification_commands_fail: 9
verification_skipped_count: 0
runtime_ac_results:
- ac: AC1
command: 'rg -n "issue_edit_deprecated" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '一致なし'
- ac: AC2
command: 'rg -n "issue_create_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '一致なし'
- ac: AC3
command: 'rg -n "issue_comment_deprecated" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '一致なし'
- ac: AC4
command: 'rg -n "remote_ops_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '一致なし'
- ac: AC5
command: 'rg -n "must_block_raw_issue_" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '一致なし'
- ac: AC6
command: 'rg -n "must_allow_controlled_executor_metadata_commands" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '一致なし'
- ac: AC7
command: 'uv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '268 passed'
- ac: AC8
command: 'rg -n "issue_metadata_mutation_parity" tests/codex/test_local_main_branch_guard.py'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '一致なし'
- ac: AC9
command: 'rg -n "repair_hint_does_not_suggest_raw_issue_mutation" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '一致なし'
- ac: AC10
command: 'rg -n "post_merge_cleanup_does_not_use_raw_issue_body_or_comment_mutation" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '一致なし'
- ac: AC11
command: 'uv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py tests/codex/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '.github/ci/python-test-plan.json は .claude/hooks/tests/ を target に含み、tests/codex/test_local_main_branch_guard.py は secondary coverage で対象化されている' |
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BEHIND
branch_behind_main: true
baseline_only: false
verification_commands_pass: 11
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results:
- ac: VC1
command: 'rg -n "issue_edit_deprecated" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'matched at line 1582'
- ac: VC2
command: 'rg -n "issue_create_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'matched at line 1593'
- ac: VC3
command: 'rg -n "issue_comment_deprecated" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'matched at line 1893'
- ac: VC4
command: 'rg -n "remote_ops_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'matched at line 1907'
- ac: VC5
command: 'rg -n "must_block_raw_issue_" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'matched at line 1913'
- ac: VC6
command: 'rg -n "must_allow_controlled_executor_metadata_commands" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'matched at line 1924'
- ac: VC7
command: 'uv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '294 passed in 7.58s'
- ac: VC8
command: 'rg -n "issue_metadata_mutation_parity" tests/codex/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'matched at line 958'
- ac: VC9
command: 'rg -n "repair_hint_does_not_suggest_raw_issue_mutation" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'matched at line 1946'
- ac: VC10
command: 'rg -n "post_merge_cleanup_does_not_use_raw_issue_body_or_comment_mutation" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'matched at line 1962'
- ac: VC11
command: 'uv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py tests/codex/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '524 passed in 12.96s' |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=BEHIND
Evidence Check
- AC coverage: 差分は #1291 の raw issue edit/comment 廃止、Claude/Codex parity、repair hint 修正、post-merge-cleanup 静的監査を満たしています。
- Allowed Paths: 変更ファイル 3 件は contract snapshot の Allowed Paths 内です。
- CI Verification: ci_verdict_summary.py が head 8275ae8 で all_pass を返しました。
- 検証コマンド結果: 最新 TEST_VERDICT_MACHINE は 11/11 VC pass です。
Blockers
- なし
Non-blockers
- PR は current head でレビュー可能ですが、merge_ready になる前に branch update と PR body section 補完が必要です。
- Spark risk flags では parity、repair hint の非推奨経路排除、post-merge-cleanup 静的監査を確認しました。
LOOP_VERDICT_V2
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=BEHIND
Evidence Check
- AC coverage: 差分は #1291 の raw issue edit/comment 廃止、Claude/Codex parity、repair hint 修正、post-merge-cleanup 静的監査を満たしています。
- Allowed Paths: 変更ファイル 3 件は contract snapshot の Allowed Paths 内です。
- CI Verification: ci_verdict_summary.py が head 8275ae8 で all_pass を返しました。
- 検証コマンド結果: 最新 TEST_VERDICT_MACHINE は 11/11 VC pass です。
Blockers
- なし
Non-blockers
- PR は current head でレビュー可能ですが、merge_ready になる前に branch update と PR body section 補完が必要です。
- Spark risk flags では parity、repair hint の非推奨経路排除、post-merge-cleanup 静的監査を確認しました。
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "8275ae86c4b3e3a74297a6ab3c5fce7fcbef9857"
merge_ready: false
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "BEHIND"
blockers: []
required_auto_actions:
- kind: update_pr_body_hygiene
executor: implementation-worker
skill: open-pr.update_pr
blocking_merge_ready: true
mechanical: true
- kind: update_branch
executor: implementation-worker
skill: implement-issue.update_branch
blocking_merge_ready: true
mechanical: true
expected_head_sha: "8275ae86c4b3e3a74297a6ab3c5fce7fcbef9857"
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
TEST_VERDICT:
result: FAIL
mergeable: MERGEABLE
merge_state_status: BLOCKED
branch_behind_main: false
baseline_only: false
verification_commands_pass: 11
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results:
- ac: AC1
command: rg -n "issue_edit_deprecated" .claude/hooks/tests/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: matched at line 1582
- ac: AC2
command: rg -n "issue_create_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: matched at line 1593
- ac: AC3
command: rg -n "issue_comment_deprecated" .claude/hooks/tests/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: matched at line 1893
- ac: AC4
command: rg -n "remote_ops_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: matched at line 1907
- ac: AC5
command: rg -n "must_block_raw_issue_" .claude/hooks/tests/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: matched at line 1913
- ac: AC6
command: rg -n "must_allow_controlled_executor_metadata_commands" .claude/hooks/tests/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: matched at line 1924
- ac: AC7
command: uv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 294 passed in 7.98s
- ac: AC8
command: rg -n "issue_metadata_mutation_parity" tests/codex/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: matched at line 958
- ac: AC9
command: rg -n "repair_hint_does_not_suggest_raw_issue_mutation" .claude/hooks/tests/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: matched at line 1946
- ac: AC10
command: rg -n "post_merge_cleanup_does_not_use_raw_issue_body_or_comment_mutation" .claude/hooks/tests/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: matched at line 1962
- ac: AC11
command: uv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py tests/codex/test_local_main_branch_guard.py
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 524 passed in 13.87s |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=CLEAN
- Draft 状態そのものは blocker ではありません。merge_ready が false なのは PR 本文に
## 受け入れ条件の達成状況/## 検証コマンド結果/## Allowed Paths 遵守/## Runtime Verification Evidenceの review gate 必須セクションが未整備なためです。
Evidence Check
- AC / VC evidence: current head
8145a7819e9545de334c2032b701f8c97d7ffaf2に対するTEST_VERDICT_MACHINEで 11/11 PASS、skip/fallback なしを確認 - Allowed Paths:
allowed_paths_review_gate.pyがstatus: ok(changed files 3 件すべて contract snapshot 内) - CI Verification:
ci_verdict_summary.pyが current head でstatus: all_pass
Blockers
- なし
Non-blockers
- PR body hygiene の機械修正が未反映です。mergeability は CLEAN なので、本文を template shape に揃えれば merge_ready 判定へ進めます。
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "8145a7819e9545de334c2032b701f8c97d7ffaf2"
merge_ready: false
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions:
- kind: update_pr_body_hygiene
executor: implementation-worker
skill: open-pr.update_pr
blocking_merge_ready: true
mechanical: true
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=CLEAN
Evidence Check
- AC coverage: linked issue #1291 の AC/VC に対応する 11/11 PASS の current-head
TEST_VERDICT_MACHINEを確認しました。 - Allowed Paths: changed files 3 件は contract snapshot の Allowed Paths 内です。
- CI Verification: required checks 自体は current head で success ですが、merge_ready 判定は PR body hygiene 完了後の最終 current-head review に留めます。
- 検証コマンド結果: PR 本文
## Checksと current-headTEST_VERDICT_MACHINEが一致しています。
Blockers
- なし
Non-blockers
- live PR body には review gate 必須セクション
## 受け入れ条件の達成状況/## 検証コマンド結果/## Allowed Paths 遵守/## Runtime Verification Evidenceがまだ存在しないため、update_pr_body_hygieneが current head でも未解消です。
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "8145a7819e9545de334c2032b701f8c97d7ffaf2"
merge_ready: false
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions:
- kind: update_pr_body_hygiene
executor: implementation-worker
skill: open-pr.update_pr
blocking_merge_ready: true
mechanical: true
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=CLEAN
Evidence Check
- AC coverage: #1291 の scope どおり、raw
gh issue edit/ rawgh issue commentの廃止、controlled executor lane 維持、Claude/Codex parity、repair hint 修正、post-merge-cleanup 静的監査が差分に入っています。 - Allowed Paths:
allowed_paths_review_gate.pyを current head8145a7819e9545de334c2032b701f8c97d7ffaf2で再実行し、status: okを確認しました。 - 検証コマンド結果: reviewed head の一時 worktree
/tmp/loop-protocol-pr1298-reviewで #1291 の 11 VC を再実行し、294 passed in 7.96sと524 passed in 14.07sを含め 11/11 PASS を確認しました。 - PR body:
validate_pr_body.pyは current PR body に対してstatus: pass, errors: []でした。Closes #1291とSummary/Checks/Schema Change Applicability/Schema Consumer Inventory/Safety Claim Matrix/Notesも live body に存在します。 - CI Verification: current head の live required checks は success で、PR は non-draft かつ mergeable=
MERGEABLE, mergeStateStatus=CLEANです。
Blockers
- なし
Non-blockers
ci_verdict_summary.pyはPR Body Japanese Checkの skipped aggregation で exit 10 を返しましたが、current head の live required check 状態および validator pass と矛盾するため、ここでは merge blocker と扱いません。
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "8145a7819e9545de334c2032b701f8c97d7ffaf2"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
敵対的レビュー結果判定: REQUEST_CHANGES。 ただし、security-sensitive な hook allowlist 変更としては、テストゲートに false-green 余地があります。 とくに AC6 の「controlled executor 経由コマンドが allow される」検証が、実際に ローカル clone / pytest 再実行は、この実行環境の DNS 制約で GitHub host 解決ができず未実施です。以下は GitHub connector で取得したPR/Issue/差分/コメント/CI情報と、公式Web資料の照合に基づくレビューです。 参照範囲PR #1298 は open / non-draft / mergeable で、base は 関連として、#1284 / PR #1295 の controlled metadata executor 実装、#1291 の raw issue metadata mutation deprecate 契約、#1287 の edit-issue transaction、#1289 / PR #1299 の PreToolUse fast-path/reason-code 分離を確認しました。PR #1299 は #1291 完了を前提にしており、 良い点
#1284 で入った controlled metadata executor 側には Blocker 1: AC6 の controlled executor allow テストが false-green になり得る追加テスト 問題は、 つまり現状のAC6テストは、「controlled executor exact class として allow された」ことではなく、「何らかの理由でブロックされなかった」ことしか証明していません。これは hook allowlist の回帰テストとして弱いです。 要求修正:
result = eval_in_local_root(cmd, str(tmp_git_repo))
assert result["status"] == "allow"
assert result["local_parser_stage"] == "controlled_skill_mutation"
assert result["local_rule_id"] == "controlled_skill_mutation"現時点の reason code は High 1:
|
…uard-gh-mutation' into worktree-issue-1291-local-main-guard-gh-mutation
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: CLEAN
branch_behind_main: false
baseline_only: false
verification_commands_pass: 11
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results:
- ac: 1
command: 'rg -n "issue_edit_deprecated" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '1592: def test_issue_edit_deprecated(self, tmp_git_repo: Path, cmd: str):'
- ac: 2
command: 'rg -n "issue_create_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '1603: def test_issue_create_still_allowed(self, tmp_git_repo: Path, cmd: str):'
- ac: 3
command: 'rg -n "issue_comment_deprecated" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '1903: def test_issue_comment_deprecated(self, tmp_git_repo: Path, cmd: str):'
- ac: 4
command: 'rg -n "remote_ops_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '1917: def test_remote_ops_still_allowed(self, tmp_git_repo: Path, cmd: str):'
- ac: 5
command: 'rg -n "must_block_raw_issue_" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '1923: def test_must_block_raw_issue_metadata_commands_via_real_hook(self, tmp_git_repo: Path, cmd: str):'
- ac: 6
command: 'rg -n "must_allow_controlled_executor_metadata_commands" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '1934: def test_must_allow_controlled_executor_metadata_commands('
- ac: 7
command: 'uv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '314 passed in 10.72s'
- ac: 8
command: 'rg -n "issue_metadata_mutation_parity" tests/codex/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '968: def test_issue_metadata_mutation_parity(self, tmp_git_repo: Path, cmd: str):'
- ac: 9
command: 'rg -n "repair_hint_does_not_suggest_raw_issue_mutation" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '1961: def test_repair_hint_does_not_suggest_raw_issue_mutation(self, capsys):'
- ac: 10
command: 'rg -n "post_merge_cleanup_does_not_use_raw_issue_body_or_comment_mutation" .claude/hooks/tests/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '1977: def test_post_merge_cleanup_does_not_use_raw_issue_body_or_comment_mutation(self):'
- ac: 11
command: 'uv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py tests/codex/test_local_main_branch_guard.py'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '564 passed in 18.39s' |
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "6f27d5148871d0cf1e017942d99f8c975ba03f64"
merge_ready: true
mergeability:
mergeable: MERGEABLE
merge_state_status: CLEAN
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent…(Issue #1289) #1298 (raw issue metadata mutation の controlled executor 一本化) をマージした際、 #1289/#1299 で導入した controlled_skill_mutation_exec.py 専用の reason_code 分離(REASON_CONTROLLED_SKILL_MUTATION_EXECUTOR)を #1298 側の 新規テスト(TestIssue1291IssueMetadataMutationClaude / ...Codex の test_must_allow_controlled_executor_metadata_commands)が知らないまま REASON_DETERMINISTIC_CHECKER を期待していたため 3 件ずつ(Claude/Codex 両フレーバー) 失敗した。 期待値を REASON_CONTROLLED_SKILL_MUTATION_EXECUTOR に更新し、両者の変更が 共存するよう調整した。parser_stage/rule_id は変更なし (controlled_skill_mutation のまま)。pretool_fastpath_classifier は controlled_skill_mutation_exec.py / skill_runtime_exec.py の exact shape のみを判定対象とし、raw gh issue edit / gh issue comment はそもそも 一致し得ない構造のため、#1298 が追加した新しい raw allowlist コマンド形状 (--add-sub-issue 等)についても追加テストは不要と確認した。
… を追加 (#1289) (#1299) * 実装: PreToolUse hook に read-only / exact-executor fast-path classifier を追加 (#1289) pretool_fastpath_classifier.py を新規追加し、local_main_branch_guard と worktree_scope_guard の read-only 判定の交差集合、および controlled_skill_mutation_exec.py / skill_runtime_exec.py への exact 呼び出しの authorized 条件(command_id membership・repo binding・namespace shape・ stable policy_hash)を検証したうえで、read-only 操作の telemetry を bounded summary で dedupe する。独立 PreToolUse hook としては登録せず、 既存 guard から共有ライブラリとして import する(AC6)。 local_main_branch_guard.py の controlled skill mutation executor allow を REASON_DETERMINISTIC_CHECKER から独立 reason_code controlled_skill_mutation_executor に分離(AC8)。 hook boundary manifest(docs/dev/hook-boundaries.md・.codex/hooks.json)に fast-path の classification / fail policy / stdout-stderr contract を追記し、 check_hook_boundaries.py の検証対象に .codex/hooks.json での classifier 独立登録チェックを追加した。 Closes #1289 Co-Authored-By: Claude Fable 5 <[email protected]> * fix: Ruff F401 未使用 import を削除 (#1289) Co-Authored-By: Claude Fable 5 <[email protected]> * fix: hook-boundaries.md 新設見出しに日本語併記を追加 (#1289) PR Body Japanese Check の per-block 検査に対応。 Co-Authored-By: Claude Fable 5 <[email protected]> * fix: PR #1299 レビュー指摘の fix_delta を適用(Issue #1289) - Blocker 1: local_main_branch_guard.py の pretool_fastpath_classifier import を lazy import 化し、循環 import 順序に依存せず fastpath 有効化を保証 - Blocker 2: --input-file の path traversal / backslash / NUL / stdin marker / 絶対パス / ネストサブディレクトリを fail-closed で拒否し mutation_or_unknown に倒す - Blocker 3: readonly_display summary を固定ラベル語彙(git:status / gh:issue:view / search / file-display 等)から構成し、raw token 由来の クエリ・パス・secret-like 値の telemetry 漏洩を防止 - Major: .codex/hooks.json PreToolUse topology を固定期待値と fail-closed で 比較する check_codex_hooks_pretool_topology() を追加 Co-Authored-By: Claude Fable 5 <[email protected]> * fix: main merge後の reason_code 分離テストを #1298 の raw allowlist 一本化と整合させる (Issue #1289) #1298 (raw issue metadata mutation の controlled executor 一本化) をマージした際、 #1289/#1299 で導入した controlled_skill_mutation_exec.py 専用の reason_code 分離(REASON_CONTROLLED_SKILL_MUTATION_EXECUTOR)を #1298 側の 新規テスト(TestIssue1291IssueMetadataMutationClaude / ...Codex の test_must_allow_controlled_executor_metadata_commands)が知らないまま REASON_DETERMINISTIC_CHECKER を期待していたため 3 件ずつ(Claude/Codex 両フレーバー) 失敗した。 期待値を REASON_CONTROLLED_SKILL_MUTATION_EXECUTOR に更新し、両者の変更が 共存するよう調整した。parser_stage/rule_id は変更なし (controlled_skill_mutation のまま)。pretool_fastpath_classifier は controlled_skill_mutation_exec.py / skill_runtime_exec.py の exact shape のみを判定対象とし、raw gh issue edit / gh issue comment はそもそも 一致し得ない構造のため、#1298 が追加した新しい raw allowlist コマンド形状 (--add-sub-issue 等)についても追加テストは不要と確認した。 --------- Co-authored-by: Claude Fable 5 <[email protected]>
Summary
local_main_branch_guard.pyから rawgh issue edit/ rawgh issue commentの許可経路を外し、Issue metadata mutation を controlled executor lane に一本化しました。.claude/hooks/tests/test_local_main_branch_guard.pyとtests/codex/test_local_main_branch_guard.pyの parity を更新し、raw Issue mutation の must-block、controlled executor metadata command の must-allow、repair hint の非推奨経路排除を固定しました。Checks
rg -n "issue_edit_deprecated" .claude/hooks/tests/test_local_main_branch_guard.pyrg -n "issue_create_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.pyrg -n "issue_comment_deprecated" .claude/hooks/tests/test_local_main_branch_guard.pyrg -n "remote_ops_still_allowed" .claude/hooks/tests/test_local_main_branch_guard.pyrg -n "must_block_raw_issue_" .claude/hooks/tests/test_local_main_branch_guard.pyrg -n "must_allow_controlled_executor_metadata_commands" .claude/hooks/tests/test_local_main_branch_guard.pyuv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.pyrg -n "issue_metadata_mutation_parity" tests/codex/test_local_main_branch_guard.pyrg -n "repair_hint_does_not_suggest_raw_issue_mutation" .claude/hooks/tests/test_local_main_branch_guard.pyrg -n "post_merge_cleanup_does_not_use_raw_issue_body_or_comment_mutation" .claude/hooks/tests/test_local_main_branch_guard.pyuv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py tests/codex/test_local_main_branch_guard.pySchema Change Applicability
Schema Consumer Inventory
変更対象 schema:
N/Abefore/after 差分:
Consumer 列挙(rg コマンド例と結果):
Consumer 更新状況:
.claude/hooks/tests/test_local_main_branch_guard.pyscripts/agent-guards/local_main_branch_guard.pygh issue edit/ rawgh issue commentallowlist を縮退し controlled executor lane に一本化tests/codex/test_local_main_branch_guard.pyCompatibility Decision / 互換性判断
N/AN/AN/AN/Anot_schema_changeのため schema migration や consumer 互換性判断は不要です。Safety Claim Matrix
gh issue edit/ rawgh issue commentを許可しないuv run --locked pytest .claude/hooks/tests/test_local_main_branch_guard.py tests/codex/test_local_main_branch_guard.pyissue_body.update/issue_comment.publish/contract_snapshot.publishは引き続き allow されるtmp/<body>.mdを approved path として再案内しないrg -n "repair_hint_does_not_suggest_raw_issue_mutation" .claude/hooks/tests/test_local_main_branch_guard.pyNotes
scripts/agent-guards/local_main_branch_guard.py,.claude/hooks/tests/test_local_main_branch_guard.py,tests/codex/test_local_main_branch_guard.pyの 3 ファイルだけを変更対象として扱いました。