Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#2155"
goal_ref: "production Performance provider observation/materialization を layout-aware にし、monolith arm が構造的に eligible run を生成できるようにする"
change_kind: codeParent Issue
Parent Goal Ref
- Goal: 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 は 実装: CI: Playwright E2E の responsive matrix を専用 lane へ分離し critical path を短縮する #2119 AC9/AC10 の close-grade 実CI証跡(44-run 本番 experiment)を確認する検証 Issue であり、monolith arm が構造的に
performance_eligible_workflow_run_ids == []になる gap は本番 experiment 実行前に解消しておく必要がある hard prerequisite として issue-refinement-loop 実行中に OWNER anchor comment(issuecomment-5568218806)で指摘された。 - Desired Destination: 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 のブロッカー解消(44-run 実験実行のための前提条件を満たす)。
Current Validated Scope
tests/ci/test_ci_performance_gate.py内に、production の Performance provider observation を manifest topology(monolith / split)に応じて materialize する共通 helper を新設する。run_evidence_gate()(pairing / post-filter sample count)、_materialize_close_grade_arm()(close-grade receipt)、assessment percentile input、run-details の各 consumer が、この共通 helper が返す同一 materialized observation を消費するようにする。- monolith topology fixture 20 run と split topology fixture 20 run を使った deterministic production-path regression test を追加する。
Remaining Parent Gaps
- 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 が要求する 44-run 本番 experiment の実行そのもの(本 Issue の完了後、別途 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 側で実施)。
-
RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSallowlist のmissing_pair_e2e-responsive-matrixエントリの要否判断(本 Issue では扱わない。独立判断が必要)。
Outcome
tests/ci/test_ci_performance_gate.py の production Performance close-grade materialization path(run_evidence_gate() → _pair_by_workflow_run_id() → provider post-filter sample count → percentile / assessment input → build_close_grade_receipt() → _materialize_close_grade_arm())が、manifest topology(monolith / split)に応じて layout-aware に provider observation を materialize するよう修正され、以下が成立している状態。
- monolith topology では、物理 provider
e2e-core1 個のci_runtime_baseline_v1.measurements[]に含まれる有効なtest_e2e*phase(test_e2e_ci+test_e2e_monolith_responsive)を一度だけ合計し、その workflow_run_id の Performance duration observation とする。synthetic なe2e-responsive-matrixbaseline/record は生成しない。共通 helper は、monolith run について同一のe2e-corebaseline object を_pair_by_workflow_run_id()の core レーン・responsive レーン双方の入力として渡す(両者が同一 object のため fingerprint 比較は自己一致し、_provider_critical_path_paired_p50_p95()のmax(core, responsive)は core 側の値と一致する)ことで、_pair_by_workflow_run_id()/_provider_critical_path_paired_p50_p95()/_materialize_close_grade_arm()の既存シグネチャ・2-sided pair 不変条件を変更せずに済ませる。 - split topology では、既存通り
e2e-coreとe2e-responsive-matrixの同一 workflow_run_id 2 provider を現行 attempt-selection/fingerprint policy で materialize し、duration は従来どおりmax(core, responsive)とする。split の real 欠落(responsive provider が本当に存在しない)と monolith の構造的 non-pair(同一 object を意図的に再利用する pair)は、baseline の内容から自動推定しない。共通 helper の呼び出し側は、build_close_grade_receipt()の既存 arm-based 呼び出し規約(arms.monolithはfixture["before"]、arms.splitはfixture["after"]に由来する既存 stand-in 規約、下記参照)に従い、どちらの topology の run 集合を処理しているかを明示的な引数として共通 helper に渡す。 - production path の provider post-filter sample count、percentile/assessment input、run-details、close-grade receipt eligibility が、すべて同一の layout-aware observation semantics に収束し、adapter だけが直って production gate が壊れたままという状態を作らない。
- split で responsive provider が本当に欠落する run は、引き続き
missing_pair_e2e-responsive-matrix等の既存 fail-closed error のままである(今回の topology gap とは無関係な既存 negative semantics を壊さない)。 pnpm typecheck/pnpm lint/pnpm test/pnpm buildとuv run --locked pytest tests/ci/test_ci_performance_gate.py -qが全て PASS している。
Runtime Verification Applicability
- decision: not_applicable
- reason: pytest による静的/決定論的な evidence-shape 検証のみで完結し、実CI dispatch や runtime smoke を必要としないため。live GitHub Actions dispatch / 44-run 本番 experiment の実行は 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 側が別途所有する。
Background
Issue #2155 の issue-refinement-loop 実行中に、OWNER anchor comment(issuecomment-5568218806)が指摘した P0 blocker(monolith arm が構造的に performance_eligible_workflow_run_ids == [] になる gap)を、read-only SubAgent が current origin/main のコードで独立検証し、confirmed=true と判定した。
本 Issue の当初案(_manifest_v2_provider_jobs_to_baselines() を manifest v2 の provider_placement[layout] を authority として使う topology-aware 実装に修正する)に対し、OWNER anchor comment(issuecomment-5575198296)が REQUEST_CHANGES を出し、choke point の特定自体が誤っていると指摘した。issue-refinement-loop の read-only codebase-investigator SubAgent が current origin/main(HEAD 1a9963c)のコードで独立に fact-check した結果は以下の通り(anchor の主張を鵜呑みにせず検証済み)。
- P0-1 confirmed:
_manifest_v2_provider_jobs_to_baselines()(tests/ci/test_ci_performance_gate.py:1448-1484)の呼び出し元は定義箇所と regression test(同ファイル1696-1697行)のみであり、production call site は存在しない(git grepで確認)。実際の production path はrun_evidence_gate()がfixture["before"/"after"]["core_baselines"]/responsive_baselinesを直接読み、即座に_pair_by_workflow_run_id()へ渡す(252-263行)。monolith でresponsive_baselines=[]の場合、adapter をどれだけ修正しても production の provider count は 0 のままである。build_close_grade_receipt()→_materialize_close_grade_arm()(1536行)も同じ_pair_by_workflow_run_id()を経由する。 - P0-2 confirmed: manifest v2 の
ProviderJob型(schemas/e2e_performance_benchmark_manifest_v2.schema.json:261-293)はjob/workflow_job_id/conclusion/exact_runner_imageのみを持ち、measurements[]を持たない。実際の duration は_job_duration_seconds()(919-929行)がci_runtime_baseline_v1.measurements[]からphase_id.startswith("test_e2e")の phase を合計して作る。monolith の物理e2e-corejob にはtest_e2e_ciとtest_e2e_monolith_responsiveの両 phase が同一 measurements に入り得るため、正しい Performance observation はこの1個のe2e-corebaseline に含まれる2 phase の合計であり、manifest 単体からは observation を構成できない。 - P0-3 confirmed: production CLI(
scripts/ci/collect_e2e_performance_benchmark.pyの argparse 定義)が受け取る manifest 関連引数は--manifest-sha256と--experiment-identity(digest/identity のみ)であり、manifest v2 本体ファイル/パスは入力に持たない。実データは--before-runs-json/--after-runs-json(already-fetched JSON)から読む。したがってprovider_placement[layout]を production の「authority」にするには CLI input contract の拡張が必要になり、本 blocker 修正に対して過剰である。 - split の critical-path semantics confirmed:
_provider_critical_path_paired_p50_p95()(1052-1075行)が同一 workflow_run_id のe2e-core/e2e-responsive-matrixduration をmax(core, responsive)で計算する既存実装が確認された。 - 参考実装 confirmed:
scripts/ci/build_ci_reliability_assessment_v1.py:622-631(実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424 の Reliability materializer、PR feat: frozen E2E benchmarkをlayout A/B/A/B dispatch契約へ置換 (#2422) #2501 merged)は既にprovider_placement[layout]を authority として物理 job 名を解決する実装をしている。Performance 側(本 Issue の owner surface)だけがこの layout-aware 解決に追従していない。ただし Reliability 側は Reliability 固有の入力(manifest.frozen_non_treatment)を持つため、本 Issue のスコープには含めない。 - 境界確認 confirmed: 実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424・実装: #2423/#2424 の close-grade result を close_evidence.json bundle に束ねる producer/validator を実装する #2486 は close 済みで Reliability 側の layout-aware 実装を既に含む。実装: frozen E2E benchmark を layout A/B/A/B dispatch 契約へ置換する #2422/実装: 性能ゲートの canonical cohort materialization と close-grade CLI を fail-closed 化する #2423 は manifest v2/close-grade schema owner surface(本 Issue はそれらへ変更を加えない)。実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 は別スコープ(close-evidence bundle publication route)。検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 は本 Issue を hard blocker として保持している。上記いずれとも本 Issue は重複しない。
以上の fact-check により、本 Issue の中心テーマを「manifest adapter 修正」から「production Performance provider observation/materialization を layout-aware にする」へ reframe する。manifest v2 の provider_placement[layout] は設計資料として参照するが、production CLI が manifest 本体を入力に持たないため、manifest-file wiring・新 artifact input・新 schema・新 broker は追加しない。
X-GitHub-Api-Version: 2022-11-28 ヘッダー pin(GitHub 公式ドキュメントで default version・support 終了日 2028-03-10 とも fact-check 済みで claim 自体は正しい)は、本 Issue の topology blocker とは無関係の housekeeping であるため、本 Issue のスコープには含めない。follow-up candidate として記録するに留める。
#2155 は本Issueをhard prerequisiteとして Blocked By に追加する予定(GitHub native blockedBy の同期は呼び出し元の issue-refinement-loop orchestrator が別途行う。本Issue自体はその配線を行わない)。
In Scope
tests/ci/test_ci_performance_gate.py内に、呼び出し側が明示的な topology 引数(monolith/split)を渡す共通 helper を新設し、production Performance provider observation を materialize する。topology は baseline の内容から自動推定しない。既存のbuild_close_grade_receipt()の arm-based 呼び出し規約(arms.monolithはfixture["before"]、arms.splitはfixture["after"]に由来する既存 stand-in 規約)に従い、どちらの run 集合を処理しているかを呼び出し側が伝える。- monolith: 物理 provider は
e2e-core1 個。ci_runtime_baseline_v1.measurements[]に含まれる有効なtest_e2e*phase(test_e2e_ci+test_e2e_monolith_responsive)を一度だけ合計し、その workflow_run_id の Performance duration observation とする。synthetic なe2e-responsive-matrixbaseline/record は生成しない。logical invocation が2個でも同一物理 provider の timing evidence を二重計上しない。共通 helper は、同一のe2e-corebaseline object を_pair_by_workflow_run_id()の core レーン・responsive レーン双方の入力として渡すことで、この関数と_provider_critical_path_paired_p50_p95()/_materialize_close_grade_arm()の既存シグネチャ・2-sided pair 不変条件を変更せずに済ませる(同一 object のため fingerprint 比較は自己一致し、max(core, responsive)は core 側の値と一致する)。 - split: 物理 provider は
e2e-coreとe2e-responsive-matrix。同一 workflow_run_id の2 provider を現行 attempt-selection/fingerprint policy で materialize し、duration は従来どおりmax(core, responsive)とする(既存 critical-path semantics を変更しない)。responsive provider が本当に欠落する split run は、引き続きmissing_pair_e2e-responsive-matrix等の既存 fail-closed error のままとする。 run_evidence_gate()(pairing / post-filter sample count)、percentile/assessment input、run-details、build_close_grade_receipt()→_materialize_close_grade_arm()(close-grade receipt eligibility)が、すべて同じ共通 helper の materialized observation を消費するように配線する。adapter regression だけが green で production gate が壊れたままという状態を防ぐ。_pair_by_workflow_run_id()/_provider_critical_path_paired_p50_p95()/_materialize_close_grade_arm()自体のシグネチャ・不変条件は変更しない(呼び出し側の共通 helper が topology に応じた入力を組み立てるだけであり、これらの private helper のシグネチャ変更は本 Issue の In Scope に含まれない)。- monolith 20 run fixture・split 20 run fixture・split の negative fixture(responsive provider 欠落)を使った deterministic production-path regression test を追加する。
- 既存の
tests/ci/test_ci_performance_gate.py:1717付近のassert monolith_result["performance_eligible_workflow_run_ids"] == [](_manifest_v2_provider_jobs_to_baselines()adapter の regression test)は、本 Issue が修正する production path とは別の adapter に対するものであり、本 Issue のスコープでは変更しない(adapter 自体が production から呼ばれていないため、その規約を保つことは今回の production fix と矛盾しない)。同ファイル2207/2253/2272行付近の類似アサーションは fingerprint_mismatch / fingerprint_placeholder / run_attempt_identity_collision という別原因に起因するものであり、今回の topology gap とは無関係なため変更しない。
Out of Scope
- manifest v2 本体ファイル/パスを production CLI の入力として追加する配線(新 artifact input・新 schema・新 broker を含む)。production CLI は
--manifest-sha256/--experiment-identity(digest/identity)のみを引き続き受け取る。 - legacy(非 manifest-v2)materializer path の変更。
_manifest_v2_provider_jobs_to_baselines()adapter 自体の実装変更、および同 adapter の既存 regression test(tests/ci/test_ci_performance_gate.py:1717付近)の期待値変更。production から呼ばれていないため本 Issue の choke point ではない。scripts/ci/build_ci_reliability_assessment_v1.py(Reliability側、実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424 owner surface)の変更。既に layout-aware 実装済みのため触らない。RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSallowlist のmissing_pair_e2e-responsive-matrixエントリの削除(split や異常系で依然発生しうる可能性があり、独立判断が必要なため今回は扱わない)。scripts/ci/collect_e2e_performance_benchmark.pyのX-GitHub-Api-Version: 2022-11-28ヘッダー pin(topology blocker とは無関係の housekeeping。follow-up candidate として記録のみ)。- close-evidence bundle publication route の追加(別issueで扱う)。
- 44-run本番実験の実行そのもの(#2155側で別途実施)。
Acceptance Criteria
- AC1: monolith 20 run fixture(各 run が物理
e2e-corebaseline 1件のみを持ち、そのmeasurements[]にtest_e2e_ci+test_e2e_monolith_responsiveの両 phase を含み、responsive_baselines=[])を使った regression test で、provider post-filter sample count が 20 であることを assert し、PASS する。 - AC2: AC1 と同じ monolith 20 run fixture(
build_close_grade_receipt()の既存 stand-in 規約に従いfixture["before"]に配置する)で、arms.monolith.performance_eligible_workflow_run_idsが 20 件であることを assert し、PASS する。 - AC3: AC1 と同じ monolith 20 run fixture で、任意の1 run の Performance duration observation が、同一
e2e-corebaseline の対象2 phase(test_e2e_ci+test_e2e_monolith_responsive)の合計値と一致することを assert し、PASS する。また synthetic なe2e-responsive-matrixrecord が生成されていないことを assert する。 - AC4: split 20 run fixture(
e2e-core+e2e-responsive-matrix両方を持つ run。既存 stand-in 規約に従いfixture["after"]に配置する)を使った regression test で、修正後もmax(core, responsive)の critical-path semantics(duration・provider count・assessment・receipt eligibility)が既存通り成立することを assert し、PASS する。 - AC5: split fixture のうち responsive provider が本当に欠落する run について、
missing_pair_e2e-responsive-matrix等の既存 fail-closed error が引き続き発生することを assert する negative regression test が PASS する。 - AC6: production assessment input(percentile 計算・run-details)が、AC1-AC4 のいずれの fixture でも同一の layout-aware materialized observation を経由していることを assert する regression test が PASS する。
- AC7:
pnpm typecheck/pnpm lint/pnpm test/pnpm buildが全て PASS する。 - AC8:
uv run --locked pytest tests/ci/test_ci_performance_gate.py -qが PASS する。
Verification Commands
# AC1
# AC2
# AC3
# AC4
# AC5
# AC6
# AC8
$ uv run --locked pytest tests/ci/test_ci_performance_gate.py -q
# AC7
$ pnpm typecheck
# AC7
$ pnpm lint
# AC7
$ pnpm test
# AC7
$ pnpm buildAllowed Paths
- tests/ci/test_ci_performance_gate.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合。本 Issue における該当対象は
tests/ci/test_ci_performance_gate.py内の production 公開 receipt schema(例:CI_PERFORMANCE_CLOSE_GRADE_RESULT_V1のフィールド名/形状)であり、同ファイル内の private helper 関数(_pair_by_workflow_run_id()等)の内部シグネチャ変更はこれに該当しない。 - 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- production CLI の入力契約(manifest本体ファイル読み取り等)を拡張する必要があると判明した場合
Required Skills
なし
Required Design References
- docs/dev/e2e-performance-benchmark.md#expected_playwright_invocations-invocation-識別リストfix_delta-blocker-4
- docs/dev/agent-skill-boundaries.md
Scope Delta(任意)
N/A
Activity
squne121 commentedon Sep 7, 2026
判定
REQUEST_CHANGES。目的は正しいですが、Issue #2554 は現状のままだと「テストだけ直って production は直らない」実装になり得ます。
#2155 の OWNER anchor は、monolith arm が構造的に performance eligible にならないことを 44-run 実験前の blocker として扱っており、その後の refinement も #2554/#2555 待ちで hard-stop しています。したがって #2554 自体の必要性は妥当です。
ただし、修正対象の choke point の特定が間違っています。
優先度 | Finding | 影響 -- | -- | -- P0 | _manifest_v2_provider_jobs_to_baselines() は production path から呼ばれていない | Issue記載どおりそこだけ直しても 44-run gate は直らない P0 | manifest v2 の provider_jobs[] には性能 measurements がない | manifest → baseline 変換だけでは duration を算出不能 P0 | production CLI は manifest 本体を読まず digest/identity しか受けない | provider_placement[layout] を「authority」にすること自体が現スコープでは不可能 P1 | logical invocation と physical provider を混同する余地がある | monolith の e2e-core を二重計上し得る P1 | AC が adapter regression に寄りすぎ | production gate の sample count / assessment / receipt が壊れたままでも PASS 可能 P2 | GitHub API version pin は妥当だが無関係 | #2554 に混ぜる価値は低いP0-1 — Issue が直そうとしている関数は、実際の Performance gate に配線されていない
現在の
_manifest_v2_provider_jobs_to_baselines()自身のコメントにも「adapter/handoff fix」とあり、monolith responsive を空配列に変換するだけです。コード検索でも呼び出しは定義と regression test にしか出てきません。一方、本物の
run_evidence_gate()はfixture["before/after"]["core_baselines"]/responsive_baselinesを直接読み、即座に_pair_by_workflow_run_id()へ渡しています。post-filter sample count も同じ pairer を使っています。つまり monolith の responsive list が空なら、adapter をどれだけ賢くしても production provider count は 0 のままです。receipt 側も同様で、
build_close_grade_receipt()→_materialize_close_grade_arm()→_pair_by_workflow_run_id()と直接進みます。したがって、**「adapter の regression が green」≠「#2155 の blocker 解消」**です。これは merge blocker にすべきです。
P0-2 — manifest v2 だけでは Performance observation を作れない
もう一段根本的な問題があります。manifest v2 の
ProviderJobはjob、workflow_job_id、conclusion、exact_runner_imageを持ちますが、measurements[]は持ちません。実際の duration は
_job_duration_seconds()がci_runtime_baseline_v1のmeasurements[]からphase_id.startswith("test_e2e")を合計して作っています。そして実 workflow の monolith
e2e-coreには、test_e2e_citest_e2e_monolith_responsiveが同じ physical job の measurements に入ります。したがって monolith の正しい Performance observation は、この1個の
e2e-corebaseline に含まれる2 phase の合計です。偽の responsive baseline は必要ありません。つまり必要なのは、
manifest topology → physical provider 解決
+
ci_runtime_baseline_v1timing evidence との joinです。
_manifest_v2_provider_jobs_to_baselines()の現在の返却値にはmeasurements自体がありません。これだけで「test-execution phases全体から observation を構成する」という Issue Outcome は成立しません。
P0-3 —
provider_placementを authority にすると書いてあるが、production gate は manifest 本体を持っていないCLI が受け取る manifest 関連引数は
--manifest-sha256と--experiment-identityだけです。実データは依然として--cohort-fixtureから読みます。--manifest-v2 <path>のような入力はありません。これは偶然ではありません。PR #2501 自身が consumer inventory で、
tests/ci/test_ci_performance_gate.pyは **「実際に v2 manifest ファイルを読み取る配線は別変更」**として残したと明記しています。したがって #2554 の
という要求を文字通り実装するなら、Issue の Allowed Paths / CLI input contract を広げる必要があります。
ただし、個人趣味開発としてはそこまで広げるのを私は勧めません。manifest file wiring、別 artifact input、新 schema などを追加すると、この blocker 修正に対して重すぎます。
推奨する #2554 の reframe
一番実用的なのは、manifest adapter 修正 Issue ではなく「production Performance provider materialization を layout-aware にする Issue」へ変えることです。
新しい共通 helper を
tests/ci/test_ci_performance_gate.py内に1つ置き、run_evidence_gate()、post-filter count、run-details、_materialize_close_grade_arm()が全て同じ materialized provider observationsを消費する構造にします。概念的にはこうです。
現在の
arm_labelは既に"monolith"/"split"として_materialize_close_grade_arm()まで渡っています。なので、新たな framework や schema を導入せず、この topology semantics を production path に通せます。特に重要なのが physical provider の dedupe です。manifest の logical core / responsive invocation は monolith ではどちらも
e2e-coreに配置されます。collector にも既にmonolith: core -> e2e-core, responsive -> e2e-core、split では別 provider、という topology 定義があります。Reliability 実装が
provider_placement[layout]を使うのは良い参考ですが、あちらは logical invocation ごとの Playwright JSON を扱っています。Performance がそれをそのまま模倣して invocation ごとに baseline を作ると、monolith の同じe2e-coretiming evidence を2回数える危険があります。Reliability と Performance で materialization granularity は違います。Acceptance Criteria も変えるべきです
現在の「adapter を呼んで eligible が非空」だけでは弱すぎます。最低限、1本の決定論的 production-path regression で次を固定するのが適切です。
monolith 20 run、各
e2e-coreにtest_e2e_ci+test_e2e_monolith_responsive、responsive_baselines=[]→ provider post-filter count が 20同 fixture の receipt →
arms.monolith.performance_eligible_workflow_run_idsが 20件monolith の1 run duration → 2 phase の sum
split → 従来どおり
max(core, responsive)split で responsive が本当に欠けた場合 → 引き続き
missing_pair_e2e-responsive-matrixsynthetic
e2e-responsive-matrixrecord は一切生成しない_cli_run_details_from_pairs()相当の assessment input まで topology-aware path を通るこれなら live GitHub Actions smoke は #2554 では不要です。Runtime Verification = not_applicable は維持してよいです。大きな harness も不要で、focused pytest だけで十分です。その後 #2155 が予定している blocks=1/2 の smoke で実 wiring を確認してから 44-run に進むのが効率的です。
GitHub API version pin
Issue にある
X-GitHub-Api-Version: 2022-11-28の記述自体は現時点で正しいです。GitHub はヘッダー未指定時も現在は2022-11-28を既定とし、この version は 2028年3月10日までサポート予定です。2022 API ではreturn_run_detailsが明示パラメータで、true 時 200 / false 時 204。現在の 2026-03-10 API では dispatch は run ID/URL を含む 200 response が標準になっています。(GitHub Docs) (GitHub Docs) (GitHub Docs)ただし #2554 からは外すのを推奨します。topology blocker と無関係で、collector に余計な変更を混ぜるだけです。必要なら後で1コミットの housekeeping で十分です。
最終 disposition
#2554 は必要。ただし現本文のまま implement に渡すのは非推奨です。
最も重要な修正は、
_manifest_v2_provider_jobs_to_baselines()を直すことではなく、pair-based しか扱えない production provider critical-path abstraction をmonolith=1 physical provider / split=2 physical providersに一般化し、sample count・assessment・receipt の全3経路をそこへ収束させることです。SLSA、OIDC、署名、追加 approval、artifact broker、新 schema はこの修正には不要です。既存の fixture/binding 契約のまま、実際に #2155 を unblock する最小変更に絞るのが適切です。
## 判定REQUEST_CHANGES。目的は正しいですが、Issue #2554 は現状のままだと「テストだけ直って production は直らない」実装になり得ます。
#2155 の OWNER anchor は、monolith arm が構造的に performance eligible にならないことを 44-run 実験前の blocker として扱っており、その後の refinement も #2554/#2555 待ちで hard-stop しています。したがって #2554 自体の必要性は妥当です。
ただし、修正対象の choke point の特定が間違っています。
_manifest_v2_provider_jobs_to_baselines()は production path から呼ばれていないprovider_jobs[]には性能measurementsがないprovider_placement[layout]を「authority」にすること自体が現スコープでは不可能e2e-coreを二重計上し得るP0-1 — Issue が直そうとしている関数は、実際の Performance gate に配線されていない
現在の
_manifest_v2_provider_jobs_to_baselines()自身のコメントにも「adapter/handoff fix」とあり、monolith responsive を空配列に変換するだけです。コード検索でも呼び出しは定義と regression test にしか出てきません。一方、本物の
run_evidence_gate()はfixture["before/after"]["core_baselines"]/responsive_baselinesを直接読み、即座に_pair_by_workflow_run_id()へ渡しています。post-filter sample count も同じ pairer を使っています。つまり monolith の responsive list が空なら、adapter をどれだけ賢くしても production provider count は 0 のままです。receipt 側も同様で、
build_close_grade_receipt()→_materialize_close_grade_arm()→_pair_by_workflow_run_id()と直接進みます。したがって、**「adapter の regression が green」≠「#2155 の blocker 解消」**です。これは merge blocker にすべきです。
P0-2 — manifest v2 だけでは Performance observation を作れない
もう一段根本的な問題があります。manifest v2 の
ProviderJobはjob、workflow_job_id、conclusion、exact_runner_imageを持ちますが、measurements[]は持ちません。実際の duration は
_job_duration_seconds()がci_runtime_baseline_v1のmeasurements[]からphase_id.startswith("test_e2e")を合計して作っています。そして実 workflow の monolith
e2e-coreには、test_e2e_citest_e2e_monolith_responsiveが同じ physical job の measurements に入ります。したがって monolith の正しい Performance observation は、この1個の
e2e-corebaseline に含まれる2 phase の合計です。偽の responsive baseline は必要ありません。つまり必要なのは、
manifest topology → physical provider 解決
+
ci_runtime_baseline_v1timing evidence との joinです。
_manifest_v2_provider_jobs_to_baselines()の現在の返却値にはmeasurements自体がありません。これだけで「test-execution phases全体から observation を構成する」という Issue Outcome は成立しません。
P0-3 —
provider_placementを authority にすると書いてあるが、production gate は manifest 本体を持っていないCLI が受け取る manifest 関連引数は
--manifest-sha256と--experiment-identityだけです。実データは依然として--cohort-fixtureから読みます。--manifest-v2 <path>のような入力はありません。これは偶然ではありません。PR #2501 自身が consumer inventory で、
tests/ci/test_ci_performance_gate.pyは **「実際に v2 manifest ファイルを読み取る配線は別変更」**として残したと明記しています。したがって #2554 の
という要求を文字通り実装するなら、Issue の Allowed Paths / CLI input contract を広げる必要があります。
ただし、個人趣味開発としてはそこまで広げるのを私は勧めません。manifest file wiring、別 artifact input、新 schema などを追加すると、この blocker 修正に対して重すぎます。
推奨する #2554 の reframe
一番実用的なのは、manifest adapter 修正 Issue ではなく「production Performance provider materialization を layout-aware にする Issue」へ変えることです。
新しい共通 helper を
tests/ci/test_ci_performance_gate.py内に1つ置き、run_evidence_gate()、post-filter count、run-details、_materialize_close_grade_arm()が全て同じ materialized provider observationsを消費する構造にします。概念的にはこうです。
現在の
arm_labelは既に"monolith"/"split"として_materialize_close_grade_arm()まで渡っています。なので、新たな framework や schema を導入せず、この topology semantics を production path に通せます。特に重要なのが physical provider の dedupe です。manifest の logical core / responsive invocation は monolith ではどちらも
e2e-coreに配置されます。collector にも既にmonolith: core -> e2e-core, responsive -> e2e-core、split では別 provider、という topology 定義があります。Reliability 実装が
provider_placement[layout]を使うのは良い参考ですが、あちらは logical invocation ごとの Playwright JSON を扱っています。Performance がそれをそのまま模倣して invocation ごとに baseline を作ると、monolith の同じe2e-coretiming evidence を2回数える危険があります。Reliability と Performance で materialization granularity は違います。Acceptance Criteria も変えるべきです
現在の「adapter を呼んで eligible が非空」だけでは弱すぎます。最低限、1本の決定論的 production-path regression で次を固定するのが適切です。
e2e-coreにtest_e2e_ci+test_e2e_monolith_responsive、responsive_baselines=[]→ provider post-filter count が 20arms.monolith.performance_eligible_workflow_run_idsが 20件max(core, responsive)missing_pair_e2e-responsive-matrixe2e-responsive-matrixrecord は一切生成しない_cli_run_details_from_pairs()相当の assessment input まで topology-aware path を通るこれなら live GitHub Actions smoke は #2554 では不要です。Runtime Verification = not_applicable は維持してよいです。大きな harness も不要で、focused pytest だけで十分です。その後 #2155 が予定している blocks=1/2 の smoke で実 wiring を確認してから 44-run に進むのが効率的です。
GitHub API version pin
Issue にある
X-GitHub-Api-Version: 2022-11-28の記述自体は現時点で正しいです。GitHub はヘッダー未指定時も現在は2022-11-28を既定とし、この version は 2028年3月10日までサポート予定です。2022 API ではreturn_run_detailsが明示パラメータで、true 時 200 / false 時 204。現在の 2026-03-10 API では dispatch は run ID/URL を含む 200 response が標準になっています。([GitHub Docs]1) ([GitHub Docs]2) ([GitHub Docs]3)ただし #2554 からは外すのを推奨します。topology blocker と無関係で、collector に余計な変更を混ぜるだけです。必要なら後で1コミットの housekeeping で十分です。
最終 disposition
#2554 は必要。ただし現本文のまま implement に渡すのは非推奨です。
最も重要な修正は、
_manifest_v2_provider_jobs_to_baselines()を直すことではなく、pair-based しか扱えない production provider critical-path abstraction をmonolith=1 physical provider / split=2 physical providersに一般化し、sample count・assessment・receipt の全3経路をそこへ収束させることです。SLSA、OIDC、署名、追加 approval、artifact broker、新 schema はこの修正には不要です。既存の fixture/binding 契約のまま、実際に #2155 を unblock する最小変更に絞るのが適切です。
squne121 commentedon Sep 7, 2026
推奨は #2554 を
reframe_in_placeで全面修正です。対象コメントの指摘どおり、現 Issue は_manifest_v2_provider_jobs_to_baselines()を主修正点にしていますが、production gate はcore_baselines/responsive_baselinesを直接 pairing しており、duration もci_runtime_baseline_v1.measurements[]から計算しています。したがって adapter 修正中心の AC では #2155 を実際には unblock できません。また、このコメントは今回ユーザーが明示的に選択したものなので、Claude Code 側では
operator_asserted_human_contextとしてwith_human_contextlane に投入するのが適切です。これにより、コメントが要求している goal / scope / AC の semantic reframe を「追加の人間承認が必要」として止めず、fact-check 後に controlled reframe へ進めます。repo の skill 自体も、operator-selected human-context と read-only investigation による exact path 導出を想定しています。サブエージェントについては、P0 がすべて call graph・measurement shape・CLI wiring に関する事実主張なので
codebase-investigatorを使う価値が高いです。planner が Web research も要求した場合はweb-researcherと並列実行できますが、起動した全 SubAgent の完了を待ってから Step 2 に合流することを明記します。これは skill の canonical flow とも一致します。そのまま Claude Code に投入するプロンプトです。
既に auto mode で起動しているこの Claude Code セッションで、以下の作業を実行してください。
対象リポジトリ:
https://github.com/squne121/loop-protocol対象 Issue:
https://github.com/squne121/loop-protocol/issues/2554human-context anchor:
https://github.com/squne121/loop-protocol/issues/2554#issuecomment-5575198296目的は、
.claude/skills/issue-refinement-loopを使って Issue #2554 を refinement し、実装着手可能な品質まで収束させることです。この invocation では loop iteration ごとの人間承認は不要です。既に Claude Code 自体は auto mode なので、permission mode を変更したり、追加の approval 設定を導入したりしないでください。
issue-refinement-loopの canonical policy に従い、needs-fixはmax_iterationsの範囲内で自動継続してください。最初に current repository state と Issue 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 の live body、対象 anchor comment の live snapshot、
.claude/skills/issue-refinement-loop/SKILL.mdおよび planner が要求するreferences/を読み、古い記憶やこのプロンプトの要約だけで判断しないでください。max_iterations=3とします。今回ユーザーは上記 anchor comment を明示的に選択し、その内容を Issue refinement の authority として使用するよう指示しています。したがって anchor は
operator_asserted_human_contextとして扱い、canonicalwith_human_contextlane を使用してください。URL の prose style や GitHub principal だけを理由にagent_report/ unlabeled lane へ再分類しないでください。anchor が要求する goal / scope / Acceptance Criteria の semantic reframe はこのユーザー指示によって承認済みです。anchor の範囲内の reframe だけを理由に人間承認を要求しないでください。issue-refinement-loopの canonical preflight / planner / trusted contract update 経路を使ってください。run_refinement_preflight.py等の内部 wrapper を勝手に直呼びして governance を迂回しないでください。currentISSUE_REFINEMENT_COMMAND_REGISTRY_V1と skill の current instructions を SSOT としてください。anchor comment は repository implementation に関する多数の factual claim を含むため、planner が
investigation_policy.required=trueとした場合は必ず read-onlycodebase-investigatorSubAgent を起動してください。mutation は main control-plane / canonical issue-editor lane だけが所有し、investigator には GitHub Issue 更新や source mutation をさせないでください。SubAgent investigation では少なくとも次の事実を current main から独立確認してください。anchor の結論を最初から正しいものとして copy するのではなく、call graph と実データ shape から検証してください。
a.
_manifest_v2_provider_jobs_to_baselines()の production call sites が本当に存在するか。定義・regression test だけなのかを確認する。b.
run_evidence_gate()が実際に何を入力として読み、_pair_by_workflow_run_id()、_provider_post_filter_sample_count()、provider percentile、assessment input へどう流しているか確認する。c.
build_close_grade_receipt()→_materialize_close_grade_arm()が monolith / split をどう materialize しているか確認する。d.
ci_runtime_baseline_v1のmeasurements[]と_job_duration_seconds()の関係を確認し、monolith の physicale2e-corebaseline にtest_e2e_ciとtest_e2e_monolith_responsiveが入る場合、その同一 physical provider のtest_e2e*phase sum が1 runの duration observationになるという主張を検証する。e. split では
e2e-coreとe2e-responsive-matrixの同一 workflow_run_id observation のmax(core, responsive)が現在の critical-path semantics であることを確認する。f. manifest v2
provider_jobs[]に Performance timingmeasurements[]が存在するかを確認する。g. production CLI が manifest v2 本体/pathを読み取るのか、それとも
--cohort-fixtureと--manifest-sha256/--experiment-identity等だけを読むのか確認する。h. manifest の logical invocation → physical provider mapping をそのまま Performance baseline へ展開した場合、monolith の同一
e2e-coretiming evidence を logical core / responsive の2件として二重計上する危険があるか確認する。i. 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 と 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555、実装: frozen E2E benchmark を layout A/B/A/B dispatch 契約へ置換する #2422、実装: 性能ゲートの canonical cohort materialization と close-grade CLI を fail-closed 化する #2423、実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424、実装: #2423/#2424 の close-grade result を close_evidence.json bundle に束ねる producer/validator を実装する #2486 の ownership と 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 の boundary を確認し、この reframe が既存 Issue と重複実装にならないことを確認する。
planner が
web_research_policy.required=trueとした場合のみweb-researcherSubAgent も起動してください。Step 1 のcodebase-investigatorと Step 1b のweb-researcherは独立なら並列で構いません。ただし、起動したすべての SubAgent が terminal completion になるまで待ってください。Task/SubAgent を dispatch しただけで「完了」と扱わないでください。全結果を回収・join してから Step 2 review に進んでください。SubAgent に nested delegation はさせないでください。ただし current skill contract 自体が明示的に要求する内部 transport はその契約に従ってください。fact-check が anchor comment の主要 P0 finding を確認した場合、Issue 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 は小修正ではなく
reframe_in_placeしてください。中心テーマを「manifest adapter 修正」から「production Performance provider observation/materialization を layout-aware にする」に変更してください。期待する設計方向は以下です。ただし exact helper 名や signature は current code を調査した上で最小・coherent なものを選んでください。
monolith:physical provider は
e2e-core1個。同じ baseline の
measurements[]に含まれる有効なtest_e2e*phase を一度だけ合計して、その workflow_run_id の Performance duration observation とする。synthetic
e2e-responsive-matrixbaseline/record は生成しない。logical invocation が2個でも同じ physical provider timing evidence を二重計上しない。
split:physical provider は
e2e-coreとe2e-responsive-matrix。同じ workflow_run_id の2 providerを現在の attempt-selection/fingerprint policyで materialize し、duration は従来どおり
max(core, responsive)。responsive provider が本当に欠けている split run は引き続き
missing_pair_e2e-responsive-matrix等の fail-closed error とする。production path の sample-count、percentile/assessment input、run-details、close-grade receipt eligibility が別々の topology 解釈を持たないようにしてください。Issue Outcome / In Scope / AC は、これら全 consumer が同じ layout-aware physical-provider observation semantics に収束することを要求する内容にしてください。
特に、adapter regression だけ green でも production gate が壊れたまま、という Issue を作らないでください。
Acceptance Criteria は少なくとも deterministic production-path regression で次を証明できる内容に reframe してください。
monolith 20 run:
各 run は physical
e2e-corebaseline 1件のみを持ち、その measurements に core + monolith-responsive のtest_e2e*phase を含む。responsive_baselines=[]。provider post-filter sample count が20。
close-grade receipt の
arms.monolith.performance_eligible_workflow_run_idsが20件。1 run の duration が同一
e2e-coreの対象2 phaseの sum。synthetic responsive record が存在しない。
split 20 run:
e2e-core+e2e-responsive-matrix。従来の
max(core, responsive)critical-path semantics が維持される。provider count / assessment / receipt が従来どおり成立する。
negative regression:
split で responsive が本当に欠落した run は fail-closed となり、既存 missing-pair semantics を維持する。
assessment/run-details:
production assessment input まで同じ topology-aware observation を通っていることを確認する。
manifest v2 の
provider_placement[layout]は topology semantics を理解する設計資料として参照して構いませんが、production CLI が manifest 本体を入力として持っていないことが確認された場合、実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 に manifest-file wiring、新 artifact input、新 schema、新 broker を追加しないでください。この blocker 修正のためだけに production input contract を大きく拡張しないでください。anchor comment が推奨しているとおり、
X-GitHub-Api-Version: 2022-11-28pin は 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 の topology blocker とは分離してください。collector API housekeeping をこの Issue の optional scope に残さないでください。必要なら follow-up candidate として記録するだけにしてください。Allowed Paths は investigation で判明した production choke point に必要な最小集合へ更新してください。現時点では
tests/ci/test_ci_performance_gate.pyが主要 owner surface と想定されますが、このプロンプトを根拠に path を捏造しないでください。anchor の reframe を成立させるため exact additional path が必要なら、read-only investigation で exact repository-relative path を導出し、with_human_contextの trusted scope-delta mechanism を使用してください。広すぎる glob や無関係な collector/workflow path は追加しないでください。Runtime Verification Applicability は、live GitHub Actions dispatch を 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 で新たに要求する必要がないことが確認できれば
not_applicableを維持してください。focused deterministic pytest を主 verification とし、その後 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 が本来の live smoke / 44-run verification を所有する境界を維持してください。Verification Commands は reframe 後の AC を実際に検証できるものにしてください。最低限 focused
uv run --locked pytest ...と repository standard のpnpm typecheck/pnpm lint/pnpm test/pnpm buildを整合させてください。Issue refinement 中に本実装を行う必要はありません。検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の native dependency が 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 のままであることは維持してください。実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 の説明変更により 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 本文の blocker prose が古くなる場合は、その不整合を follow-up/hygiene observation として記録して構いませんが、この request では 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155/実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 を無関係に書き換えないでください。dependency materializer 等の canonical skill contract が明示的に必要とする操作のみ例外とします。
Step 2 review → Step 4 rewrite → 再review を
max_iterations=3の範囲で自動継続してください。「本文をこの内容で更新してよいですか」「次 iteration に進んでよいですか」等の承認質問はしないでください。deterministic repair / structural repair / issue-editor rewrite は canonical routing に従って自動実行してください。anchor によって明示的に承認されている reframe の範囲内の scope / goal / AC change は、人間判断が必要な新規 semantic change として扱わないでください。一方、調査の結果、anchor の範囲を越える destructive/non-idempotent operation、permission boundary変更、外部サービス境界変更、Issue split が必要、または別の owner decision が本当に必要と判明した場合は、skill の fail-closed /
human_judgment_requiredを尊重してください。無理に承認済みと偽装しないでください。refinement の成功条件は、単なる issue-reviewer approve ではなく、current body に対して fresh な final contract review が
CONTRACT_REVIEW_RESULT_V1.status == "go"となり、Issue がimplementation_ready相当まで到達することです。stale review snapshot を再利用しないでください。この依頼の作業範囲は Issue refinement までです。source code の実装・PR作成・merge は行わないでください。approved termination / handoff readiness を生成したところで止め、別 invocation の
impl-review-loopに渡せる状態にしてください。最終報告では、少なくとも以下を簡潔に示してください。
Issue 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 の最終 classification。
anchor comment の P0 finding ごとの fact-check 結果。
Issue body の主要な変更点。
最終 review verdict と fresh contract-review status。
残った blocker / follow-up。
起動した各 SubAgent の役割と、その全ての完了を待って結果を回収したこと。
実装には着手していないこと。
途中で人間への進捗確認や承認要求を挟まず、可能な範囲を最後まで連続実行してください。
この形なら、対象コメントの semantic reframe を「人間判断待ち」で再停止する可能性をかなり抑えつつ、anchor を無検証で採用することも避けられます。最終 gate は
approveだけではなく fresh なCONTRACT_REVIEW_RESULT_V1.status == goが必要です。なお、#2155 は現在 #2554 を hard blocker として保持していますが、その本文はまだ「manifest
provider_placementを authority にする修正」という旧 framing です。#2554 refinement 完了後には #2155 側の説明だけ同期する余地がありますが、native dependency 自体はそのままで問題ありません。squne121 commentedon Sep 7, 2026
issue-refinement-loop 終了報告(approved)
Issue #2554 は issue-refinement-loop により
implementation_ready相当まで収束し、impl-review-loopへの handoff 準備が完了しました。実行サマリ
operator_asserted_human_context/with_human_contextlane として扱い、read-onlycodebase-investigatorSubAgent が current main(当初 HEAD1a9963c038ab4969b9cdc4ccf3bb47e33ef93361)のコードで anchor の P0-1/P0-2/P0-3 finding を独立検証し、全て confirmed と判定した。web-researcherSubAgent がX-GitHub-Api-Version: 2022-11-28関連の external claim を GitHub 公式ドキュメントで fact-check し、全て confirmed(変更不要)と判定した。reframe_in_placeした。issue-design-reviewerSubAgent が high/medium/low の semantic finding を検出(monolith の pairing 不変条件を満たす具体的機構が本文に未記載、等)、rewrite_lane: semanticで本文を修正。2周目でassessment: clearを得てeffective_verdict: approveに到達。run_contract_review_once.py(evidence-mode: baseline)がstatus: goを返した(stale snapshot の再利用なし)。Fact-check 結果(anchor P0 findings)
_manifest_v2_provider_jobs_to_baselines()は production から呼ばれていないProviderJobにmeasurements[]が存在しないmax(core, responsive))provider_placement[layout]を authority として使用return_run_details)Issue body の主要な変更点
run_evidence_gate()→_pair_by_workflow_run_id()→ provider post-filter sample count → percentile/assessment input →build_close_grade_receipt()→_materialize_close_grade_arm()という単一 layout-aware observation に収束させる設計へ reframe。e2e-corebaseline object を_pair_by_workflow_run_id()の core/responsive 両レーンへ渡すことで、既存の private helper シグネチャ・2-sided pair 不変条件を変更せずに monolith を成立させる具体的機構を明記。tests/ci/test_ci_performance_gate.py)のみに縮小。scripts/ci/collect_e2e_performance_benchmark.pyは本 Issue の変更対象外のため除外。X-GitHub-Api-Versionヘッダー pin は topology blocker と無関係な housekeeping として Out of Scope に整理し、follow-up candidate としてのみ記録。最終 review verdict
VERDICT: approve(ISSUE_REVIEW_RESULT_COMPACT_V2、REVIEWED_BODY_SHA256: sha256:0635ee43dd2779fe8a1658c3a73f2f1f840d719ee91491481ccf83b6eee3fd0b)effective_verdict: approve(2周目、assessment: clear)run_contract_review_once.py, evidence-mode=baseline):status: go(body_sha256一致、stale snapshot 不使用)起動した SubAgent とその役割
codebase-investigator(read-only): anchor P0 finding の独立 fact-check(a〜i 全項目)。完了・結果回収済み。web-researcher(read-only): GitHub API version claim の一次資料 fact-check。完了・結果回収済み。issue-editor(controlled executor 経由): reframe_in_place 本文置換(1回目)、semantic finding 反映の本文修正(2回目)。両方完了・readback 確認済み。issue-design-reviewer(read-only): Step 2.5 semantic design review(1周目: findings、2周目: clear)。両方完了・結果回収済み。すべての SubAgent の terminal completion を待機し、結果を回収した上で次ステップへ進行した(dispatch のみで完了扱いにしていない)。
残った blocker / follow-up
RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSallowlist のmissing_pair_e2e-responsive-matrixエントリの要否判断(独立判断が必要、本 Issue では扱わない)。X-GitHub-Api-Version: 2022-11-28ヘッダー pin(scripts/ci/collect_e2e_performance_benchmark.py)は低リスクな follow-up candidate として記録のみ(新規 Issue 起票はしていない)。blockedBy(実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 を predecessor として追加)の同期は、今回の 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554 refinement サイクル単独では実施していない。dependency_materializer.pyの materialize には 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 側の確認済みISSUE_EXECUTION_DECISION_V1が必要であり、これは 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 自身の refinement/確認サイクルの責務であるため、検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 本文の書き換え回避方針(本依頼の指示)と整合させ、本 Issue の hygiene observation としてのみ記録する。検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 側の次回 refinement で対応することを推奨する。実装状況
本 invocation は Issue refinement のみを実施し、source code の実装・PR 作成・merge は行っていません。
impl-review-loopへの自動 handoff(run_root_transition())もこの invocation では起動していません(別 invocation での実行を想定)。squne121 commentedon Sep 7, 2026
推奨は、#2554 の refinement をやり直さず、現在の live Issue 本文を実装契約として、そのまま canonical
impl-review-loopに渡すことです。#2554 はすでに refinement 側でimplementation_ready、fresh contract reviewstatus: go、routing_action: run_impl_review_loopまで到達しており、実装・PR作成は未着手と明記されています。実装上の重要点は、Allowed Paths を
tests/ci/test_ci_performance_gate.pyだけに固定し、monolith=1 physical provider / split=2 physical providers の production materialization を sample count・assessment・receipt の全経路で共通化することです。44-run 本番 experiment、manifest-file wiring、Reliability側、API version pin は対象外です。また「人間承認不要」は、通常の iteration / commit / push / PR / REQUEST_CHANGES 修正で承認を求めないという意味にするのが適切です。canonical Skill が定める actual Git conflict、明示的 human veto、
HUMAN_REVIEW_REQUIRED、max iteration 超過などの hard stop まで無視させるのは Skill 契約と矛盾します。一方、SubAgent の単なるhuman_review_required: true自己申告やBLOCKED/UNSTABLE等だけでは即 human escalation せず、既定ルーティングを継続する仕様になっています。その前提で、以下をそのまま既に auto mode で動いている Claude Code に貼るのを推奨します。
以下を、人間の追加承認なしで可能な限り最後まで連続実行してください。
対象 repository:
squne121/loop-protocol対象 Issue:
https://github.com/squne121/loop-protocol/issues/2554使用する canonical Skill:
.claude/skills/impl-review-loop目的:
Issue #2554 の現在の live contract を実装し、canonical
impl-review-loopのImplementation → Verification → PR Review → Judgment → 必要なら fix_delta を反映して再 Implementation
を bounded loop で自律実行し、PR を merge する直前の
draft_pr_ready/ merge-ready 相当まで到達することです。実際の merge は行わないでください。
auto-merge も有効化しないでください。
重要な実行方針
Claude Code は既に auto mode で起動しています。
--dangerously-skip-permissions等を追加しないHUMAN_REVIEW_REQUIRED、max_iterations 超過などを勝手に無効化しないmax_iterations=3としてください。0. 必ず current live state から開始する
過去の記憶やこのプロンプト内の Issue 要約を実装 authority にしないでください。
最初に current repository state、live Issue #2554、current branch/HEAD/worktree state、および current canonical Skill を読み直してください。
以下を正本として読んでください。
.claude/skills/impl-review-loop/SKILL.mdsteps//references/.claude/skills/implement-issue/SKILL.md.claude/skills/pr-review-judge/SKILL.mddocs/dev/workflow.mddocs/dev/agent-skill-boundaries.md過去の refinement 完了報告:
https://github.com/squne121/loop-protocol/issues/2554#issuecomment-5575542127は
agent_report_comment_urls相当の provenance / telemetry として参照して構いませんが、Step 1 起動 authorization として使用しないでください。過去の OWNER REQUEST_CHANGES:
https://github.com/squne121/loop-protocol/issues/2554#issuecomment-5575198296の finding は既に current Issue 本文へ反映済みです。
旧コメントを raw execution instruction として再適用せず、current live Issue body を実装 scope / AC の authority としてください。
1. Root-Owned Synchronous Entry Transition を正規経路で実行する
過去の
LOOP_HANDOFF_RESULT_V1.status: impl_readyをそのまま authorization に使わないでください。canonical policy に従い root/main thread が同一 continuous invocation 内で、
issue-contract-reviewinvoke_impl_review_loopならそのまま Step 1 起動までを一続きで行ってください。
body drift 等が存在する場合も canonical root-entry routing に従って処理し、artifact freshness や古い handoff comment だけを理由に人間承認へ戻さないでください。
2. #2554 の確定済み scope を固定する
current live Issue が変更されていない限り、実装変更を以下に限定してください。
Allowed Paths:
tests/ci/test_ci_performance_gate.pyこの Issue では以下を行わないでください。
_manifest_v2_provider_jobs_to_baselines()adapter 自体の変更RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSallowlist 整理X-GitHub-Api-VersionhousekeepingAllowed Paths 外の変更が本当に必要と判明した場合は、silent scope expansion をせず canonical Stop Condition として扱ってください。
3. 実装時に守る semantic contract
current live Issue 本文の AC1〜AC8 をすべて満たしてください。
特に以下を implementation-worker に明示してください。
monolith
物理 Performance provider は
e2e-core1個です。同一
e2e-corebaseline のci_runtime_baseline_v1.measurements[]に存在する有効なtest_e2e*phase、特にtest_e2e_citest_e2e_monolith_responsiveを一度だけ合計し、その workflow_run_id の duration observation としてください。
synthetic な
e2e-responsive-matrixbaseline / record を生成してはいけません。既存の
_pair_by_workflow_run_id()等の 2-sided pair invariant を維持するため、current Issue が定めている通り、monolith では同じe2e-corebaseline object を core / responsive 両レーンへ渡す方式を優先してください。同一 physical provider の timing evidence を二重計上してはいけません。
split
既存どおり
e2e-coree2e-responsive-matrixを同一 workflow_run_id で pair し、duration は
max(core, responsive)を維持してください。
responsive provider が本当に欠落している split run は、既存の
missing_pair_e2e-responsive-matrix等の fail-closed semantics を維持してください。
consumer convergence
以下すべてが同一 topology-aware materialization semantics を利用するようにしてください。
run_evidence_gate()pairingbuild_close_grade_receipt()_materialize_close_grade_arm()adapter test だけ green で production path が壊れたまま、という実装を禁止します。
4. SubAgent を必ず使用する
root/main thread は control-plane に徹してください。
canonical Skill に従い、少なくとも以下を SubAgent に委譲してください。
Step 1
implementation-workerimplement-issueSkill を実行させ、まで行わせてください。
Step 2
test-runnercandidate HEAD に対して Issue #2554 の Verification Commands を独立実行させてください。
Step 4
pr-reviewercandidate HEAD と live Issue contract を対象に
pr-review-judgeの canonical review を実行させてください。5. SubAgent の完了待機は必須
これは重要です。
SubAgent を dispatch しただけで完了扱いにしないでください。
各 SubAgent について、
という順序を守ってください。
複数 SubAgent を並列起動した場合も、起動した全 SubAgent の terminal completion を待ち、全結果を回収してから control-plane に合流してください。
散文の途中報告を canonical structured output の代替にしないでください。
agent discovery が一時的に失敗した場合は canonical recovery routing に従い、bounded live-reload retry → candidate-head fresh direct invocation 等の既存 recovery を使ってください。回復可能な discovery failure だけで人間を呼ばないでください。
6. Verification
Issue #2554 の literal Verification Commands を current live body から取得し、そのまま authoritative command set としてください。
少なくとも現在の contract では以下が必要です。
uv run --locked pytest tests/ci/test_ci_performance_gate.py -q pnpm typecheck pnpm lint pnpm test pnpm buildAC1〜AC6/AC8 は focused pytest で deterministic に検証してください。
特に regression test で最低限確認すること:
arms.monolith.performance_eligible_workflow_run_idsが20件max(core, responsive)semantics 維持Runtime Verification Applicability は Issue contract の
not_applicableを尊重してください。#2554 のために live 44-run experiment や追加 workflow_dispatch を実行しないでください。
それは #2155 の責務です。
通常の PR CI / required checks は別であり、merge-ready 判定のため必要に応じて完走を待ってください。
7. Step 4 current-head gate を省略しない
PR review 起動直前に canonical current-head gate を実行してください。
Step 2 の verification result が、
と一致していることを再確認してください。
stale なら pr-reviewer を起動せず Step 2 を再実行してください。
PR review 中または review 後に HEAD が変化した場合、古い review を再利用せず current HEAD で再 review してください。
8. REQUEST_CHANGES は自動修正する
pr-reviewerがREQUEST_CHANGESを返した場合、人間の承認を求めないでください。blockers を structured
fix_deltaとして implementation-worker に渡し、Implementation
→ Verification
→ PR Review
を再実行してください。
fix_delta の修正だけを行い、Issue scope を勝手に拡大しないでください。
BEHINDなら canonicalupdate_branchroute を実行し、その後 Verification / PR Review をやり直してください。reviewed head が stale なら current head で再 review してください。
UNKNOWNmergeability は canonical bounded retry を行ってください。SubAgent が単に
human_review_required: trueを自己申告しただけでは停止せず、canonical #1860 routing に従って warning として扱って継続してください。9. 外部調査
本 Issue は current repository 内の Performance materialization semantics と deterministic pytest が中心であり、refinement 段階で外部 claim の fact-check も完了しています。
current implementation 中に新たな外部仕様依存が発生しない限り、追加 Web research は不要です。
LOOP_STATE の
external_research_skip_basisには例えば、internal-only topology/materialization change; live Issue contract and repository tests are authoritative; no new external API behavior introduced相当を記録してください。
外部仕様が本当に implementation correctness を左右する新事実を発見した場合のみ、canonical external-research route を利用してください。
10. PR と merge-ready 判定
PR を作成または更新し、candidate branch を push してください。
PR本文は current Issue #2554 の Outcome / AC / Verification と実装内容が対応するよう更新してください。
Closes #2554の扱いは repository の canonicalopen-prpolicy に従ってください。最終終了条件は canonical
impl-review-loopに従い、APPROVECLEANまたはHAS_HOOKSことです。
これを満たしたら、
IMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_ready相当を emit して終了してください。
PR は merge しないでください。
auto-merge も有効化しないでください。
11. 最終報告
最後に簡潔に以下を報告してください。
IMPL_REVIEW_LOOP_RESULT_V1途中で通常の承認確認や進捗確認を人間へ求めず、canonical hard stop に該当しない限り最後まで連続実行してください。
このプロンプトでは、過去の
impl_readyコメントを直接 authorization にせず fresh root-entry review を通す点と、**「subagent dispatch ≠ completion」**を明示している点が特に重要です。Step 1 は実際にimplementation-workerへ worktree作成・実装・検証・PR起票まで委譲することが canonical Skill に規定されています。また #2554 は live Issue 上で Runtime Verification が
not_applicableとされているため、実装ループ中に44-run experimentまで広げない方がよいです。focused pytest と通常の PR CI までで merge直前状態を作り、44-run は #2155 に残すのが契約どおりです。squne121 commentedon Sep 7, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Sep 7, 2026
implement-issue: 実装完了 (2026-09-07T21:18:21Z)
.claude/worktrees/issue-2554-performance-close-grade-materializer-topworktree-issue-2554-performance-close-grade-materializer-topfix: monolith self-pairが片方の必須phase欠落を検出せず誤ってeligible判定していた問題を修正する (#2554
fix: performance close-grade materializer をtopology-aware実装に修正しmonoli…