Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#2761"
goal_ref: "research Issue #2761 の残余リスク(irrelevant sibling cross-reference による qualification 前 freshness 誤停止)を解消する"
change_kind: codeParent Issue
Parent Goal Ref
- Goal:
impl-review-loopのimplementation_landed_evidence.pyが、current target と無関係な sibling candidate(irrelevant cross-reference)の transport failure により current Issue のreconciliation_requiredを誤って停止させる残余リスクを解消する - Desired Destination:
resolve_landing_disposition_with_freshness_rebind()/collect_candidate_inputs()/_candidate_errors()/validate_implementation_landed_evidence()の qualification 順序を、fresh negative qualification 成立後は irrelevant sibling の transport failure が current target の disposition に影響しない形へ修正する
Current Validated Scope
.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.pyのcollect_candidate_inputs()/_candidate_errors()/validate_implementation_landed_evidence()/resolve_landing_disposition_with_freshness_rebind()/_live_freshness_reference()を修正する.claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.pyと.claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.pyに regression test を追加する
Remaining Parent Gaps
- なし(research Issue 調査: impl-review-loop の irrelevant sibling cross-reference が qualification 前の freshness 検証で current Issue を停止し得る残余リスクを解消する #2761 が特定した3箇所の修正は本 Issue のスコープで完結する想定)
Outcome
.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py において、decision-time に live 再取得した candidate PR の body(coverage_from_pr_body() 相当で再解析し scope_coverage_issue_identity_mismatch 単独であること)と closingIssuesReferences(current target を含まないこと)を fresh negative qualification authority とし、qualification 成立後の irrelevant sibling について、collect_candidate_inputs() の materialization_failures/contradictory 計算と _candidate_errors()/validate_implementation_landed_evidence() の merged_candidate_main_ancestry_unverified チェックの両方が current target の reconciliation_required を誘発しない状態にし、対応する regression test が test_implementation_landed_evidence.py / test_implementation_landed_intake_integration.py に追加され PASS している状態を完了とする。pr_head_sha は authority に昇格させない。既存の fail-closed 境界(markerless candidate、malformed marker、identity mismatch + 複合 error、closing relation 等)は維持する。
Runtime Verification Applicability
- decision: not_applicable
- reason: 静的な unit/integration test(pytest)のみで完結するため
In Scope
collect_candidate_inputs()に qualification-aware な処理を追加する(candidate ごとに live body/closingIssuesReferences から_is_irrelevant_cross_reference()相当の判定を collection 時点、または_candidate_errors()/validate_implementation_landed_evidence()実行前に行う)_candidate_errors()/validate_implementation_landed_evidence()のmerged_candidate_main_ancestry_unverifiedチェックを、confirmed-irrelevant candidate には適用しない、または適用後に reclassify するderive_landing_disposition()の qualification 順序を、research Issue 調査: impl-review-loop の irrelevant sibling cross-reference が qualification 前の freshness 検証で current Issue を停止し得る残余リスクを解消する #2761 の AC4 が定義する ordering(materialization → fresh authority qualification → target-specific freshness → disposition)に整合させるpr_head_shaを authority として扱わないことの回帰防止- regression test 追加(open/draft/merged/closed-unmerged irrelevant sibling、merged sibling + ancestry compare transport failure、sibling candidate + live body/detail fetch failure(fail-closed維持)、body変更後もsibling marker維持、closing relationへの変化、markerless legacy互換性、identity mismatch + 複合error)
- 既存
test_implementation_landed_intake_integration.pyの mock gh harness を再利用した production-shaped regression の追加
Out of Scope
- PR fix: impl-review-loop の cross-reference false candidate による不要な reconciliation 停止を防ぐ #2758 への追加修正(完了済み)
- Issue 実装: implementation_landed_evidence.py の gh api --paginate に --slurp を追加し timeline JSON parse 失敗を防ぐ #2739(timeline pagination)への対応
- 新規 registry / attestation / runtime harness の追加
- GitHub native dependency の再設計
Acceptance Criteria
- AC1: irrelevant sibling の fresh negative qualification が、decision-time の live body 再解析(
scope_coverage_issue_identity_mismatch単独)と liveclosingIssuesReferences(current target 非包含)に基づいて成立する - AC2: fresh negative qualification 成立後、open/draft sibling の head drift、closed-unmerged sibling の head identity drift、merged sibling の main ancestry compare transport failure、current-target-specific files/scope ownership validation が current target の
freshness_rebind_failed/reconciliation_requiredを引き起こさない - AC3: live body/detail 取得失敗、closingIssuesReferences 未確認、malformed marker、markerless candidate、identity mismatch + 複合 error、current target を含む closing relation は引き続き fail-closed である
- AC4:
pr_head_shaが negative qualification / freshness authority として使われていない - AC5:
test_implementation_landed_intake_integration.pyの既存 harness を再利用した production-shaped regression(build_intake_capsule -> resolve_landing_disposition_with_freshness_rebind -> derive_landing_disposition -> apply_already_satisfied_precedence)が少なくとも1本追加されている - AC6: 新規 regression test で AC1〜AC3 の各シナリオ(open/draft/merged/closed-unmerged irrelevant sibling、ancestry compare transport failure、body/detail fetch failure、markerless legacy compatibility、identity mismatch + 複合 error)がカバーされている
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py -v
# AC2
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py -v
# AC3
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py -v
# AC4
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py -v
# AC5
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -v
# AC6
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -vAllowed 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
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Required Design References
- .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py:751
resolve_landing_disposition_with_freshness_rebind() - .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py:678
_live_freshness_reference() - .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py:469
collect_candidate_inputs() - .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py:225
_candidate_errors() - .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py:270
validate_implementation_landed_evidence()
Scope Delta(任意)
N/A
Background
research Issue #2761(https://github.com/squne121/loop-protocol/issues/2761)で issue-refinement-loop による refinement が完了し approved となった。research の結論として、impl-review-loop の implementation_landed_evidence.py において、current target と無関係な sibling candidate(irrelevant cross-reference)の transport failure が current Issue の reconciliation_required 誤停止を引き起こす残余リスクが確定した。repository investigation と2回の semantic design review(issue-design-reviewer による独立検証)により、修正対象は以下の3箇所であることが確認済み:
resolve_landing_disposition_with_freshness_rebind()(751-811行)/_live_freshness_reference()(678-738行)— decision-time の freshness re-fetch が candidate PR のbody/closingIssuesReferencesを再取得していない。collect_candidate_inputs()(469-637行)— 候補ごとのgh pr view失敗を無条件にmaterialization_failuresへ積み、merged candidate の ancestry compare も無条件実行し、qualification より前にcontradictoryを確定させる。_candidate_errors()(225-253行)/validate_implementation_landed_evidence()(270-297行)—merged_candidate_main_ancestry_unverifiedチェックが全 candidate に対し qualification より前に無条件適用され、evidence 全体を invalid にする。
Notes for Reviewer
- Scope Collision advisory(C3,
ambiguous_requires_human): overlap preflight(check_issue_overlap.py)が本 Issue の Allowed Paths と親 research Issue 調査: impl-review-loop の irrelevant sibling cross-reference が qualification 前の freshness 検証で current Issue を停止し得る残余リスクを解消する #2761 の read-only 参照パス(本文中のコード参照目的)との文字列一致を検出したが、調査: impl-review-loop の irrelevant sibling cross-reference が qualification 前の freshness 検証で current Issue を停止し得る残余リスクを解消する #2761 は読み取り専用の research Issue であり write-capable な実装作業を含まない。導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 Owner Decision により Allowed Paths の文字列重複は起票停止理由にしないため、advisory として記録した上で起票を継続する。 - dedupe_key:
impl-review-loop:irrelevant-sibling-prequalification-freshness-fix
Activity
squne121 commentedon Sep 25, 2026
implement-issue: 実装完了 (2026-09-25T14:19:27Z)
.claude/worktrees/issue-2767-irrelevant-sibling-prequalificationworktree-issue-2767-irrelevant-sibling-prequalificationsqune121 commentedon Sep 25, 2026
impl-review-loop: 完了 (2026-09-25T14:42:37Z)
fix: impl-review-loop の irrelevant sibling cross-reference による qualif…