Repository navigation
fix: 固定SHA benchmark artifactのhead_sha意味論をmeasured_head_sha/workflow_run_head_sha分離で修正 - #2493
Conversation
…run_head_sha分離で修正 (#2184) e2e-core/e2e-responsive-matrixのci_runtime_baseline_v1 producerに、 target_shaのコピーではなくgit rev-parse HEADで独立観測するmeasured_head_shaを 両ジョブ対称に追加した。collector側はworkflow_run_head_shaを既存merge_sha フィールドから導出し、live API照合はexpected_head_shaとの比較ではなく record自身のworkflow_run_head_shaとの自己整合性チェックに変更した (workflow_run_head_shaを導出できないpre-#2184 legacy recordへは 既存のexpected_head_sha比較へフォールバックし、Allowed Paths外の scripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark_rerun_attempt.py の既存回帰スイートを完全に非破壊のまま維持する)。 schemaにmeasured_head_sha/workflow_run_head_shaをoptional fieldとして追加し (既存head_sha/requiredは変更なし)、docsのtarget_sha/workflow_sha/workflow_digest 分離セクションと ci-performance.md のフィールド定義表を更新した。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2493/ The preview will be removed when this PR is closed. |
…egacy hard-exclude (fix_delta #2493) Blocker 1: `git config --global --add safe.directory "$GITHUB_WORKSPACE"` before the new unconditional `git rev-parse HEAD` (measured_head_sha) invocation in both containerized jobs' "Collect ci_runtime_baseline_v1 artifact" step -- the pre-existing "Verify checked-out HEAD..." step never hit this because it's gated on target_sha and only ran on an actual dispatch; this step's unconditional git call runs on every push/pull_request CI run. Blocker 2: implements AC4(iii) (legacy_ambiguous_head_sha hard-exclude) in `_collect_arm`, scoped to `LEGACY_AMBIGUOUS_HEAD_SHA_JOBS` (e2e-core/e2e-responsive-matrix -- the only jobs #2184's producer change touches). Also fixes test_collect_e2e_performance_benchmark.py's `_record()` fixture default: `merge_sha` now defaults to `head_sha` (auto-derived) instead of always-absent, matching real CI history where merge_sha has been recorded unconditionally since #2159 (well before #2184) -- this keeps the file's many unrelated fixtures (dedup, pairing, schema, CLI) trusted-cohort-eligible under the new hard-exclude without touching the out-of-Allowed-Paths rerun_attempt regression suite (its legacy fixtures all use the retired, out-of-scope `e2e` job name, which the exclusion never targets). Adds 3 new regression tests (AC4e/f/g) covering the hard-exclude, the merge_sha-present backward-compat path, and the job-name scoping. Co-Authored-By: Claude Sonnet 5 <[email protected]>
fix_delta: pr-reviewer REQUEST_CHANGES 対応(reviewed_head_sha
|
…et_sha step (fix_delta #2493 AC6 live) Live workflow_dispatch AC6 verification (run https://github.com/squne121/loop-protocol/actions/runs/33869974220) surfaced the same "dubious ownership" failure (exit 128) previously fixed for the "Collect ci_runtime_baseline_v1 artifact" step, but in the pre-existing "Verify checked-out HEAD matches dispatched target_sha (#2159 P0-2)" step: its bare `git rev-parse HEAD` runs inside the container image and the checked-out workspace is owned by a different UID than the container's git config sees by default. This step is gated `if: target_sha != ''` and only runs on an actual dispatched benchmark run, so it was never exercised by normal push/pull_request CI until this live dispatch. Adds `git config --global --add safe.directory "$GITHUB_WORKSPACE"` immediately before the bare `git rev-parse HEAD` call, symmetrically in both e2e-core and e2e-responsive-matrix jobs. Per Issue #2184 AC1, the step's `if` condition, name, and comparison logic are unchanged.
fix_delta: AC6 live workflow_dispatch で新たな "dubious ownership" バグを発見・修正AC6 の要求どおり実装 branch に対して実際に これは前回修正した「Collect ci_runtime_baseline_v1 artifact」ステップの同種バグとは別の、より前段の既存ステップです。 修正内容
Issue #2184 AC1 の制約どおり、当該ステップの New head SHA: 再検証結果(全 PASS)
実際の workflow_dispatch による再確認(AC6 の再実行)は今回のスコープ外とし、別途 orchestrator が実施します。 |
AC6 Runtime Verification Evidence(live workflow_dispatch, 2回目の再実行・fix適用後)実装branch
取得・照合した実値
照合結果
以上により、AC6 が要求する3条件( (1回目の実行 https://github.com/squne121/loop-protocol/actions/runs/33869974220 は、既存の「Verify checked-out HEAD matches dispatched target_sha」ステップのコンテナ内 dubious-ownership バグにより |
結論PR #2493 は設計方向・実測検証ともかなり改善されており、元の #2182 P0-4 を解消するアプローチ自体は妥当です。ただし、現 head マージを止める理由は大量のハーネス追加ではなく、SHA provenance の正本を1本に固定するための小さな修正1件です。その修正と、意味論ドキュメントの矛盾2件を直せば、個人趣味開発の前提では十分 merge-ready と判断します。 現在の通常 PR CI run 敵対的レビュー findingsSeverity | Finding | 判定 -- | -- | -- P1 / Blocker | workflow_run_head_sha の provenance source を caller が上書きできる | 修正必須 P1 / Contract | schema の legacy 説明と実装・テストが矛盾 | 同PRで修正推奨 P1 / Contract | ci-performance.md が measured_head_sha を「固定SHA時のみ」と誤記 | 同PRで修正推奨 P2 | live-binding 周辺コメントに古い expected_head_sha 意味論が残存 | ついでに整理 Follow-up | benchmark dispatch が無関係な CI/harness を大量に走らせて失敗する | #2422で解決。#2493は止めないP1 Blocker — |
| Severity | Finding | 判定 |
|---|---|---|
| P1 / Blocker | workflow_run_head_sha の provenance source を caller が上書きできる |
修正必須 |
| P1 / Contract | schema の legacy 説明と実装・テストが矛盾 | 同PRで修正推奨 |
| P1 / Contract | ci-performance.md が measured_head_sha を「固定SHA時のみ」と誤記 |
同PRで修正推奨 |
| P2 | live-binding 周辺コメントに古い expected_head_sha 意味論が残存 |
ついでに整理 |
| Follow-up | benchmark dispatch が無関係な CI/harness を大量に走らせて失敗する | #2422で解決。#2493は止めない |
P1 Blocker — workflow_run_head_sha が merge_sha の正本性を迂回できる
#2184 AC2 の契約は明確で、workflow_run_head_sha は raw ci_runtime_baseline_v1 artifact の既存 merge_sha から導出することになっています。これは前身 #2182 の provenance laundering 問題を踏まえた設計です。#2182 の OWNER adversarial review でも、固定SHA benchmark では workflow の ref と実 checkout commit が異なることが P0-4 として指摘され、それが #2184 に分離されています。
ところが現実装は、
explicit = record.get("workflow_run_head_sha")
if explicit is not None:
return explicit
return record.get("merge_sha")となっており、caller が workflow_run_head_sha を付ければ merge_sha より優先されます。
これは例えば raw record が、
merge_sha=C(誤り)、head_sha=B、workflow_run_head_sha=B(後付け)、live API head=B
だった場合、merge_sha=C の不整合を検出せずに live verification を通せます。つまり manifest に出る値が「artifact の既存 merge_sha 由来」という AC2 の provenance claim を満たさなくなります。
推奨修正は単純です。
_derive_workflow_run_head_sha() は return record.get("merge_sha") のみにしてください。互換性のため explicit field をどうしても許すなら、merge_sha と explicit の両方がある場合に 完全一致を要求し、不一致なら fail-closed にするべきです。ただ、producer が explicit field を出す設計ではないので、前者の方が小さく明瞭です。
GitHub の REST artifact response 自体が workflow_run.head_sha を返し、workflow job response にも head_sha があるので、merge_sha → workflow_run_head_sha → live API head_sha という一本の binding chain は自然です。([GitHub Docs]1)
P1 — schema の legacy 説明が実装と逆
schema の workflow_run_head_sha description は、
pre-#2184 record は field を omit し、legacy record には infer/synthesize しない
という意味になっています。
一方、追加された test_ac4f_legacy_record_with_derivable_merge_sha_is_not_hard_excluded は、#2159〜#2184 の legacy record で measured_head_sha がなくても、merge_sha があればそこから workflow_run_head_sha を導出して manifest に書くことを明示的に保証しています。
実装側の方が合理的です。したがって schema description を、
- pre-実装: 固定SHA benchmark artifact の head_sha 意味論混同を measured_head_sha/workflow_run_head_sha 分離で修正する #2184 でも
merge_shaを持つ 実装: e2e performance benchmark の fixed-SHA cohort・paired critical path・cross-run collector・immutable manifest を再設計する(Issue A) #2159-era record →workflow_run_head_shaを導出可能 merge_shaすらない truly legacy record → 合成しないe2e-core/e2e-responsive-matrixではlegacy_ambiguous_head_shaで除外
という実態に合わせるべきです。
コードを変える必要はありません。contract documentation をコードへ合わせれば十分です。
P1 — ci-performance.md の「固定SHA benchmark 時のみ」は事実と異なる
docs/dev/ci-performance.md は現在、
measured_head_shaは e2e-core / e2e-responsive-matrix の「固定SHA benchmark 実行時にのみ追加」
と記載しています。
しかし workflow 実装は明示的に、
regardless of whether target_sha was provided
として git rev-parse HEAD を常時実行しています。通常の PR/push の e2e job artifact にも measured_head_sha が出ます。
むしろ e2e-performance-benchmark.md 側の「通常 pull_request では synthetic merge commit を指しうる」という説明が正しいです。GitHub 公式にも、pull_request の GITHUB_SHA は PR merge branch の merge commit、workflow_dispatch の GITHUB_SHA は dispatch された ref の latest commit と定義されています。([GitHub Docs]2)
ここは、
e2e-core/e2e-responsive-matrixの artifact に追加される optional field。target_shaの有無を問わず actual checkout HEAD を記録する。他 job には出現しない。
程度へ直すのが正確です。
なお #2184 AC7 自体にも「固定SHA時のみ」という古い記述が残っており、PRだけのミスではなく Issue contract 内部の不整合です。AC1/AC5・実装・live evidence の方を authoritative として直すのが適切です。
実測 evidence は強い
このPRで最も評価できるのは AC6 を本当に実行した点です。
fix 後の live workflow_dispatch run 33872587585 では、
- branch/run head:
609fcba426... - target / measured:
57a898c9e8... e2e-core: successe2e-responsive-matrix: success- target SHA verification step: success
- artifact collection: success
が実行されています。
GitHub の仕様上も workflow_dispatch の GITHUB_SHA は dispatch 先 ref の commit なので、checkout を target_sha に差し替えた場合に
measured_head_sha != workflow_run_head_sha
となるのは期待通りです。([GitHub Docs]2)
また git safe.directory の fix も過剰な security workaround ではありません。actions/checkout 自体には set-safe-directory: true が既定で存在しますが、container context では異なる HOME/user により後続 git command が dubious ownership になる既知事例があります。GitHub Actions 側でも、container 内で git config --global --add safe.directory "$GITHUB_WORKSPACE" を実行する workaround が示されています。したがって、この修正を撤去・複雑化する理由はありません。([GitHub]3)
ハーネスについては #2493 を肥大化させない方がよい
AC6 の live dispatch は目的の e2e 2ジョブには成功しましたが、同じ workflow 内では python-test-core、node-backed-hook-tests、visual-impact-policy、その aggregate が別理由で failure になっています。例えば python-test-core は本体 pytest を完走した後の Generate ci_test_selection/v1 artifact で落ち、node-backed-hook-tests も selection artifact producer で落ちています。
これは #2493 の SHA 分離をさらに policy/harness で囲む理由ではなく、benchmark dispatch に通常CIの unrelated jobsを巻き込んでいること自体が問題です。
ここは既に #2422 が正しい解決を持っています。#2422 は #2184 を blocker としたうえで、benchmark_layout != '' の dispatch では benchmark provider jobs だけを起動し、typecheck/lint/build 等の unrelated jobs を起動しない dedicated benchmark route へ置き換える契約です。
したがって、#2493 に追加ハーネスや conditional logic を積むのは非推奨です。#2493 は provenance vocabulary の修正だけ完成させ、hybrid route の構造問題は #2422 に渡す方が保守性・完走率とも良いです。
推奨アクション
このPRに対する私のレビュー verdict は次です。
verdict: REQUEST_CHANGES
reviewed_head_sha: "609fcba42630886a7b438da8884304ed6cdd4423"
blockers:
- "workflow_run_head_sha must have a single provenance source. Remove the explicit record.workflow_run_head_sha precedence from _derive_workflow_run_head_sha(), or fail closed when it disagrees with raw artifact merge_sha."
required_contract_fixes:
- "Update schema description: #2159-era pre-#2184 records with merge_sha may derive workflow_run_head_sha; only truly source-less legacy records are not synthesized."
- "Update docs/dev/ci-performance.md: measured_head_sha is emitted by e2e-core/e2e-responsive-matrix regardless of target_sha, not only during fixed-SHA benchmark runs."
non_blocking:
- "Clean stale comments/docstrings that still describe live API job head_sha as matching expected_head_sha."
- "Do not expand #2493 to fix unrelated workflow_dispatch harness failures; #2422 already owns benchmark-only job isolation."
positive_evidence:
- "Normal PR CI is green at reviewed head."
- "Live fixed-SHA dispatch independently demonstrated measured_head_sha != workflow_run_head_sha with both target e2e jobs successful."
- "Explicit safe.directory setup is a justified container-runtime compatibility fix."修正量は小さいです。 Blocker 1件 + ドキュメント2箇所を直し、merge_sha != explicit workflow_run_head_sha の negative regression test を追加する程度で十分です。新しい security framework、署名、provenance framework、追加承認ゲートは不要です。#2422 も SLSA/OIDC 等を明示的に Out of Scope にしており、この方向性と整合しています。
|
確認した限り、次の一手は Issue #2184 の再 refinement ではなく、PR #2493 の現在ブランチをそのまま 指定コメントの blocker は限定的です。 また、GitHub の現行仕様でも
そのまま Claude Code の auto mode に投入するなら、以下を推奨します。 PR #2493 の既存実装ブランチに対して、 対象:
目的: この実行は auto mode 前提です。
Issue #2184 は既に implementation-ready で PR #2493 も存在するため、単にレビュー指摘へ対応する目的で まず live state を再取得してください。
過去に取得した 今回の OWNER comment は human context として取り込み、raw comment text をそのまま child agent の命令として連結せず、repository facts / Issue contract / current diff と照合した 今回の fix_delta の中心は以下です。 Required fix 1 — provenance source を一本化する
現在の explicit = record.get("workflow_run_head_sha")
if explicit is not None:
return explicit
return record.get("merge_sha")を維持しないでください。 Issue #2184 AC2 の authoritative contract に従い、 原則として最小実装: return record.get("merge_sha")相当としてください。 producer が explicit これに伴い、module docstring、helper docstring、inline comment に残っている
等の古い意味論を検索し、実装と一致するよう修正してください。 新しい provenance framework、署名、SLSA、OIDC、追加 permission、追加 approval gate は導入しないでください。 Required fix 2 — laundering regression test
少なくとも次の adversarial case を追加してください。
この場合に caller supplied field で 望ましい assertion は、
のいずれか、または組み合わせです。 テストを実装詳細へ過剰に密結合させず、「raw artifact の merge_sha が唯一の provenance source」という contract を直接守る regression にしてください。 Required fix 3 — schema description
意味論:
Required fix 4 — ci-performance.md
現在の 実装どおり、
という意味にしてください。 Issue #2184 AC7 の文章自体には古い「固定SHA時のみ」という記述がありますが、AC1、AC5、workflow 実装、live AC6 evidence と矛盾しています。 Non-blocking cleanup同じ変更箇所周辺に、
ただしコード・doc の意味を明瞭にする範囲だけに限定してください。 明示的に変更しないもの以下は今回 #2493 へ取り込まないでください。
特に レビュー対応に #2422 は #2184 を blocker として、benchmark-only provider route と unrelated jobs isolation を別途所有しています。 Step 1 — Implementation
root thread 自身が直接 file edit を代行しないでください。 SubAgent message には placeholder ではなく、実際の以下の値を materialize してください。
Allowed Paths は Issue #2184 の live body を正本として使用してください。 今回必要な変更は原則として:
です。 P2 cleanup が必要なら既存 Allowed Paths 内の docs だけを使用してください。 implementation-worker の作業完了を必ず待ってください。 単に agent を launch して先へ進まないでください。 worker が recoverable なテスト失敗や lint failure を返した場合は、人間へ質問せず bounded retry / fix iteration を継続してください。 Step 2 — Independent Verification実装 commit/push 後、PR の live current head SHA を再取得してください。 その head に束縛して Issue #2184 の現在の Acceptance Criteria と Verification Commands を live body から取得し、Verification Commands を literal contract として一字一句の実行文字列を保持したまま test-runner に渡してください。 最低でも AC1〜AC7 の全 current VC を実行・adjudicate してください。 特に:
を省略しないでください。 AC6 は runtime-only evidence です。 必要なら current implementation branch に対して branch tip と異なる
を current-head evidence として取得してください。 AC6 の live dispatch で unrelated jobs が失敗しても、目的の ただし通常の pull_request current-head required CI failure は別です。 test-runner の完了を必ず待ってください。 Step 4 に進む条件は必ず:
の全てです。 terminal head/body/Verification Commands が変化したら stale evidence とし、人間確認を求めず Step 2 を current state で再実行してください。 Current-head CI gateStep 4 前および最終判定前に、current PR head の repository-required CI を確認してください。 pending の間に reviewer を先行起動しないでください。 failure が今回の変更によるものなら implementation-worker に戻して修正してください。 flaky/retry-safe と客観的に判断できる場合は bounded rerun を行ってください。 正常な PR CI と、AC6 用 workflow_dispatch の unrelated job failures を混同しないでください。 Step 4 — PR Reviewcurrent-head verification gate が nonblocking になった場合のみ reviewer には最低限:
を渡してください。 過去 head に対する review verdict を current head に流用しないでください。 pr-reviewer の完了を必ず待ってください。 canonical task が terminal
を再実行してください。 このループを Step 5 — Merge-readiness routing
以下は人間へ聞かず自動処理してください。
SubAgent の単なる agent discovery failure があれば current Step 4 recovery contract の Stage A → Stage B → 必要時 Stage C を bounded に実行し、回復可能な 人間への停止条件マージ直前までは原則として承認を求めないでください。 ただし次の場合だけ停止してください。
単なる permission prompt、通常の commit/push、GitHub Actions dispatch、CI rerun、PR comment、draft→ready、review iteration は停止理由にしないでください。利用可能な既存権限の範囲で自動実行してください。 秘密情報をログ・Issue・PR・artifact に書かないでください。 force push はしないでください。 完了条件以下を全て満たすまで作業を継続してください。
ここまで到達したら merge は実行しないでください。 人間が最終的に merge する直前の状態で停止し、最後に簡潔に以下だけ報告してください。
最終 merge 以外について、途中で人間の確認を求めず完走してください。 このケースでは |
OWNER adversarial review (PR #2493 issuecomment-5540651128) の REQUEST_CHANGES 対応。`_derive_workflow_run_head_sha()` が caller-supplied な明示的 `workflow_run_head_sha` フィールドを `merge_sha` より優先していたため、artifact の真の provenance (`merge_sha`) と食い違う自己申告値で live-API self-consistency チェックを迂回できる laundering path になっていた。 - `merge_sha` のみを正本の derivation source とし、explicit `workflow_run_head_sha` の precedence を撤去 - 該当箇所の module docstring / helper docstring / inline comment を 実装の意味論に合わせて修正 - laundering regression test (`test_ac2_explicit_workflow_run_head_sha_field_cannot_override_merge_sha_provenance`) を追加。既存 80 テスト(rerun_attempt スイート含む)は非回帰 - schema `RunRecord.properties.workflow_run_head_sha` の description を 「#2159-era merge_sha 保持 record からは derive 可能、merge_sha 自体を 持たない truly legacy record のみ omit」という実装の実態に合わせて修正 - `docs/dev/ci-performance.md` の `measured_head_sha` 説明を、固定SHA dispatch 専用ではなく通常の pull_request/push 実行を含め常時 `git rev-parse HEAD` で収集される optional field である旨に修正 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Summary
Closes #2184。固定SHA E2E benchmark artifact の
head_shaが「計測対象コミット(measured)」と「GitHub API 上の workflow run 自体の head SHA(workflow run)」を単一 field に混同していた問題(PR #2182 OWNER adversarial review P0-4、Issue #2184 reframe review)を、measured_head_sha/workflow_run_head_shaの分離で修正した。.github/workflows/ci.yml:e2e-core/e2e-responsive-matrix両ジョブのCollect ci_runtime_baseline_v1 artifactステップに、git rev-parse HEADで独立観測するmeasured_head_shaを対称に追加。既存head_sha/merge_shaは計算式・値とも変更なし。scripts/ci/collect_e2e_performance_benchmark.py:workflow_run_head_shaを既存merge_shaフィールドから導出(_derive_workflow_run_head_sha)。live API 照合(verify_run_record_against_live_api)はexpected_head_shaとの比較を廃止し、record 自身のworkflow_run_head_shaとの自己整合性チェックに変更。_verify_run_recordにmeasured_head_sha専用の新規構造 binding 検証を追加し、measured_head_shaを持つ record には既存のhead_sha != expected_head_sha検証を適用しない。トラステッド record の両 field を manifestRunRecordへ伝播(_optional_head_sha_provenance_fields)。schemas/e2e_performance_benchmark_manifest_v1.schema.json:RunRecordにmeasured_head_sha/workflow_run_head_shaを optional field として追加(requiredは変更なし、既存head_shaはrequiredのまま維持)。docs/dev/e2e-performance-benchmark.md/docs/dev/ci-performance.md: 新field の意味論、workflow_digest/workflow_shaの既知の限界(解消は 実装: frozen E2E benchmark を layout A/B/A/B dispatch 契約へ置換する #2422 に委ねる)を追記。Checks
pnpm typecheck: PASSpnpm lint: PASSpnpm test: PASS(1874 passed, 105 files)pnpm build: PASSuv run --locked ruff check scripts/ci/collect_e2e_performance_benchmark.py scripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark.py: PASSuv run --locked pytest scripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark.py(AC4 VC): PASS(38 passed)uv run --locked pytest scripts/ci/tests/e2e_performance_benchmark/(同ディレクトリ全体、非 Allowed Path の 実装: e2e performance benchmark の rerun attempt 選択を順序非依存の決定論的ポリシーにする #2179/fix: e2e performance benchmark の rerun attempt 選択を決定論的にする #2182 回帰スイート含む): PASS(76 passed, 0 failed, 変更ゼロで非回帰)uv run --locked pytest tests/ci/ scripts/ci/: PASS(476 passed, 4 skipped, 0 failed)uv run --locked pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py: PASS(24 passed)actionlint .github/workflows/ci.yml: PASS(0 issues)grep -n -e measured_head_sha -e MEASURED_HEAD_SHA .github/workflows/ci.yml): PASS(e2e-core / e2e-responsive-matrix 両ジョブに対称的に出現)grep -n -e "\"workflow_run_head_sha\"" scripts/ci/collect_e2e_performance_benchmark.py): PASSgrep -n "measured_head_sha" docs/dev/e2e-performance-benchmark.md): PASSgrep -n "measured_head_sha" docs/dev/ci-performance.md): PASSfix_delta(2回目 REQUEST_CHANGES 対応、commit 57a898c)
.github/workflows/ci.ymlのe2e-core/e2e-responsive-matrix両ジョブにgit config --global --add safe.directory "$GITHUB_WORKSPACE"を追加し、git rev-parse HEAD(measured_head_sha独立観測)実行時の "dubious ownership" CI 失敗を解消した。CI run https://github.com/squne121/loop-protocol/actions/runs/33864489280 でe2e-core/e2e-responsive-matrix/e2eすべて success を確認済み。LEGACY_AMBIGUOUS_HEAD_SHA_JOBS = ("e2e-core", "e2e-responsive-matrix")にスコープし、当該 2 ジョブについてmeasured_head_sha/workflow_run_head_shaを両方とも持たない legacy record をlegacy_ambiguous_head_sha理由で hard exclude する。新規回帰テストtest_ac4e_legacy_record_lacking_both_head_sha_fields_is_hard_excluded/test_ac4f_legacy_record_with_derivable_merge_sha_is_not_hard_excluded/test_ac4g_legacy_ambiguous_exclusion_scoped_to_e2e_core_responsive_matrix_jobsを追加。scripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark_rerun_attempt.py(38 tests)が上記 hard-exclude 実装後も非回帰であることを再確認済み。Schema Change Applicability
schemas/e2e_performance_benchmark_manifest_v1.schema.jsonのRunRecordにmeasured_head_sha/workflow_run_head_shaを optional field として追加した(required配列は変更していない)。既存のhead_sha/workflow_sha等の required field・型・意味論は一切変更していない。Schema Consumer Inventory
before(変更前のスキーマ状態)
変更前は
RunRecord.required = [workflow_run_id, job, head_sha, artifact_id, artifact_digest, conclusion, workflow_digest, workflow_sha]のみで、measured_head_sha/workflow_run_head_shaという field 自体が未定義(存在しない field)だった。after(変更後のスキーマ状態)
変更後も
RunRecord.requiredは変更なし(上記と同一配列を維持)。propertiesにmeasured_head_sha(pattern^[0-9a-f]{40}$)とworkflow_run_head_sha(同 pattern)を optional field として追加した。scripts/ci/collect_e2e_performance_benchmark.py_collect_armのrunsエントリ組み立て)・validator(_verify_run_record/verify_run_record_against_live_api)の両方が新 field を認識するよう本PRで更新済みscripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark.pyscripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark_rerun_attempt.py_verify_run_record/verify_run_record_against_live_api変更は additive-only + fallback 設計で、この既存回帰スイート 43 tests を無編集のまま green 維持することを確認済み)docs/dev/e2e-performance-benchmark.mddocs/dev/ci-performance.mdこのスキーマの他の consumer(
rg/grepでe2e_performance_benchmark_manifest_v1を検索)は上記以外に存在しない。Safety Claim Matrix
.github/workflows/ci.ymlを変更しているため safety-sensitive 判定(SAFETY_SENSITIVE_PATH_PATTERNSに.github/workflows/を含む)に該当する。head_sha/merge_shaの計算式・値を変更せず、新規 env var(GH_MEASURED_HEAD_SHA)の追加のみgit diff .github/workflows/ci.yml— 既存行は削除・改変されず、追記のみgit rev-parse HEADの読み取りのみ)git diff .github/workflows/ci.ymlに権限昇格・secrets 参照の追加なしactionlintによる構文検証を実施済みactionlint .github/workflows/ci.ymlexit 0workflow_dispatch実行)は実装完了時点では未実施(別途 orchestrator が実施)VISUAL_IMPACT_DECLARATION_V1
.github/workflows/ci.ymlは resolver のMETA_POLICY_PATHSに含まれるため、CI 配線のみの変更でも全登録 surface が affected 判定される。本 PR はtests/component/combat-hud-critical.vrt.test.ts/tests/component/combat-hud-running.vrt.test.tsを一切変更していないため、両 surface ともverified_unchangedを宣言する。Notes
LEGACY_AMBIGUOUS_HEAD_SHA_JOBS = ("e2e-core", "e2e-responsive-matrix")にスコープし、当該 2 ジョブについてmeasured_head_sha/workflow_run_head_shaを両方とも持たない legacy record をlegacy_ambiguous_head_sha理由で hard exclude する(詳細は上記「fix_delta(2回目 REQUEST_CHANGES 対応、commit 57a898c)」参照)。スコープをe2e-core/e2e-responsive-matrixに限定したのは、Allowed Paths 外のscripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark_rerun_attempt.py(実装: e2e performance benchmark の rerun attempt 選択を順序非依存の決定論的ポリシーにする #2179/fix: e2e performance benchmark の rerun attempt 選択を決定論的にする #2182 の rerun-attempt 回帰スイート、全 fixture がmeasured_head_sha非搭載)の既存テストがjobフィールドとして異なる job 名を使うため、この 2 ジョブへのスコープ限定によって当該スイート(38 tests)を非回帰のまま維持できることを確認したため。live-API self-consistency 側は、workflow_run_head_shaを導出できない legacy record についてexpected_head_sha比較へフォールバックする既存挙動を維持している(変更なし)。workflow_digestの既知の限界(checkout 後の.github/workflows/ci.ymlから計算されるためworkflow_shaと別 commit 由来になり得る)は docs に明示するのみに留め、本PRでは解消しない(解消は 実装: frozen E2E benchmark を layout A/B/A/B dispatch 契約へ置換する #2422 に委ねる)。workflow_dispatch実行と結果記録)は本 PR 作成時点では未実施。Issue 実装: 固定SHA benchmark artifact の head_sha 意味論混同を measured_head_sha/workflow_run_head_sha 分離で修正する #2184 の指示により、AC6 の実際のworkflow_dispatch実行・API readback 照合は実装完了後に別途 orchestrator が実施する。Allowed Paths 遵守状況(Compliance)
変更ファイルは Issue #2184 の Allowed Paths と完全一致(違反なし):
.github/workflows/ci.ymlscripts/ci/collect_e2e_performance_benchmark.pyscripts/ci/tests/e2e_performance_benchmark/test_collect_e2e_performance_benchmark.pyschemas/e2e_performance_benchmark_manifest_v1.schema.jsondocs/dev/e2e-performance-benchmark.mddocs/dev/ci-performance.md