Repository navigation
fix: agent publish lane safety stop (#1402) - #1410
Conversation
Preview URLPreview removed (PR #1410 closed). |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability(マージ可否)
- mergeable=MERGEABLE, merge_state_status=CLEAN
- reviewed_head_sha=
25ab9ebe5a4a0a9168e3426d7f0dfbc4dd9f6359 - Draft は解除済みです。
Evidence Check(証跡確認)
- AC coverage: PR body の「受け入れ条件の達成状況」で AC1〜AC7 が根拠付きで完了しています。
- Allowed Paths:
allowed_paths_review_gate.pyはstatus=okで、変更 10 files は Issue #1402 の Allowed Paths 内です。 - CI Verification:
ci_verdict_summary.pyは expected head と PR head が一致し、status=all_passです。 - 検証コマンド結果: PR body の「検証コマンド結果」と CI の
python-test/PR Body Japanese Checkが head25ab9ebe5a4a0a9168e3426d7f0dfbc4dd9f6359で一致しています。 - Safety Claim Matrix: Not controlled は #1408 follow-up として materialize 済みで、今回 PR の bounded claim と整合しています。
Blockers(ブロッカー)
- なし
Non-blockers(非ブロッカー)
- #1408 は Codex PreToolUse の generic
remote_write_requires_approvalを publish lane 証跡で通過可能にする follow-up です。これは #1402 の docs_and_policy_only scope 外として扱います。
LOOP_VERDICT_V2(機械判定)
verdict: APPROVE
reviewed_head_sha: "25ab9ebe5a4a0a9168e3426d7f0dfbc4dd9f6359"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied:
- kind: update_pr_body_hygiene
result: applied
evidence: "PR body updated through open-pr update_pr.py wrapper"
- kind: mark_ready_for_review
result: applied
evidence: "PR draft state cleared"
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
changed_files_source: git_diff_name_status_find_renames_z
changed_files:
- ".claude/hooks/tests/test_worktree_scope_guard.py"
- ".claude/hooks/worktree_scope_guard.py"
- ".claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md"
- ".claude/skills/open-pr/SKILL.md"
- "docs/dev/agent-skill-boundaries.md"
- "docs/dev/hook-boundaries.md"
- "docs/dev/workflow.md"
- "scripts/agent-guards/git_mutation_command_policy.py"
- "scripts/agent-guards/hook_repair_hints.py"
- "scripts/agent-guards/tests/test_git_mutation_command_policy.py"
allowed_paths_gate_source: review_subagent
敵対的レビュー結果: REQUEST_CHANGESGitHub には投稿していません。PR #1410 は #1402 の契約は、branch publish が hook / approval 境界または remote head drift で止まった場合に、手動 remote 更新へ暗黙フォールバックせず、 Blocker 1: strict publish guard が missing / malformed context で fail-open する
修正要求: publish command と判定された時点で、strict context は必須にしてください。欠落・partial・malformed は Blocker 2:
|
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
- reviewed_head_sha:
4ae91f5388d8d3f4885058c8b79c10241d112d5c - linked issue:
#1402(contract snapshotbody_sha256=sha256:695ed768b597bf753eddf7ab320773ecf26584d1e4b6741213adc4ccb72e084f/status: go) - CI:
ci_verdict_summary.py --expected-head-sha 4ae91f5388d8d3f4885058c8b79c10241d112d5cはstatus=all_pass - mergeability:
mergeable=MERGEABLE,mergeStateStatus=CLEAN,draft=false - Allowed Paths: review gate evidence は
status=ok,changed_files_source=git_diff_name_status_find_renames_z - previous REQUEST_CHANGES comment 4934471714 の Blocker 1-5 は最新 diff で解消済み
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "4ae91f5388d8d3f4885058c8b79c10241d112d5c"
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
changed_files_source: git_diff_name_status_find_renames_z
changed_files:
- ".claude/hooks/tests/test_worktree_scope_guard.py"
- ".claude/hooks/worktree_scope_guard.py"
- ".claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md"
- ".claude/skills/open-pr/SKILL.md"
- "docs/dev/agent-skill-boundaries.md"
- "docs/dev/hook-boundaries.md"
- "docs/dev/workflow.md"
- "scripts/agent-guards/git_mutation_command_policy.py"
- "scripts/agent-guards/hook_repair_hints.py"
- "scripts/agent-guards/tests/test_git_mutation_command_policy.py"
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
- reviewed_head_sha=
4ae91f5388d8d3f4885058c8b79c10241d112d5c - Draft は解除済みです。
Evidence Check
- AC coverage: PR body の「受け入れ条件の達成状況」で AC1 から AC7 が完了し、指定レビューコメントの Blocker 1 から 5 に対応しています。
- Allowed Paths:
allowed_paths_review_gate.pyはstatus=ok、changed_files_source=git_diff_name_status_find_renames_zで、変更 10 files は Issue #1402 の Allowed Paths 内です。 - CI Verification:
ci_verdict_summary.pyは expected head と PR head が一致し、status=all_passです。required wait helper もstatus=passedです。 - 検証コマンド結果:
uv run pytest scripts/agent-guards/tests/test_git_mutation_command_policy.py .claude/hooks/tests/test_worktree_scope_guard.pyは228 passed、ruff はAll checks passed!、py_compile は exit 0 です。 - PR body hygiene: PR body の
PR headは current head4ae91f5388d8d3f4885058c8b79c10241d112d5cと一致しています。
Blockers
- なし
Non-blockers
- #1408 は Codex PreToolUse の generic
remote_write_requires_approvalを publish lane 証跡で通過可能にする follow-up です。これは #1402 の docs_and_policy scope 外であり、Safety Claim Matrix でも not controlled として限定されています。
LOOP_VERDICT_V2
LOOP_VERDICT_V2:
verdict: APPROVE
reviewed_head_sha: "4ae91f5388d8d3f4885058c8b79c10241d112d5c"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied:
- kind: update_pr_body_hygiene
result: applied
evidence: "PR body updated through open-pr update_pr.py wrapper for current head"
- kind: update_branch
result: applied
evidence: "branch merged origin/main and human pushed 4ae91f5388d8d3f4885058c8b79c10241d112d5c"
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
changed_files_source: git_diff_name_status_find_renames_z
changed_files:
- ".claude/hooks/tests/test_worktree_scope_guard.py"
- ".claude/hooks/worktree_scope_guard.py"
- ".claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md"
- ".claude/skills/open-pr/SKILL.md"
- "docs/dev/agent-skill-boundaries.md"
- "docs/dev/hook-boundaries.md"
- "docs/dev/workflow.md"
- "scripts/agent-guards/git_mutation_command_policy.py"
- "scripts/agent-guards/hook_repair_hints.py"
- "scripts/agent-guards/tests/test_git_mutation_command_policy.py"
allowed_paths_gate_source: review_subagent
Summary
概要です。
#1402 の publish failure lane を docs / hook policy / repair hint / tests で揃えました。
boundary_layerとreason_codeを分離し、expected/current/local/verified/declared head、allowed paths gate、remote readback source、decision input completeness を比較する bounded publish lane にしました。追加対応では、指定レビューコメントの Blocker 1〜5 に合わせて strict publish context を必須化しました。publish command 判定時に
LOOP_PUBLISH_*が欠落・partial・malformed の場合は legacy allow に落とさず、publish_guard_context_missing/publish_guard_context_invalidのPUBLISH_SAFETY_STOP_REPORT_V1に倒します。remote head は hook 内の stale な remote-tracking ref から暗黙取得せず、ls_remotesource では hook 側で live readback を実行し、fetch_then_show_refsource では同一 decision cycle の fetch 証跡付き入力として扱います。受け入れ条件の達成状況
受け入れ条件の対応状況です。
publish_failure_reasonはboundary_layerとreason_codeを分離し、docs / tests / hook stderr の machine-readable block で一致するようにしました。impl-review-loopは publish failure 後の live readback、head comparison、allowed publish lane decision、post-publish readback、safety stop report の順序を明記しました。remote == origin、active branch / target branch、expected/current remote head、local/declared/verified head、allowed paths gate、remote readback source、decision input completeness の全条件が揃う場合だけallowed_commandを出すようにしました。remote_fast_forward_by_same_scope/non_fast_forward_remote_rewrite/remote_head_scope_contaminationを分けてPUBLISH_SAFETY_STOP_REPORT_V1に倒すようにしました。open-pr側の記述は実在するSKILL.md/open_pr.py正本へ揃え、branch publish failure は impl-review-loop の safety lane に戻すと明記しました。Checks
検証結果です。以下を実行しました。
uv run pytest scripts/agent-guards/tests/test_git_mutation_command_policy.py .claude/hooks/tests/test_worktree_scope_guard.pyを実行しました。uv run --locked ruff check --select E,F --ignore E402 .claude/scripts scripts schemas .claude/skillsを実行しました。uv run --locked python3 -m py_compile scripts/agent-guards/git_mutation_command_policy.py scripts/agent-guards/hook_repair_hints.py .claude/hooks/worktree_scope_guard.pyを実行しました。rg -n "publish_guard_context_missing|publish_guard_context_invalid|allowed_paths_gate_not_ok" scripts/agent-guards .claude/hooks/tests docs/dev .claude/skillsを実行しました。rg -n "remote_readback_source|decision_inputs_complete" scripts/agent-guards .claude/hooks/tests docs/dev .claude/skillsを実行しました。rg -n "mixed_head_contamination|unsafe_wrapper_route|rtk git <publish>" .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md docs/dev/hook-boundaries.md docs/dev/agent-skill-boundaries.md docs/dev/workflow.md .claude/skills/open-pr/SKILL.md scripts/agent-guards .claude/hooks/testsを実行し、旧語彙が対象範囲に残っていないことを確認しました。検証コマンド結果
検証コマンドの実行結果です。
uv run pytest scripts/agent-guards/tests/test_git_mutation_command_policy.py .claude/hooks/tests/test_worktree_scope_guard.pyは228 passedでした。uv run --locked ruff check --select E,F --ignore E402 .claude/scripts scripts schemas .claude/skillsはAll checks passed!でした。uv run --locked python3 -m py_compile ...は exit 0 でした。4ae91f5388d8d3f4885058c8b79c10241d112d5cです。Allowed Paths 遵守
Allowed Paths の遵守状況です。
.claude/hooks/tests/test_worktree_scope_guard.py、.claude/hooks/worktree_scope_guard.py、.claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md、.claude/skills/open-pr/SKILL.md、docs/dev/agent-skill-boundaries.md、docs/dev/hook-boundaries.md、docs/dev/workflow.md、scripts/agent-guards/git_mutation_command_policy.py、scripts/agent-guards/hook_repair_hints.py、scripts/agent-guards/tests/test_git_mutation_command_policy.pyです。Runtime Verification Evidence(実行時検証証跡)
runtime verification の証跡です。
ls_remotelive readback / ancestry-based drift / safety stop cases を検証しました。remote_readback_source、decision_inputs_complete、PUBLISH_LANE_DECISION_V1、PUBLISH_SAFETY_STOP_REPORT_V1、publish_guard_context_missing、allowed_paths_gate_not_okの記述整合を確認しました。pr_number、declared_publish_head、remote_readback_source、decision_inputs_completeを出力します。Schema Change Applicability
スキーマ変更の該当性です。
Schema Consumer Inventory
スキーマ消費者一覧です。
N/A。
decision: not_schema_changeのため、schema consumer の before / after inventory は不要です。PR body validator の必須 section として明示しています。Safety Claim Matrix
安全主張の一覧です。
CI Test Performance Decision(CI テスト性能判断)
CI テスト性能判断です。
Notes
補足です。
remote_write_requires_approvalを publish lane 証跡で通過可能にするための追加実装です。