Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "impl-review-loop の Evidence-Based Landing Disposition が、同一 Issue の historical merged scope と current exact open/draft scope を区別し、正規の existing_pr_resume を false conflict で止めない"
change_kind: workflow
dedupe_key: "impl-review-loop:landing-disposition:historical-merged-later-scope-vs-current-exact-resume:v1"Parent Issue
none(単独の再発防止修正)。
Related: #2843, #2750, PR #2851, PR #2888。
Parent Goal Ref
- Goal:
impl-review-loopの Evidence-Based Landing Disposition が、実装済み scope の重複 dispatch を防ぎつつ、正規の既存 PR 再開(existing_pr_resume)を false conflict で止めない。 - Desired Destination: 同一 Issue の過去 merged PR(後に scope が拡張された)と、現在 scope を exact に所有する open/draft PR が共存しても、producer が後者を一意の resume authority として返す。
Current Validated Scope
2026-10-03 の current main(f7a2cff5)で確認した。
implementation_landed_evidence.py::derive_landing_disposition()は closing candidate が無い場合、lifecycle がmerged|open|draft|closed_unmergedの candidate を conflict counting 前に同一集合へ入れ、2 件以上でqualified_candidate_conflictを返す。- 実装: impl-review-loop の cross-reference false candidate で不要な reconciliation 停止を防ぐ #2750 の carve-out(
_is_irrelevant_cross_reference())は candidate-local marker がscope_coverage_issue_identity_mismatch1 件だけの場合に限られ、同一 Issue の有効 marker を持つ candidate は対象外。 - Issue 実装: Claude-GPT Auto に canonical workflow delegation context を投影し External System Writes false-deny を減らす #2843 の実 intake で PR feat: Claude-GPT Auto に canonical workflow delegation context を追加し canary で測定する #2851(merged /
later_scope_expansion)と PR fix: Claude-GPT canonical workflow canary の測定契約を是正する (#2843) #2888(draft /covered_exactly)が同時に qualified となり、reconciliation_required/suppress_worker_worktree_new_prとなった。
Remaining Parent Gaps
なし(parent_issue は none の単独修正)。
Outcome
closing relation が無く、historical merged candidate が valid / main-reachable / later_scope_expansion で、current scope を exact に所有する fresh open/draft candidate が一意なら、producer は後者を existing_pr_resume として選択する。この判定は implementation_landed_evidence.py の既存 evidence authority 内で完結し、generic override・新 schema・新 registry・新 approval layer を追加しない。
Incident / Source
2026-10-03、Issue #2843 / PR #2888 の impl-review-loop 再開時に pre-Step-1 の canonical landing producer が:
- PR feat: Claude-GPT Auto に canonical workflow delegation context を追加し canary で測定する #2851:
verified_cross_reference,merged, candidate-localscope_coverage.status = later_scope_expansion - PR fix: Claude-GPT canonical workflow canary の測定契約を是正する (#2843) #2888:
verified_cross_reference,draft, candidate-localscope_coverage.status = covered_exactly closing_relation: 0 件
を同時に qualified candidate と数え、reconciliation_required / qualified_candidate_conflict を返した。結果、pre_step1_data_plane.start_data_plane = false / suppress_worker_worktree_new_pr となり、既存 PR #2888 の正規 resume が停止した。
PR #2888 は Issue #2843 を意図的に Refs #2843 としており、runtime observation 後まで Issue を OPEN に保つ契約のため closing relation を持たない。PR #2851 は同一 Issue の earlier scope を merge 済みで、その後 Issue #2843 の scope が拡張されたため later_scope_expansion である。
Related: #2843, PR #2851, PR #2888, #2750.
Root Cause
current .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py::derive_landing_disposition() は、closing candidate が無い場合、lifecycle が merged|open|draft|closed_unmerged の verified candidates を conflict counting 前に同一集合へ入れる。
#2750 の bounded carve-out は「candidate-local marker が 別 Issue identity を指す non-closing cross-reference」を除外するが、今回の両 candidate はどちらも 同一 Issue #2843 の有効な marker を持つため対象外。
その結果、historical merged candidate 自体は単独なら legacy_or_later_scope_expansion -> ordinary_dispatch_or_explicit_recovery になるにもかかわらず、current exact draft candidate と並ぶと、その state-specific 意味論へ到達する前に qualified_candidate_conflict になる。
Desired Outcome
closing relation が存在しない場合に限り、同一 target Issue の historical merged candidate が valid / main-reachable / later_scope_expansion で、current scope を exact に所有する fresh open/draft candidate が一意に存在するなら、historical merged candidate を current resume authority との conflict counting から bounded に除外し、current open/draft candidate を existing_pr_resume として選択できるようにする。
これは「merged candidate を一般に無視する」変更ではない。historical scope と current resume scope の state-specific evidence が明確な場合だけに限定する。
Acceptance Criteria
- AC1: no
closing_relationかつ candidate set が「main-reachable な mergedverified_cross_reference/ valid same-Issue marker /later_scope_expansion == true」と「fresh open/draftverified_cross_reference/ valid same-Issue marker /exact_coverage == true」の組み合わせで、current exact open/draft candidate が一意ならqualified_candidate_conflictにせずexisting_pr_resumeを返す。 - AC2: historical merged candidate は evidence から削除せず、debug/audit 用 candidate evidence として保持する。除外対象は conflict counting / authority selection のみ。
- AC3: open/draft exact candidate が複数ある場合は従来どおり
reconciliation_required / qualified_candidate_conflictを維持する。 - AC4: merged candidate が current scope を
covered_exactlyしている場合、marker malformed / stale / identity mismatch、main ancestry 未確認、または other contradictory evidence を含む場合は carve-out を適用せず、既存 fail-closed semantics を維持する。 - AC5:
closing_relationcandidate が1件でも存在する場合は、新 carve-out を適用せず structured closing authority の既存 precedence を維持する。 - AC6: 実装: impl-review-loop の cross-reference false candidate で不要な reconciliation 停止を防ぐ #2750 の irrelevant sibling cross-reference carve-out、markerless legacy behavior、closed-unmerged behavior、
implementation_already_landed、already_satisfiedprecedence を regression させない。 - AC7: PR feat: Claude-GPT Auto に canonical workflow delegation context を追加し canary で測定する #2851 + PR fix: Claude-GPT canonical workflow canary の測定契約を是正する (#2843) #2888 相当の production-shaped fixture を unit/integration regression に追加し、pre-fix では false conflict、post-fix では fix: Claude-GPT canonical workflow canary の測定契約を是正する (#2843) #2888 相当が
existing_pr_resumeになることを固定する。 - AC8: capsule 生成経路(
build_intake_capsule.pyの production 経路、fake transport)で incident shape を入力した場合にpre_step1_data_planeがaction: resume_existing_pr(start_data_plane: false。新規 PR・新規 worktree は作らず既存 PR を再開する。dispatch_step1ではない)となり、selected candidate が current draft PR になることを offline test で固定する。加えて、実装後に修正済み producer で Issue 実装: Claude-GPT Auto に canonical workflow delegation context を投影し External System Writes false-deny を減らす #2843 に対する read-only live sanity check を実施した場合は結果を PR 本文に記録する(live state が incident shape を失っていれば、その事実を記録し AC7/AC8 の deterministic regression を authority とする。live check は機械 VC ではない)。 - AC9:
SKILL.md/steps/preparation.mdは本 Issue では変更しない(Allowed Paths 外)。新 carve-out の bounded condition と fail-closed 非変更条件はimplementation_landed_evidence.pyの docstring に 実装: impl-review-loop の cross-reference false candidate で不要な reconciliation 停止を防ぐ #2750 と同様に明文化し、新しい schema / registry / approval layer / generic override mechanism は追加しない。prose 側の同期が必要と判明した場合は PR 本文に記録し、follow-up として扱う。 - AC10: relevant focused tests と repository-required quality gates が PASS する。
In Scope
.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py.claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py.claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py
Out of Scope
- PR fix: Claude-GPT canonical workflow canary の測定契約を是正する (#2843) #2888 / Issue 実装: Claude-GPT Auto に canonical workflow delegation context を投影し External System Writes false-deny を減らす #2843 の実装内容そのもの
- generic
reconciliation_requiredOWNER override の追加 - closing linkage を捏造するための PR body 変更
- Issue 実装: Claude-GPT Auto に canonical workflow delegation context を投影し External System Writes false-deny を減らす #2843 を早期 close する変更
- timeline cross-reference の全面無効化
- markerless compatibility の撤廃
- 新しい landing schema / lifecycle registry / approval layer
- merge / auto-merge / force push
Verification Guidance
最低限、current repository-native tests で以下を固定する:
- feat: Claude-GPT Auto に canonical workflow delegation context を追加し canary で測定する #2851/fix: Claude-GPT canonical workflow canary の測定契約を是正する (#2843) #2888-shaped: historical merged
later_scope_expansion+ unique current draftcovered_exactly=>existing_pr_resume - two current exact drafts => conflict 維持
- merged exact-current + current draft => fail-closed / existing semantics 維持
- malformed/stale/identity mismatch merged => fail-closed 維持
- closing candidate present => closing precedence 維持
- 実装: impl-review-loop の cross-reference false candidate で不要な reconciliation 停止を防ぐ #2750 sibling carve-out / markerless legacy regressions 維持
実行コマンドの最終形と baseline-expect は current issue-refinement-loop で canonical に確定すること。
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 上記 bounded rule ではなく generic override が必要になる
- evidence integrity を弱めないと 実装: Claude-GPT Auto に canonical workflow delegation context を投影し External System Writes false-deny を減らす #2843 incident を解けない
implementation_landed_evidence.py以外の authority model を重複実装する必要が出る- current canonical workflow が
human_judgment_requiredを返す
Runtime Verification Applicability
decision: not_applicable
reason: >-
producer の pure な判定ロジックと production-shaped fixture を使う offline test で完結する。
プロセス起動・通信・I/O の runtime 検証は不要。AC8 の live sanity check は read-only の診断であり
runtime verification AC ではない。Verification Commands
# AC1
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_ac1_historical_merged_later_scope_expansion_with_unique_current_exact_resumes -q
# AC2
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_ac2_historical_candidate_is_retained_in_evidence -q
# AC3
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_ac3_two_current_exact_candidates_keep_conflict -q
# AC4
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_ac4_non_historical_merged_states_keep_fail_closed -q
# AC5
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_ac5_closing_relation_precedence_is_unchanged -q
# AC6
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_ac6_existing_carveouts_and_legacy_behavior_are_unchanged -q
# AC7
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py::test_ac7_incident_shaped_2851_2888_intake_resumes_existing_pr -q
# AC8
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py::test_ac8_intake_capsule_pre_step1_data_plane_resumes_existing_pr -q
# AC9
# baseline-expect: fail
$ rg -n "historical merged later_scope_expansion carve-out" .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py
# AC10
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -q
$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm buildAllowed Paths
.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py.claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py.claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py
Required Skills
なし
Required Design References
.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py.claude/skills/impl-review-loop/steps/preparation.md(0-a-0 Evidence-Based Landing Disposition。read-only reference).claude/skills/impl-review-loop/SKILL.md(Evidence-Based Landing Disposition 節。read-only reference)docs/dev/workflow.md- Issue 実装: impl-review-loop の cross-reference false candidate で不要な reconciliation 停止を防ぐ #2750(irrelevant sibling cross-reference carve-out の precedent)
Activity
squne121 commentedon Oct 3, 2026
issue-refinement-loop 終了レポート (approved)
fix: AC8 pre_step1_data_plane の start_data_plane を実契約どおりに固定する (#2893)
fix: decision-time live PR semantic refresh と same-Issue marker 必須化で #…
squne121 commentedon Oct 3, 2026
impl-review-loop: 完了 (2026-10-03)
fix: historical merged later_scope_expansion と current exact open/dra…
fix: #2750/#2893 除外条件の分離・semantic refresh の射程限定・runtime smoke の委譲先と主張…
docs: impl-review-loop の landing disposition prose を Bounded candidat…