Repository navigation
fix: impl-review-loop の cross-reference false candidate による不要な reconciliation 停止を防ぐ - #2758
Conversation
…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]>
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2758/ The preview will be removed when this PR is closed. |
|
PR #2758 を、関連 Issue/PR、現行 結論現状は 重要度は P1 1件、加えて 既知の非ブロッカー残余リスク 2件です。 P1 — production-shaped regression が canonical disposition composition まで到達していないIssue #2750 の In Scope は、integration regression を明確に
まで通すことを要求しています。 ところが追加された 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 が使う、 のうち、freshness rebind と already-satisfied composition / data-plane routing を今回の sibling-marker fixture では通していません。 これは単なる「もっとテストを増やした方がいい」という話ではありません。今回の Issue の核心は、#2727 で false candidate が pre-Step-1 route を止めたことです。現在の regression は「parser/filter が 既存の #2713 / PR #2741 系テストには generic な 最小修正を推奨します。巨大な harness は不要です。 今回追加した fixture を、少なくとも landing_disposition == "already_satisfied"
pre_step1_data_plane == {
"start_data_plane": False,
"action": "suppress_worker_worktree_new_pr",
}まで確認するのが適切です。未充足 fixture なら 実装本体については良い主要ロジックは Issue #2750 の bounded fix と整合しています。
を全部満たした場合だけ true にしています。 さらに、 if closing:
qualified = closing
else:
qualified = [
c for c in qualified
if not _is_irrelevant_cross_reference(c)
]なので、structured これは GitHub の外部仕様とも合っています。GitHub の timeline したがって、generic cross-reference と closing authority を区別する設計判断は妥当です。 GitHub native dependency もさらに別の authority で、 既知の残余リスク — 今回の merge blocker にはしない1つ目は、irrelevant sibling candidate も qualification より前の freshness / evidence validation には参加することです。 canonical production entry の はまだ可能です。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 です。 で、100件超になると複数JSON documentになる問題があります。GitHub CLI公式仕様でも、 ただしこれは既に Issue #2739「 その他のレビュー結果docs と code の SSOT drift は見つかりませんでした。 また、Issue #2750 refinement 時に指摘されていた lifecycle ambiguityも、実装側では qualified lifecycle 全般に適用する方針で解消され、open/draft の regression も追加されています。 PR head は現在 推奨する修正量1テストを production composition まで延長するだけで十分です。 新しい framework、runtime harness、live GitHub mutation、security hardening、schema追加は不要です。#2739 や既知 materialization/freshness 問題もこのPRへ持ち込まない方が、個人開発としての速度と保守性のバランスが良いです。 修正後に current-head で targeted tests と既存 CI が通れば、今回確認した範囲では追加の blocker はありません。 |
|
確認しました。PR #2758 は現時点で open / draft / mergeable、head は 推奨アクションは、レビューコメントの P1 だけを最小修正することです。新しい production code を足すより、既存の また、再発性がある未追跡リスクについては Issue #2761 を新規起票しました。irrelevant sibling candidate が qualification 前の freshness 検証だけで current Issue を止め得る問題を、#2758 から分離して調査するものです。pagination 問題は既存 #2739 があるので重複起票していません。 以下を、そのまま起動済みの Claude Code auto mode に渡すのを推奨します。
対象:
この comment URL は 最重要方針これは既存 PR #2758 の fix loop です。
今回直す blocker対象 review comment の P1 を正本として扱う。 現状の
は、
までしか通しておらず、Issue #2750 が要求する canonical production composition:
まで同一 #2727 incident-shaped fixture で検証できていない。 推奨する最小修正原則として production logic は変更せず、
の既存 #2727 sibling-cross-reference integration regression を、既存 production entry:
まで延長する。 この関数は既に、
を一続きの production pipeline として実行しているため、テスト側で同じ composition logic を再実装しないこと。 既存 test module 内の
等の mock / #2727 incident-shaped fixture で保持すべき条件
base AC PASS の fixture を使い、production composition の最終結果として最低限以下を直接 assert すること:
および
これにより、 timeline collection までを 同じ incident-shaped regression で固定する。 必要なら intermediate evidence として、 禁止レビューを満たすためだけに以下を追加しない:
production code の変更は、上記 production-shaped test を通した結果として 実際の production defect が再現された場合だけ行うこと。 既知 follow-up今回の PR に混ぜない。
これらは PR #2758 の merge blocker にしない。 これ以外に新しい再発性の高い問題を発見した場合:
impl-review-loop 実行現行
Step 1
target review comment の P1 を root で正規化し、 SubAgent の作業完了を必ず待つ。 terminal worker が修正・commit・push を完了し、existing PR #2758 の head が更新されたことを live readback する。 Step 2
最低限 Issue #2750 の Verification Commands を literal に実行する:
必要なら変更された integration test 単体も先に実行してよい。 test-runner SubAgent の作業完了を必ず待つ。 terminal report の:
を current Issue / current PR head と独立照合する。 current-head gate を通過するまで pr-reviewer を起動しない。 Step 4
レビューでは特に以下を確認する:
pr-reviewer SubAgent の作業完了を必ず待つ。 terminal Step 5
stale head の場合:
BEHIND の場合:
actual conflict の場合だけ conflict hard-stop policy に従う。 Draft → Ready for reviewPR #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 判定を行う。 CIpush 後は GitHub Actions を current head に対して確認する。 required / relevant checks が失敗した場合:
CI green と reviewer APPROVE の両方が成立するまで「完了」としない。 終了条件以下をすべて満たしたところで終了:
最後に以下を報告:
途中で質問や承認待ちに戻らず、現行 このケースでは、 |
…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]>
impl-review-loop PR Review VerdictMergeability: current head Evidence Check:
Blockers: なし Non-blockers:
verdict: APPROVE
reviewed_head_sha: "be863501f392a72c756dbc49464959513d5ddbff"
blockers: []
warnings:
- "PR本文に「## 受け入れ条件の達成状況」「## Allowed Paths 遵守」見出しが無い(non-blocker、詳細は上記)" |
…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]>
Summary
implementation_landed_evidence.py::derive_landing_disposition()が、closing relation を持たないverified_cross_referencecandidate について、candidate 自身の durableIMPLEMENTATION_SCOPE_COVERAGE_V1marker が current target Issue とは異なる Issue を指し、かつ marker error がscope_coverage_issue_identity_mismatchの1件だけの場合に限り、その candidate を qualified landing candidate(conflict counting 対象)から bounded に除外するようにした。qualified_candidate_conflictを発生させていた false-positive reconciliation 停止を解消する。closing_relationcandidate が1件でも存在する場合、または marker error が identity mismatch 単独でない(複合エラー)場合、または markerless candidate(実装: CI: Playwright E2E の responsive matrix を専用 lane へ分離し critical path を短縮する #2119/PR feat: Playwright E2E responsive matrix を専用 lane へ分離する #2137 legacy compatibility)は、この carve-out の対象外のまま従来どおり fail-closed(reconciliation_required)を維持する。.claude/skills/impl-review-loop/SKILL.mdとsteps/preparation.mdの既存 fail-closed 契約に、この bounded carve-out を明文化した(AC8、文字列scope_coverage_issue_identity_mismatchを含む)。Checks
uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py -quv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -qrg -n "scope_coverage_issue_identity_mismatch" .claude/skills/impl-review-loop/SKILL.md .claude/skills/impl-review-loop/steps/preparation.mdpnpm系はリポジトリ TypeScript コード非変更のため対象外 — 変更は.claude/skills/impl-review-loop/**の Python script / test / skill doc のみ)Verification Results(検証コマンド結果)
Schema Change Applicability
not_schema_changeIMPLEMENTATION_LANDED_EVIDENCE_V1/IMPLEMENTATION_SCOPE_COVERAGE_V1schema・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
closing_relationcandidate が1件でも存在する場合は一切適用されない(closing relation の identity mismatch は従来どおりreconciliation_required)test_closing_relation_identity_mismatch_stays_reconciliation_required(test_implementation_landed_evidence.py)scope_coverage_issue_identity_mismatchの1件だけの場合のみ適用され、他のエラーと複合している candidate は除外しない(fail-closed 維持)test_non_closing_candidate_with_identity_mismatch_plus_other_marker_error_stays_fail_closedtest_markerless_2119_2137_candidate_is_never_excluded_by_sibling_mismatch_reasoningtest_open_draft_lifecycle_gets_same_sibling_cross_reference_carve_out_as_merged/test_2727_incident_shape_two_sibling_cross_references_do_not_conflictqualified_candidate_conflictが発生しないことを production-shapedcollect_candidate_inputs()経路で確認test_collect_candidate_inputs_production_shaped_2727_sibling_cross_references_excluded(test_implementation_landed_intake_integration.py)Notes
.claude/skills/impl-review-loop/SKILL.mdのimplement-issue手順に従い worktree 内で実装・検証した。