Skip to content

refactor: pre-Step-1 data-plane判定をresolve_pre_step1_data_plane_action()に統合する - #2741

Merged
squne121 merged 2 commits into
mainfrom
worktree-issue-2713-pre-step1-data-plane-dry
Sep 24, 2026
Merged

squne121 merged 2 commits into
mainfrom
worktree-issue-2713-pre-step1-data-plane-dry

Conversation

@squne121

@squne121 squne121 commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

PR #2700 レビューで指摘された DRY 違反(pre-Step-1 data-plane 判定の重複実装・未接続コード)を解消します。build_intake_capsule.py::_collect_implementation_landed_evidence() のインライン素朴分岐を撤去して route_loop_verdict_v2.resolve_pre_step1_data_plane_action() の単一呼び出しに置き換え、implementation_landed_evidence.py::apply_already_satisfied_precedence() を production entry point に実配線しました。あわせて、既定ローダーが route_loop_verdict_v2.py のロードに常に失敗し例外を握り潰していた不具合(sys.modules 未登録)を修正しました。

さらに、本 PR へのレビューコメント(#2741 review)を受けて Issue #2713 が 2026-09-24 に 2 回 amend され、以下 3 点が In Scope / AC8-AC10 として追加されました。本 iteration でこれらも実装・配線済みです。

  • base_ac_satisfied の production source を canonical CLI/public API 境界(main() の --base-ac-verification-result-file フラグ、build_intake_capsule() の base_ac_verification_result パラメータ)から実際に到達可能にする
  • derive_base_ac_satisfied_from_verification_result() の判定強化(既存 adjudicate_vc_result.py::adapt_test_verdict_to_current_vc_result() の TEST_VERDICT_MACHINE/v2 検証ロジックを再利用)
  • _load_route_loop_verdict_v2_module() / build_intake_capsule.py::_load_module() の sys.modules 既存 entry 破壊防止(ロード失敗時に original entry を復元)

Checks

  • 対象回帰テスト: uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py .claude/skills/impl-review-loop/tests/test_build_intake_capsule_advisory_routing.py .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -q → 66 passed
  • .claude/skills/impl-review-loop/tests/ full suite: uv run --locked pytest .claude/skills/impl-review-loop/tests/ -q → 762 passed, 1 skipped, 2 deselected, 2 xfailed
  • uv run ruff check (変更ファイル5件) → クリーン

受け入れ条件の達成状況

現在の head(11e3bf3e9ace791faf74663f142b8e886895f917)に対し Issue #2713 の Verification Commands を個別に再実行して確認しました。

  • AC1: _collect_implementation_landed_evidence() が route_loop_verdict_v2.resolve_pre_step1_data_plane_action() を import し、最終 disposition(apply_already_satisfied_precedence() 適用後の値)に対して一度だけ呼び出している。(根拠: VC PASS — rg -n "resolve_pre_step1_data_plane_action" build_intake_capsule.py)
  • AC2: build_intake_capsule.py に disposition == "ordinary_dispatch_or_explicit_recovery" の素朴な分岐が残存していない(absence-check VC が exit 1 = no match)。
  • AC3: apply_already_satisfied_precedence() が _collect_implementation_landed_evidence() から呼び出されている。pr_exists は landing disposition が既に解決した candidate の lifecycle から implementation_landed_evidence.py::derive_pr_exists_from_landing_candidate() で生成(open/draft/merged→True、closed-unmerged/候補なし→False)。base_ac_satisfied は独立した TEST_VERDICT_MACHINE/v2 相当の Verification-Commands 評価結果から derive_base_ac_satisfied_from_verification_result() で導出し、現行 main HEAD SHA(同一 evidence 収集ステップが取得済みの main_head_sha)とのフレッシュネス一致を要求する。(根拠: VC PASS — rg -n "apply_already_satisfied_precedence" build_intake_capsule.py、test_pr_exists_is_generated_from_candidate_lifecycle_pr_fixtures_not_injected_booleans、test_collect_implementation_landed_evidence_applies_precedence_through_default_loader、test_collect_implementation_landed_evidence_skips_precedence_when_base_ac_undeterminable)
  • AC4: _load_route_loop_verdict_v2_module() が exec_module() 前に sys.modules[spec.name] = module を登録している。既定ロード経路(モジュール注入なし)で apply_already_satisfied_precedence() が実際に route_loop_verdict_v2 を正常ロードして適用できることを regression test で確認。(根拠: VC PASS — rg -n "sys.modules\[spec.name\] = module"、test_default_route_loop_verdict_v2_loader_succeeds_without_module_injection、test_apply_already_satisfied_precedence_fires_through_default_loader、test_collect_implementation_landed_evidence_applies_precedence_through_default_loader)
  • AC5: 判定順序(証拠取得・検証 → landing disposition → already_satisfied 優先順位合成 → 最終 disposition からの start_data_plane/action 一意導出 → capsule 投影)が単線に固定されている。resolve_pre_step1_data_plane_action() は raw evidence を再受理して landing 判定を再計算する経路自体を廃止し、既に解決済みの disposition mapping のみを受け取るよう signature を変更したため、中間結果の二重適用は構造的に不可能。(根拠: route_loop_verdict_v2.py::resolve_pre_step1_data_plane_action() docstring、test_disposition_precedes_worker_worktree_and_new_pr)
  • AC6: 既存 capsule の pre_step1_data_plane キー集合(start_data_plane / action)は変更していない。(根拠: 上記統合テストの assert set(evidence["pre_step1_data_plane"]) == {"start_data_plane", "action"})
  • AC7: .claude/skills/impl-review-loop/tests/ 配下の pytest が全件 PASS。(根拠: 下記「検証コマンド結果」)
  • AC8: production canonical CLI 境界(main() / build_intake_capsule())から base_ac_verification_result を供給でき、already_satisfied → pre_step1_data_plane.start_data_plane == false まで到達することを、private helper への直接引数注入ではなく public API/CLI 経由の統合テストで確認した。main() は --base-ac-verification-result-file <path> を受け取り JSON を読み込んで build_intake_capsule() の base_ac_verification_result パラメータへ渡す。build_capsule_argv() も base_ac_verification_result_file kwarg を additive に扱い(既存の --human-context-comment-url 等と同じパターン)、preparation.md の Step "0-a-0" コマンド例にも配線した。(根拠: VC PASS — rg -n "base_ac_verification_result" build_intake_capsule.py、test_public_build_intake_capsule_reaches_already_satisfied_via_base_ac_verification_result、test_cli_main_reaches_already_satisfied_via_base_ac_verification_result_file、test_cli_main_base_ac_verification_result_file_missing_is_fail_safe_not_fatal、test_build_capsule_argv_materializes_base_ac_verification_result_file_additively)
  • AC9: derive_base_ac_satisfied_from_verification_result() が既存 adjudicate_vc_result.py::adapt_test_verdict_to_current_vc_result() の TEST_VERDICT_MACHINE/v2 検証ロジック(AC identity・command_hash・exit_code・fallback_detected・human_review_required・stop_condition_triggered 等)を _load_adjudicate_vc_result_module() 経由で再利用し、不完全・malformed な runtime_ac_results payload を base_ac_satisfied: true に誤判定しないことをテストで確認した。(根拠: VC PASS — rg -n -e "adapt_test_verdict_to_current_vc_result" -e "adjudicate_vc_result" implementation_landed_evidence.py、test_derive_base_ac_satisfied_from_verification_result_reuses_adjudicate_...、test_derive_base_ac_satisfied_from_verification_result_never_fabricates_a_fallback)
  • AC10: _load_route_loop_verdict_v2_module() / _load_adjudicate_vc_result_module()(implementation_landed_evidence.py)と build_intake_capsule.py::_load_module() の3ローダーすべてで、exec_module() 前に prior_module = sys.modules.get(spec.name) を退避し、ロード失敗時に prior entry が存在すればそれを復元、存在しなければ自身が挿入した entry のみを pop する(他コードが後から挿入した無関係 entry を誤って破壊しない)ことをテストで確認した。(根拠: VC PASS — rg -n -e "sys.modules.get\(spec.name\)" -e "prior_module"、test_route_loop_verdict_v2_loader_restores_prior_entry_on_failure、test_adjudicate_vc_result_loader_restores_prior_entry_on_failure、test_load_module_restores_prior_entry_on_failure、test_load_module_removes_only_its_own_newly_inserted_entry_on_failure)

検証コマンド結果

現在の head(11e3bf3e9ace791faf74663f142b8e886895f917)で以下を再実行し、全て PASS を確認しました。

AC1 : rg -n "resolve_pre_step1_data_plane_action" .claude/skills/impl-review-loop/scripts/build_intake_capsule.py
      → 複数 match(import comment + 実呼び出し行)

AC3 : rg -n "apply_already_satisfied_precedence" .claude/skills/impl-review-loop/scripts/build_intake_capsule.py
      → 複数 match

AC2 : rg -n 'disposition == "ordinary_dispatch_or_explicit_recovery"' .claude/skills/impl-review-loop/scripts/build_intake_capsule.py
      → no match, exit 1(絶対値ではなく absence-check の意図どおり)

AC4 : rg -n "sys.modules\[spec.name\] = module" .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py
      → match

AC8 : rg -n "base_ac_verification_result" .claude/skills/impl-review-loop/scripts/build_intake_capsule.py
      → 複数 match(main() flag、build_intake_capsule() パラメータ、build_capsule_argv() kwarg)

AC9 : rg -n -e "adapt_test_verdict_to_current_vc_result" -e "adjudicate_vc_result" .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py
      → 複数 match

AC10 : rg -n -e "sys.modules.get\(spec.name\)" -e "prior_module" -e "sys\.modules\[spec\.name\] = prior" .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py .claude/skills/impl-review-loop/scripts/build_intake_capsule.py
      → 複数 match(implementation_landed_evidence.py 2ローダー + build_intake_capsule.py::_load_module())

uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py -q
      → 24 passed
uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py -q
      → 26 passed
uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -q
      → 8 passed
uv run --locked pytest .claude/skills/impl-review-loop/tests/test_intake_capsule_provenance_e2e.py -q
      → 24 passed
uv run --locked pytest .claude/skills/impl-review-loop/tests/ -q
      → 762 passed, 1 skipped, 2 deselected, 2 xfailed

Allowed Paths 遵守

本 PR の変更ファイル一覧(git diff --name-only origin/main...HEAD)は以下の 8 件で、Issue #2713 の ## Allowed Paths(計 9 件、2026-09-24 scope amendment で preparation.md / test_intake_capsule_provenance_e2e.py を追加)にすべて収まっています。

変更ファイル Issue #2713 Allowed Paths 内
.claude/skills/impl-review-loop/scripts/build_intake_capsule.py yes
.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py yes
.claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.py yes
.claude/skills/impl-review-loop/steps/preparation.md yes(2026-09-24 scope amendment で追加)
.claude/skills/impl-review-loop/tests/test_build_intake_capsule.py yes
.claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py yes
.claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py yes
.claude/skills/impl-review-loop/tests/test_intake_capsule_provenance_e2e.py yes(2026-09-24 scope amendment で追加)

Allowed Paths に含まれるが本 PR では変更していないファイル(test_build_intake_capsule_advisory_routing.py)は、上記「検証コマンド結果」で回帰確認のみ実行し編集はしていません。Allowed Paths 外の変更はありません。

Schema Change Applicability

  • decision: not_schema_change
  • reason: IMPL_REVIEW_INTAKE_CAPSULE_V1 の implementation_landed_evidence.pre_step1_data_plane キー集合(start_data_plane / action)は AC6 のとおり変更していません。resolve_pre_step1_data_plane_action() の Python 関数シグネチャ(raw evidence 引数 → 既解決済み disposition mapping 引数)は変更しましたが、これは公開スキーマ/JSON 契約ではなく本 PR で唯一の production caller(build_intake_capsule.py)と唯一のテスト呼び出し元も同一 PR 内で同時に更新済みです。main() / build_capsule_argv() に追加した --base-ac-verification-result-file / base_ac_verification_result_file は additive flag(既存 --human-context-comment-url 等と同じパターン)であり、既存呼び出し経路を破壊しません。

Schema Consumer Inventory

N/A
reason: schema_change ではないため(Schema Change Applicability 参照)。

Safety Claim Matrix

Claim Implemented? Not controlled Evidence Follow-up
resolve_pre_step1_data_plane_action() は最終 disposition(already_satisfied 合成後を含む)に対して一度だけ呼ばれ、raw evidence の再解釈による二重適用を構造的に排除する yes none test_disposition_precedes_worker_worktree_and_new_pr、test_collect_implementation_landed_evidence_applies_precedence_through_default_loader none
base_ac_satisfied の production source が未配線の場合、固定の True/False を捏造せず apply_already_satisfied_precedence() を skip して既存 disposition をそのまま通す yes none test_collect_implementation_landed_evidence_skips_precedence_when_base_ac_undeterminable、test_derive_base_ac_satisfied_from_verification_result_never_fabricates_a_fallback none
_load_route_loop_verdict_v2_module() の既定ロード経路(モジュール注入なし)が route_loop_verdict_v2.py を実際にロードでき、例外を握り潰して恒常的に no-op になる状態を修正した yes none test_default_route_loop_verdict_v2_loader_succeeds_without_module_injection、test_apply_already_satisfied_precedence_fires_through_default_loader none
pre_step1_data_plane の既存キー集合(start_data_plane / action)を変更しない yes none 統合テストの set(evidence["pre_step1_data_plane"]) == {"start_data_plane", "action"} assertion none
base_ac_verification_result は production canonical CLI/public API 境界(main() の --base-ac-verification-result-file、build_intake_capsule() の同名パラメータ)から実際に到達可能であり、private helper への直接引数注入に依存しない yes none test_public_build_intake_capsule_reaches_already_satisfied_via_base_ac_verification_result、test_cli_main_reaches_already_satisfied_via_base_ac_verification_result_file、test_cli_main_base_ac_verification_result_file_missing_is_fail_safe_not_fatal none
derive_base_ac_satisfied_from_verification_result() は既存 adjudicate_vc_result.py の TEST_VERDICT_MACHINE/v2 検証を再利用し、AC identity 欠落・command_hash 欠落・非 0 exit・fallback/human_review/stop_condition フラグ・SKIP/PARTIAL 等を含む不完全 payload を True に誤判定しない yes none test_derive_base_ac_satisfied_from_verification_result_reuses_adjudicate_...、同ファイル内の隣接 negative-case tests none
_load_route_loop_verdict_v2_module() / _load_adjudicate_vc_result_module() / build_intake_capsule.py::_load_module() はロード失敗時、ロード開始前から sys.modules に存在していた同名 entry を破壊せず復元し、無関係な他コードの entry を誤って削除しない yes none test_route_loop_verdict_v2_loader_restores_prior_entry_on_failure、test_adjudicate_vc_result_loader_restores_prior_entry_on_failure、test_load_module_restores_prior_entry_on_failure、test_load_module_removes_only_its_own_newly_inserted_entry_on_failure none

Notes

IMPLEMENTATION_SCOPE_COVERAGE_V1:
  schema_version: "IMPLEMENTATION_SCOPE_COVERAGE_V1"
  issue_number: 2713
  issue_body_sha256: "sha256:3396ea7dc7718388627f119573f1a70f47052de03dbc438b66afa2b9b1bf5906"
  normalized_scope_manifest_sha256: "sha256:cb213b4e6fdc6124b20262f8a532f736056fc7066f61887fc87e5045dc075a34"
  pr_head_sha: "11e3bf3e9ace791faf74663f142b8e886895f917"
  scope_manifest: {"acceptance_criteria": [".claude/skills/impl-review-loop/tests/ 配下の pytest が全件 PASS している", "_collect_implementation_landed_evidence() が pre-Step-1 data-plane 判定において route_loop_verdict_v2.resolve_pre_step1_data_plane_action() を import し、最終 disposition に対して一度だけ呼び出している", "_load_route_loop_verdict_v2_module() が exec_module() 前に sys.modules[spec.name] = module を登録しており、モジュール注入なしの既定ロード経路で apply_already_satisfied_precedence() が実際に route_loop_verdict_v2 を正常ロードして適用できることが regression test で確認できる", "_load_route_loop_verdict_v2_module() と build_intake_capsule.py::_load_module() の両方が、ロード開始前から sys.modules に存在していた同名 entry をロード失敗時に破壊せず復元することが regression test で確認できる", "apply_already_satisfied_precedence() が _collect_implementation_landed_evidence() から呼び出されており、pr_exists / base_ac_satisfied の production source(テストから直接 boolean を注入するのではなく、PR fixture / 独立 AC 検証結果由来であること)が Issue 本文と実装コメントの両方に明記されている", "build_intake_capsule.py に pre-Step-1 data-plane 判定の重複インライン実装(disposition == \"ordinary_dispatch_or_explicit_recovery\" の素朴な分岐)が残存していない", "derive_base_ac_satisfied_from_verification_result() が、AC identity 欠落・command_hash 欠落・exit_code != 0・fallback_detected: true・human_review_required: true・stop_condition_triggered: true・SKIP/PARTIAL status のいずれかを含む不完全な runtime_ac_results を base_ac_satisfied: true と誤判定しないことがテストで確認できる", "production canonical CLI 境界(main() または build_intake_capsule() の public API)から base_ac_verification_result を供給でき、それが _collect_implementation_landed_evidence() → apply_already_satisfied_precedence() → resolve_pre_step1_data_plane_action() を経由して already_satisfied → pre_step1_data_plane.start_data_plane == false まで到達することが、private helper への直接引数注入ではなく public API/CLI 経由の統合テストで確認できる", "判定順序(証拠取得・検証 → landing disposition → already_satisfied 優先順位合成 → 最終 disposition からの start_data_plane/action 一意導出 → capsule 投影)が実装コード上で単線に固定されており、中間結果の二重適用による矛盾が発生し得ない", "既存 capsule の pre_step1_data_plane キー集合(start_data_plane / action)が変更されていない"], "allowed_paths": [".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/steps/preparation.md", ".claude/skills/impl-review-loop/tests/test_build_intake_capsule.py", ".claude/skills/impl-review-loop/tests/test_build_intake_capsule_advisory_routing.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_intake_capsule_provenance_e2e.py"], "change_kind": "code", "goal_ref": "PR #2700 レビューで指摘された DRY 違反(pre-Step-1 data-plane 判定の重複実装・未接続コード)を解消し、already_satisfied precedence の production 配線を実際に機能させる", "in_scope": ["PR fixture(open / draft / closed-unmerged / merged / no-qualified-candidate)から pr_exists 相当の値を生成するテストを追加し、テストコードから pr_exists boolean を直接注入するだけの既存パターンに追加する形で production input generation 経路を検証する", "_collect_implementation_landed_evidence() のインライン pre-Step-1 data-plane 判定(build_intake_capsule.py:852-861)を撤去し、route_loop_verdict_v2.resolve_pre_step1_data_plane_action() の呼び出しに置き換える", "_load_route_loop_verdict_v2_module()(implementation_landed_evidence.py:785-797)を修正し、exec_module() 前に sys.modules[spec.name] = module を登録する(route_loop_verdict_v2.py:695-698 と同じパターン)。import 失敗時の except 節は維持してよいが、失敗を「通常 dispatch してよい」へ黙って縮退させない(既存 apply_already_satisfied_precedence() の module is None fallback 自体は変更しないが、既定ロード経路が通常時に成功することを regression test で保証する)", "_load_route_loop_verdict_v2_module()(implementation_landed_evidence.py)および同型の _load_module()(build_intake_capsule.py)を修正し、exec_module() 実行前から sys.modules に同名 entry が既に存在していた場合、失敗時にその original entry を復元する(今回 loader が新規挿入した entry のみを削除対象とする)", "apply_already_satisfied_precedence() を _collect_implementation_landed_evidence() から呼び出すよう配線する。その際:", "base_ac_satisfied は、contract review の go から推測せず、current main の SHA に対する独立した Verification Commands 評価結果(test-runner 相当の判定)に由来する値であることを明記し、その production source を配線する。値の取得元が既存の build_intake_capsule.py 内に存在しない場合は、フォールバックとして常に False/True を固定注入せず、判定不能な場合は apply_already_satisfied_precedence() を経由せず既存 disposition をそのまま通す(precedence を適用しない)ことを明示する", "build_intake_capsule.py に base_ac_verification_result を外部から供給する仕組み(例: JSON ファイルパスを受け取る CLI flag、build_intake_capsule() の optional パラメータ、build_capsule_argv() の対応する optional kwarg)を追加し、canonical CLI 境界(main())から到達可能にする", "derive_base_ac_satisfied_from_verification_result()(implementation_landed_evidence.py)の判定を、adjudicate_vc_result.py::adapt_test_verdict_to_current_vc_result() が行う既存の TEST_VERDICT_MACHINE/v2 検証(AC identity・command_hash・exit_code・fallback_detected・human_review_required・stop_condition_triggered 等)を再利用する形に強化し、不完全・malformed な payload で True と誤判定しないようにする", "next_action_route / product_spec_routing_action の供給元を明記する(既存の _next_action_route() 等、production 内の既存値を再利用し、新規に無関係な値を捏造しない)", "pr_exists は、既に収集済みの evidence[\"landing_disposition\"][\"candidate\"](lifecycle: merged / open / draft / closed_unmerged)から導出し、「過去に何らかの PR が存在した」ではなく「今回の resume / conflict 判定の対象になり得る candidate が存在するか」を表す値にする(closed-unmerged の扱いを含め、意味論を Issue 本文・コード双方で明記する)", "preparation.md の Step \"0-a-1. Already-Satisfied Early-Exit choke point\" が独立実行する test-runner 評価結果(TEST_VERDICT_MACHINE/v2、head_sha に current main SHA を記録)を、後続の \"0-a-0. Evidence-Based Landing Disposition\" の build_intake_capsule.py --include-implementation-landed-evidence 呼び出しへファイル経由(例: --base-ac-verification-result-file <path>)で再利用させ、capsule 側で test-runner を新規起動しないようにする。0-a-1 の test-runner 評価は、現行の pr_exists ゲートに関わらず(closed-unmerged candidate が存在し pr_exists が true になるケースを含め)VC が構造的に評価可能な場合は実行し、結果を後続 0-a-0 呼び出しへ常に引き渡す", "モジュール注入なし(既定ローダー経由)で _collect_implementation_landed_evidence() の production entry point を通し、apply_already_satisfied_precedence() が実際に適用されることを検証する regression test を追加する(test_implementation_landed_intake_integration.py または同等の統合テストファイル)", "判定順序を「証拠取得・検証 → landing disposition 導出 → already_satisfied 優先順位合成 → 最終 disposition から start_data_plane/action を一度だけ導出 → 既存 capsule 形状へ投影」に固定し、中間 helper の二重適用(例: raw evidence を data-plane helper へ再度渡し landing 判定を再計算する経路)を許容しない", "既存 capsule の pre_step1_data_plane キー集合(start_data_plane / action の 2 キー)を変更しない"], "schema_version": "IMPLEMENTATION_SCOPE_MANIFEST_V1"}

…()に統合する (#2713)

build_intake_capsule.py::_collect_implementation_landed_evidence() の
インライン重複判定(disposition == "ordinary_dispatch_or_explicit_recovery"
の素朴な分岐)を撤去し、route_loop_verdict_v2.resolve_pre_step1_data_plane_action()
への単一呼び出しに置き換えた。同関数は raw evidence を再受理して landing
disposition を再計算する経路を廃止し、既に解決済みの disposition mapping
を直接受け取る形に変更した(中間結果の二重適用を構造的に不可能にするため)。

implementation_landed_evidence.py::apply_already_satisfied_precedence() を
production entry point に実配線した。pr_exists は landing disposition が
既に解決した candidate の lifecycle から生成し(closed-unmerged は False)、
base_ac_satisfied は独立した Verification Commands 評価結果
(TEST_VERDICT_MACHINE/v2 shape)から導出する。production source が
build_intake_capsule.py 内に存在しない場合(現状)は precedence を適用せず
既存 disposition をそのまま通す。

_load_route_loop_verdict_v2_module() の default loader が exec_module()
前に sys.modules[spec.name] = module を登録しておらず、route_loop_verdict_v2.py
の @DataClass(frozen=True)(PEP 563 stringified annotations)が
ClassVar/InitVar 解決時に AttributeError を送出して常に None を返していた
不具合を修正した。build_intake_capsule.py::_load_module() にも同種の
sys.modules 登録漏れがあり同じ理由で route_loop_verdict_v2.py のロードに
失敗していたため、同様に修正した。

Closes #2713

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-2741/

The preview will be removed when this PR is closed.

@squne121

Copy link
Copy Markdown
Owner Author

impl-review-loop Step 4/5: PR Review Verdict

Mergeability: mergeable=MERGEABLE, merge_state_status=CLEAN (head SHA 4970fa27ad32d3143b64407567784f8fe027b7ff)

Evidence Check:

Blockers: なし

Non-blockers / Warnings:

  • PR は Draft のまま。Draft であること自体は blocker ではなく、human の最終マージ判断に委ねる。
verdict: APPROVE
reviewed_head_sha: "4970fa27ad32d3143b64407567784f8fe027b7ff"
blockers: []
warnings:
  - "PR is Draft (isDraft: true); not a blocker per SKILL.md, left for human final merge decision."

@squne121

Copy link
Copy Markdown
Owner Author

結論

[PR #2741](https://github.com/squne121/loop-protocol/pull/2741?utm_source=chatgpt.com) は、現状 REQUEST_CHANGES 相当です。

PR #2700 から持ち越された「data-plane 判定の重複」「default dynamic loader の実質 no-op」「最終 disposition の再計算」という問題への修正はかなり進んでいます。CI も current head 4970fa27ad32d3143b64407567784f8fe027b7ff で成功しています。

ただし、[Issue #2713](https://github.com/squne121/loop-protocol/issues/2713?utm_source=chatgpt.com) の主目的である already_satisfied precedence を production で実際に機能させる配線が、canonical CLI から到達不能なままです。ここは merge 前に直すべきです。

P1 — already_satisfied precedence が production では実質 dead path

今回 _collect_implementation_landed_evidence() に base_ac_verification_result が追加され、値があれば apply_already_satisfied_precedence() に到達できます。問題は、その値を渡せるのが private helper の直接呼び出しだけなことです。

current head の public build_intake_capsule() は、

issue_number
repo
ensure_contract_snapshot_result
human_context_comment_urls
agent_report_comment_urls
include_implementation_landed_evidence

しか受け取りません。CLI parser にも base verification result の入力手段がなく、build_capsule_argv() にもありません。

一方、canonical production route は preparation.md に記載されている、

build_intake_capsule.py ... --include-implementation-landed-evidence

です。

したがって通常実行では常に、

base_ac_verification_result = None
→ derive_base_ac_satisfied... = None
→ apply_already_satisfied_precedence() を skip
→ ordinary_dispatch_or_explicit_recovery のまま

となります。

つまり、「判定不能時に安全に skip する fallback」が、production では例外経路ではなく唯一の経路になっています。

さらに追加された integration test は private _collect_implementation_landed_evidence() を直接呼び、

base_ac_verification_result={
    "head_sha": main_sha,
    "runtime_ac_results": [{"ac": "AC1", "status": "pass"}],
}

をテストコードから注入しています。これは default module loader と precedence helper の結合テストとしては有効ですが、canonical production entry のテストにはなっていません。

PR本文自身も「CLIにはproduction sourceがなく、将来Issueで接続可能」と認めています。これは #2713 の goal_ref にある「production 配線を実際に機能させる」と矛盾します。さらに #2713 の Stop Conditions には、base_ac_satisfied の production source を Allowed Paths 内で特定できなければ停止する、と明記されています。

ここが最大の blocker です。[current build_intake_capsule.py](https://github.com/squne121/loop-protocol/blob/4970fa27ad32d3143b64407567784f8fe027b7ff/.claude/skills/impl-review-loop/scripts/build_intake_capsule.py?utm_source=chatgpt.com)

P1 — 新しい base_ac_satisfied 判定が TEST_VERDICT 契約より弱い

derive_base_ac_satisfied_from_verification_result() は「TEST_VERDICT_MACHINE/v2-shaped」と説明していますが、実際に検査するのはほぼ、

head_sha == live_main_sha
runtime_ac_results が空でない
全 entry の status == "pass"

だけです。

そのため例えば、

{
    "head_sha": live_main_sha,
    "runtime_ac_results": [
        {"status": "pass"}
    ],
}

のように、AC ID すらない不完全なpayloadでも True になり得ます。

既存の test-runner.md の正式契約では runtime_ac_results は全 Verification Commands を被覆し、各行に ac、command、command_hash、exit_code、fallback_detected、human_review_required、stop_condition_triggered などを持ちます。また PASS 根拠として使う場合は exit_code: 0、fallbackなし、human reviewなし、stop conditionなしまで要求しています。

今回のintegration testが AC1 ひとつだけの配列で #2713 の base AC 全充足として成立するのは、まさにこの問題を示しています。

現時点では上のP1によってproductionから到達できないため潜在不具合ですが、production inputを接続した瞬間に、不完全な検証結果から「もう実装不要」と誤判定して作業を抑止する経路になります。

ここで新しい証跡ハーネスを増やす必要はありません。むしろ逆で、既存の test-runner / TEST_VERDICT 契約を再利用し、独自の弱い「全pass判定」をもう1個作らない方がよいです。

P2 — sys.modules 修正の方向は正しいが、既存entryを壊し得る

exec_module() 前に sys.modules[spec.name] = module を行う修正自体は正しいです。Python公式のsource-file直接import例もこの順序です。:chatgpt-content-reference{index="3"}

ただし現在の実装は無条件に、

sys.modules[spec.name] = module
try:
    exec_module(module)
except Exception:
    sys.modules.pop(spec.name, None)

としています。

Pythonのimport contractでは、ロード開始前から sys.modules に存在していたmoduleは保持し、loader自身が挿入したmoduleだけを失敗時に削除するのが原則です。:chatgpt-content-reference{index="4"}

現在の実装では同名moduleがすでにあった場合に上書きし、ロード失敗時には元のmoduleまで消します。

一発実行のCLIでは実害は出にくいためP1 blockerにはしません。ただし _load_module() はgeneric helperなので、長寿命processや同一Python process内で複数回ロードするテストでは避けたい副作用です。既存entryを保存して失敗時にrestoreするか、pathごとに衝突しないmodule nameを使う程度で十分です。

関連Issueの切り分けは妥当

[Issue #2739](https://github.com/squne121/loop-protocol/issues/2739?utm_source=chatgpt.com) の timeline pagination は #2741 に混ぜなくてよいです。GitHub CLI公式も --paginate では各pageが別JSONになり、--slurp がそれらを外側arrayにまとめる仕様だと明記しています。したがって #2739 の --slurp + flatten 方針は技術的に妥当です。:chatgpt-content-reference{index="6"}

[Issue #2740](https://github.com/squne121/loop-protocol/issues/2740?utm_source=chatgpt.com) の refinement → implementation 自動handoff分離も、#2741とは別責務のままでよいです。ただし #2740 は preparation.md を編集対象にしているので、#2741 の production input wiring でも同ファイルを変更するなら、マージ順またはrebaseだけ調整した方がよいです。

修正するならこの形が最小です

新しいapproval gate、ledger、live GitHub runtime gateなどは不要です。今回必要なのは純粋にデータフローを完成させることです。

  1. #2713を現状のままcloseしない。 Stop Conditionに従い、base_ac_satisfied production source未配線を解消するまでPRはDraft/REQUEST_CHANGES扱いにする。
  2. 既存 0-a-1 が取得する current-main の test-runner結果を再利用し、build_intake_capsule.py に明示入力する。例えば --base-test-verdict-file <path> のようなfile入力が、巨大JSONのargv埋め込みより単純です。capsule側でtest-runnerを新規起動する必要はありません。
  3. main() → build_intake_capsule() → _collect_implementation_landed_evidence() までその値を通す。build_capsule_argv() も同じ入力をSSOTとして扱う。
  4. preparation.md のcanonical commandも更新する。これは現在の 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 Allowed Paths 外なので、Allowed Pathsを明示的に拡張するか、production wiringを別Issue化する必要があります。黙って「将来Issue」で済ませるのは 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 の終了条件と合いません。
  5. integration testはprivate helper直呼びではなく、最低でも public build_intake_capsule()、できれば main() 相当のcanonical CLI境界から already_satisfied → start_data_plane:false まで到達させる。
  6. base verdictの判定は既存TEST_VERDICT契約を再利用し、少なくとも全VC被覆・AC identity・exit_code=0・fallback/skip/human-reviewなしを確認する。不完全な一件だけの runtime_ac_results を「全AC satisfied」としない。
  7. dynamic loaderでは既存 sys.modules entryを破壊しないよう小さく修正し、full suiteとcurrent-head CIを再実行する。

それ以外の主要変更、特に final disposition → resolve_pre_step1_data_plane_action() を一度だけ適用する単線化、2-key capsule投影の維持、default loader regression test追加は適切です。

現状のレビュー結果をまとめると、P1 blocker 2件、P2 1件。#2739/#2740は別scopeのままでよい、という判定です。既存の impl-review-loop コメントにある「blockersなし / APPROVE」は、このproduction到達性を見落としています。

@squne121

Copy link
Copy Markdown
Owner Author

GitHub 上の現状を確認しました。PR #2741 は open / Draft、head 4970fa27ad32d3143b64407567784f8fe027b7ff のままで、指定コメント 5812953296 以降に修正コミットや新しいレビューコメントはありません。したがって、以前の APPROVE 判定は最新の owner コメントによって実質的に supersede されており、ここから 既存 PR を fix_delta として再開するのが適切です。

推奨アクションは次のとおりです。

  1. 別 Issue 化せず 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 を完遂するのを推奨します。goal_ref 自体が「already_satisfied precedence の production 配線を実際に機能させる」なので、production wiring を将来 Issue に送ると契約と矛盾します。
  2. 最大の問題は preparation.md が現在の Allowed Paths 外な点です。今回のユーザー指示を 明示的な operator scope decision として扱い、必要なら 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 の Allowed Paths を最小限拡張してから実装を続行させるのがよいです。少なくとも .claude/skills/impl-review-loop/steps/preparation.md、必要性を確認できた場合のみ canonical argv の既存 E2E を持つ tests/test_intake_capsule_provenance_e2e.py まで許可します。
  3. base_ac_satisfied は独自の「全 status=pass」判定を強化するのではなく、既存 TEST_VERDICT_MACHINE/v2 / VC adjudication 契約を再利用させます。current-main SHA、全 VC coverage、AC identity、command hash、exit_code=0、fallback/human-review/stop-condition 無しを確認させます。
  4. canonical CLI から明示的に verdict を渡し、main() → build_intake_capsule() → _collect_implementation_landed_evidence() まで単線で接続します。capsule 内から test-runner を再起動させるのは避けます。
  5. sys.modules の P2 も同じ fix_delta で処理し、ロード前に存在した entry を失敗時に復元させます。
  6. root は control-plane に徹し、analysis subagent → implementation-worker → test-runner → pr-reviewer を順番に起動し、各 SubAgent の terminal completion を必ず待たせます。REQUEST_CHANGES なら自動で次 iteration。マージ・auto-merge は行わせません。

そのまま auto mode の Claude Code に貼れる形です。

squne121/loop-protocol の既存 PR #2741 を対象に、.claude/skills/impl-review-loop/SKILL.md を正本として implementation/review loop を再開してください。

対象:

現在確認されている PR head:
4970fa27ad32d3143b64407567784f8fe027b7ff

Goal

指定コメント 5812953296 を最新かつ authoritative な human review fix_delta として扱い、以前の同一 head に対する APPROVE / blockers: [] 判定は superseded としてください。

PR #2741 の既存 branch/worktree を再利用し、新しい PR は作成しないでください。

impl-review-loop に従って implementation → independent verification → PR review を自律的に反復し、

となる「マージ直前」の状態まで、人間の追加承認を求めず進めてください。

実際の merge、auto-merge 有効化は行わないでください。
Draft 状態は impl-review-loop の規約上 blocker でなければそのままで構いません。

Operator decision / scope authorization

このプロンプト自体を、以下の scope decision に対する明示的な operator authorization として扱ってください。

Issue #2713 の現在の goal は
already_satisfied precedence の production 配線を実際に機能させる
ことです。

その実現に canonical production command の更新が必要であることを確認した場合、production wiring を別 Issue / 将来 Issue に先送りせず、Issue #2713 を最小限 amend して同じ PR #2741 で完遂してください。

具体的には、read-only 調査の結果必要性が確認できた場合に限り、Issue #2713 の In Scope / Acceptance Criteria / Verification Commands / Allowed Paths を最小限更新してよいものとします。

追加を明示的に許可する候補:

  • .claude/skills/impl-review-loop/steps/preparation.md
  • canonical build_capsule_argv() / CLI command の既存 E2E invariant を更新するため実際に必要なら
    .claude/skills/impl-review-loop/tests/test_intake_capsule_provenance_e2e.py

それ以外の Allowed Paths 拡張は、必要性を SubAgent が具体的に証明した場合だけ最小限追加してください。

Issue body を更新した場合:

  • live Issue body を Allowed Paths authority とする
  • scope/body digest を再計算する
  • PR body の IMPLEMENTATION_SCOPE_COVERAGE_V1 を最終 current head / current Issue body に再bindする
  • explicit scope amendment に起因する旧 contract snapshot の stale は advisory として処理し、それだけを理由に今回の loop を停止しない
  • issue-refinement-loop を新規に開始して implementation を中断しない

#2739 の timeline pagination と #2740 の refinement→implementation handoff responsibility separation は今回の scope に混ぜないでください。

Mandatory SubAgent protocol

root orchestrator は control-plane に徹してください。

SubAgent は root から直接起動し、SubAgent 自身に nested delegation させないでください。

各 SubAgent を起動したら、必ず terminal completion まで待ってから次へ進んでください。
非同期 fire-and-forget や「後で結果を見る」は禁止です。

最低限、以下の順序で使用してください。

A. Read-only diagnosis SubAgent

最初に read-only の SubAgent を起動し、以下を current PR head と live Issue #2713 に対して確認させてください。

  • 指定コメントの P1 blocker 2件 / P2 1件が current head に実在するか
  • 0-a-1 が current-main に対して生成する test-runner / TEST_VERDICT_MACHINE/v2 の実データフロー
  • preparation.md の canonical build_intake_capsule.py invocation
  • build_capsule_argv() の SSOT invariant
  • main() / build_intake_capsule() / _collect_implementation_landed_evidence() の現在の引数伝播
  • derive_base_ac_satisfied_from_verification_result() が現在どの schema fields を検証しているか
  • 既存 adjudicate_vc_result.py 等に再利用可能な TEST_VERDICT validation/adaptation logic があるか
  • _load_module() / _load_route_loop_verdict_v2_module() の sys.modules failure semantics
  • production wiring を完成するのに本当に必要な変更 path

診断 SubAgent の完了を待ち、結果を fix_delta として構造化してから implementation-worker を開始してください。

B. implementation-worker

診断結果を渡して既存 PR branch/worktree 上で修正してください。

実装上の要求は以下です。

P1-1: canonical production entry から already_satisfied precedence を到達可能にする

base_ac_verification_result を private helper のテスト注入だけでなく canonical production route から供給可能にしてください。

望ましい設計:

  • 0-a-1 で既に取得する current-main の test-runner result を再利用する
  • capsule builder 自身から test-runner を新規起動しない
  • 巨大 JSON を argv に直接埋め込まない
  • 既存 artifact / report を利用できるなら file-backed explicit handoff を優先する
    • 例: --base-test-verdict-file <path>
  • ただし既存 repository artifact contract に、より自然な明示的 handoff が既に存在するならそちらを優先してよい

データフローは最低限、

canonical preparation route
→ build_capsule_argv()
→ CLI main()
→ build_intake_capsule()
→ _collect_implementation_landed_evidence()
→ validated base verdict
→ apply_already_satisfied_precedence()
→ final disposition
→ resolve_pre_step1_data_plane_action()
→ capsule pre_step1_data_plane

という一本の production chain にしてください。

base verdict が存在しない・malformed・stale・不完全な場合に True/False を捏造しない既存 fail-safe semantics は維持してください。

canonical production route の実テストでは、private helper を直接呼ぶだけでなく、最低でも public build_intake_capsule()、可能なら main() / canonical argv 境界から、

already_satisfied
→ pre_step1_data_plane.start_data_plane == false

まで到達することを証明してください。

P1-2: TEST_VERDICT validation を既存契約へ揃える

新しい独自の弱い「全 status が pass なら satisfied」という判定を増やさないでください。

可能な限り既存の TEST_VERDICT_MACHINE/v2 validator / adapter / adjudication logic を再利用してください。

base_ac_satisfied == true を許可する evidence は、少なくとも以下を保証してください。

  • schema / producer shape が期待する test-runner verdict
  • verdict head_sha が decision-time の live current-main SHA と一致
  • linked Issue の Verification Commands を全件被覆している
  • AC identity が欠落していない
  • expected VC / command identity または command hash と対応している
  • 各 required current execution が status: pass
  • exit_code == 0
  • fallback_detected == false
  • human_review_required == false
  • stop_condition_triggered == false
  • SKIP / PARTIAL / missing VC を全 AC satisfied と扱わない

例えば

{
  "head_sha": "<main>",
  "runtime_ac_results": [
    {"status": "pass"}
  ]
}

のような AC identity / command evidence のない partial payload が True になる状態は必ず解消してください。

ただし unnecessary な新しい approval gate、ledger、network runtime gate、証跡ハーネスは追加しないでください。

P2: dynamic loader の sys.modules restoration

exec_module() 前に module を sys.modules へ登録する現在の修正意図は維持してください。

ただしロード開始前から同名 entry が存在していた場合、それを破壊しない semantics にしてください。

期待動作:

  • loader が今回新規挿入した entry だけなら failure 時に remove
  • loader 実行前から既存 entry があったなら failure 時にその original entry を restore
  • successful load の既存仕様は維持
  • generic _load_module() と関連 loader の両方について必要性を確認する

この failure/restoration path の regression test を追加してください。

Preserve existing good changes

以下は指定レビューでも妥当とされているため、理由なく巻き戻さないでください。

implementation-worker が完了したら terminal result を待ち、diff / changed paths / unresolved items を root が確認してください。

C. independent test-runner

implementation-worker 完了後、新しい test-runner SubAgent を起動し、必ず完了を待ってください。

implementation-worker 自身の「tests pass」という自己申告を verification authority にしないでください。

少なくとも:

を current head で独立確認してください。

Issue contract amend により VC を追加した場合は、新しい live Issue body の Verification Commands を source of truth にしてください。

test-runner の terminal completion を待ってください。

D. pr-reviewer

verification が終了した current head に対して pr-reviewer SubAgent を起動してください。

必ず以下をレビュー入力に含めてください。

pr-reviewer の terminal completion を待ってください。

Loop

pr-reviewer が REQUEST_CHANGES を返した場合、blockers をそのまま次 iteration の fix_delta とし、

implementation-worker
→ test-runner
→ pr-reviewer

を再実行してください。

各 iteration で必ず新しい current head に evidence を bindし直してください。

reviewed_head_sha != current PR head の場合、古い APPROVE を採用せず current head を再レビューしてください。

base branch が進み BEHIND になった場合は skill の update-branch route に従って既存 PR を更新し、その後 verification / review を再実行してください。

human_review_required: true という SubAgent の自己申告や advisory snapshot warning だけでは停止しないでください。impl-review-loop の現行 routing policy に従って continuation を優先してください。

ただし以下は hard stop としてください。

  • actual Git conflict / CONFLICTING / DIRTY で自動解消が安全にできない
  • secret / credential の入力が必要
  • repository/history を破壊する操作が必要
  • operator の明示的な stop/veto
  • skill の hard max_iterations 到達

それ以外について追加の人間承認は要求しないでください。

Completion condition

次をすべて満たすまで終了しないでください。

  • target comment の P1 blocker 2件が解消
  • P2 が解消または current design 上不要であることを current-head evidence で証明
  • Issue 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 contract と実装が一致
  • production canonical route から already_satisfied が実際に到達可能
  • partial / malformed TEST_VERDICT から false positive が発生しない
  • Allowed Paths gate OK
  • independent Verification Commands PASS
  • required CI PASS
  • pr-reviewer = APPROVE
  • blockers = []
  • reviewed head == live PR head
  • live mergeability が impl-review-loop の approved 終了条件を満たす

完了時は PR を merge しないでください。

PR body / LOOP_STATE /必要な review summary を current head に更新し、最終的に IMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_ready 相当の構造化結果を出してください。

最終報告には最低限以下を含めてください。

target_pr: 2741
target_issue: 2713
target_human_context_comment: 5812953296
final_head_sha: <sha>
iterations: <n>
scope_amended: <true|false>
scope_added_paths: [...]
p1_production_reachability: <pass|fail>
p1_test_verdict_contract: <pass|fail>
p2_sys_modules_restoration: <pass|not_needed|fail>
verification: <pass|fail>
pr_review_verdict: <APPROVE|REQUEST_CHANGES|HUMAN_REVIEW_REQUIRED>
blockers: [...]
mergeability: <live status>
termination_reason: <approved|max_iterations|human_escalation|...>
merge_performed: false

作業途中で「次へ進めてよいですか」「Issue scope を変更してよいですか」「修正を続けますか」等の確認は求めず、このプロンプトの operator authorization と impl-review-loop の routing policy に基づいて自律継続してください。

この形なら、今回もっとも詰まりやすい 「Allowed Paths 外なので停止」→人間待ちを先に解消しつつ、#2713 の本来の goal を別 Issue に逃がさず完遂させられます。

…にし、TEST_VERDICT 検証を強化する

Issue #2713(amend後 AC8-AC10)と PR #2741 レビューコメント
(#2741 (comment))
の P1 blocker 2 件・P2 1 件に対応する。

- P1-1: build_intake_capsule.py::build_intake_capsule() / main() /
  build_capsule_argv() に base_ac_verification_result(CLI では
  --base-ac-verification-result-file)を追加し、already_satisfied
  precedence が canonical CLI/public API 境界から実際に到達できるようにした。
  preparation.md の 0-a-0 / 0-a-1 を改訂し、0-a-1 の test-runner 評価結果を
  ファイル保存して 0-a-0 の呼び出しへ渡す運用を明記した。
- P1-2: implementation_landed_evidence.py::derive_base_ac_satisfied_from_
  verification_result() を、独自の弱い判定ではなく
  adjudicate_vc_result.py::adapt_test_verdict_to_current_vc_result() の
  既存 TEST_VERDICT_MACHINE/v2 検証を再利用する形に強化し、AC identity 欠落・
  command_hash 欠落・exit_code != 0・fallback_detected・human_review_required・
  stop_condition_triggered・SKIP/PARTIAL を base_ac_satisfied: true と
  誤判定しないようにした。
- P2: implementation_landed_evidence.py::_load_route_loop_verdict_v2_module()
  および build_intake_capsule.py::_load_module() の両方で、exec_module() 失敗時に
  ロード開始前から存在していた sys.modules エントリを破壊せず復元するよう修正した。

対応するテストを test_build_intake_capsule.py / test_implementation_landed_evidence.py /
test_implementation_landed_intake_integration.py / test_intake_capsule_provenance_e2e.py に追加。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@squne121
squne121 marked this pull request as ready for review September 24, 2026 12:50
@squne121
squne121 merged commit 0a7c42a into main Sep 24, 2026
83 of 86 checks passed
@squne121
squne121 deleted the worktree-issue-2713-pre-step1-data-plane-dry branch September 24, 2026 13:00
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 の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する

1 participant