Skip to content

fix: impl-review-loop の cross-reference false candidate による不要な reconciliation 停止を防ぐ - #2758

Merged
squne121 merged 2 commits into
mainfrom
worktree-issue-2750-impl-review-loop-cross-reference-false-c
Sep 25, 2026
Merged

squne121 merged 2 commits into
mainfrom
worktree-issue-2750-impl-review-loop-cross-reference-false-c

Conversation

@squne121

Copy link
Copy Markdown
Owner

Summary

Checks

  • uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py -q
  • uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -q
  • rg -n "scope_coverage_issue_identity_mismatch" .claude/skills/impl-review-loop/SKILL.md .claude/skills/impl-review-loop/steps/preparation.md
  • 上記コマンドをすべてローカルで実行し、成功したことを確認してからチェックしています(本 Issue 実装: impl-review-loop の cross-reference false candidate で不要な reconciliation 停止を防ぐ #2750 の Verification Commands 一式。pnpm 系はリポジトリ TypeScript コード非変更のため対象外 — 変更は .claude/skills/impl-review-loop/** の Python script / test / skill doc のみ)

Verification Results(検証コマンド結果)

$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py -q
.................................                                        [100%]
33 passed in 0.04s

$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -q
.........                                                                [100%]
9 passed in 0.06s

$ rg -n "scope_coverage_issue_identity_mismatch" .claude/skills/impl-review-loop/SKILL.md .claude/skills/impl-review-loop/steps/preparation.md
.claude/skills/impl-review-loop/SKILL.md:167:...(bounded carve-out 明文化)...
.claude/skills/impl-review-loop/steps/preparation.md:294:...(bounded carve-out 明文化)...

Schema Change Applicability

  • decision: not_schema_change
  • reason: 既存 IMPLEMENTATION_LANDED_EVIDENCE_V1 / IMPLEMENTATION_SCOPE_COVERAGE_V1 schema・disposition enum・provenance kind の追加や変更は行わず、既存 candidate qualification ロジック内の bounded な filtering 条件を1つ追加しただけである。新しい top-level フィールドや enum 値は追加していない。

Schema Consumer Inventory

N/A(not_schema_change のため)。

Visual Impact Declaration(視覚影響申告)

UI(DOM/CSS)変更を含まないため省略します。

Safety Claim Matrix

本 PR は .claude/skills/impl-review-loop/** を変更するため validator の safety-sensitive path pattern に該当します。安全境界そのもの(権限・サンドボックス・transport・auth・MCP)ではなく、impl-review-loop の pre-Step-1 duplicate-dispatch fail-closed 判定(reconciliation_required)の carve-out 範囲を明示的に限定した claim を記載します。

Claim Implemented? Not controlled Evidence Follow-up
carve-out は closing_relation candidate が1件でも存在する場合は一切適用されない(closing relation の identity mismatch は従来どおり reconciliation_required) yes test_closing_relation_identity_mismatch_stays_reconciliation_required(test_implementation_landed_evidence.py) N/A
carve-out は候補 marker error が scope_coverage_issue_identity_mismatch の1件だけの場合のみ適用され、他のエラーと複合している candidate は除外しない(fail-closed 維持) yes test_non_closing_candidate_with_identity_mismatch_plus_other_marker_error_stays_fail_closed N/A
markerless candidate(#2119/PR #2137 legacy compatibility, #2699)は本 carve-out の対象外であり除外されない yes test_markerless_2119_2137_candidate_is_never_excluded_by_sibling_mismatch_reasoning N/A
carve-out は lifecycle(merged/open/draft/closed_unmerged)を問わず conflict counting の前段で適用される yes test_open_draft_lifecycle_gets_same_sibling_cross_reference_carve_out_as_merged / test_2727_incident_shape_two_sibling_cross_references_do_not_conflict N/A
#2727 incident shape(PR #2735/#2746 相当の sibling marker candidate 2件)で qualified_candidate_conflict が発生しないことを production-shaped collect_candidate_inputs() 経路で確認 yes test_collect_candidate_inputs_production_shaped_2727_sibling_cross_references_excluded(test_implementation_landed_intake_integration.py) N/A

Notes

IMPLEMENTATION_SCOPE_COVERAGE_V1:
  schema_version: "IMPLEMENTATION_SCOPE_COVERAGE_V1"
  issue_number: 2750
  issue_body_sha256: "sha256:56de66fdaa7649620c2f7983365677afd355f79b111cbbf98108edf360cfee3e"
  normalized_scope_manifest_sha256: "sha256:feb5bf377eec15c71a98bdf245d1551a4ca0648ffd27f5504f84efa27154a58e"
  pr_head_sha: "93c9c30ee64e41c314f3960c2ccbca9048460595"
  scope_manifest: {"acceptance_criteria": ["#2727 incident shape の reproducer(PR #2735/#2746 相当の well-formed sibling marker candidate 2件、両方 current target には irrelevant)で qualified_candidate_conflict は発生せず、no_qualified_candidate 相当 → 既存 already-satisfied precedence → canonical route(already_satisfied または ordinary_dispatch_or_explicit_recovery)になる", ".claude/skills/impl-review-loop/SKILL.md と steps/preparation.md が、既存の「identity mismatch / malformed durable marker は lifecycle に関係なく常に最優先で reconciliation_required」契約に対する bounded carve-out(non-closing candidate かつ marker error が identity mismatch 単独の場合のみ)を明文化している", "AC1-AC5 の regression が、手組み candidate dict の unit test だけでなく、少なくとも1件は collect_candidate_inputs() を通す production-shaped integration path(既存 test_implementation_landed_intake_integration.py の mock gh pattern を再利用)でも検証される", "GitHub native blocked_by と timeline cross-reference を混同する新しい dependency inference を追加しない", "Issue #2119 / PR #2137 相当の markerless PR fixture で、sibling marker mismatch と同じ理由では除外されず、Issue #2699 の legacy compatibility 契約が維持される", "current Issue 用の valid non-closing candidate が1件、sibling marker candidate(irrelevant)が複数存在する fixture では、sibling candidate は conflict counting から除外され valid candidate のみが評価される。また non-closing candidate の marker error が scope_coverage_issue_identity_mismatch に加え別の marker error(schema/digest/manifest 等)を同時に持つ fixture では、irrelevant 扱いにせず従来どおり reconciliation_required を維持する(fail-closed)", "current target Issue を実際に closing_relation(構造化 closingIssuesReferences)で close する candidate が durable marker identity mismatch を持つ fixture は、従来どおり reconciliation_required を返す", "merged verified_cross_reference candidate が current target Issue とは異なる IMPLEMENTATION_SCOPE_COVERAGE_V1.issue_number を持ち、かつ candidate-local marker error が scope_coverage_issue_identity_mismatch の1件だけの場合、その candidate は qualified landing candidate から除外され、current target の reconciliation conflict を生成しない", "verified_cross_reference / closing_relation の provenance schema や既存 disposition enum を増やさず、既存 implementation_already_landed | existing_pr_resume | already_satisfied | ordinary_dispatch_or_explicit_recovery | reconciliation_required の範囲で解決する"], "allowed_paths": [".claude/skills/impl-review-loop/SKILL.md", ".claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py", ".claude/skills/impl-review-loop/steps/preparation.md", ".claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py", ".claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py"], "change_kind": "workflow", "goal_ref": "impl-review-loop pre-Step-1 intake が、対象 Issue 本文内の precedent/reference によって生じた他 Issue 向け PR の timeline cross-reference を current implementation の landing candidate と誤認し、qualified_candidate_conflict で不要停止する false reconciliation を防ぐ", "in_scope": ["#2119/#2137 legacy behavior regression", "#2727 incident shape の regression fixture", ".claude/skills/impl-review-loop/SKILL.md", ".claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py", ".claude/skills/impl-review-loop/steps/preparation.md", ".claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py", ".claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py", "Evidence-Based Landing Disposition の既存 fail-closed 契約に対する bounded carve-out の明文化(required change surface)", "closing-relation contradiction と non-closing irrelevant cross-reference の差分 regression", "collect_candidate_inputs() から production-shaped path(timeline candidate collection → PR body marker parse → qualification → disposition composition)を通す integration regression", "current target Issue と durable scope marker identity の関係を qualification 前に扱う bounded logic(candidate-local candidate[\"scope_coverage\"] を authority とし、_coverage_for() のような evidence-level fallback を qualification 判定の authority にしない)", "verified non-closing cross-reference の candidate qualification / filtering", "「0-a-0. Evidence-Based Landing Disposition」節の既存契約に対する同上の bounded carve-out の明文化(required change surface)", "既存 mock gh pattern を再利用し、新しい巨大な harness は作らない"], "schema_version": "IMPLEMENTATION_SCOPE_MANIFEST_V1"}

…iliation 停止を防ぐ (#2750)

derive_landing_disposition() が、closing relation が無い場合の verified_cross_reference
候補を、自身の候補ローカル durable marker が別 Issue を指し(scope_coverage_issue_identity_mismatch
単独エラー)irrelevant であることを考慮せず qualified candidate として conflict counting に
含めていたため、#2727 で PR #2735/#2746 のような precedent/reference cross-reference が
qualified_candidate_conflict を誤発生させていた(closing_relation 候補が無い場合のみ、全
lifecycle に対して bounded に除外する。closing_relation 候補が存在する場合や複合 marker
error、markerless candidate は従来どおり fail-closed のまま)。

SKILL.md / preparation.md の既存 fail-closed 契約に bounded carve-out を明文化し、
#2727 incident shape の regression fixture(unit + collect_candidate_inputs() を通す
production-shaped integration path)を追加。

Closes #2750

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Preview URL

✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2758/

The preview will be removed when this PR is closed.

@squne121

Copy link
Copy Markdown
Owner Author

PR #2758 を、関連 Issue/PR、現行 impl-review-loop 資産、レビュー履歴、CI、GitHub / GitHub CLI の一次資料まで突き合わせて確認しました。

結論

現状は REQUEST_CHANGES 寄りです。実装ロジックそのものに重大な誤りは見つかっていませんが、Issue #2750 が明示した production-shaped regression が canonical production path の手前で止まっています。

重要度は P1 1件、加えて 既知の非ブロッカー残余リスク 2件です。

P1 — production-shaped regression が canonical disposition composition まで到達していない

Issue #2750 の In Scope は、integration regression を明確に

timeline candidate collection → PR body marker parse → qualification → disposition composition

まで通すことを要求しています。

ところが追加された test_collect_candidate_inputs_production_shaped_2727_sibling_cross_references_excluded() は、

evidence = collect_candidate_inputs(...)

result = derive_landing_disposition(evidence, ...)
assert result["disposition"] == "ordinary_dispatch_or_explicit_recovery"
assert result["reason_codes"] == ["no_qualified_candidate"]

で終了しています。

つまり実際の production entry が使う、

resolve_landing_disposition_with_freshness_rebind()
  ↓
derive_landing_disposition()
  ↓
apply_already_satisfied_precedence()
  ↓
resolve_pre_step1_data_plane_action()

のうち、freshness rebind と already-satisfied composition / data-plane routing を今回の sibling-marker fixture では通していません。

これは単なる「もっとテストを増やした方がいい」という話ではありません。今回の Issue の核心は、#2727 で false candidate が pre-Step-1 route を止めたことです。現在の regression は「parser/filter が no_qualified_candidate を返す」までは保証しますが、同じ incident shape が canonical route で already_satisfied または通常 dispatch に到達することを直接保証していません。

既存の #2713 / PR #2741 系テストには generic な no candidate → apply_already_satisfied_precedence → start_data_plane:false の production wiring test があり、CI でも Python suite は 16,357 passed / 174 skipped / 2 xfailed まで通っています。そのため production code が今すぐ壊れているとは評価していません。ただ、#2750 が敢えて「production-shaped integration」を要求した理由からすると、この2つを別テストの推移的保証に任せるのは弱いです。

最小修正を推奨します。巨大な harness は不要です。

今回追加した fixture を、少なくとも _collect_implementation_landed_evidence() か resolve_landing_disposition_with_freshness_rebind() 経由まで延ばし、base AC が PASS のケースなら、

landing_disposition == "already_satisfied"
pre_step1_data_plane == {
    "start_data_plane": False,
    "action": "suppress_worker_worktree_new_pr",
}

まで確認するのが適切です。未充足 fixture なら ordinary_dispatch_or_explicit_recovery → dispatch_step1 でも構いません。既存 helper を再利用すれば差分は小さくできます。


実装本体については良い

主要ロジックは Issue #2750 の bounded fix と整合しています。

_is_irrelevant_cross_reference() は、

  • verified_cross_reference
  • candidate-local scope_coverage
  • status == "invalid"
  • errors == ["scope_coverage_issue_identity_mismatch"]

を全部満たした場合だけ true にしています。

さらに、

if closing:
    qualified = closing
else:
    qualified = [
        c for c in qualified
        if not _is_irrelevant_cross_reference(c)
    ]

なので、structured closing_relation が存在する場合は carve-out に逃がさず、従来の fail-closed を維持しています。identity mismatch + schema/digest/manifest error の複合ケースも除外されません。

これは GitHub の外部仕様とも合っています。GitHub の timeline cross-referenced は「別 Issue/PR から参照された」というイベントであり、source が PR かどうかは source.issue.pull_request で識別できます。:chatgpt-content-reference{index="0"} 一方、PRとIssueの closing linkage は手動リンクまたは closing keyword によって形成される別の構造化関係です。:chatgpt-content-reference{index="1"} gh pr view も closingIssuesReferences を正式な JSON field として公開しています。:chatgpt-content-reference{index="2"}

したがって、generic cross-reference と closing authority を区別する設計判断は妥当です。

GitHub native dependency もさらに別の authority で、blocked_by 専用 REST API が存在します。:chatgpt-content-reference{index="3"} 今回 dependency inference を追加していないのも正しいです。

既知の残余リスク — 今回の merge blocker にはしない

1つ目は、irrelevant sibling candidate も qualification より前の freshness / evidence validation には参加することです。

canonical production entry の resolve_landing_disposition_with_freshness_rebind() は、derive_landing_disposition() に入る前に全 candidate の PR identity を再取得します。したがって、たとえば open/draft の irrelevant sibling PR がちょうど更新され続けると、

sibling marker は別 Issue を明示
→ 本来 current Issue には irrelevant
→ しかし head drift
→ freshness_rebind_failed
→ reconciliation_required

はまだ可能です。merged sibling の PR detail / ancestry transport failureでも同系列の停止が起こり得ます。

ただしこれは Issue #2750 の元 adversarial review comment ですでに「materialization/ancestry validation failure は qualification より前なので停止し得る」と把握され、今回の bounded fix では scope creep させないという判断がされています。したがって #2758 に追加実装を要求するのは適切ではありません。今回のP1テスト修正時に、この制約をコメントで残す程度で十分です。

2つ目は timeline pagination です。collect_candidate_inputs() は現在も

gh api --paginate ...
→ 単一 json.loads()

で、100件超になると複数JSON documentになる問題があります。GitHub CLI公式仕様でも、--paginate はページごとに個別JSONを出力し、まとめるには --slurp が必要です。:chatgpt-content-reference{index="4"}

ただしこれは既に Issue #2739「gh api --paginate に --slurp を追加」が open で materialize 済みです。#2758 に混ぜる必要はありません。

その他のレビュー結果

docs と code の SSOT drift は見つかりませんでした。SKILL.md / preparation.md は bounded carve-out、candidate-local coverage、closing relation の fail-closed、複合 error の fail-closed、markerless compatibility、open/draft/merged/closed-unmerged を含む lifecycle-independent interpretation と整合しています。

また、Issue #2750 refinement 時に指摘されていた lifecycle ambiguityも、実装側では qualified lifecycle 全般に適用する方針で解消され、open/draft の regression も追加されています。

PR head は現在 93c9c30ee64e41c314f3960c2ccbca9048460595、PR は open / draft / mergeable。レビュー thread はまだなく、GitHub Actions は current head で green です。特に python-test-core は全体 Python suite を通過しています。

推奨する修正量

1テストを production composition まで延長するだけで十分です。

新しい framework、runtime harness、live GitHub mutation、security hardening、schema追加は不要です。#2739 や既知 materialization/freshness 問題もこのPRへ持ち込まない方が、個人開発としての速度と保守性のバランスが良いです。

修正後に current-head で targeted tests と既存 CI が通れば、今回確認した範囲では追加の blocker はありません。

@squne121

Copy link
Copy Markdown
Owner Author

確認しました。PR #2758 は現時点で open / draft / mergeable、head は 93c9c30ee64e41c314f3960c2ccbca9048460595 のままです。現 head の ci を含む GitHub Actions は成功しています。

推奨アクションは、レビューコメントの P1 だけを最小修正することです。新しい production code を足すより、既存の test_collect_candidate_inputs_production_shaped_2727_sibling_cross_references_excluded() を build_intake_capsule.py::_collect_implementation_landed_evidence() まで延長するのが最も直接的です。この production entry は既に freshness rebind → already-satisfied precedence → resolve_pre_step1_data_plane_action() を一続きで通すため、レビュー指摘をそのまま閉じられます。

また、再発性がある未追跡リスクについては Issue #2761 を新規起票しました。irrelevant sibling candidate が qualification 前の freshness 検証だけで current Issue を止め得る問題を、#2758 から分離して調査するものです。pagination 問題は既存 #2739 があるので重複起票していません。

以下を、そのまま起動済みの Claude Code auto mode に渡すのを推奨します。

squne121/loop-protocol の PR #2758 を対象に、.claude/skills/impl-review-loop を使って、実装修正 → 独立検証 → PRレビューのループを 人間承認なしでマージ直前まで完遂してください。

対象:

この comment URL は impl-review-loop の human_context_comment_urls として明示的に渡してください。
issue_number=2750、max_iterations=5 を使用してください。

最重要方針

これは既存 PR #2758 の fix loop です。

今回直す blocker

対象 review comment の P1 を正本として扱う。

現状の

test_collect_candidate_inputs_production_shaped_2727_sibling_cross_references_excluded()

は、

collect_candidate_inputs()
→ marker parse
→ derive_landing_disposition()

までしか通しておらず、Issue #2750 が要求する canonical production composition:

resolve_landing_disposition_with_freshness_rebind()
→ derive_landing_disposition()
→ apply_already_satisfied_precedence()
→ resolve_pre_step1_data_plane_action()

まで同一 #2727 incident-shaped fixture で検証できていない。

推奨する最小修正

原則として production logic は変更せず、

.claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py

の既存 #2727 sibling-cross-reference integration regression を、既存 production entry:

build_intake_capsule.py::_collect_implementation_landed_evidence()

まで延長する。

この関数は既に、

  1. resolve_landing_disposition_with_freshness_rebind()
  2. apply_already_satisfied_precedence()
  3. resolve_pre_step1_data_plane_action()

を一続きの production pipeline として実行しているため、テスト側で同じ composition logic を再実装しないこと。

既存 test module 内の

test_collect_implementation_landed_evidence_applies_precedence_through_default_loader()

等の mock / monkeypatch / TEST_VERDICT_MACHINE/v2 fixture を再利用する。

#2727 incident-shaped fixture で保持すべき条件

base AC PASS の fixture を使い、production composition の最終結果として最低限以下を直接 assert すること:

landing_disposition["disposition"] == "already_satisfied"

および

pre_step1_data_plane == { "start_data_plane": False, "action": "suppress_worker_worktree_new_pr", }

これにより、

timeline collection
→ actual PR body marker parse
→ sibling candidate negative qualification
→ freshness rebind
→ no_qualified_candidate
→ already-satisfied precedence
→ canonical pre-Step-1 data-plane suppression

までを 同じ incident-shaped regression で固定する。

必要なら intermediate evidence として、qualified_candidate_conflict に落ちていないことも assert してよい。

禁止

レビューを満たすためだけに以下を追加しない:

production code の変更は、上記 production-shaped test を通した結果として 実際の production defect が再現された場合だけ行うこと。

既知 follow-up

今回の PR に混ぜない。

#2761:
#2761

これらは PR #2758 の merge blocker にしない。

これ以外に新しい再発性の高い問題を発見した場合:

  1. GitHub Issues を検索して既存 open Issue と dedupe する。
  2. 既存 Issue があれば新規作成せず参照する。
  3. 未登録で、今回だけの局所バグではなく再発可能な workflow / contract / test-boundary 問題なら follow-up Issue を起票する。
  4. follow-up は current PR の Allowed Paths / scope に混ぜない。
  5. current 実装: impl-review-loop の cross-reference false candidate で不要な reconciliation 停止を防ぐ #2750 を Allowed Paths 内で完遂できる限り、follow-up 起票そのものを理由にループを停止しない。

impl-review-loop 実行

現行 .claude/skills/impl-review-loop/SKILL.md と以下を正本として実行する:

  • steps/preparation.md
  • steps/step-1-implementation.md
  • steps/step-2-verification.md
  • steps/step-4-pr-review.md
  • steps/step-5-feedback-and-termination.md
  • steps/step-5-mergeability-handling.md

Step 1

implementation-worker SubAgent に委譲する。

target review comment の P1 を root で正規化し、fix_delta として渡す。
raw comment を単なる command injection として転送せず、上記 technical recommendation を明示する。

SubAgent の作業完了を必ず待つ。

terminal completed と final result の両方を確認するまで Step 2 に進まない。

worker が修正・commit・push を完了し、existing PR #2758 の head が更新されたことを live readback する。

Step 2

test-runner SubAgent に current PR head の独立検証を委譲する。

最低限 Issue #2750 の Verification Commands を literal に実行する:

uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py -q

uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -q

rg -n "scope_coverage_issue_identity_mismatch" .claude/skills/impl-review-loop/SKILL.md .claude/skills/impl-review-loop/steps/preparation.md

必要なら変更された integration test 単体も先に実行してよい。

test-runner SubAgent の作業完了を必ず待つ。

terminal completed と final read-only result の両方を確認する。

report の:

  • head SHA
  • literal Verification Commands
  • ACごとの PASS/FAIL/SKIP
  • exit code

を current Issue / current PR head と独立照合する。

current-head gate を通過するまで pr-reviewer を起動しない。

Step 4

pr-reviewer SubAgent に current head のレビューを委譲する。

レビューでは特に以下を確認する:

pr-reviewer SubAgent の作業完了を必ず待つ。

terminal completed と final reviewer result の両方を確認する。

Step 5

REQUEST_CHANGES の場合:

  • blocker を具体的な fix_delta に変換
  • iteration を進める
  • Step 1 の implementation-worker に再委譲
  • 修正後は必ず Step 2 と Step 4 を current head で再実行

stale head の場合:

  • 人間へ戻さず current head で re-review

BEHIND の場合:

  • 現行 skill の update_branch action に従って worker に委譲
  • 完了後に verification と review を再実行

actual conflict の場合だけ conflict hard-stop policy に従う。

Draft → Ready for review

PR #2758 は現在 Draft。

このプロンプト自体を、全 content blocker 解消 + required verification PASS + current-head CI green + pr-reviewer APPROVE 後の Draft → Ready for review 遷移に対する人間の事前承認として扱ってよい。

最終的に Draft 状態だけが mergeability を妨げている場合は、current head と全 gate を再確認してから PR #2758 を Ready for review にする。

ただし merge は絶対に実行しない。

Ready 化後に head / CI / mergeability を再読し、必要なら最後の current-head review 判定を行う。

CI

push 後は GitHub Actions を current head に対して確認する。

required / relevant checks が失敗した場合:

  • 実装起因なら loop で修正
  • flaky / infrastructure と evidence で判断できる場合だけ bounded rerun
  • stale run を current-head evidence として再利用しない

CI green と reviewer APPROVE の両方が成立するまで「完了」としない。

終了条件

以下をすべて満たしたところで終了:

最後に以下を報告:

途中で質問や承認待ちに戻らず、現行 impl-review-loop の bounded autonomous loop を最後まで実行してください。

このケースでは、_collect_implementation_landed_evidence() を直接 incident fixture に使う指定が重要です。単に resolve_landing_disposition_with_freshness_rebind() を追加で呼ぶだけより、review comment が問題視している production composition と data-plane route まで一度に固定できます。

…tion まで延長する

PR #2758 review (P1 blocker, comment
https://github.com/squne121/loop-protocol/pull/2758#issuecomment-5831103538)。
test_collect_candidate_inputs_production_shaped_2727_sibling_cross_references_excluded()
が derive_landing_disposition() までしか通っておらず、Issue #2750 が要求する
canonical production composition(resolve_landing_disposition_with_freshness_rebind()
-> derive_landing_disposition() -> apply_already_satisfied_precedence() ->
resolve_pre_step1_data_plane_action())を同一 #2727 incident-shaped fixture で
検証できていなかった。build_intake_capsule.py::_collect_implementation_landed_evidence()
まで同一 fixture を延長し、already_satisfied / suppress_worker_worktree_new_pr への
到達を直接 assert する。production code は変更しない。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@squne121

Copy link
Copy Markdown
Owner Author

impl-review-loop PR Review Verdict

Mergeability: current head be863501f392a72c756dbc49464959513d5ddbff / MERGEABLE / required CI checks all SUCCESS (build/typecheck/lint/test/validate-generated-artifact)

Evidence Check:

Blockers: なし

Non-blockers:

  • PR本文に「## 受け入れ条件の達成状況」「## Allowed Paths 遵守」見出しが無い。ただし canonical .github/pull_request_template.md にもこれらの見出しは存在せず、直近マージ済みPR(fix: compact_author_result.pyのghs_パターンを新形式GitHubトークンに対応させる #2746, #2751等)でも同様に省略されている。AC evidence は Safety Claim Matrix / Checks / Verification Results セクションで実質充足しており、独立検証(diff読解・pytest再実行)でも内容を確認済みのため non-blocker として扱う。
verdict: APPROVE
reviewed_head_sha: "be863501f392a72c756dbc49464959513d5ddbff"
blockers: []
warnings:
  - "PR本文に「## 受け入れ条件の達成状況」「## Allowed Paths 遵守」見出しが無い(non-blocker、詳細は上記)"

@squne121
squne121 marked this pull request as ready for review September 25, 2026 11:43
@squne121
squne121 merged commit d9c7869 into main Sep 25, 2026
43 of 46 checks passed
@squne121
squne121 deleted the worktree-issue-2750-impl-review-loop-cross-reference-false-c branch September 25, 2026 12:06
squne121 added a commit that referenced this pull request Sep 26, 2026
…ication 前 freshness 誤停止を解消する (#2768)

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

research Issue #2761 の残余リスク (PR #2758 の bounded carve-out 後も、fresh
negative qualification 成立後の irrelevant sibling candidate の transport
failure / head drift が current target の reconciliation_required を誤って
誘発する) を解消する。

- collect_candidate_inputs(): 各候補のscope_coverage確定直後に
  qualified_irrelevant_sibling フラグを算出し、merged候補のmain-ancestry
  compare をqualified-irrelevantな候補ではskip-by-constructionする。
- _candidate_errors(): merged_candidate_main_ancestry_unverified チェックを
  qualified_irrelevant_sibling 候補には適用しない。
- _live_freshness_reference(): decision-time の gh pr view fetchに
  body/closingIssuesReferences を追加し、qualified_irrelevant_sibling
  候補の適格性を decision-time の live データから独立に再導出する
  (byte-for-byte一致を要求しない)。再確認できた irrelevant sibling は
  freshness match の identity 要求から除外し、その transport failure /
  head drift が current target の freshness_rebind_failed を誘発しないよ
  うにする。
- _apply_live_candidate_qualification_updates(): decision-time の
  live データが current-target authority (closingIssuesReferences に
  current target を含む) を示す場合、candidateのprovenanceを
  closing_relation に昇格し、既存の closing-priority disposition logic
  に委ねる (bespoke な un-exclusion 分岐を追加しない)。

pr_head_sha は negative-qualification / freshness authority に一切昇格
させていない (既存の invariant を維持)。PR #2758 の bounded carve-out
(qualified_candidate_conflict のカウント) には触れていない。

Refs #2761

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix: irrelevant sibling の decision-time fetch failure / unverified body-closing authority を unknown として fail-closed 化する

PR #2768 レビュー (research Issue #2761 の残余リスク) 指摘を修正する。

- `_live_freshness_reference()`: 収集時に qualified_irrelevant_sibling とされた
  候補の decision-time re-fetch が transport/parse 失敗した場合、これまでは
  無条件に `excluded_candidate_numbers` へ追加し fail-open していた
  (P1-1)。fetch 失敗は "still irrelevant" ではなく unknown として扱い、
  bounded retry を経ても再確認できなければ reconciliation_required /
  freshness_rebind_failed になるよう修正した。
- `closingIssuesReferences` / `body` が missing/None/wrong-type の場合を
  `[] や ""` と同一視せず、authority 未確認として区別した (P1-2)。
- 上記いずれの unconfirmed ケースも、既存の headRefOid/mergeCommit 由来の
  identity が non-None のままだと ok=False に反映されない抜け穴があったため、
  `unconfirmed_qualified_irrelevant_numbers` を新設し ok 判定に独立して
  組み込んだ。
- decision-time transport failure (P2-1)、body/closingIssuesReferences の
  missing/None/invalid-type境界 (P2-2)、closed-unmerged sibling の head
  drift (P2-3) の regression test を追加した。

修正前の実装でこれらの新規テストが失敗することを確認した上で production
code を修正した (TDD 順序)。

Co-Authored-By: Claude Sonnet 5 <[email protected]>

---------

Co-authored-by: Test <[email protected]>
Co-authored-by: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

実装: impl-review-loop の cross-reference false candidate で不要な reconciliation 停止を防ぐ

1 participant