Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1674"
relationship: part_of
goal_ref: "impl-review-loop production router が mergeable と merge_state_status を別フィールドとして扱い、GitHub の conflict・unknown・behind 状態を決定論的に routing する"
change_kind: codeParent Issue
Parent Goal Ref
- Goal: OPEN Issue の重複・依存順・実装優先順位判定を issue-refinement-loop に一元化する。
- Desired Destination: impl-review-loop が semantic relation を再分類せず、live safety gate と target PR mergeability の production routing を維持する。
Current Validated Scope
.claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.pyの production mergeability consumer- 同 consumer の fixture-driven tests と、mergeability handling / conflicting PR escalation の設計記述
Remaining Parent Gaps
- 実装: commit/PR 作成後の target head に対し pairwise_merge_conflict を SHA-bound で観測する PAIRWISE_MERGE_OBSERVATION_V1 producer を追加する #1792 の pairwise merge observation producer
- 実装: ensure_contract_snapshot.py・open-pr・impl-review-loop に PAIRWISE_MERGE_OBSERVATION_V1 の再利用禁止 consumer 契約を配線する #1793 の pairwise merge observation consumer wiring
- 実装: impl-review-loop preparation から scope rollup preflight(Step 2.5)を除去し、issue-refinement-loop の判定を再実行しない #1676 の scope-rollup-runner automatic dispatch を advisory manual diagnostic へ移行
Outcome
route_loop_verdict_v2.py と fixture-driven truth table が mergeable と merge_state_status を分離し、conflict・unknown・behind の各状態を正規化して検証済みである状態。
In Scope
mergeability.mergeableとmergeability.merge_state_statusを production router で別フィールドとして検証するmergeable == CONFLICTINGとmerge_state_status == DIRTYを conflicting PR escalation へ route するmerge_state_status == CONFLICTINGを schema invalid として fail-closed にするmergeable == UNKNOWN、RESTmergeable == null、merge_state_status == UNKNOWNを bounded retry 後の indeterminate または human escalation に route するmerge_state_status == BEHINDを既存 update-branch route に保つBLOCKED、DRAFT、HAS_HOOKS、UNSTABLEを Git conflict と誤認しない truth table と production behavior test を追加する
Out of Scope
ISSUE_EXECUTION_DECISION_V1schema / downstream_policy の変更PAIRWISE_MERGE_OBSERVATION_V1の producer / consumer 実装(実装: commit/PR 作成後の target head に対し pairwise_merge_conflict を SHA-bound で観測する PAIRWISE_MERGE_OBSERVATION_V1 producer を追加する #1792 / 実装: ensure_contract_snapshot.py・open-pr・impl-review-loop に PAIRWISE_MERGE_OBSERVATION_V1 の再利用禁止 consumer 契約を配線する #1793)- scope-rollup-runner、scope_rollup.run executor、capture hook の変更
- 実装: impl-review-loop preparation から scope rollup preflight(Step 2.5)を除去し、issue-refinement-loop の判定を再実行しない #1676 が所有する semantic scope-rollup automatic dispatch の撤去
Acceptance Criteria
- AC1: production router は
mergeable == CONFLICTINGを conflicting PR escalation へ route する。 - AC2: production router は
merge_state_status == DIRTYを conflicting PR escalation へ route する。 - AC3:
merge_state_status == CONFLICTINGは schema invalid として fail-closed になる。 - AC4:
mergeable == UNKNOWN、REST null 相当、またはmerge_state_status == UNKNOWNは bounded retry 後に indeterminate または human escalation へ route する。 - AC5:
merge_state_status == BEHINDは既存 update-branch route を維持する。 - AC6:
BLOCKED、DRAFT、HAS_HOOKS、UNSTABLEは Git conflict として escalation されない。 - AC7: fixture-driven truth table が AC1〜AC6 の production consumer behavior を実行して検証する。
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/fixtures/step5_routing_consumer/test_route_loop_verdict_v2.py -q# AC2
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/fixtures/step5_routing_consumer/test_route_loop_verdict_v2.py -q# AC3
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/fixtures/step5_routing_consumer/test_route_loop_verdict_v2.py -q# AC4
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/fixtures/step5_routing_consumer/test_route_loop_verdict_v2.py -q# AC5
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_termination_gate.py -q# AC6
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_termination_gate.py -q# AC7
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_v2_routing_boundary_regression.py -q# preflight-scope: pr_review_only
$ uv run --locked ruff check .claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.py .claude/skills/impl-review-loop/testsAllowed Paths
.claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.py.claude/skills/impl-review-loop/tests/test_v2_routing_boundary_regression.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/fixtures/step5_routing_consumer/.claude/skills/impl-review-loop/steps/step-5-mergeability-handling.md.claude/skills/impl-review-loop/steps/conflicting-pr-escalation-runbook.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 実装: ensure_contract_snapshot.py・open-pr・impl-review-loop に PAIRWISE_MERGE_OBSERVATION_V1 の再利用禁止 consumer 契約を配線する #1793 が未完了のまま pairwise merge observation を production-ready と仮定する必要が生じた場合
- GitHub API enum の追加・変更により本 Issue の truth table を超える schema 変更が必要になった場合
Required Skills
なし
Required Design References
docs/dev/agent-skill-boundaries.md#impl-review-loop V2 routing boundarydocs/dev/workflows/impl-review-loop-design.md.claude/skills/impl-review-loop/steps/step-5-mergeability-handling.md.claude/skills/impl-review-loop/steps/conflicting-pr-escalation-runbook.md
Runtime Verification Applicability
- decision: not_applicable
- reason: pure-function production router と fixture-driven tests で検証するため
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR。#1793 完了後に専用 worktree で実装し、Draft PR を既定とする。
Notes for Reviewer
- 実装: impl-review-loop preparation から scope rollup preflight(Step 2.5)を除去し、issue-refinement-loop の判定を再実行しない #1676 は scope-rollup-runner automatic dispatch の撤去を所有する。本 Issue は target PR mergeability の production router のみを所有する。
- 実装: commit/PR 作成後の target head に対し pairwise_merge_conflict を SHA-bound で観測する PAIRWISE_MERGE_OBSERVATION_V1 producer を追加する #1792 / 実装: ensure_contract_snapshot.py・open-pr・impl-review-loop に PAIRWISE_MERGE_OBSERVATION_V1 の再利用禁止 consumer 契約を配線する #1793 の pairwise observation schema・producer・consumer を再実装しない。
- Scope Collision (C2b): 実装: ensure_contract_snapshot.py・open-pr・impl-review-loop に PAIRWISE_MERGE_OBSERVATION_V1 の再利用禁止 consumer 契約を配線する #1793 と
.claude/skills/impl-review-loop/tests/配下が重なる。実装: ensure_contract_snapshot.py・open-pr・impl-review-loop に PAIRWISE_MERGE_OBSERVATION_V1 の再利用禁止 consumer 契約を配線する #1793 完了後にのみ着手し、本 Issue は mergeability truth table と production router の修正だけを行い、PAIRWISE_MERGE_OBSERVATION_V1 consumer の変更は行わない。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jul 30, 2026
#1860 の owner decision(2026-07-30)に基づく実装child #1869(実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する)に、本Issueのscope(impl-review-loop production routerでの mergeable/merge_state_status 分離、conflict/unknown routingの正規化)を統合します。#1869のPRがmergeされ、本Issueの残存差分がないことを確認できた時点でcloseします。
Part of #1860 / absorbed by #1869
squne121 commentedon Jul 30, 2026
実装child #1869 のPR #1871(Draft, head cc75632, CI全green, mergeable: MERGEABLE/CLEAN, 独立レビューAPPROVE)が merge-ready になりました。本Issueのscopeは #1871 に吸収されています。PR がマージされ、残存scopeがないことを確認できた時点でcloseします(現時点ではまだcloseしません)。
Part of #1860 / absorbed by #1869 / see #1871
squne121 commentedon Jul 30, 2026
実装child #1869 のPR #1871(Closes #1869)の状態を更新します。
現状(2026-07-30 時点): head
fa1fe901f405520c92331e2dce65b8b8624b7f7c、CI 16/16 pass、mergeable: MERGEABLE、mergeStateStatus: CLEAN、独立レビュー APPROVE・merge_ready: true(Draft のまま、人間マージ待ち)。過去のコメントで参照していた head
cc756328は初回実装時点のものです。その後、人間レビューで REQUEST_CHANGES(production router のmergeable/merge_state_status分離不足等)を受けて fix_delta を適用し、途中で main 進行による実 Git conflict(route_loop_verdict_v2.py、Issue #1856 由来)を通常のマージで解消した上で、現在の head に至ります。本 Issue の scope 判定は PR #1871 の「Related / superseded Issues」節を正とします(詳細は #1871 参照)。PR merge 後、残存 scope の有無を再確認した上で close 可否を判断してください。
squne121 commentedon Jul 31, 2026
実装child #1869(PR #1871, MERGED, merge commit
c3cbc0dd, 2026-07-31T10:56:41Z)の「Related / superseded Issues」節で、route_loop_verdict_v2.pyによるmergeable/merge_state_status分離のproduction実装により、本Issueの独立scopeが本PRに吸収されたことが明記されています。current mainで該当実装を確認済み。残存consumerなし。#1860 Closure Matrix参照。