Repository navigation
fix: unify percentile estimator paths to nearest_rank_v1 (#2180) - #2490
Conversation
PR #2172's OWNER adversarial review deferred finding P1-2: the legacy e2e (before) baseline P50 and gate-ready before/after P50 in tests/ci/test_ci_performance_gate.py used Python's statistics.median() while the provider critical-path P50/P95 and the validator's assessment builder already used nearest_rank_v1. On even-n samples the two estimators disagree, which could flip the AC9a 35% relative-shortening gate decision depending on which code path computed "before" P50. - Remove `import statistics` and both statistics.median() call sites; replace with the existing _nearest_rank_percentile() (nearest_rank_v1) helper already used by the provider critical-path calculation. - Add tests/ci/test_ci_performance_gate_percentile_consistency.py with deterministic golden-vector regression tests exercising the actual decision-producing paths (job-duration / gate-ready-latency / paired-critical-path conversions, not a bare direct helper call) for the even-n P50 divergence, the 35% gate decision reversal regression, and the P95 boundary -- plus gate/validator semantic parity. - docs/dev/e2e-performance-benchmark.md: document the intentional test_e2e*-only scope of _job_duration_seconds() (no wall-clock broadening), sync the run_details description with the validator's current required-when-claim contract, and note the estimator unification across all four decision-producing paths. - schemas/ci_runtime_delta_v2.schema.json: sync the RunDetail description with the current required-when-claim validator contract (description only; keys/types/required unchanged). Issue #2423 (canonical cohort materialization, duplicate/run-attempt/ fingerprint/timestamp canonicalization, approval eligibility binding, close-grade CLI fail-closed contract) is intentionally NOT implemented here -- it remains #2423's owner scope per the OWNER-confirmed dependency ordering #2180 -> #2423 -> #2155. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Preview URLPreview removed (PR #2490 closed). |
判定REQUEST_CHANGES が妥当です。 PR #2490 の中核修正、つまり PR は head P1 — regression test が「実 call site」を固定できていないPR 本文と新規テストの説明は、fixture を「実際の decision-producing path」に通していると主張しています。Issue #2180 も AC2/AC3 で「関連する decision-producing path」から P50 と35%判定を証明する契約になっています。 しかし実装を見ると、legacy e2e の AC2 は 一方、今回本当に変更された箇所は
および gate-ready の
です。 つまり、将来この3箇所のどれかを別 estimator に戻しても、新規 consistency test は これは特に問題です。既存の artifact-dependent gate テストは live cohort がなければ SKIP し得るため、今回 artifact-independent golden test を追加した理由そのものが「常時 regression を検出すること」だからです。以前の #2180 OWNER review でも、artifact-independent test を主検証にすべきと明記されています。 推奨修正は harness を増やすことではありません。 AST 検査や live GitHub Actions harness は不要です。 なお P2 — |
| 優先度 | 所見 | 判定 |
|---|---|---|
| P1 / blocker | 新規 golden-vector test が変更対象の実 decision call site を実行していない | 修正必須 |
| P2 | run_details の docs/schema description が validator の条件より狭く書かれている |
merge前修正推奨 |
| P3 | 新規332行テストは目的に対してかなり重く、P1修正と同時に簡略化できる | 任意 |
P1 — regression test が「実 call site」を固定できていない
PR 本文と新規テストの説明は、fixture を「実際の decision-producing path」に通していると主張しています。Issue #2180 も AC2/AC3 で「関連する decision-producing path」から P50 と35%判定を証明する契約になっています。
しかし実装を見ると、legacy e2e の AC2 は _job_duration_seconds() で vector を作ったあと、テスト自身が直接 gate._nearest_rank_percentile(durations, 50) を呼びます。gate-ready も同様に _gate_ready_latency_seconds() の結果へテスト側から estimator を適用しています。AC3 の35%判定も、provider 側は実関数を通す一方、old 側 P50 と relative shortening はテスト自身で再実装しています。
一方、今回本当に変更された箇所は test_ci_performance_gate.py 内の
old_p50 = _nearest_rank_percentile(old_durations, 50)
および gate-ready の
new_p50 = _nearest_rank_percentile(...)
old_p50 = _nearest_rank_percentile(...)
です。
つまり、将来この3箇所のどれかを別 estimator に戻しても、新規 consistency test は _nearest_rank_percentile() 自体が残っている限り PASS できます。たとえば gate-ready call site を独自の補間 percentile に変更しても、新規 AC2 test は変更箇所を呼ばないため検知しません。
これは特に問題です。既存の artifact-dependent gate テストは live cohort がなければ SKIP し得るため、今回 artifact-independent golden test を追加した理由そのものが「常時 regression を検出すること」だからです。以前の #2180 OWNER review でも、artifact-independent test を主検証にすべきと明記されています。
推奨修正は harness を増やすことではありません。 AST 検査や live GitHub Actions harness は不要です。test_ci_performance_gate.py 内に小さな pure calculation helper を切り出し、実 gate と golden test の両方がそれを呼ぶ構成が最も軽量です。例えば legacy/provider の P50+shortening 計算と、gate-ready before/after P50 比較をそれぞれ小さな関数にし、現在の artifact-dependent test function はデータ取得後にその関数を呼ぶだけにします。これなら estimator を call site で変更すると golden test も必ず壊れます。
なお ! rg statistics.median は現在の修正確認には有用ですが、長期 regression contract としては弱いです。median_low、別 helper、手書き補間などは検出しません。
P2 — run_details の「optional は claim:none のみ」は現行 validator と一致しない
変更後 docs は、
status == complete && claim.kind != noneの場合 required
という条件を正しく書いた直後に、**「後方互換が残るのは claim.kind == none の no-op artifact のみ」**としています。schema description も同じ主張です。
前半は正しいですが、後半の「のみ」は強すぎます。現行契約では performance_evidence.status に insufficient_samples や incomparable_cohort などがあり、active claim と証拠充足状態は独立しています。 現行 validator も run_details を必須にする predicate を status == complete and claim_kind != none としているため、claim.kind != none でも status が incomplete なら、この particular rule は run_details 欠落を要求しません。
したがって AC6 の「現行 validator と同期」という観点では、
run_detailsis conditionally required for complete, non-none claims. Outside that predicate, omission is not blocked by percentile recomputation itself; other semantic/approval rules may still block the assessment.
程度にする方が正確です。
これは runtime bug ではありません。JSON Schema の description は validation assertion ではなく annotation なので、今回の description-only 変更が構造 contract を変えないという PR の判断は正しいです。(JSON Schema) むしろ conditional JSON Schema を追加して仕組みを二重化する必要はなく、文章だけ直せば十分です。
スコープについて
以前の敵対的レビューで出ていた canonical cohort、duplicate/run-attempt、fingerprint、approval_eligible false-green を この PR の blocker に戻すべきではありません。その後の OWNER anchor で責務は #2423 に明確に分離され、現在の正しい依存順序は #2180 → #2423 → #2155 と確定しています。 Issue #2180 本文にも同じ dependency ordering が反映されています。 #2423 自体も canonical materialization と close-grade CLI を自分の owner scope とし、#2180 の percentile estimator を consumer として使う契約です。
したがって、ここで canonicalization や approval harness を #2490 に追加すると、品質向上ではなく scope 再膨張です。避けるべきです。
merge 前の最小修正
P1だけなら merge blocker、P2は同じ修正ラウンドで直すのが合理的です。P1 を直す際には、新しい framework や dependency を増やさず、actual gate calculation を数十行以下の pure helper に抽出して golden test と共有するのが最も費用対効果が高いです。
また、nearest_rank_v1 の8行程度の実装を NumPy に置き換えることも勧めません。NumPy 自身が percentile method を多数持っていることからも method の明示は重要ですが、このプロジェクトでは50/95の固定値しか使っておらず、現在の小さな versioned helper+golden vectorsの方が依存・理解コストとも低いです。(NumPy)
最終 verdict: REQUEST_CHANGES。P1 修正後は、P2 の文言同期を確認したうえで APPROVE 寄りです。 現在レビュー thread は付いておらず、PR はまだ Draft です。
|
確認した限り、今回は 既存 PR #2490 をそのまま使い、#2180 の PR #2490 は現在 open / Draft、head は 対象コメントの判断はかなり明確です。P1 は blockerで、現在の golden-vector test は fixture の変換部分こそ実関数を通すものの、肝心の legacy P50・gate-ready P50・relative-shortening をテスト側で直接計算しているため、変更された decision call site 自体を固定できていません。P2 は同じ修正ラウンドで直すべき文言不整合です。P3 の332行テスト簡略化は、P1修正に伴って自然に小さくできる範囲だけで十分です。 また、canonical cohort、duplicate/run-attempt、fingerprint、
その前提で、以下をそのまま貼るのがよいです。 GitHub repository Target PR: Linked implementation Issue: 今回の trusted human-context / fix-delta anchor: このセッションは GoalPR #2490 の上記レビューコメントを canonical fix-delta として扱い、既存 PR / 既存 branch / 既存 worktree を継続利用して、 実装修正 まで、人間の途中承認を要求せず自律的に完了してください。
最終状態は「人間が merge 操作だけを行えばよい状態」を目標にしてください。 最新の人間指示の解釈target comment 内の このプロンプトが、その REQUEST_CHANGES を実際に修正して impl-review-loop を続行するという最新の明示的指示です。 したがって target comment を 過去コメント内の 現在把握している主要 fix-deltaまず live GitHub state と現在の branch/HEAD/diff を再取得して確認し、この記述を盲目的に信用しないでください。 P1 / merge blocker現在追加されている
へ通してはいますが、その後の legacy e2e P50、gate-ready P50、relative-shortening decision をテスト自身が このため、実際に PR #2490 で変更した
の production decision call site が将来別 estimator に戻っても、golden test が通る余地があります。 これを修正してください。 推奨する最小設計は、
の両方が同じ helper を呼ぶ構成にすることです。 例えば概念的には、
程度です。 正確な関数名・return type は現行コードとの整合性を見て決めて構いません。 重要なのは、golden test が estimator primitive を直接呼んで production logic を再実装するのではなく、実 gate が使う decision-producing pure helper を直接検証することです。 AST inspection、新しい harness、新しい dependency、live GitHub Actions fixture は追加しないでください。
AC2/AC3 の regression が次を直接証明する状態にしてください。
gate-readyについても、実 gate と golden test が共通 calculation helper を消費する構造にしてください。 P2 / merge前に同時修正
正しい中心契約は、
の場合に 現在の 「後方互換で omission が可能なのは という意味の文言は強すぎます。 active claim でも status が 趣旨は例えば、
程度にしてください。 JSON Schema の key / type / required set は変更せず、description-only のままにしてください。 P3 / optional新規 consistency test が現在かなり大きいため、P1 の pure helper 抽出に伴い明らかな重複を削れるなら簡略化して構いません。 ただし、行数削減そのものを目的にしないでください。 AC2/AC3/AC4、gate/validator semantic parity、pre-fix decision reversal の regression value を落とさないことを優先してください。 Scope boundaryIssue #2180 の live body / Allowed Paths を authority としてください。 特に以下を #2490 に戻さないでください。
これらは Issue #2423 の owner scope です。 dependency ordering は現在、
です。 新しい canonical-cohort Issue も作成しないでください。 Existing PR reuse新しい PR を作らないでください。 PR #2490 の linked worktree / branch を特定し、その current head から継続してください。 既存 branch: ただし live GitHub / git state を再取得して identity を確認してください。 root checkout で直接変更しないでください。 通常の fast-forward push は必要に応じて自律実行して構いません。 force push、history rewrite、published commit の destructive amend/reset は禁止です。 impl-review-loop execution
root/main thread は control-plane に徹してください。 以下の SubAgent を実際に起動してください。
必要なら同じ役割を iteration ごとに fresh に再起動してください。 各 SubAgent に役割を明確に限定し、同一 agent が「実装したので自分で APPROVE」のような自己承認をしないようにしてください。 SubAgent 自身からさらに nested SubAgent を増殖させないでください。delegation は root orchestrator が管理してください。 SubAgent completion barrierこれは必須です。 起動した SubAgent は必ず terminal state まで待ってください。 SubAgent の作業が走っている途中で root/main thread が最終回答を返してはいけません。 並列に起動した場合も、全 relevant SubAgent の completion を join してから次の routing decision をしてください。 各 iteration で、 implementation-worker 完了 の causal ordering を保持してください。 stale head に対する review result を current head の verdict として再利用しないでください。 最終報告には、起動した全 SubAgent を列挙し、それぞれの terminal status と担当内容を示してください。 No-human-approval operating policy通常の実装判断では人間に質問しないでください。 以下は自律処理してください。
「どうしますか」「修正してよいですか」「テストを実行しますか」「pushしてよいですか」等の routine confirmation は不要です。 reviewer の iteration 上限は routine human approval を発生させないよう十分大きく設定してください。3回で足りない場合に単に「max_iterationsなので人間へ」とするのではなく、同一の明確な技術的 blocker に進展なく反復しているかを確認してください。 Hard stop人間へ停止して確認してよいのは、原則として次の場合だけです。
それ以外の技術的失敗は、まず安全な代替手段、再試行、ログ調査、fix iteration で解消してください。 permission classifier があるコマンドを拒否した場合、 実 Git conflict も、意味が一意で通常の merge で安全に解消できるなら自律解消して構いません。双方の意図のどちらかを捨てる必要があり正解が repository evidence から決められない場合だけ hard stop としてください。 VerificationIssue #2180 の Verification Commands を current live body から取得し、すべて実行してください。 少なくとも今回の fix に対し focused に、
と関連 gate tests を実行してください。 P1 の regression test については、修正前の設計では検出できなかった decision-call-site drift が修正後に検出可能になったことをレビューしてください。 docs/schema の P2 については validator implementation も読み、predicate と説明文が完全に一致していることを確認してください。 その後、PR head を push し、current-head の GitHub Actions / required checks を待ってください。 過去 head の green CI を最終証拠にしないでください。 required CI は branch protection の live state から取得してください。 failure があれば current-head の failed job/log を取得し、今回の差分起因なら同じループ内で修正してください。 flaky と決めつけず原因を確認してください。 PR review loopverification が通った current head に対して fresh reviewer には少なくとも以下を確認させてください。
REQUEST_CHANGES の場合は blockers を concrete fix_delta として implementation-worker に戻し、人間へ質問せず次 iteration を続けてください。 reviewer が APPROVE を返しても、その reviewed_head_sha が current PR head と一致することを確認してください。 PR hygiene修正完了後、PR #2490 の body を current implementation に同期してください。 特に、
を current head の実態と一致させてください。 target comment の指摘に対応したことが分かる簡潔な PR conversation comment も投稿してください。 P1: P2: を記載してください。 対象コメントは top-level PR conversation comment なので、存在しない review thread を無理に resolve しないでください。 Final merge-readiness gate終了前に live state を再取得してください。 以下がすべて成立するまで完了扱いにしないでください。
PR がまだ Draft であり、repository workflow 上 Ready for Review にすることが merge直前 handoff として適切なら、最後に Ready for Review へ変更してください。 ただし実際の merge は絶対に実行しないでください。
は禁止です。 Final report最終回答は途中経過ではなく、全 SubAgent が terminal state になった後だけ返してください。 以下を簡潔に報告してください。
成功時、人間の次アクションは原則 このプロンプトでは、コメント中の REQUEST_CHANGES を「停止命令」ではなく「今回直す fix-delta」だと明示した点と、SubAgent completion barrier を明文化した点が重要です。さらに |
PR #2490 OWNER REQUEST_CHANGES (issuecomment-5532831822) の fix_delta。 P1 (merge blocker): golden regression test (test_ci_performance_gate_percentile_consistency.py) が legacy e2e P50・gate-ready P50・35% relative-shortening 判定を `_nearest_rank_percentile()` の直接呼び出しでテスト自身が再構成しており、 実 gate (test_ci_performance_gate.py) の decision call site が将来別 estimator に変更されても golden test がその変更を検知できない構造だった。 `_legacy_e2e_vs_provider_relative_shortening()` と `_gate_ready_before_after_non_regression()` の2つの pure decision helper を test_ci_performance_gate.py に抽出し、実 gate のテスト関数 (test_p50_provider_meets_absolute_and_relative_shortening_threshold / test_p50_gate_ready_latency_not_regressed) と golden test (AC3 + 新規 gate-ready 版) の両方が同じ helper を直接呼ぶ構成に変更した。 gate-ready 側には AC3 と対称な decision-reversal regression test (test_gate_ready_non_regression_decision_reversal_uses_nearest_rank_v1) を 新規追加した。 P2 (merge前に同時修正): docs/dev/e2e-performance-benchmark.md と schemas/ci_runtime_delta_v2.schema.json の run_details 記述を、 validate_ci_performance_assessment_v2.py の実装 predicate (`status == "complete" and claim_kind != "none"`) に厳密同期し、 「後方互換が残るのは claim.kind == none のみ」という過度に強い文言を 修正した(schema の key/type/required set は不変、description のみ変更)。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
…est-rank-v1-unify
fix_delta 対応完了(OWNER REQUEST_CHANGES issuecomment-5532831822)head SHA P1 (merge blocker) — 対応済み
実 gate 側のテスト関数( gate-ready 側には AC3 と対称な decision-reversal regression test を新規追加し(
P2 (merge前に同時修正) — 対応済み
従来の「後方互換が残るのは schema の key / type / required set は変更していません( 検証
詳細は更新済みの PR body(Summary / fix_delta セクション / Checks / AC-by-AC)を参照してください。 verdict 判定は別途 pr-reviewer が行います。 |
Summary
tests/ci/test_ci_performance_gate.pyの全 decision-producing percentile path(provider critical-path / legacye2e(before)baseline / gate-ready before / gate-ready after)を、versionednearest_rank_v1semantics に統一する(PR #2172 OWNER adversarial review の deferred finding P1-2 の是正)。統一前は provider critical-path と validator の assessment builder のみがnearest_rank_v1を使い、legacye2e(before)baseline P50 と gate-ready before/after P50 は Python 標準ライブラリの偶数件平均型statistics.median()を使っていた。偶数サンプルサイズ(n=20)では両者が異なりうり、AC9a の 35% relative-shortening gate の判定を反転させ得る不整合だった。tests/ci/test_ci_performance_gate_percentile_consistency.py(新規)に、実際の decision-producing path(_job_duration_seconds()/_gate_ready_latency_seconds()/_pair_by_workflow_run_id()+_provider_critical_path_paired_p50_p95())を経由する決定論的 golden vector regression test を追加し、この一致(および 35% gate 判定反転の re-regression)を固定した。同ファイルで gate 側 / validator 側の_nearest_rank_percentile()実装の semantic parity も固定している。docs/dev/e2e-performance-benchmark.mdとschemas/ci_runtime_delta_v2.schema.jsonのrun_details関連記述を、現行validate_ci_performance_assessment_v2.pyのstatus == "complete" && claim.kind != "none"required-when-claim 契約に同期した(schema は description のみ変更、key/type/required set は不変)。加えて_job_duration_seconds()がphase_id.startswith("test_e2e")の test-execution phase sum のみを意図的に維持し、install/build/container-startup/artifact-processing 等の wall-clock へ broaden していないことを docs に明記した。Closes #2180(本 PR のマージで close する)。
fix_delta(OWNER REQUEST_CHANGES issuecomment-5532831822 対応)
test_ci_performance_gate_percentile_consistency.py)が、fixture を実 decision-producing path(_job_duration_seconds()等)へ通した後の legacy e2e P50・gate-ready P50・35% relative-shortening 判定を、テスト自身が_nearest_rank_percentile()を直接呼んで再構成していた(実 gate の decision call site が将来別 estimator に変更されても golden test がその変更を検知できない構造)。_legacy_e2e_vs_provider_relative_shortening()と_gate_ready_before_after_non_regression()の 2 つの pure calculation helper をtest_ci_performance_gate.pyに抽出し、(1) 実 gate のテスト関数(test_p50_provider_meets_absolute_and_relative_shortening_threshold/test_p50_gate_ready_latency_not_regressed)と (2) golden vector regression test(AC3 + gate-ready 側新規テスト)の両方が同一 helper を直接呼ぶ構成に変更した。gate-ready 側には AC3 と対称な decision-reversal regression test(test_gate_ready_non_regression_decision_reversal_uses_nearest_rank_v1)を新規追加し、legacy old P50 / provider P50 からの relative shortening、および gate-ready before/after P50 / non-regression 判定の両方が共通 helper を消費する構造にした。nearest_rank_v1の実装自体(数行の nearest-rank ロジック)は変更していない。docs/dev/e2e-performance-benchmark.mdとschemas/ci_runtime_delta_v2.schema.json(RunDetail.description)のrun_details文言を、validate_ci_performance_assessment_v2.py::_check_percentile_recomputed_from_raw_samplesの正確な predicate(status == "complete" and claim_kind != "none")に厳密同期した。従来の「後方互換で omission が可能なのはclaim.kind == "none"のみ」という過度に強い文言を修正し、predicate の外側(例:statusがincomparable_cohort/insufficient_samples/unavailable等でclaim.kind != "none"のまま)では、この percentile-recomputation 要件自体はrun_detailsの省略を拒否しないが、他の意味検証・承認ルールが assessment を却下しないことを意味しない旨を明記した。schema の key / type / required set は変更していない(description のみ 1 行差分)。Checks
! rg -n -e 'statistics\.median' -e '^import statistics$' tests/ci/test_ci_performance_gate.py→ PASS(マッチなし、exit 0)uv run --locked pytest tests/ci/test_ci_performance_gate_percentile_consistency.py -q→ PASS(7 passed — fix_delta で gate-ready decision-reversal test 1 件追加)uv run --locked pytest tests/ci/test_ci_performance_gate_paired_critical_path.py -q→ PASS(3 passed)uv run --locked pytest tests/ci/test_ci_performance_gate*.py -q→ PASS(65 passed, 3 skipped — 既存の cohort-dependent 統合テストで、live GitHub Actions history 不在によるものであり Runtime Verification Applicability の SKIP 規約通り)rg -n -F 'phase_id.startswith("test_e2e")' docs/dev/e2e-performance-benchmark.md→ PASS(1 match)rg -n -F 'status == "complete"' docs/dev/e2e-performance-benchmark.md→ PASS(1 match)rg -n -F 'claim.kind != "none"' docs/dev/e2e-performance-benchmark.md→ PASS(1 match)! rg -n 'does not read run_details' schemas/ci_runtime_delta_v2.schema.json→ PASS(マッチなし、exit 0)! rg -n 'このチェックをスキップする' docs/dev/e2e-performance-benchmark.md→ PASS(マッチなし、exit 0)uv run --locked pytest schemas/tests/test_catalog.py -q(focused regression)→ PASS(51 passed)uv run --locked pytest .claude/skills/ci-test-performance/scripts/tests/ -q(validator consumer suite, schema description 変更の影響確認)→ PASS(150 passed)uv run --locked ruff check tests/ci/test_ci_performance_gate.py tests/ci/test_ci_performance_gate_percentile_consistency.py→ PASS(All checks passed!)uv run --locked python3 .claude/skills/create-issue/scripts/validate_japanese_content.py --file docs/dev/e2e-performance-benchmark.md --verbose→ PASS(51 prose blocks, 0 failed)uv run --locked python3 -c "import json; json.load(open('schemas/ci_runtime_delta_v2.schema.json'))"→ PASS(JSON 構文健全性確認)AC-by-AC 達成状況
tests/ci/test_ci_performance_gate.pyからstatistics.medianの呼び出しおよびimport statisticsを除去し、旧 e2e(before)baseline P50 と gate-ready before/after P50 を既存の_nearest_rank_percentile()(nearest_rank_v1)へ置き換えた。provider critical-path / validator と合わせて全 4 decision-producing path が同一セマンティクスに適合している。達成(上記 rg negated check + 全 gate テスト PASS で証明)。samples = [100.0] * 10 + [200.0] * 10(n=20)の golden vector fixture を、legacy e2e job-duration path と gate-ready latency path の両方に対して materialize し、実際の decision-producing path(_job_duration_seconds()/_gate_ready_latency_seconds()→_nearest_rank_percentile())が P50 = 100.0 を返すこと(statistics.medianの 150.0 ではない)をtest_ac2_legacy_e2e_p50_even_n_divergence_uses_nearest_rank_v1/test_ac2_gate_ready_p50_even_n_divergence_uses_nearest_rank_v1で証明。達成。old_samples = [100.0] * 10 + [200.0] * 10(legacy e2e job-duration fixture)、provider_samples = [90.0] * 20(paired critical-path fixture)に対し、統一後の relative shortening が(100 - 90) / 100 == 10%と判定され、35% shortening gate を誤って PASS しないことをtest_ac3_unified_estimator_does_not_incorrectly_pass_35_percent_gateで証明。同テストは pre-fix の混在計算(statistics.median(old_samples) == 150→ shortening 40% → gate を誤って PASS)を regression guard として明示的に再現し、統一後との対比を固定している。fix_delta により、このテストは実 gate と同一の pure helper(gate._legacy_e2e_vs_provider_relative_shortening)を直接呼ぶ構成に変更されている。達成。samples = [100.0] * 19 + [500.0]の golden vector fixture を legacy e2e job-duration path と provider paired critical-path の両方に対して materialize し、nearest_rank_v1P95 = 100.0 であること、estimator version がpercentile_method: "nearest_rank_v1"として decision-producing result payload に明示されることをtest_ac4_p95_boundary_nearest_rank_v1_legacy_e2e_path/test_ac4_p95_boundary_nearest_rank_v1_provider_critical_path_declares_estimator_versionで証明。達成。_job_duration_seconds()がphase_id.startswith("test_e2e")の test-execution phase sum のみを維持しており、install/build/container-startup/artifact-processing 等への broaden が行われていないことを、docs/dev/e2e-performance-benchmark.mdの新規セクション「_job_duration_seconds()の計測スコープ」に明記した。達成。docs/dev/e2e-performance-benchmark.md(AC8 セクション)とschemas/ci_runtime_delta_v2.schema.json(RunDetail.description)のrun_details関連記述を、現行validate_ci_performance_assessment_v2.pyのstatus == "complete" && claim.kind != "none"required-when-claim 実装契約と一致するよう同期した。fix_delta(P2)で predicate の外側での挙動(percentile-recomputation 要件自体は省略を拒否しないが他ルールは拒否しうる)まで明記し、validate_ci_performance_assessment_v2.py::_check_percentile_recomputed_from_raw_samplesの実装と文言を完全一致させた。schema の key / type / required set は不変(description フィールドのみ 1 行差分)。達成。検証コマンドと実行結果(Verification Commands and actual results)
上記「Checks」セクション参照。全 Issue #2180 本文記載の Verification Commands を実行し、すべて PASS した。追加で focused regression(
schemas/tests/test_catalog.py、validator consumer suite)、ruff check、validate_japanese_content.py、schema JSON 構文健全性も実行し、すべて PASS した。Schema Change Applicability
schemas/ci_runtime_delta_v2.schema.jsonの変更はRunDetail.descriptionフィールド 1 行のみであり、キー名・型・required配列は一切変更していない(git diffで確認可能、1 insertion + 1 deletion の description 文字列差分のみ)。fix_delta(P2)でも同フィールドの文言をさらに predicate 一致に精緻化したのみで、対象は同じく description のみ。consumer 境界をまたぐ contract(key/type/required set)に変更がないためdocs/dev/schema-governance.mdのnot_schema_change判定基準(「Allowed Paths 内の変更がすべて内部ロジック・コメント・説明文のみで、consumer 境界をまたぐ contract に変更がない」)に該当する。Schema Consumer Inventory
N/A(
not_schema_change— description のみの変更であり、consumer 側のパース/読み取りロジックへの影響がないため、consumer 一覧・before/after key diff は不要)。参考までに
ci_runtime_delta_v2schema の既知 consumer はrg -l "ci_runtime_delta_v2" .(.claude/worktrees除外)で以下:schemas/ci_test_performance_assessment_v2.schema.json($ref参照)schemas/tests/test_catalog.py(catalog test — 本 PR で再実行し PASS 確認済み)schemas/catalog.yaml(catalog エントリ).claude/skills/ci-test-performance/scripts/validate_ci_performance_assessment_v2.py(validator consumer suite を本 fix_delta で追加再実行し PASS 確認済み)いずれも description 文字列の変更では影響を受けない(構造・型・required set 非依存のため)。
Safety Claim Matrix
N/A — reason: 変更対象パス(
tests/ci/*.py、docs/dev/e2e-performance-benchmark.md、schemas/ci_runtime_delta_v2.schema.json)はdocs/dev/schema-governance.mdの safety-sensitive パスパターン(transport/permission/sandbox/auth/mcp/.claude/skills//.github/workflows/)のいずれにも一致しない。テストコード・ドキュメント・schema description の変更のみで、実行時の権限・sandbox・auth・transport 境界への影響はない。Scope Delta
Issue #2423(canonical cohort materialization、duplicate / run-attempt / fingerprint / timestamp canonicalization、approval eligibility binding、close-grade CLI の fail-closed exit contract)の owner scope は、本 PR では意図的に実装していない。OWNER の 2026-09-04 敵対的レビュー確定(anchor: https://github.com/squne121/loop-protocol/issues/2180#issuecomment-5530904888)に基づき、正しい依存順序は
#2180 -> #2423 -> #2155 close-grade verificationであり、#2180 は percentile estimator contract の owner のまま、#2423 が consumer として #2180 完了後に着手する。新しい「canonical cohort P0 Issue」の起票も行っていない(既存 #2423 がその責務を保持しているため)。また production
_cli_main()のapproval_eligible未チェックによる false-green(#2423 AC4 の責務)も本 PR のスコープ外として残している。Notes
decision: not_applicable(percentile estimator semantics と threshold decision は deterministic fixture-based pytest で完全に検証可能であり、live GitHub API / Actions cohort は不要)。本 PR の新規テストはすべて artifact 非依存の fixture-driven pytest であり、live GitHub Actions history を必要としない。origin/mainに対する差分はtests/ci/test_ci_performance_gate.py(既存関数の呼び出し置換 + pure helper 抽出 + コメント追加)、新規テストファイル、docs/dev/e2e-performance-benchmark.md、schemas/ci_runtime_delta_v2.schema.jsonの description 1 行のみであり、既存 CI 失敗との比較対象となる無関係な差分は含まれていない。