Repository navigation
fix(codex): allow readonly bash pipelines (#1069) - #1072
Conversation
Add a narrow readonly pipeline classifier for local root Bash guard checks and align Codex hook validator and regression tests with the current Bash hook inventory and no-output behavior.
Preview URLPreview removed (PR #1072 closed). |
|
TEST_VERDICT result=FAIL pass=2 fail=9 skip=0 mergeable=MERGEABLE merge_state_status=BEHIND branch_behind_main=true |
| TEST_VERDICT result=FAIL mergeable=MERGEABLE merge_state_status=BEHIND branch_behind_main=true pass=2 fail=9 skip=0 |
|
TEST_VERDICT_MACHINE v1 TEST_VERDICT result=FAIL mergeable=MERGEABLE merge_state_status=BEHIND branch_behind_main=true pass=11 fail=1 skip=0 |
| TEST_VERDICT result=FAIL mergeable=MERGEABLE merge_state_status=BEHIND branch_behind_main=true pass=11 fail=1 skip=0 |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=BEHIND
Evidence Check
- contract snapshot: #1069 body_sha256=sha256:d5d297069968e4dbdb98ac762687e968a4e49ed5458ba57644bf44402b19010c (
#issuecomment-4760581418) と linked issue body が一致 - Allowed Paths: 変更 6 file は issue #1069 の Allowed Paths 内
- CI Verification:
ci_verdict_summary.pyon043c456a6e7e23ffbbf871909ce20a7776854057=all_pass - 検証コマンド結果: reviewer rerun
uv run pytest tests/codex/test_local_main_branch_guard.py tests/session_recording/codex/test_hook_adapter.py -qin.claude/worktrees/issue-1069-readonly-bash-hook-noise-guard=>58 passed
Blockers
- なし
Non-blockers
- 既存
TEST_VERDICT_MACHINE v1FAIL コメントは current head の CI / reviewer rerun と整合しないため、stale/inconclusive な補助証跡として扱いました merge_state_status=BEHINDのため update-branch 完了までmerge_readyは false
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: 043c456a6e7e23ffbbf871909ce20a7776854057
merge_ready: false
mergeability:
mergeable: MERGEABLE
merge_state_status: BEHIND
blockers: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
required_auto_actions:
- kind: update_branch
executor: implementation-worker
skill: implement-issue.update_branch
blocking_merge_ready: true
mechanical: true
expected_head_sha: 043c456a6e7e23ffbbf871909ce20a7776854057
auto_fix_applied: []
follow_up_issue_requests: []
TEST_VERDICT:
result: FAIL
mergeable: MERGEABLE
merge_state_status: BLOCKED
branch_behind_main: false
baseline_only: false
verification_commands_pass: 11
verification_commands_fail: 1
verification_skipped_count: 0
runtime_ac_results:
- ac: AC1
command: "rg -q \"readonly pipeline\" 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"
- ac: AC2
command: "rg -q \"test_readonly_pipeline_rg_head\" 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"
- ac: AC3
command: "rg -q \"test_readonly_pipeline_rejects_xargs_rm\" 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"
- ac: AC4
command: "rg -q \"unparseable_branch_mutation\" 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"
- ac: AC5
command: "rg -q \"stdout empty\" tests/session_recording/codex/test_hook_adapter.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC6
command: "rg -q \"secret_boundary_violation\" tests/session_recording/codex/test_hook_adapter.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC7
command: "rg -q \"local_main_branch_guard.sh\" scripts/session-recording/validate-codex-hooks.mjs"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC8
command: "rg -q \"test_hook_config_positive_fixture\" tests/session_recording/codex/test_hook_adapter.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC9
command: "uv run pytest tests/codex/test_local_main_branch_guard.py tests/session_recording/codex/test_hook_adapter.py -q"
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "5 failed / 53 passed; failures include missing ajv and ajv-formats devDependencies plus manifest assertions"
- ac: AC10
command: "rg -q '\"Summary\"' .claude/skills/create-issue/scripts/prose_boundary_policy.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC11
command: "rg -q 'Schema Consumer Inventory' .claude/skills/create-issue/scripts/tests/test_heading_policy.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC12
command: "gh pr view 1072 --json url"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "https://github.com/squne121/loop-protocol/pull/1072" |
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, merge_state_status=CLEAN
Evidence Check
- contract snapshot: linked issue #1069 の snapshot (
#issuecomment-4760581418) を基準に照合し、現 PR の変更 6 files は Allowed Paths 内です - CI Verification:
ci_verdict_summary.pyon86eb8ad2b01e44143f400770ee5049e3e2570d40=all_pass - 最新 TEST_VERDICT 群:
#issuecomment-4760671837,#issuecomment-4760689596,#issuecomment-4760711749はいずれも FAIL で、最新 machine verdict は AC9 fail を記録したままです
Blockers
TEST_VERDICT_MACHINEがこの review cycle でまだ PASS に更新されていません。PR_REVIEW_JUDGE_VC_EVIDENCE_POLICY では machine verdict が最優先のため、current head86eb8ad2b01e44143f400770ee5049e3e2570d40に対する fresh PASS 証跡が出るまで fail-closed で止めます
Non-blockers
merge_state_status=CLEANかつ CI は全 pass ですが、primary machine evidence の競合が未解消です
LOOP_VERDICT_V2
verdict: REQUEST_CHANGES
reviewed_head_sha: "86eb8ad2b01e44143f400770ee5049e3e2570d40"
merge_ready: false
mergeability:
mergeable: MERGEABLE
merge_state_status: CLEAN
blockers:
- "latest TEST_VERDICT_MACHINE evidence remains FAIL in #issuecomment-4760711749; post a fresh PASS TEST_VERDICT_MACHINE for head 86eb8ad2b01e44143f400770ee5049e3e2570d40 or reconcile the failing AC9 evidence before approval"
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
LOOP_VERDICT_V2verdict: REQUEST_CHANGES
reviewed_head_sha: "86eb8ad2b01e44143f400770ee5049e3e2570d40"
merge_ready: false
mergeability:
mergeable: MERGEABLE
merge_state_status: CLEAN
blockers:
- "latest TEST_VERDICT_MACHINE evidence remains FAIL in #issuecomment-4760711749; AC9 is still recorded as failing and no fresh PASS machine verdict has been posted for head 86eb8ad2b01e44143f400770ee5049e3e2570d40"
- "latest ci_verdict_summary.py run for head 86eb8ad2b01e44143f400770ee5049e3e2570d40 exited failed with failed_checks=[PR Body Japanese Check] after the retrospective workflow reran"
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
|
TEST_VERDICT:
result: PARTIAL
mergeable: MERGEABLE
merge_state_status: CLEAN
branch_behind_main: false
baseline_only: false
verification_commands_pass: 10
verification_commands_fail: 0
verification_skipped_count: 2
runtime_ac_results:
- ac: AC1
command: "git grep -n \"readonly pipeline\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- 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"
- ac: AC2
command: "git grep -n \"test_readonly_pipeline_rg_head\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- 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"
- ac: AC3
command: "git grep -n \"test_readonly_pipeline_rejects_xargs_rm\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- 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"
- ac: AC4
command: "git grep -n \"unparseable_branch_mutation\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- 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"
- ac: AC5
command: "git grep -n \"stdout empty\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- tests/session_recording/codex/test_hook_adapter.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC6
command: "git grep -n \"secret_boundary_violation\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- tests/session_recording/codex/test_hook_adapter.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC7
command: "git grep -n \"local_main_branch_guard.sh\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- scripts/session-recording/validate-codex-hooks.mjs"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC8
command: "git grep -n \"test_hook_config_positive_fixture\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- tests/session_recording/codex/test_hook_adapter.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC9
command: "uv run pytest tests/codex/test_local_main_branch_guard.py tests/session_recording/codex/test_hook_adapter.py -q"
exit_code: 77
status: skip
fallback_detected: false
artifact_present: not_required
human_review_required: true
stop_condition_triggered: false
notes: "preflight_scope=pr_review_only; deferred_reason=VC marked pr_review_only; verification deferred to PR review"
- ac: AC10
command: "git grep -n \"Summary\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- .claude/skills/create-issue/scripts/prose_boundary_policy.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC11
command: "git grep -n \"Schema Consumer Inventory\" 86eb8ad2b01e44143f400770ee5049e3e2570d40 -- .claude/skills/create-issue/scripts/tests/test_heading_policy.py"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "matched"
- ac: AC12
command: "gh pr view 1072 --json url"
exit_code: 77
status: skip
fallback_detected: false
artifact_present: not_required
human_review_required: true
stop_condition_triggered: false
notes: "preflight_scope=pr_review_only; deferred_reason=VC marked pr_review_only; verification deferred to PR review" |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=CLEAN
Evidence Check
- contract snapshot: linked issue #1069 の
#issuecomment-4760581418を基準に照合 - Allowed Paths:
gh pr diff --name-onlyの変更 6 files は issue #1069 の Allowed Paths 内 - CI Verification: GitHub required checks は head
86eb8ad2b01e44143f400770ee5049e3e2570d40で green - 検証コマンド結果: 最新
TEST_VERDICT_MACHINE(#issuecomment-4760738024) で AC1-8/10-11 pass、deferred の AC9 は reviewer が reviewed head 専用 worktree でuv run pytest tests/codex/test_local_main_branch_guard.py tests/session_recording/codex/test_hook_adapter.py -qを再実行して58 passed、AC12 はgh pr view 1072 --json url,headRefOid,mergeable,mergeStateStatusで確認
Blockers
- なし
Non-blockers
#issuecomment-4760738024はpr_review_only/deferredの AC9/AC12 を skip として保持していますが、closing review で両 AC を fresh に再確認済みですci_verdict_summary.pyの earlier fail 判定は retrospective Japanese check の skipped 重複を拾った補助判定で、現在の required checks green / mergeability CLEAN とは整合しないため merge blocker としては扱いません
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "86eb8ad2b01e44143f400770ee5049e3e2570d40"
merge_ready: true
mergeability:
mergeable: MERGEABLE
merge_state_status: CLEAN
blockers: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
Verdict: REQUEST_CHANGESPR #1072 の実装方針は概ね妥当です。 ただし、このまま merge するには 証跡・PR本文・fail-closed テスト境界がまだ弱い です。 Blockers1. PR body の Allowed Paths が実変更と一致していないPR body の Allowed Paths は 4 ファイルだけですが、実際の PR は 6 ファイル変更です。特に #1069 自体は heading policy 系の変更も In Scope / Allowed Paths に含めています。したがってコード変更は Issue 範囲内ですが、PR body が不正確です。これは review automation / human review の trust を落とすため、merge 前に body を修正してください。 2. TEST_VERDICT / review comment の証跡が head SHA と食い違っている途中の review は 一方で、current head の GitHub Actions は つまり実装が壊れているというより、PR thread 上の machine verdict が stale / contradictory です。merge 前に current head 3. pipeline classifier の fail-closed 境界テストがまだ足りない実装は ただし 追加で最低限、次を regression に入れてください。 Python Non-blocking but should be fixed4.
|
Summary
rg ... | head ...やgit status --short | head ...を許可するようにしました。.codex/hooks.jsonの Bash hook inventory に合わせ、local_main_branch_guard.shを含む exact shape を検証するように更新しました。PreToolUse/PermissionRequestが stdout 空かつ manifest 非生成のまま維持されることと、allow/deny matrix を回帰テストで固定しました。Checks
uv run pytest tests/codex/test_local_main_branch_guard.py tests/session_recording/codex/test_hook_adapter.py -qSchema Change Applicability
Schema Consumer Inventory
not_schema_changeのため追加の consumer 更新はありません。Safety Claim Matrix
tests/codex/test_local_main_branch_guard.pyの positive / negative matrixtests/session_recording/codex/test_hook_adapter.py::test_hook_config_positive_fixturetests/session_recording/codex/test_hook_adapter.pyの read-only regressionNotes
scripts/agent-guards/local_main_branch_guard.pyscripts/session-recording/validate-codex-hooks.mjstests/codex/test_local_main_branch_guard.pytests/session_recording/codex/test_hook_adapter.py