Repository navigation
実装: review/refinementのreplay・envelope・custom publisherをbounded loopへ置換する - #1875
Conversation
Closes #1873 Part of #1860 issue-refinement-loop と impl-review-loop の通常経路から、replay arbitration(reviewer_claim_replay.py 系)、parent binding digest (parent_replay_binding.py)、review envelope V2 (emit_parent_review_envelope_v2.py)、永続 state store (build_loop_state.py / build_refinement_phase_state.py / save_loop_state_before_compaction.sh)、専用 termination/review publisher(termination_report.publish / pr_review.publish command id、 publish_termination_report.py / render_termination_report.py / pr_review_marker_archive_exec.py)を撤去し、native subagent の bounded loop(verdict / reviewed_head_sha または reviewed_body_sha256 / blockers / optional warnings の最小 convention)へ置換した。 - impl-review-loop: route_loop_verdict_v2.py を、reviewer 自己申告の merge_ready/required_auto_actions/allowed_paths_gate に依存しない 設計へ再設計。mergeability hard-stop 不変条件(CONFLICTING/DIRTY のみ hard stop、#1869/PR#1871 で確立)は完全に維持。 - publisher 撤去: controlled_skill_mutation_policy.py / controlled_skill_mutation_exec.py から termination_report.publish / pr_review.publish の command id 固有 branch のみ除去(他 7 command id と共通機構は無変更)。最終 summary は通常の `gh issue comment --body-file` / `gh pr comment --body-file` 経路へ移行。 - isolation-worktree issue comment bridge(Issue #1633、 issue_comment.publish 用)を publish_termination_report.py から isolation_issue_comment_bridge.py へ分離抽出し、無関係な保護対象 機能を保持したまま termination publisher 部分のみ削除。 - ANCHOR_SCOPE_REFRAME_V1(#1869 所有)が参照する anchor_comment JSON Schema フラグメントを loop_state.schema.json から anchor_comment.schema.json へ抽出し、validation ロジック自体は 無変更のまま schema ファイル本体を削除可能にした。 - decide_next_loop_action.py を verdict/iteration/max_iterations(3) のみに依存する bounded loop 判断へ縮小。 - .claude/agents/issue-reviewer.md・pr-reviewer.md(.codex/agents/ mirror 含む)を最小 convention の read-only reviewer 定義へ整合。 - 新規 schema・digest・receipt・publisher・state machine は追加せず、 schemas/catalog.yaml・docs/dev/schema-governance.md 等の該当行を 削除して同期。 Verification(current head, worktree issue-1873-bounded-review-loops): - uv run --locked pytest .claude/skills/issue-refinement-loop/ -q → 1096 passed - uv run --locked pytest .claude/skills/impl-review-loop/ -q → 470 passed, 2 deselected, 2 xfailed - uv run --locked pytest .claude/skills/pr-review-judge/ -q → 414 passed - uv run --locked pytest scripts/agent-guards/tests/ -q → 1110 passed, 1 skipped, 1 deselected - uv run --locked pytest tests/agent_guards/ tests/test_agent_parity.py → 291 + 49 passed - uv run --locked pytest .claude/hooks/tests/ tests/test_hook_boundaries_doc.py → 899 + 33 passed - uv run --locked ruff check(変更ファイルに新規違反なし。repo-wide 183件は本PR対象外ファイルの既存違反で origin/main と同一) - pnpm typecheck / pnpm lint / pnpm test(1794 passed)/ pnpm build → すべて成功 - git diff --check → clean Co-Authored-By: Claude Sonnet 5 <[email protected]>
…ounded-review-loops # Conflicts: # .claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.py # .claude/skills/impl-review-loop/tests/fixtures/step5_routing_consumer/negative_behind_branch_behind_main_key_absent.yml # .claude/skills/impl-review-loop/tests/fixtures/step5_routing_consumer/negative_behind_missing_branch_behind_main.yml # .claude/skills/impl-review-loop/tests/fixtures/step5_routing_consumer/test_route_loop_verdict_v2.py # .claude/skills/impl-review-loop/tests/test_handoff_pr_hygiene_regression.py # .claude/skills/impl-review-loop/tests/test_termination_gate.py # .claude/skills/impl-review-loop/tests/test_v2_routing_boundary_regression.py # docs/dev/agent-skill-boundaries.md
Preview URLPreview removed (PR #1875 closed). |
…/issue_dependency.remove専用テストカバレッジを復元する 削除された汎用executor機構テストをissue_comment.publish代表値で再構築し(レガシーな termination_report.publish専用API廃止に伴い低レベル欠落フィクスチャのみ補完)、 issue_dependency.remove系15クラスをそのまま復元。pyproject.tomlにE402 per-file-ignore を再登録。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
…EWED_BODY_SHA256を追加 (#1873) decide.runエントリから撤去済みphase-state gate機能への参照(--phase-state-file)を削除し、 実際のdecide_next_loop_action.pyのargparse定義と一致することをregressionテストで検証する。 compact_review_result.pyのcompact stdoutにREVIEWED_BODY_SHA256行を追加し、 Issue #1873のOutcome規定に沿うfield名でreviewed live bodyのsha256を露出する。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
test_scope_signal_guard_termination.py はrender_termination_report.py 撤去に伴いE402を誘発するimportが既に無くなっており、 scripts/ci/verify_ruff_configuration.pyのisolated E402 probeがfail していた(PR #1875 レビュー指摘)。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
…1873) changed *.md の per-block 日本語比率不足5件(見出しブロックの日本語比率不足4件、 verdict-output-template.mdのnested code fence起因の未パース1件)を解消し、 .codex/agents/pr-reviewer.toml の developer_instructions に 「structured output」要件文言を明記してscripts/check-codex-agents.mjsの 必須assertionを満たすようにした。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bounded Implementation Review Loop 結果(iteration 2、完了)
iteration 1(head
|
判定現時点では PR #1875 は現在も Draft・未マージで、GitHub 上の これは単純な競合マーカー除去ではありません。次の三つを意味的に統合する必要があります。
現在の PR ブランチは、このうち 2 と 3 を一部後退させています。 敵対的レビュー結果P0-1: 削除済みの |
Merge origin/main into worktree-issue-1873-bounded-review-loops and semantically integrate Issue #1873's bounded review-loop design with the contracts established by merged PR #1870 (#1856: route_loop_verdict_v2() drops test_verdict) and merged PR #1871 (#1869: only actual Git conflict is hard stop). - route_loop_verdict_v2.py: two-argument API only (reviewer_verdict, live_mergeability); actual conflict (mergeable==CONFLICTING or merge_state_status==DIRTY) is evaluated before reviewer verdict dispatch; BLOCKED/UNSTABLE/DRAFT/UNKNOWN are non-conflict fail_closed outcomes deferred to the current-head CI evaluator, not automatic human escalation; removed the now-zero-consumer comment-parser/CLI. - step-5-mergeability-handling.md / step-5-feedback-and-termination.md / SKILL.md: rebuilt from the #1873 contract rather than conflict-marker splicing; ported #1871's human_review_required-is-not-auto-stop section and product-spec-preflight advisory demotion. - Allowed Paths gate (pr-reviewer.md/.toml, pr-review-judge SKILL.md, allowed-paths-gate.md, allowed_paths_review_gate.py): live linked Issue body is canonical; contract snapshot/fingerprint drift is advisory-only (warnings[]), no longer merge-blocking. - Regression tests migrated to the two-input API; fixtures reconciled with the new route names/semantics; dangling test_verdict= call sites and stale doc wording fixed.
- docs/dev/agent-skill-boundaries.md: fix stale BEHIND-authority reference (LOOP_VERDICT_V2.mergeability -> live_mergeability), add HUMAN_REVIEW_REQUIRED to the verdict enum shown in the routing_allowed_fields table. - route_loop_verdict_v2.py: repoint the docstring's dangling pointer to a docs/dev/workflow.md section that does not exist, to the actual pr-review-judge references that document the minimal convention. - step-4-pr-review.md: fix stale line claiming the pr-reviewer SubAgent posts the verdict comment (it cannot -- no Write/Edit tools); fix a leftover LOOP_VERDICT_V2.blockers reference to reviewer_verdict.blockers[]. - impl-review-loop/SKILL.md: remove stale_snapshot from the gate status column (it is now warnings[]-only, per allowed-paths-gate.md). - implementation-worker.md: reframe the action-kind dispatch table heading away from the removed required_auto_actions reviewer field. - verdict-output-template.md: add HUMAN_REVIEW_REQUIRED to the example heading. Also updated Issue #1873's Allowed Paths / Current Validated Scope sections (with readback) per its own "consumer discovered during implementation" procedure, to cover the additional files touched while reconciling the Allowed Paths gate advisory-fingerprint change with #1860/#1871.
- step-5-feedback-and-termination.md: worker_status_stale_verdict now routes to re-review (not human_escalation), reconciling a contradiction with step-5-mergeability-handling.md's UPDATE_BRANCH_RESULT_V1.stale_verdict row and route_loop_verdict_v2()'s own route_stale_head_rereview semantics. Staleness alone must never be a human-escalation reason. - pr-reviewer.md: removed a dangling reference to the removed "controlled review publisher" mechanism. - Deleted .claude/skills/pr-review-judge/scripts/tests/test_loop_verdict_v2.py (explicitly authorized for deletion by Issue #1873's own Allowed Paths): a self-contained legacy #637-era LOOP_VERDICT_V2 schema test with zero production-code imports that pinned removed reviewer self-report fields (merge_ready/required_auto_actions/mergeability) as required SKILL.md content. - test_handoff_pr_hygiene_regression.py / test_termination_gate.py: two doc-presence tests were asserting the removed field names (required_auto_actions / merge_ready) as things step-5-mergeability- handling.md must reference; flipped to assert the actual #1873 replacement contracts (route_to_update_branch synthesis, live_mergeability routing). - issue-refinement-loop/SKILL.md: fixed a reference-map row pointing at the deleted schemas/loop_state.schema.json to the anchor_comment schema it was extracted into. Also updated Issue #1873's Allowed Paths (with readback) to cover three additional files identified by iteration-2 review: isolation_issue_comment_bridge.py, run_refinement_preflight.py, test_pretool_fastpath_classifier.py. Verified programmatically that all 173 files in `git diff origin/main...HEAD` are now covered by the live Allowed Paths list.
impl-review-loop bounded audit verdict: APPROVEreviewed_head_sha: このコメントは bounded-loop audit verdict であり、GitHub branch protection の formal approving review ではない( Conflict Resolution Summary
追加修正(non-conflict files)
live Allowed Paths canonicalityIssue #1873 の Allowed Paths を実装中に判明した追加 consumer( Tests(current head)Live GitHub state(current head)
独立レビュー結果(3 iteration、bounded loop)
残存 warning(人間確認推奨、blocking ではない)
確認事項
人間の最終マージ判断を待つ。 |
…・strict JSON 検証を canonical validator に統一する PR #2135 human REQUEST_CHANGES (iteration 3, comment #2135 (comment)) が指摘した production-wiring gap を修正する。 - P0-1: run_root_review_pipeline.py の produce コマンドが compact_review_result.py の純粋関数 + hardened _atomic_write() を直接呼び、 ISSUE_REVIEW_RESULT_COMPACT_V1 の生成・永続化まで単一 producer として完結 させる。issue-reviewer agent は compact_result.stdout_lines を read-only input として受け取り、そのまま relay するだけになり、 compact_review_result.py を自ら実行しなくなった。 - P0-2: classify_child_stdout() が validate_review_compact_output.py の canonical validator に委譲する単一実行経路になり、非空だが malformed な child stdout も reviewer_transport_failure として一度だけ再試行される (以前は非空なら無条件で "ok" 扱いだった)。 - P1-3: persist_to_canonical_artifact_directory() が run-unique (pid+uuid4) filename component を持ち、compact_review_result._atomic_write() の hardened primitive (mkstemp+0600+symlink recheck) を再利用する。 - P1-4: run_root_review_pipeline.py のモジュール docstring に #1875 からの architecture delta (何を追加し、誰が consume し、なぜ #2049 のスコープに 閉じているか) を明記した。 - P1-5: readback_persisted_artifact() が compact_review_result._strict_json_loads() を再利用し、NaN/Infinity をパーサレベルで拒否する。raw substring search ("Infinity handling" のような正当な文字列を誤検知していたバグ) を削除した。 - P2-6: _cmd_produce() が invocation-private intermediate files を tempfile.TemporaryDirectory() のスコープに置き、呼び出し完了時に自動削除 する。 test_issue_reviewer_contract_static.py に P0-2/P1-5/P1-3/P0-1/P2-6 の regression テストを追加 (20 tests)。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
…解消する (#2135) * fix: root-owned review pipeline を分離し issue-reviewer の read-only 権限矛盾を解消する (#2049) `.codex/agents/issue-reviewer.toml` は read-only permission profile (`loop-protocol-readonly`) を宣言しながら、developer_instructions では live body fetch・temp file 保存・full artifact 保存という producer I/O を 要求しており、権限契約として自己矛盾していた。 producer I/O(live body fetch・body SHA 固定・check_issue_contract / contract_readiness_check / merge_readiness の実行・canonical artifact directory への保存)を新規の root-owned pipeline `run_root_review_pipeline.py` に集約し、issue-reviewer agent は merged review result を読んで advisory verdict を返すだけの役割に限定した。 child stdout が 0 byte のケースは validate_review_compact_output.py が `empty_input` を `reviewer_transport_failure` として分類し、root producer を一度だけ再実行、再度失敗した場合は human_judgment_required へ倒す。 final review は remote body update / artifact readback(regular file・ no symlink・strict JSON・body SHA・verdict identity)が成功した場合にのみ 実行するガードを追加した。 static contract test(test_issue_reviewer_contract_static.py)で、 read-only agent の instructions に workspace write requirement が 残っていないことを継続的に検証する。 Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: ruff E501 (test_issue_reviewer_contract_static.py:73) line length PR #2135 review iteration 0 REQUEST_CHANGES: ci/python-test (python-test-core) failing on ruff E501 (124>120) at line 73. Wraps the AC9 negative-fixture Japanese-language OUTPUT_CONTRACT string literal across multiple lines within the triple-quoted fixture without altering its semantic content (check_agent_is_read_only_advisory folds newlines to spaces before sentence splitting, so the fixture's detection behavior is unaffected). Issue #2049 * fix: PR Body Japanese Check 対応のため review-issue SKILL.md 見出しに和文併記を追加 CI の PR Body Japanese Check が review-issue/SKILL.md 見出し '## Producer I/O ownership(Issue #2049)' を英語のみの prose block と 判定し ratio=0.000 で fail していたため、和文グロスを併記して閾値を満たす。 Issue #2049 * fix: root pipeline を compact envelope の単一 producer にし、child stdout 分類・strict JSON 検証を canonical validator に統一する PR #2135 human REQUEST_CHANGES (iteration 3, comment #2135 (comment)) が指摘した production-wiring gap を修正する。 - P0-1: run_root_review_pipeline.py の produce コマンドが compact_review_result.py の純粋関数 + hardened _atomic_write() を直接呼び、 ISSUE_REVIEW_RESULT_COMPACT_V1 の生成・永続化まで単一 producer として完結 させる。issue-reviewer agent は compact_result.stdout_lines を read-only input として受け取り、そのまま relay するだけになり、 compact_review_result.py を自ら実行しなくなった。 - P0-2: classify_child_stdout() が validate_review_compact_output.py の canonical validator に委譲する単一実行経路になり、非空だが malformed な child stdout も reviewer_transport_failure として一度だけ再試行される (以前は非空なら無条件で "ok" 扱いだった)。 - P1-3: persist_to_canonical_artifact_directory() が run-unique (pid+uuid4) filename component を持ち、compact_review_result._atomic_write() の hardened primitive (mkstemp+0600+symlink recheck) を再利用する。 - P1-4: run_root_review_pipeline.py のモジュール docstring に #1875 からの architecture delta (何を追加し、誰が consume し、なぜ #2049 のスコープに 閉じているか) を明記した。 - P1-5: readback_persisted_artifact() が compact_review_result._strict_json_loads() を再利用し、NaN/Infinity をパーサレベルで拒否する。raw substring search ("Infinity handling" のような正当な文字列を誤検知していたバグ) を削除した。 - P2-6: _cmd_produce() が invocation-private intermediate files を tempfile.TemporaryDirectory() のスコープに置き、呼び出し完了時に自動削除 する。 test_issue_reviewer_contract_static.py に P0-2/P1-5/P1-3/P0-1/P2-6 の regression テストを追加 (20 tests)。 Co-Authored-By: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
Closes #1873(Issue #1873を実装した)
Part of #1860(親Issue #1860の一部として提出する)
Summary(概要)
issue-refinement-loopとimpl-review-loopの通常review/refinement経路から、replay arbitration、parent binding digest、review envelope V2、永続 state store、専用 termination/review publisher を撤去し、Claude Code native subagent の bounded loop(verdict/reviewed_head_sha(PR)またはreviewed_body_sha256(Issue)/blockers/optionalwarningsの最小 convention)へ置換した。route_loop_verdict_v2.pyを reviewer 自己申告(merge_ready/required_auto_actions/allowed_paths_gate)非依存の設計へ再設計。mergeability hard-stop 不変条件(CONFLICTING/DIRTYのみ hard stop、実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する #1869/PR#1871 で確立)は完全維持。termination_report.publish/pr_review.publishcommand id を撤去し、最終summary投稿を通常のgh issue comment --body-file/gh pr comment --body-file経路へ移行。Root cause(根本原因)
docs/dev/workflow.mdが掲げる「SSOT/確率論的プロンプト/決定論的ガードレール」の三層分離に対し、実装(replay taxonomy、parent binding digest、review envelope V2、永続state store、専用publisher command id)は意味判断そのものを閉じたenum/digest/fail-closed validatorで固定しており、方針と実装が矛盾していた(親Issue #1860のOwner Decision)。Before / After loop(変更前後のloop)
Before(issue-refinement-loop Step 2/2a): reviewer compact stdout →
reviewer_claim_replay.pyによる独立replay検証 →parent_replay_binding.pyによるbinding digest付与 →emit_parent_review_envelope_v2.pyによるV2 envelope組み立て →reviewer_claim_replay_state_store.py永続state書き込み →build_refinement_phase_state.py/build_loop_state.pyによるphase-state gate →publish_termination_report.py/render_termination_report.py経由の専用publisher投稿。After: live Issue body取得 → issue-reviewer subagentのcompact verdict(
verdict/reviewed_body_sha256/blockers/warnings)をそのまま信頼 →decide_next_loop_action.pyがverdict/iteration/max_iterations(3)のみで継続・終了判断 → 終了時はplain markdown summaryを組み立てて通常のgh issue comment --body-fileで投稿。Before(impl-review-loop Step 4/5): pr-reviewerが
LOOP_VERDICT_V2(merge_ready/required_auto_actions/allowed_paths_gate含む)を自己申告 →route_loop_verdict_v2.pyがその自己申告を信頼してrouting。After: pr-reviewerは
verdict/reviewed_head_sha/blockers/warningsのみ返却 →route_loop_verdict_v2(reviewer_verdict, live_mergeability)(二引数のみ。test_verdictは一切受け付けない、Issue #1870/#1856)がGitHub live state(mergeable/merge_state_status)から直接mergeabilityを判定。actual conflict(mergeable==CONFLICTINGまたはmerge_state_status==DIRTY)はreviewer verdictより先に評価され、REQUEST_CHANGES/HUMAN_REVIEW_REQUIREDでもconflict hard stopをバイパスしない(PR #1871/#1869)。Deleted Authority Matrix(削除したauthority一覧)
reviewer_claim_replay.py/reviewer_claim_replay_state_store.pyparent_replay_binding.pyemit_parent_review_envelope_v2.pybuild_loop_state.py/build_refinement_phase_state.pyvalidate_issue_execution_decision.pyのISSUE_EXECUTION_DECISION_V1自己検証呼び出しplan_refinement_loop.pyから除去(ファイル自体はrun_refinement_preflight.pyが別目的で使用中のため残存)save_loop_state_before_compaction.sh(PreCompact hook)publish_termination_report.pyのtermination publisher部分 /render_termination_report.pyisolation_issue_comment_bridge.pyへ分離抽出して存続)termination_report.publish/pr_review.publishcommand id(controlled_skill_mutation_policy.py/_exec.py)pr_review_marker_archive_exec.pypr_review.publish専用consumer消滅のため)compact_review_result.py/validate_review_compact_output.pyREVIEWER_BLOCKER_CLAIM/PARENT_REPLAY_*部分削除)schemas/loop_handoff_result_v1.json/loop_state.schema.json/loop_state_build_result.schema.jsoncommand_registry.pyのparent_replay.bind/review_compact.validate_v2/review_compact.emit_v2/review_compact.emit_approve/state.write-v2エントリPreserved Safety Boundaries(維持した安全境界)
worktree_scope_guard.pyは無変更、.claude/rulesの該当運用も無変更)protected_paths_policy.py無変更)check_vc_scope.py/scope_signal_delta.py(Allowed Paths検出、実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する #1869 scope)— 無変更CONFLICTING/DIRTYのみhard stop、UNKNOWN/BLOCKED/BEHIND/UNSTABLE/DRAFT/HAS_HOOKSは非hard-stop、実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する #1869/PR#1871で確立)—route_loop_verdict_v2.py再設計後も完全維持し、merge時のconflict解決でも後退させていないcontrolled_skill_mutation_policy.py/_exec.pyの他7 command id(issue_body.update/issue_content.update/issue_comment.publish/contract_snapshot.publish/test_verdict.publish/issue_scope_snapshot.materialize/issue_dependency.remove)とその共通機構(canonical repository binding、secret sanitize、argv検証、_check_no_tracked_changes等)issue_comment.publish用)—isolation_issue_comment_bridge.pyへ分離抽出して保持anchor_comment.schema.jsonへschema fragment抽出のみ行い、ロジック自体は無変更may_grant_approval: false/may_block_approval: false/may_change_routing: false)— merge conflict解決時に両立させ後退させていないChanged / Deleted files(変更・削除ファイル)
現在のPR head(
ca61837a)は、実装本体(コミット0eb80bb0ほか)に加えて、origin/mainとのmerge conflict解決(マージコミット3ae95d47)とその後の2回のレビュー是正コミット(71671bcb/ca61837a)を含む。合計173ファイルがorigin/mainとの差分に含まれる(git diff origin/main...HEAD --name-onlyで確認)。詳細はdiffを参照。主要な削除・新規ファイルはPR descriptionの Deleted Authority Matrix を参照。新規追加:.claude/skills/issue-refinement-loop/scripts/isolation_issue_comment_bridge.py、.claude/skills/issue-refinement-loop/schemas/anchor_comment.schema.json。Acceptance Criteria status(受け入れ条件の状態)
plan_refinement_loop.pyは依存しない)decide_next_loop_action.pyのmax_iterations=3)build_loop_state.py削除)verdict/reviewed_body_sha256/blockers/warnings程度に縮小(compact_review_result.py)verdict/reviewed_head_sha/blockers/warnings程度に縮小(route_loop_verdict_v2.py新API)decide_next_loop_action.py維持gh issue comment/gh pr comment経由の通常投稿へ移行、専用publisher command id削除plan_refinement_loop.pyはartifact replayでなくlive Issue取得ベースVerification Commands and results(検証コマンドと結果)
実行環境: worktree
worktree-issue-1873-bounded-review-loops、current headca61837a10cd87f6a46b07af64c4bc28532a6ee4(origin/main41fe26e2統合後、2回のレビュー是正コミット適用後)。旧head(7b7a2518/151d128c等)時点の証跡は本PRのconflict解決・レビュー是正で置換されているため、current evidenceとしては扱わない。Dangling reference check(production consumer基準):
parent_replay_binding/reviewer_claim_replay/emit_parent_review_envelope/PARENT_REPLAY_*/termination_report.publish/pr_review.publish/render_termination_reportを.claude/skills/issue-refinement-loop・.claude/skills/impl-review-loop・.claude/agents・.codex/agents・scripts/agent-guards・scripts/agent-ops・docs/dev配下でgrepし、残存箇所はすべてhistorical docs/コメント/変数名としての言及のみであることを確認済み(production consumerとしての参照は0件)。旧V2 production chainをsubprocessで実行するtest_production_v2_command_chain.py(永久skip化していた)は削除。Runtime Verification Evidence(実行時検証の証跡)
AC2/AC3/AC6/AC7/AC9/AC10/AC11/AC15はRuntime Verification Applicability: immediateに該当。上記pytest実行(4425 passed)に、
decide_next_loop_actionのbounded iteration test、route_loop_verdict_v2のstale head/mergeability test、isolation issue comment bridgeのlive readback testが含まれる。これらのACはいずれも実行時の挙動確認が必須であり、静的なコードレビューだけでは判定できないため、実際にテストを実行して証拠を残した。Related / Superseded Issues(関連・supersede対象Issue)
LOOP_VERDICT_V2strict schema cutover、本PRのminimal convention置換と両立しないため)— 最終判断はPhase 7でPR安定後に実施PR #1871との関係
PR #1871(#1869、semantic planning/overlap/contract artifact撤去)のwarning-continue方針・mergeability truth table(
CONFLICTING/DIRTYのみhard stop)は本PRのmerge時conflict解決で完全に維持した。#1871自体のscope(plan_issue_scope_rollup.py等)には一切触れていない。Conflict Resolution Summary(origin/mainとのconflict解決の要約)
origin/main(b055e4e5→41fe26e2)とのmerge conflictを5ファイルについて意味的に解消した(git checkout --ours/--theirsによるファイル単位一括採用は行わず、三者比較で契約単位に統合)。route_loop_verdict_v2.pyreviewer_verdict,live_mergeability)のみ。test_verdict引数を完全除去。actual conflict(mergeable==CONFLICTINGまたはmerge_state_status==DIRTY)をreviewer verdict分岐より前に評価する優先順位に修正(PR branch側の逆転バグを解消)。BLOCKED/UNSTABLE/DRAFTはfail_closed(current-head CI evaluatorへdefer)とし、自動human escalationにしない。production consumerがゼロであることを確認した上でLOOP_VERDICT_V2 comment parser/CLIを削除。step-5-mergeability-handling.mdstep-5-feedback-and-termination.mdhuman_review_required非自動停止セクションを移植。SKILL.md#1871warning-continueとlive safety境界を基礎に、#1873のminimal reviewer convention・max 3 iteration・resume live-refetchを移植。test_route_loop_verdict_v2.py/fixturesconflict_hard_stop優先順位、BLOCKED/UNSTABLE/DRAFT非conflict等)を保持しつつ、新API(reviewer_verdict+live_mergeability)へ移植。test_verdictを渡すfixture/callは削除。追加で、
.claude/agents/pr-reviewer.mdが「contract snapshotはadvisory」と述べながらAllowed Paths gateではexpected_contract_fingerprintを必須ブロッキング入力にしていた内部矛盾を解消(.codex/agents/pr-reviewer.toml・pr-review-judge/SKILL.md・references/allowed-paths-gate.md・allowed_paths_review_gate.pyを含めて整合)。Allowed Pathsパターンのcanonical sourceはlive linked Issue本文とし、contract snapshot/fingerprintはadvisory telemetry(warnings[])に降格。path外violation(fail_closed)とrename provenance不足(indeterminate)はhard blockerのまま維持した。3回の独立レビューloop(pr-reviewer-primary + pr-reviewer-safety、各最大3 iteration)を経て、iteration 1・2でのREQUEST_CHANGES(doc/code内部矛盾・Allowed Paths未列挙ファイル・stale test assertion等)を修正し、iteration 3で両reviewerがAPPROVE。
Scope Delta(スコープ差分)
実装中に複数のAllowed Paths外依存を発見し、Issue #1873本文をsection-level更新して対応した(readback確認済み):
publish_termination_report.pyが無関係の保護対象機能(isolation-worktree issue comment bridge、Issue 実装: isolation worktree agent の Issue comment request を issue_comment.publish controlled mutation lane へ parent delegation で接続する #1633)と同居していたため、isolation_issue_comment_bridge.pyへ分離抽出loop_state.schema.jsonのanchor_commentフラグメントをANCHOR_SCOPE_REFRAME_V1(#1869所有)が参照していたため、anchor_comment.schema.jsonへ抽出allowed_paths_review_gate.pyほか)に伴い追加で必要になったsettings.json/.codex/rules/default.rules/pyproject.toml/関連testファイル計13件run_refinement_preflight.py(anchor_comment schema extraction依存)・test_pretool_fastpath_classifier.pyのAllowed Paths未列挙2件プログラムでの検証:
git diff origin/main...HEAD --name-onlyの173ファイル全てがlive Issue #1873のAllowed Pathsで網羅されていることを確認済み(独立reviewer 2名がそれぞれ再検証)。Schema Change Applicability(schema変更の適用性)
Schema Consumer Inventory(schema消費者一覧)
削除した3 schemaファイルの旧consumer(
build_loop_state.py/build_refinement_phase_state.py/validate_issue_execution_decision.pyの一部)は全て削除済み。anchor_commentフラグメントの唯一のconsumerだったrun_refinement_preflight.pyは新ファイルanchor_comment.schema.jsonを参照するよう切替済み。Safety Claim Matrix(安全性主張一覧)
ca61837aで16/16 checks green)gh pr commentによるコメント)はAPPROVE。これはGitHub branch protectionの formal approving review ではない。本PRはDraftのまま維持し、人間の最終マージ判断に委ねる(gh pr review/gh pr ready/gh pr mergeはいずれも実行していない)🤖 本PRは Claude Code によって生成された。Claude Code