Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#2119"
goal_ref: "e2e performance benchmark(fixed pre/post SHA・paired workflow-run critical path・cross-run collector・immutable manifest)を再設計し、#2155 が実データ検証を再開できるようにする"
change_kind: bugfixParent Issue
Parent Goal Ref
- Goal: Playwright の決定論的 workers=1 契約を維持したまま、E2E の最大 hotspot を独立 lane 化して PR CI の critical path を短縮する(実装: CI: Playwright E2E の responsive matrix を専用 lane へ分離し critical path を短縮する #2119
## Parent Goal Refより引用) - Desired Destination: 実装: CI: Playwright E2E の responsive matrix を専用 lane へ分離し critical path を短縮する #2119 の AC9/AC10 性能ゲートを実 CI データで検証する 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 が、実データ蓄積後に意味のある PASS/FAIL 判定を得られる状態
Scope Split History
本 Issue は元々 #2155(#2119 の子 Issue)の OWNER 敵対的レビュー(issuecomment-5292487405)で指摘された測定器欠陥の修正 prerequisite として起票された。その後、本 Issue に対する OWNER 敵対的レビュー(issuecomment-5293380230)が、performance benchmark/collector(本 Issue = Issue A)と reliability schema/validator(別 Issue B)への分割を推奨し、issue-refinement-loop が human_escalation で停止(終了コメント 参照。本 Issue 自身の Stop Conditions「新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)」に該当したため)。
人間が分割方針を承認し、本 Issue を Issue A(performance benchmark/cohort/collector に限定、reliability を含まない)へ全面改訂した。reliability schema/validator(旧 AC9/AC10 相当)は別途新規 Issue(Issue B)として起票する。
Current Validated Scope
- 本 Issue は 実装: CI: Playwright E2E の responsive matrix を専用 lane へ分離し critical path を短縮する #2119 の直接の作業タスクではなく、検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155(実装: CI: Playwright E2E の responsive matrix を専用 lane へ分離し critical path を短縮する #2119 の子 Issue)が実データ検証を再開するための prerequisite(Issue A)である。
- 修正対象は
_comparable_cohort()/ fingerprint / provider critical path 統計・gate-ready 同一時計比較・cross-run collector・immutable manifest・governed artifact upload に narrow する。 - reliability(failure/flaky rate、統計手法、非劣性 margin)は本 Issue の範囲外であり、Issue B で扱う。
- lane 分割ロジック自体(
e2e-core/e2e-responsive-matrixの job 定義)は Out of Scope であり、実装: CI: Playwright E2E の responsive matrix を専用 lane へ分離し critical path を短縮する #2119 の既存実装を変更しない。
Remaining Parent Gaps
- 本 Issue完了後も、Issue B(reliability schema/validator)と、両方が生成した artifact を消費する 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の実データ検証待機は別途残る。
- 親 実装: CI: Playwright E2E の responsive matrix を専用 lane へ分離し critical path を短縮する #2119 の AC10 記述改訂が必要かどうかは Issue B の検討結果次第であり、必要な場合は別途 follow-up として扱う(本 Issue の Stop Conditions に明記)。
Blocks
#2155(#2155 は本 Issue と Issue B の close 後に実データ検証を再開する。#2155 の Allowed Paths は「なし」のまま変更しない)
Background
OWNER レビュー(issuecomment-5293380230)で指摘された、本 Issue(performance benchmark/collector)に関係する主要な欠陥は以下の通り(P0-2, P0-3, P0-4, P0-5, P0-6, P0-7, P0-9, P1-1, P1-2, P1-3, P1-4, P1-5, P1-6。reliability 関連の P0-1, P0-8 は Issue B へ分離)。
- 新 fingerprint を要求すると旧 cohort が再利用不能になる一方、固定 ref を再実行して cohort を再構築する経路が定義されていない(P0-2)。
- assessment producer を
.github/workflows/ci.ymlに追加するだけでは不十分で、複数 workflow run にまたがる artifact を取得・検証・集約する collector が必要(P0-3)。 - 現行の provider P50 計算
max(median(core), median(responsive))は並列 critical path の正しい統計量ではない。正しくはmedian(max(core_i, responsive_i))(同一workflow_run_idの paired run から計算)(P0-4)。 - 現行実装の「provider P50」が install/build/Playwright 実行/artifact 処理/job startup のどこまでを含むか未定義(P0-5)。
- gate-ready の before/after が異なる時計(before: artifact 内
measurements[].elapsed_ms手動合算、after: GitHub APIrun_started_at〜checkcompleted_at)で測られており、apples-to-apples ではない(P0-6)。 COMPARABILITY_FINGERPRINT_FIELDSを単一 tuple として cross-arm 一致させる設計は誤り。within_cohort_required_equal/cross_cohort_required_equal/intentional_treatment_differenceの三分類が必要(P0-7)。- validator は assessment の自己申告
before.p50_seconds/after.p50_secondsからの delta のみを検証し、run_details[].duration_secondsから percentile 自体を再計算していない(P0-9)。 _find_all_baselines()の(run_id, run_attempt)dedupe は rerun 水増しを防がない。独立 sample 単位はworkflow_run_idにすべき(P1-1)。- fingerprint field が
unknown/unknown/unknown/ 空文字列等の placeholder を含む場合、現行の tuple equality では欠損として除外できない(P1-2)。 - host runner image と Playwright container の provenance が分離されていない(P1-3)。
- artifact digest binding が
ci_verdict_summary_v2のみに限定され、assessment・各 baseline・raw Playwright result・run selection manifest には及ばない(P1-4)。 - governed baseline upload に
if-no-files-found: warnが残っており、measurement gate の正本として fail-close ではない(P1-5)。 - AC8 の Verification Command(
rg -n "CI_TEST_PERFORMANCE_ASSESSMENT_V2" .github/workflows/ci.yml)は文字列の存在のみを確認し、実配線を証明しない。SKIP は最終 verification の close 条件に使用すべきではない(P1-6)。
Outcome
tests/ci/test_ci_performance_gate.py の cohort selector・comparability fingerprint・provider critical path 統計を修正し、固定 pre/post SHA による再現可能な benchmark 実験設計(#1064 方式)・cross-run artifact collector・immutable manifest・CI_TEST_PERFORMANCE_ASSESSMENT_V2 producer wiring を実装した状態。reliability(failure/flaky rate)は含まない。
In Scope
_comparable_cohort()をe2e-core/e2e-responsive-matrix間で fingerprint が一致することを要求するよう修正し、fingerprint 欠損 field を持つ run を cohort から除外する(fail-closed 化)。- fingerprint field の placeholder 値(
""/null/"unknown"/"unknown/unknown"/"N/A"等)を欠損と同様に拒否する validation を追加する。 - pre-split
e2ejob と post-split aggregatee2ejob を明示的な判別子(cohort_role: before|after)で区別する。 COMPARABILITY_FINGERPRINT_FIELDSをwithin_cohort_required_equal/cross_cohort_required_equal/intentional_treatment_differenceの三分類へ再設計し、host runner image と Playwright container image digest を分離した provenance 構造を導入する。- provider critical path の統計式を
median(max(core_i, responsive_i))(同一workflow_run_idの paired run から計算、pair 欠損 run は evidence error として明示)へ修正する。 - gate-ready の before/after を GitHub API の同一時計(
workflow_run.run_started_at起点、対応する check run のcompleted_at終点)で統一する。 _find_all_baselines()の sample identity をworkflow_run_id単位にし、rerun attempt を独立 sample として数えないようにする。scripts/ci/collect_e2e_performance_benchmark.pyを新設し、固定 before/after ref に対する専用workflow_dispatchbenchmark route から artifact ID/digest/head/run/job を検証した immutable manifest(schemas/e2e_performance_benchmark_manifest_v1.schema.json準拠)を生成する。validate_ci_performance_assessment_v2.pyに、run_details[].duration_secondsの raw sample から percentile(nearest_rank_v1等の versioned method)を再計算し、assessment の自己申告 aggregate と照合するロジックを追加する。- governed baseline artifact upload の
if-no-files-foundをwarnからerrorへ変更する。 CI_TEST_PERFORMANCE_ASSESSMENT_V2を実 CI run から生成する producer を.github/workflows/ci.ymlに配線する。- evidence 不足時の最終 verification が
pytest.skip()(exit 0)ではなく non-zero hard failure になるよう、close 条件用の verification path を分離する。 docs/dev/e2e-performance-benchmark.mdに benchmark contract(fixed SHA、sample identity、pairing、measurement clocks、percentile method、comparability 三分類、artifact manifest)を記述する。
Out of Scope
- Playwright E2E lane 分割ロジック自体(
e2e-core/e2e-responsive-matrixの job 定義)の変更。 - reliability(failure/flaky rate)の schema・statistical method・validator(Issue B のスコープ)。
- comparable cohort の 20 run 蓄積を待つこと自体、および
#2119の close 判定そのもの(検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 のスコープ)。
Acceptance Criteria
- AC1: before/after の固定 40-hex commit SHA と
workflow_digestが benchmark manifest に記録される。 - AC2: 各 arm(before/after)の production contract は、20 未満の有効 sample を
completeとして受理せず、workflow_run_idを一意な sample identity として要求し rerun attempt を追加 sample として数えない(実際に 20-run 蓄積した実データでの検証実行は 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の責務であり、本 AC は「今 20 件存在すること」ではなく「20 未満を complete と誤認しない production contract が成立していること」を指す)。 - AC3: post-split provider の
e2e-core/e2e-responsive-matrixが同一workflow_run_idで exact pairing され、per-runmax(core_duration, responsive_duration)から P50/P95 を計算する。pair 欠損 run は cohort 全体から除外せず evidence error として manifest に明示する。 - AC4: gate-ready latency の before/after が GitHub API の同一時計(
workflow_run.run_started_at起点)で計算される。 - AC5: fingerprint field が欠損、または
""/null/"unknown"/"unknown/unknown"/"N/A"のいずれかの run は cohort から除外される。 - AC6:
COMPARABILITY_FINGERPRINT_FIELDSがwithin_cohort_required_equal/cross_cohort_required_equal/intentional_treatment_differenceの三分類として定義され、host runner image と container image digest が分離されている。 - AC7:
scripts/ci/collect_e2e_performance_benchmark.pyが artifact ID・artifact digest・head SHA・workflow_run_id・job を検証し、schemas/e2e_performance_benchmark_manifest_v1.schema.json準拠の immutable manifest を生成する。 - AC8:
validate_ci_performance_assessment_v2.pyがrun_details[].duration_secondsから percentile を再計算し、assessment 記載の自己申告値との一致を検証する(自己申告値のみを信頼しない)。 - AC9: governed baseline artifact upload ステップの
if-no-files-foundがerrorである。 - AC10:
.github/workflows/ci.ymlがCI_TEST_PERFORMANCE_ASSESSMENT_V2producer ステップを持ち、実 CI run から assessment JSON を生成する(コメント文字列存在だけでなく、実行結果 artifact の存在を Verification Command で確認する)。 - AC11: evidence 不足時、最終 verification 用のテスト実行が非 zero exit code で終了する(
pytest.skip()を close 条件に使用しない)経路がtests/ci/test_ci_performance_gate.pyに存在する。 - AC12:
scripts/ci/tests/e2e_performance_benchmark/に collector の unit/integration test が存在し PASS する。
Verification Commands
# AC1
$ uv run --locked pytest "scripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark.py::test_fixed_sha_recorded" -q
# AC2
$ uv run --locked pytest "scripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark.py::test_sample_identity_workflow_run_id" -q
# AC3
$ uv run --locked pytest "tests/ci/test_ci_performance_gate_paired_critical_path.py::test_provider_critical_path_paired_per_run_p50" -q
# AC4
$ uv run --locked pytest "tests/ci/test_ci_performance_gate_clock_alignment.py::test_gate_ready_latency_uses_same_github_api_clock" -q
# AC5
$ uv run --locked pytest "tests/ci/test_ci_performance_gate_fingerprint_validation.py::test_fingerprint_rejects_placeholder_and_missing_values" -q
# AC6
$ uv run --locked pytest "tests/ci/test_ci_performance_gate_comparability_classification.py::test_comparability_fingerprint_three_way_classification" -q
# AC7
$ uv run --locked pytest "scripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark.py" -q
# AC8
$ uv run --locked pytest ".claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2_percentile.py::test_percentile_recomputed_from_raw_samples" -q
# AC9
$ rg -U -n "name: Upload ci-runtime-baseline artifact(\n.*){1,6}?if-no-files-found: error" .github/workflows/ci.yml
# AC10
$ rg -n "CI_TEST_PERFORMANCE_ASSESSMENT_V2" .github/workflows/ci.yml
# AC11
$ uv run --locked pytest "tests/ci/test_ci_performance_gate_evidence_hard_failure.py::test_evidence_incomplete_produces_hard_failure_not_skip" -q
# AC12
$ uv run --locked pytest "scripts/ci/tests/e2e_performance_benchmark/" -qAllowed Paths
tests/ci/test_ci_performance_gate.pytests/ci/test_ci_performance_gate_paired_critical_path.pytests/ci/test_ci_performance_gate_clock_alignment.pytests/ci/test_ci_performance_gate_fingerprint_validation.pytests/ci/test_ci_performance_gate_comparability_classification.pytests/ci/test_ci_performance_gate_evidence_hard_failure.py.claude/skills/ci-test-performance/scripts/validate_ci_performance_assessment_v2.py.claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2.py.claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2_percentile.py.claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2_build_from_cohorts.py(P0-8 対応の real assessment producer テスト。実装: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する(Issue A) #2159 fix_delta で Allowed Paths へ追加).claude/skills/ci-test-performance/SKILL.md(producer wiring の手順記載が必要な場合のみ).github/workflows/ci.ymlscripts/ci/collect_e2e_performance_benchmark.pyscripts/ci/tests/e2e_performance_benchmark/tests/ci/test_ci_performance_gate_post_filter_sample_floor.py(P0-6 対応の post-filter sample floor 再検証テスト。実装: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する(Issue A) #2159 fix_delta で Allowed Paths へ追加)schemas/e2e_performance_benchmark_manifest_v1.schema.jsondocs/dev/e2e-performance-benchmark.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- reliability(failure/flaky rate)関連の変更が必要と判明した場合(Issue B のスコープであり、本 Issue へ混在させない)
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- GitHub Actions
workflow_dispatchの新規 route 追加に repository の Actions 設定変更(permissions 拡張等)が必要と判明した場合
Required Skills
- ci-test-performance
Required Design References
- docs/dev/test-lane-policy.md
- docs/dev/runtime-verification-policy.md
- tests/ci/test_ci_performance_gate.py
- .claude/skills/ci-test-performance/scripts/validate_ci_performance_assessment_v2.py
Runtime Verification Applicability
decision: immediate
applicable_acs:
- AC1
- AC2
- AC3
- AC4
- AC5
- AC6
- AC7
- AC8
- AC9
- AC10
- AC11
- AC12
execution_environment:
cli_tools:
- python3
- uv
- rg
auth_required: false
network_required: false
skip_conditions:
- "実 GitHub Actions run history(20-run comparable cohort)が現在の実装セッション環境に存在しない場合、cohort 依存の統合テストは SKIP ではなく environment blocked として扱い、単体テストとfixture-based テストで代替検証する"
fallback_policy:
fallback_success_is_pass: false
notes: "fallback 経由の成功を PASS に変換しない。evidence 不足時は AC11 の non-zero hard failure 経路を使う"
artifact_requirements:
- "pytest output"
- "schemas/e2e_performance_benchmark_manifest_v1.schema.json への validation 結果"Scope Delta(該当時のみ記載)
- 2026-08-14: PR fix: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する #2172 への OWNER 敵対的レビュー(issuecomment-5295659213)対応 fix_delta で追加した以下2テストファイルを Allowed Paths へ追加。いずれも review が要求した具体的な P0 修正(P0-6 post-filter sample floor 再検証、P0-8 real assessment producer)に直結する新規テストのみで、他スコープ拡張はない。
.claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2_build_from_cohorts.pytests/ci/test_ci_performance_gate_post_filter_sample_floor.py
- 2026-08-15: PR fix: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する #2172 の
human_review_requiredに対する OWNER scope authority 判断(issuecomment-5299412215)を反映。- OWNER 第2次敵対的レビューのマージ条件item 6(実 20-run 蓄積)は 実装: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する(Issue A) #2159 の merge blocker から明示的に除外し、検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 へ委譲する(AC2 を「20 未満を complete と誤認しない production contract」へ再定義。上記参照)。
- item 1(P0-2 の fixed-SHA route 構造。dispatch する workflow 自体は default branch の現行定義を使い、
actions/checkoutのrefにだけ古いtarget_shaを渡す構造へ変更。workflow_sha != target_shaを許容する)、item 7(P0-8 の assessment producer を実 production workflow/CLI path へ配線し、20 件未満は non-zero、成立時はclaim.kind != noneを生成する)、item 9(AC11:_evidence_readiness_hard_check*()を実 workflow の close gate へ接続する)は fix: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する #2172 内で完成必須(follow-up へ送らない)。 - 追加指摘:
host_runner_imageを${{ runner.os }}/${{ runner.arch }}から生成するのは実 runner image version/build の provenance にならない(GitHub 公式定義上runner.os/runner.archは OS 種別・CPU architecture のみ)。comparability contract が runner image provenance を要求する以上、AC1/AC6 の fingerprint 実装をこの観点で見直す必要がある。
Delivery Rule
1 Issue = 1 PR を原則とする。
Source
- source_kind: issue_comment
- source_url: 実装: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する(Issue A) #2159 (comment)
- dedupe_key: "prerequisite:squne121/loop-protocol:issue/2155:measurement-instrument-fix:issue-a-benchmark-collector"
Activity
squne121 commentedon Aug 14, 2026
総合判定
REQUEST_CHANGES。#2159は問題の方向性を正しく捉えていますが、現状のIssue契約のまま実装へ進むべきではありません。
#2155の敵対的レビューで指摘された、cohortの誤選択、欠損fingerprint、pre/post split混同、AC10の未実装、assessment producer不在といった主要欠陥は、おおむね#2159へ取り込まれています。ところが、実装Issueとして読むと次の矛盾が残っています。
したがって、コード修正前にmeasurement contractを確定し、最低でも「performance benchmark」と「reliability schema/validator」を分離する必要があります。
Findings
P0-1 — AC9が非決定的で、Issue自身のStop Conditionsと矛盾している
#2159のAC9は、次のどちらかを認めています。
failure_rate/flaky_rate検証を追加するしかしStop Conditionsでは、#2119本文のAC10改訂が必要になった場合は別follow-upとして停止すると定めています。つまり、二つ目の選択肢は#2159内では完了できません。ACとして「AまたはB」と書かれていても、Bを選んだ時点で本Issueは未完了のまま停止します。
一つ目を選ぶ場合も問題があります。現在のV2 validatorはruntimeのP50/P95、cohort一致、sample数、自己申告deltaなどを扱いますが、failure/flaky rateの分母、retry transition、非劣性margin、統計規則を持っていません。単にvalidatorのPythonファイルへ条件分岐を足すだけでは、入力契約が定義されません。
必要な修正
AC9の二者択一を削除し、起票時点で次のいずれかに固定すべきです。
#1724は既存V1をin-place変更せずV2を追加する設計を採用しているため、今回もV2へ場当たり的にフィールドを足すより、
CI_TEST_RELIABILITY_ASSESSMENT_V1またはV3相当のversioned additionが整合的です。P0-2 — AC2とAC7を実装すると、pre-split cohortが永久に成立しない
#2159は次を要求します。
command_manifest_digestとtest_selection_digestをfingerprintへ追加する。e2eとpost-split aggregatee2eを区別する。これは将来のrunには妥当ですが、既存のpre-split artifactは、これらのフィールドをproducerが実装する前に作られています。欠損をfail-closedで除外すれば、過去の旧
e2eartifactは20件あっても全件不適格になります。mainは既にpost-split topologyへ移行しているため、通常のmain pushを待ってもpre-split artifactは増えません。#2155のレビューでも、自然発生main runではなく、#1064と同様の固定base/head benchmarkが必要だと指摘されています。#1064の先例は、固定base commit、専用benchmark branch、固定head、各20 run、同一runner image、全run ID列挙という形で、再現可能な実験になっています。#2159にも同じ方式が必要です。
さらに現行workflowのpost-split producerは、
ImageOSまたはImageVersionが得られない場合にunknown/unknownへフォールバックします。AC2を正しく実装するなら、unknownは欠損同様に除外されるべきなので、既存post-split runも有効cohortにならない可能性があります。必要な修正
#2159のIn Scopeへ、次を明示的に追加する必要があります。
workflow_dispatchbenchmark route。workflow_run_id。P0-3 — assessment producerだけでは不十分で、cross-run collectorが必要
AC8は「
.github/workflows/ci.ymlにCI_TEST_PERFORMANCE_ASSESSMENT_V2producerを配線する」としています。しかしassessmentは一つのrunだけから作れるartifactではありません。before/after双方の20 run、provider pair、旧e2e、新aggregatee2e、対応するverdict summaryを取得・検証・集約する必要があります。通常のCI run内にproducer stepを一つ追加しても、そのrun自身のartifactしかローカルworkspaceにありません。過去runを扱うには、少なくとも次の処理が必要です。
GitHubのartifact APIをfine-grained tokenで利用する場合、Actionsのread権限が必要です。またworkflowで一部の
permissionsを明示すると、未指定権限はnoneになるため、collector jobは少なくともactions: readを明記すべきです。 ([GitHub Docs]1)actions/upload-artifactはartifact ID、URL、SHA-256 digestを正式なoutputとして公開しているため、ファイル名globではなく、それらをmanifestへ固定すべきです。 ([GitHub]2)Allowed Paths上の問題
適切な実装は、巨大なinline Pythonを
ci.ymlへ書くより、例えば次を追加する方が妥当です。しかし現在のAllowed Pathsでは、これらを追加できません。Allowed Pathsの再設計が必要です。
P0-4 — provider critical pathの統計式が誤っている
現行テストは、jobごとに独立したcohortを作り、次の式を使っています。
またdurationはjob全体ではなく、
phase_id.startswith("test_e2e")に該当する測定値だけを合算しています。並列providerのcritical pathを測るなら、正しい単位は同じworkflow run内のpairです。
max(median(A), median(B))とmedian(max(A_i, B_i))は一致しません。例えば二つのrunが次の場合、
現行式では両medianが250なので結果は250ですが、実際のcritical pathは両runとも400です。現行式は150秒過小評価します。
AC1にはfingerprint共通化だけでなく、次を追加すべきです。
e2e-coreとe2e-responsive-matrixのrun ID集合が完全一致する。workflow_run_id同士だけをpairする。P0-5 — AC9(a)の「provider P50」が何を測るか未定義
現行helperは
test_e2e*phaseだけを合計しますが、親#2119のAC9は「provider P50」「旧E2E critical-path P50」と書かれています。install、build、Playwright config検証、artifact処理、job startupのどこまで含むかが固定されていません。性能改善の目的がPR CIのcritical path短縮なら、少なくとも次を別metricとして扱うべきです。
playwright_execution_seconds: Playwright test commandのみ。provider_job_duration_seconds: jobのstarted_atからcompleted_at。gate_ready_seconds: workflow run開始からrequirede2echeck完了まで。現在のテスト名・AC・実装は、この三つを混同しています。
推奨
AC9(a)はprovider job durationを使用し、Playwright command時間はdiagnostic metricに落とすべきです。分割によるrequired checkの体感改善はAC9(b)のgate-readyで判定します。
P0-6 — gate-ready before/afterで時計が異なる
post-splitのgate-ready producerは、GitHub APIの
workflow run_started_atからaggregatee2echeckのcompleted_atまでを計算しています。一方、pre-split側は
gate_ready_latency_msが存在しない場合、artifact内の全measurements[].elapsed_msを合算します。これにはworkflow queue、job setup、checkout、未計測step、artifact uploadなどが含まれません。したがって現在の比較は、
であり、apples-to-applesではありません。
正しい比較
両armともGitHub APIの同じ時計を使用します。
古いrunのcheck-run timestampsを取得できない場合、そのrunはgate-ready比較には使用できません。step合計で代用してはいけません。
P0-7 —
command_manifest_digestを単純にcross-arm一致させる設計も誤りlane splitは、物理的なcommand topologyを変更すること自体がtreatmentです。
したがって、物理command manifestやworkflow digestはbefore/afterで異なるのが正常です。一方、論理的なtest inventoryは一致しなければなりません。
fingerprintを一つのtupleに詰め込むのではなく、次の三分類が必要です。
#2155レビューで提示された「within-cohort invariant / cross-cohort invariant / intentional treatment difference」の分離を、そのままmachine-readable contractへ昇格すべきです。
P0-8 — AC10の「P95 failure/flaky rate」は指標として未定義
親#2119のAC10は、P95 failure/flaky rateと統計的に明白な非悪化を要求しています。
しかし、次が未定義です。
Playwrightの標準用語では、flakyは「最初に失敗し、retryで成功」、failedは「全retry後も失敗」です。GitHub Actionsのworkflow rerunはPlaywright retryとは別物であり、flaky testとして数えてはいけません。 (Playwright)
最低限、次の三指標へ分解すべきです。
さらに20 runでは、低頻度failureの非悪化を強く証明できません。0 failures / 20 runsでも、Clopper–Pearsonの両側95% exact intervalの上限は約16.8%です。したがって「20件でfailure rateの非悪化を統計的に証明する」という契約は、許容marginが大きくない限り成立しません。sample数をpower analysisで決めるか、AC10を「記述的観測」に弱める必要があります。SciPyはexactおよびWilson型のbinomial proportion intervalを提供しています。 ([SciPy Documentation]4)
P0-9 — validatorはraw sampleからP50/P95を再計算していない
現在のvalidatorは、assessmentに記載された
before.p50_secondsとafter.p50_secondsの差からdeltaを再計算しています。run_details[].duration_secondsからpercentile自体を再構築していません。したがって、producerが誤ったP50/P95を記載しても、deltaだけ整合させれば通る余地があります。producer wiringを追加するならvalidatorは次を再計算すべきです。
percentileには複数の推定方式があるため、methodをschemaへ固定しなければ実装間で結果が変わります。NumPyのpercentile APIだけでも複数のmethodが定義されています。 (NumPy)
例えば次のようなversioned定義が必要です。
P1-1 —
(run_id, run_attempt)でのdedupeはrerun水増しを防がないAC5は同一
(run_id, run_attempt)を重複計上しないことしか要求していません。しかしGitHubではGITHUB_RUN_IDはrerunしても変わらず、GITHUB_RUN_ATTEMPTが増えます。したがってattempt 1、2、3は異なるpairとして3 sampleに数えられます。 ([docs.github.com]6)性能cohortの独立sample単位は
workflow_run_idにすべきです。さらに、最新成功attemptだけを採用するとsurvivorship biasになります。少なくとも次を分ける必要があります。
P1-2 —
unknownや不正digestを欠損扱いするACがないAC2は「fieldが欠損しているrun」を除外するとしています。しかし次のplaceholderはfield自体は存在します。
これらが20件あれば、単純なtuple equalityではcomparable cohortを作れてしまいます。
必要なvalidation
negative fixtureも必須です。
P1-3 — runner hostとPlaywright containerのprovenanceを分けるべき
GitHubの
runnercontextが公式に提供するのはOS、arch、name、environmentなどで、正確なhosted runner image versionは含まれません。正確なimage versionはSet up jobログで確認する方式が案内されており、hosted runner imageは定期的に更新されます。 ([GitHub Docs]7)一方、E2E providerはdigest-pinnedされたPlaywright containerを使っています。したがってprovenanceは一つの
runner_imageではなく、少なくとも次へ分離すべきです。短期間に同じhost imageでbenchmarkを収集できない場合、self-hosted/pinned runnerを使うか、cohortを作り直すべきです。
P1-4 — artifact digest bindingの対象が狭すぎる
#2159のAC6は、validator呼び出しへ
expected_artifact_digestを渡すことを要求しています。しかしこれは現行API上、trustedci_verdict_summary_v2artifactのdigest検査です。以下は別途束縛されません。また現行testは任意のassessmentをglobし、verdict summary候補の先頭を使います。対象Issue、PR、head SHA、cohort run setへの一意なbindingがありません。
必要なmanifest
assessment内のrun ID集合とmanifestのrun ID集合はexact equalityにすべきです。
P1-5 — governed evidenceで
if-no-files-found: warnを使っている現行baseline uploadには
if-no-files-found: warnが残っています。これはartifactが生成されなくてもupload stepを成功扱いにします。measurement gateの正本として使うならfail-closeではありません。actions/upload-artifactの仕様上、warnとerrorは明確に異なるため、benchmark evidenceにはerrorを使用すべきです。 ([GitHub]2)P1-6 — Verification Commandsが実配線を証明しない
AC8のVCは次だけです。
rg -n "CI_TEST_PERFORMANCE_ASSESSMENT_V2" .github/workflows/ci.ymlこれは文字列がコメント内に存在してもPASSします。またassessment producerが実際に20-run artifactを取得し、digestを検証し、validatorを通すことを証明しません。
さらに現行性能テストはevidence不足時に
pytest.skip()し、pytest自体はexit 0になります。実装PR段階の「SKIPは捏造PASSではない」という扱いと、#2155の最終close verificationは分離すべきです。最終verificationでは、次のいずれかが必要です。
SKIP → exit 0をclose条件には使用すべきではありません。推奨するIssue分割
Issue A — benchmark contract・collector・performance gate
対象:
責務:
Issue B — reliability evidence schema・validator
対象:
責務:
Issue #2155 — verification再開
#2155は実装を持たず、A/Bが生成したimmutable manifestとassessmentを消費して#2119のclose可否だけを判定します。
この三段構成なら、測定器の実装、統計契約、最終判定が混在しません。
推奨するmachine-readable contract
修正版Acceptance Criteriaの要点
workflow_run_idを持ち、rerun attemptを追加sampleとして数えない。max(core, responsive)からP50/P95を計算する。unknown、空文字、不正digestを拒否する。if-no-files-found: errorである。結論
#2159は、#2155を再開するための前提Issueとして必要です。しかし現状は、selectorのbugfix、benchmark実験設計、cross-run artifact collector、runtime assessment producer、reliability統計schemaという五つの責務を一つに詰め込んでいます。
特に重大なのは次の四点です。
max(median(core), median(responsive))は並列critical pathのP50ではない。推奨dispositionは、#2159をperformance benchmark/collector修正へnarrowし、reliability schema/validatorを別Issueへ分割した上で、#2155を最終verification専用Issueとして維持することです。 この再設計なしに実装すると、20 run蓄積後もSKIPが解消しないか、誤った統計量によるfalse-greenが残ります。
squne121 commentedon Aug 14, 2026
issue-refinement-loop: human_escalation
Blockers
scripts/ci/,schemas/*.schema.json,docs/dev/e2e-performance-benchmark.md等、現行 Allowed Paths にない新規ディレクトリ/アーキテクチャ層の追加を要求する。# AC10形式でコメント参照されていない## Runtime Verification Applicabilityセクションが存在しないpytest collected 0 tests (exit 5)— baseline expected-fail 形式(存在しない specific test 名を参照する exit 4 形式)になっていないcontract_update.run.with_human_context --consume-contract-patch-planを試行したがSTATUS: blocked/BLOCKERS: PLANNER_FAIL_CLOSED(no_anchor_scope_reframe_v1_payload)。OWNER コメントは自由記述の設計批評であり machine-readableANCHOR_SCOPE_REFRAME_V1payload を持たないため、自動 scope-delta 適用はできない。OWNER 推奨事項(要約、詳細は anchor comment 参照)
CI_TEST_RELIABILITY_ASSESSMENT_V1)へ分離する。workflow_dispatchbenchmark route・各 20 run の再現可能な実験として再設計する(実装: pytest target plan を SSOT 化し serial→xdist 段階移行と ci_test_selection fail-close 化を行う(python-test 並列化 migration) #1064 方式)。max(median(core), median(responsive))は並列 critical path の正しい統計量ではない(median(max(core_i, responsive_i))へ修正)。推奨 Next Action(人間判断待ち)
issue-editorへの明示指示による本文全面改訂(Allowed Paths 拡張含む)が必要。FOLLOW_UP_MATERIALIZATION_RESULT_V1.follow_up_issues: [])。squne121 commentedon Aug 14, 2026
GitHub上の #2159 本体、OWNER anchor、
human_escalationコメントを確認しました。今回の停止判断は妥当です。GitHub状態は変更していません。特に決定的なのは、#2159 自身が「Allowed Paths 外の変更」「新規Issueが必要なスコープ分割」「#2119 AC10改訂」を明示的な Stop Condition にしている点です。 一方、OWNER は #2159 を performance benchmark/collector に narrow し、reliability schema/validator を別Issueへ分離することを明示的に推奨しています。
したがって、ここで
issue-refinement-loopが自動的に #2159 を書き換えたり follow-up Issue を起票したりすると、むしろ自身の権限境界を破ります。PLANNER_FAIL_CLOSEDはこのケースでは期待どおりです。終了コメントに記録されたissue_split_boundary/undecided_ac/no_anchor_scope_reframe_v1_payloadの組み合わせも整合しています。次の人間判断としては、OWNER案の分割を採用するのが最も整合的です。
Issue A = 実装: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する(Issue A) #2159 を全面改訂
workflow_dispatchbenchmark routeIssue B = 新規Issue
CI_TEST_RELIABILITY_ASSESSMENT_V1のような独立契約を候補とする検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 は verification-only のまま維持
また、C5・C9・
pytest exit 5 ×3は確かに修正対象ですが、今それだけ直して #2159 の refinement を再開するのは適切ではありません。これらは契約形式上の blocker であり、より上位の scope decomposition が未確定だからです。実際、終了コメントでも両者は別種の blocker として記録されています。つまり推奨順序は、
分割承認 → #2159をIssue Aへrewrite → Issue B起票 → 各Issueで独立してissue-refinement-loop → 実装
です。現状の #2159 をそのまま refinement-loop に再投入するのは避けるべきです。
[-]実装: tests/ci/test_ci_performance_gate.py の cohort comparability・runner image provenance・AC10 reliability evidence・assessment producer wiring を修正する[/-][+]実装: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する(Issue A)[/+]squne121 commentedon Aug 14, 2026
issue-refinement-loop: approved
修正内容の要約
Runtime Verification Applicability: decision: immediateに対応する<!-- runtime-verification: true -->タグを全 AC に付与。scripts/ci/tests/が既存の共有ディレクトリ(360+ tests、python invocation policy 等の無関係な既存テスト群)であることを確認し、新規 collector テストを専用サブディレクトリscripts/ci/tests/e2e_performance_benchmark/に隔離。Allowed Paths と VC を修正し、無関係な既存テスト failure(test_repo_scan_clean_zero_violations)を巻き込まないようにした。-kfilter 形式(既存ファイルに対する 0-match で exit 5)を、プロジェクト規約(Issue 実装: VC baseline-fail 用 pytest command を canonical form に正規化して contract-review 往復を削減する #1285/feat: VC baseline-fail pytest command を canonical form に正規化する compiler を追加 #1305: baseline は not-yet-created test file を参照する canonical shape)に沿って、新規専用テストファイル(tests/ci/test_ci_performance_gate_paired_critical_path.py等 5 ファイル + validator 用 1 ファイル)への参照に置き換えた。if-no-files-found: errorの存在確認)が、無関係な既存 job の同一設定に対して baseline で trivially pass していた問題を、Upload ci-runtime-baseline artifactstep に multiline-scoped した VC に修正し、baseline fail(現状warn)を正しく検出するようにした。全 12 AC の VC を baseline で実行し、非 zero exit code(exit 4 = not-yet-created file/test、exit 1 = rg no-match)で「未実装」を正しく示すことを確認済み。
squne121 commentedon Aug 14, 2026
implement-issue: 実装完了 (2026-08-14T14:02:55Z)
.claude/worktrees/issue-2159-e2e-perf-benchmark-redesignworktree-issue-2159-e2e-perf-benchmark-redesignsqune121 commentedon Aug 14, 2026
impl-review-loop: 完了 (2026-08-14T14:25:00Z)
squne121 commentedon Aug 14, 2026
impl-review-loop: human_escalation (2026-08-15T01:00:00Z)
447338bd789ef139ad4206eae01bc7f1c6f4f94d、CLEAN、CI green、Allowed Paths gate ok)状況
OWNER の第2次敵対的レビュー(9件のP0)のうち、8件は独立検証(コード読解・実
gh api照会での artifact digest/head_sha 一致確認・実行証跡再現)で解消を確認しました。未解決なのは P0-8(
CI_TEST_PERFORMANCE_ASSESSMENT_V2producer が実 workflow データを読んで non-none performance assessment を生成する実配線)で、real producer 関数自体(build_assessment_from_percentile_cohorts())は実装・テスト済みですが、実 workflow への配線は「merge 後に実 20-run 履歴が蓄積されて初めて可能」という構造的制約により、本 PR 単体では完了できません。OWNER レビューは末尾で「以下(項目1・2・6・7を含む10項目)が揃うまでは PR をマージせず #2159 を close すべきではない」と明示的なマージ前提条件を提示しており、この条件を「follow-up で対応」という形で waive してよいかは pr-reviewer の裁量を超えるため、
HUMAN_REVIEW_REQUIREDとして停止しました。次アクション(人間判断が必要)
squne121 commentedon Aug 15, 2026
impl-review-loop: 完了 (2026-08-15T02:00:00Z、OWNER scope authority 判断反映後)
経緯
HUMAN_REVIEW_REQUIREDで停止(OWNER 明示のマージ条件のうち PR 単体では構造的に満たせない項目が残ったため)。APPROVEを取得。fix: e2e performance benchmark の fixed-SHA cohort・paired critical pat…
squne121 commentedon Aug 15, 2026
post-merge-cleanup: 完了 (2026-08-15T05:15:00Z)
実施内容
af47ed72、Closes 実装: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する(Issue A) #2159).claude/worktrees/issue-2159-e2e-perf-benchmark-redesignとローカルブランチworktree-issue-2159-e2e-perf-benchmark-redesignを削除(squash-merge特有のHEAD OID不一致は正常な状態であることを確認した上で手動実施)origin/main(af47ed72)へ fast-forwardhost_runner_image_provenance: os_arch_fallbackの限界は PR本文で開示済みの既知事項(新規follow-up不要)fix: e2e-core/e2e-responsive-matrix CI dubious-ownership + AC4(iii) l…
fix: register safe.directory before bare git rev-parse in Verify targ…
fix: workflow_run_head_sha を merge_sha 単独 provenance に一本化 (#2184)
fix: 固定SHA benchmark artifactのhead_sha意味論をmeasured_head_sha/workflow_…
feat: frozen E2E benchmarkをlayout A/B/A/B dispatch契約へ置換 (#2422) (#2501)