Skip to content

実装: impl-review-loop の irrelevant sibling cross-reference による qualification 前 freshness 誤停止を解消する #2767

Closed

Description

@squne121

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: code

Parent Issue

#2761

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

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

Acceptance Criteria

  • AC1: irrelevant sibling の fresh negative qualification が、decision-time の live body 再解析(scope_coverage_issue_identity_mismatch 単独)と live closingIssuesReferences(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 -v

Allowed 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箇所であることが確認済み:

  1. resolve_landing_disposition_with_freshness_rebind()(751-811行)/ _live_freshness_reference()(678-738行)— decision-time の freshness re-fetch が candidate PR の body/closingIssuesReferences を再取得していない。
  2. collect_candidate_inputs()(469-637行)— 候補ごとの gh pr view 失敗を無条件に materialization_failures へ積み、merged candidate の ancestry compare も無条件実行し、qualification より前に contradictory を確定させる。
  3. _candidate_errors()(225-253行)/ validate_implementation_landed_evidence()(270-297行)— merged_candidate_main_ancestry_unverified チェックが全 candidate に対し qualification より前に無条件適用され、evidence 全体を invalid にする。

Notes for Reviewer

Activity

  1. added
    enhancement
    phase/implementation
    triage-required
    agent/implementer
    on Sep 25, 2026
  2. squne121 commented on Sep 25, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-09-25T14:19:27Z)

  3. squne121 commented on Sep 25, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-09-25T14:42:37Z)

    IMPL_REVIEW_LOOP_RESULT_V1:
      schema_version: 1
      status: draft_pr_ready
      pr_url: "https://github.com/squne121/loop-protocol/pull/2768"
      head_sha: "b6653ed5a5d6945ae602eaba953bb00b16407413"
      issue_number: 2767
      termination_reason: approved
      merge_ready: true
      iteration: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions