Repository navigation
feat: add evidence-based landing intake - #2700
Conversation
Derive pre-Step-1 disposition from validated candidate, ancestry, scope, and freshness evidence to prevent duplicate implementation dispatch. Co-Authored-By: Claude Code <[email protected]>
Preview URLPreview removed (PR #2700 closed). |
Co-Authored-By: Claude Code <[email protected]>
Co-Authored-By: Claude Code <[email protected]>
Co-Authored-By: Claude Code <[email protected]>
Co-Authored-By: Claude Code <[email protected]>
結論現状は Request Changes 相当です。 方針自体、つまり ただし、現在の head Issue #2699 側にも、marker付き open/draft と merged の scope drift をどう route するかについて 修正順
個人趣味開発という前提では、署名、attestation、追加ledger、厳格な権限ハーネスを増やす必要はありません。今回必要なのは、GitHub read が部分的に失敗したとき「候補が存在しなかった」と誤認しないことと、agentが一意に実行できるrouting contractにすることです。そこを直せば、PRの基本設計は十分活かせます。 現時点ではPRに実質的なレビューコメント/レビューthreadはなく、preview botコメントのみです。したがって上記は既存レビューの追認ではなく、現head・Issue contract・関連PR・CI・GitHub公式仕様を突き合わせた独立レビューです。PR #2700 conversation 必要なら、PR #2700 のhead更新を監視して、これらのP0/P1が解消された時点で再レビューするよう設定できます。 ## 結論現状は Request Changes 相当です。 方針自体、つまり ただし、現在の head Issue #2699 側にも、marker付き open/draft と merged の scope drift をどう route するかについて
修正順
個人趣味開発という前提では、署名、attestation、追加ledger、厳格な権限ハーネスを増やす必要はありません。今回必要なのは、GitHub read が部分的に失敗したとき「候補が存在しなかった」と誤認しないことと、agentが一意に実行できるrouting contractにすることです。そこを直せば、PRの基本設計は十分活かせます。 現時点ではPRに実質的なレビューコメント/レビューthreadはなく、preview botコメントのみです。したがって上記は既存レビューの追認ではなく、現head・Issue contract・関連PR・CI・GitHub公式仕様を突き合わせた独立レビューです。[PR #2700 conversation](https://github.com/squne121/loop-protocol/pull/2700?utm_source=chatgpt.com) 必要なら、PR #2700 のhead更新を監視して、これらのP0/P1が解消された時点で再レビューするよう設定できます。 |
|
確認したところ、対象レビューは head 推奨アクションは次の方針です。
そのまま Claude Code に投入できる形です。 既に auto mode で起動しているこの対話的 Claude Code セッションで、以下を人間の中間承認なしで最後まで実行してください。 対象:
目的は、anchor comment の findings を fresh current head に対して再検証し、残っている blocker / regression / contract mismatch を修正し、canonical PR の merge、auto-merge、有効化済みの merge queue 投入は行わないこと。 OWNER decision: #2699 の未解決 scope-drift policyIssue #2699 の canonical policy は以下です。
live Issue #2699 の contract がこの OWNER decision とまだ矛盾する場合は、canonical workflow が許す既存の issue-edit 経路で この判断だけを反映する最小 contract alignment を行ってください。広範な issue-refinement-loop を最初からやり直さないでください。 agent-generated comment を human-authored provenance と偽装してはなりません。この interactive OWNER directive を利用する canonical context-binding 方法が repository 内にある場合はそれを使ってください。 自律実行ポリシー
最初に fresh read するもの作業開始時点の repository / GitHub state を SSOT としてください。 最低限、以下を fresh read してください。
anchor review は head 現在の head がそれより進んでいる場合、anchor findings を無条件に「未修正」と扱わず、current head で一つずつ再検証してください。逆に head が進んだというだけで「修正済み」とも扱わないでください。 SubAgent completion barrier — 必須この作業では SubAgent を使用してください。 また、各 SubAgent の作業完了を必ず待ち、その structured result を main/root thread が検証してから次工程へ進んでください。 SubAgent を起動したまま main thread が先回りして実装・判定・終了してはいけません。 canonical roles:
必要に応じて read-only investigation 用 sibling SubAgent を追加して構いませんが、その場合も join/completion を待ってください。 main/root thread は control-plane を担当し、canonical skill が worker delegation を要求する data-plane mutation を自分で横取りしないでください。 Phase 0 — anchor findings の fresh triage最初に read-only investigation を行い、anchor comment の各 finding を current head に対して以下のいずれかへ分類してください。
分類には必ず repository evidence / current test evidence を付けてください。 特に以下を優先してください。 A.
|
open_pr.py の scope-coverage marker 生成を new-PR-creation 経路限定に修正し (P0-1)、AC9 decision-time freshness rebind、candidate materialization failure の contradictory 化 (P0-3)、merged candidate の malformed marker precedence (P1-1)、cross-reference repository identity 検証 (P1-2) を implementation_landed_evidence.py に実装する。AC4/AC5/AC10 の欠落テストと AC12 のテスト名不一致を解消し (P1-4)、runtime verifier が production の derive_landing_disposition() を実際に消費するよう修正する (P1-5)。SKILL.md に Evidence-Based Landing Disposition 節を追加する (P1-3)。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
test_scope_normalizer_excludes_operational_prose_and_progress_state を Issue #2699 AC2 の要求どおりの名前で新規追加し、operational prose / checkbox 状態 / runtime evidence の除外とリスト順序非依存の digest 安定性を 検証する。あわせて CI ruff check が指摘した 4 件の E501(120 文字超)を ロジック変更なしで行分割修正する。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
…2699) open_pr.py の scope-coverage marker 生成(P0-1 fix_delta 後は new-PR-creation 経路限定)が get_linked_issue_body() / resolve_head_sha() という新規依存を 要求するようになったが、test_open_pr_validation_hook.py / test_open_pr_canonical_repo_regression.py / test_open_pr_overlap_removal.py の create-path テストはこれらを mock していなかったため、gh 認証を持たない CI サンドボックスで E_IMPLEMENTATION_SCOPE_COVERAGE_UNAVAILABLE により 5件 FAIL していた(ローカル環境では gh 認証済みのため偶然 pass していた)。 resolve_canonical_repository と同種の既存パターンに倣い、該当箇所へ monkeypatch を追加する(ロジック・assertion変更なし)。Scope Delta 承認 (Issue #2699 body_sha256: sha256:80ca5d18c2ea9ee19dffe5a364df2af672d506b 6ce818d90cada4721e19b7808)に基づく。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
impl-review-loop Step 5: LOOP_VERDICTverdict: APPROVE reviewed_head_sha: OWNER の敵対的レビュー(comment #5757138663、対象 head Issue #2699 側の 検証済み
Warning(non-blocking)
このコメントは |
Summary
Issue #2699 の pre-Step-1 intake に、実装済み scope を判定する durable evidence を追加します。PR 作成時に
IMPLEMENTATION_SCOPE_COVERAGE_V1を本文へ保存し、intake 側は live Issue scope、candidate provenance、main ancestry、freshness を read-only で照合します。これにより既存 PR の再開・reconciliation・通常 dispatch を data-plane 起動前に分離します。Checks
uv run --locked pytest .claude/skills/open-pr/tests/test_implementation_scope_snapshot_producer.py .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py .claude/skills/impl-review-loop/tests/test_already_satisfied_routing.py .claude/skills/impl-review-loop/tests/test_already_satisfied_early_exit_e2e_runtime_only.py .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py .claude/skills/impl-review-loop/tests/test_preparation_entry_policy.py .claude/skills/open-pr/scripts/tests/test_open_pr_validation_hook.py .claude/skills/open-pr/scripts/tests/test_open_pr_canonical_repo_regression.py .claude/skills/open-pr/scripts/tests/test_open_pr_overlap_removal.py -q→ 110 passeduv run --locked python3 .claude/skills/impl-review-loop/scripts/verify_implementation_landed_intake_runtime.py --artifact-path artifacts/runtime-verification-AC12-20260921T095500Z.log→ PASS, exit 0pnpm typecheck && pnpm lint && pnpm test && pnpm buildおよびuv run --locked pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py→ 全て PASS受け入れ条件の達成状況
現在の head(
09d0877b284e1dc749bc1408126ab2f4b89560c7)に対し、Issue #2699 の Verification Commands を個別に再実行して確認しました。open_pr.pyの新規 PR 作成経路が live Issue body から canonical normalizer でscope_manifestを構築し、IMPLEMENTATION_SCOPE_COVERAGE_V1を PR body に埋め込んでからcreate_pr()を呼ぶ。marker 生成は dry-run / 既存 PR resume 経路には依存しない。(根拠: VC PASS —test_open_pr_embeds_implementation_scope_coverage_marker)## Remaining Parent Gaps)/ runtime evidence / リスト記載順序が digest に影響しないことを確認する専用テストを追加。(根拠: VC PASS —test_scope_normalizer_excludes_operational_prose_and_progress_state)IMPLEMENTATION_LANDED_EVIDENCE_V1の strict validator が target identity / freshness / candidate provenance / lifecycle / merge OID ancestry / state-specific coverage の不足・型不正・stale・identity mismatch を landed に補完推論しないことを検証。(根拠: VC PASS —test_validator_rejects_missing_stale_and_identity_mismatched_evidence)apply_already_satisfied_precedence()を追加し、既存route_loop_verdict_v2.py::resolve_already_satisfied_early_exit_decision()を再利用(再実装しない)して no-qualified-candidate / closed-unmerged-only の両ケースで 実装: impl-review-loop に already_satisfied terminal route を追加する #2607 early-exit が維持されることを確認。(根拠: VC PASS —test_disposition_precedence_reuses_already_satisfied_before_landed_evidence)implementation_already_landedを導出しないことを確認。(根拠: VC PASS —test_legacy_merged_candidate_without_durable_marker_never_yields_implementation_already_landed)existing_pr_resume/reconciliation_requiredが分岐することを確認。(根拠: VC PASS —test_markerless_open_draft_candidate_allowed_paths_coverage_determines_resume_or_reconciliation)reconciliation_requiredになることを確認。(根拠: VC PASS —test_candidate_discovery_dedupes_and_reconciles_conflicting_qualified_candidates)closingIssuesReferences)またはsource.issue.pull_requestの verified cross-reference のみを landing authority とし、genericRefs/ title・branch regex / merged state 単独を authority にしないことを確認。(根拠: VC PASS —test_candidate_discovery_is_not_landing_authority)reconciliation_required(freshness_rebind_failed)になることを確認。(根拠: VC PASS —test_decision_time_freshness_rebind_and_bounded_retry)test_2119_2137_legacy_and_durable_marker_fixture_regressions)implementation_already_landed/reconciliation_required/ 既存already_satisfiedでは data-plane operation を開始せず、existing_pr_resumeでは duplicate PR を作成しないことを確認。(根拠: VC PASS —test_disposition_precedes_worker_worktree_and_new_pr)implementation_already_landedを導出しないこと)を production のderive_landing_disposition()経由で取得し、fixture / fallback に縮退しない runtime artifact を出力する。(根拠: VC PASS —test_live_runtime_verifier_records_2119_2137_legacy_compatibility_without_fixture_fallback、および下記「Runtime Verification Evidence」の live artifact)pnpm typecheck/pnpm lint/pnpm test(1939 件)/pnpm build、model-routing test(24 件)が全て PASS し、Allowed Paths 外を変更していない。(根拠: 下記「検証コマンド結果」「Allowed Paths 遵守」)検証コマンド結果
現在の head(
09d0877b284e1dc749bc1408126ab2f4b89560c7)で以下を個別に再実行し、全て1 passedを確認しました。追加で、Allowed Paths 内の全対象テストファイルをまとめて実行した結果も PASS しています。
Allowed Paths 遵守
本 PR の変更ファイル一覧(
gh pr diff 2700 --name-only)は以下の 13 件で、Issue #2699 の現行## Allowed Paths(Scope Delta で追加されたopen-pr/scripts/tests/配下 3 件を含む、計 17 件)の範囲に全て収まっています。Allowed Paths に含まれるが本 PR では変更していないファイル(test_already_satisfied_routing.py/test_already_satisfied_early_exit_e2e_runtime_only.py/test_build_intake_capsule.py/test_preparation_entry_policy.pyの 4 件)は、上記「検証コマンド結果」で回帰確認のみ実行し編集はしていません。.claude/skills/impl-review-loop/SKILL.md.claude/skills/impl-review-loop/scripts/build_intake_capsule.py.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py.claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.py.claude/skills/impl-review-loop/scripts/verify_implementation_landed_intake_runtime.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.claude/skills/open-pr/scripts/open_pr.py.claude/skills/open-pr/scripts/tests/test_open_pr_canonical_repo_regression.py.claude/skills/open-pr/scripts/tests/test_open_pr_overlap_removal.py.claude/skills/open-pr/scripts/tests/test_open_pr_validation_hook.py.claude/skills/open-pr/tests/test_implementation_scope_snapshot_producer.pyAllowed Paths 外の変更はありません。
Runtime Verification Evidence(動作検証証跡)
Issue #2699 の Runtime Verification Applicability は
decision: immediate(対象 AC12)です。verify_implementation_landed_intake_runtime.pyを live 実行し、artifact を worktree-local のartifacts/配下に保存しました。artifacts/runtime-verification-AC12-20260921T095500Z.loguv run --locked python3 .claude/skills/impl-review-loop/scripts/verify_implementation_landed_intake_runtime.py --artifact-path artifacts/runtime-verification-AC12-20260921T095500Z.logstatus: PASS(exit code 0)、fallback_used: falseissue_identity.number == 2119、pr_identity.number == 2137non_closing_relation: true(feat: Playwright E2E responsive matrix を専用 lane へ分離する #2137 は 実装: CI: Playwright E2E の responsive matrix を専用 lane へ分離し critical path を短縮する #2119 に対し構造化 closing リンクを持たない verified cross-reference)merge_commit_current_main_ancestry: true(compare_status: ahead)legacy_scope_coverage_marker_missing: true(IMPLEMENTATION_SCOPE_COVERAGE_V1marker 欠落)legacy_compatibility_disposition: ordinary_dispatch_or_explicit_recovery(reason_codes: [legacy_or_later_scope_expansion])— production のimplementation_landed_evidence.py::derive_landing_disposition()を実際に呼び出して導出した値であり、implementation_already_landedには縮退していません(fixture / fallback を経由しない live 判定)Schema Change Applicability
IMPLEMENTATION_SCOPE_COVERAGE_V1を追加し、impl-review-loop の consumer が canonical manifest digest と lifecycle disposition を解釈するためです。Schema Consumer Inventory
before: 変更前の状態
open_pr.pyは linked Issue reference のみを本文へ追加し、historical implementation scope の durable record はありませんでした。intake は候補 PR metadata だけでは exact coverage を導出できませんでした。after: 変更後の状態
open_pr.pyは live Issue body と branch HEAD からIMPLEMENTATION_SCOPE_COVERAGE_V1を PR 本文へ埋め込みます。implementation_landed_evidence.pyとbuild_intake_capsule.pyはその marker を検証し、pre-Step-1 data-plane gate を返します。.claude/skills/open-pr/scripts/open_pr.py.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py.claude/skills/impl-review-loop/scripts/build_intake_capsule.py.claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.pySafety Claim Matrix
resolve_pre_step1_data_plane_action()integration regressionNotes