Skip to content

fix: e2e performance gate 側の _normalize_run_attempt を missing run_attempt 除外ポリシーに統一する - #2383

Merged
squne121 merged 2 commits into
mainfrom
worktree-issue-2187-run-attempt-trust-boundary
Aug 28, 2026
Merged

squne121 merged 2 commits into
mainfrom
worktree-issue-2187-run-attempt-trust-boundary

Conversation

@squne121

Copy link
Copy Markdown
Owner

Summary

この PR は Issue #2187 の実装です。e2e performance gate 側(tests/ci/test_ci_performance_gate.py::_normalize_run_attempt)の run_attempt 欠落時の trust 判定を、collector 側 _classify_run_attempt(scripts/ci/collect_e2e_performance_benchmark.py、PR #2182 で是正済み)と同じ「missing-key は trusted cohort から除外する」ポリシーへ統一します。

  • trust 判定用の _normalize_run_attempt_trusted() を新設し、run_attempt 欠落を None(除外)として扱う。既存の _normalize_run_attempt() は identity collision グルーピング専用ヘルパーとして責務分離のうえ維持(missing→1 の既存挙動は変更しない)。
  • _select_initial_attempt_baselines() を (selected, evidence_errors) のタプル返却へ変更し、missing-key 除外を legacy_unverified_run_attempt reason で evidence_errors に記録する。
  • _pair_by_workflow_run_id() の all_ids を raw input の workflow_run_id 集合から構築するよう変更し、core/responsive 双方が missing で除外された workflow_run_id も evidence_errors から消えないようにした。
  • _cli_run_details_from_pairs() の _normalize_run_attempt(core) or 1 フォールバックを削除し、missing/invalid な attempt から run_attempt: 1 を合成しないようにした。
  • _gate_ready_post_filter_sample_count() に provider lane と同じ attempt selection / workflow_run_id dedupe を適用し、(count, evidence_errors) を返すよう変更、呼び出し元 run_evidence_gate() を追従させた。
  • 新規回帰テスト tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py を追加(AC2/AC4/AC5/AC6(4パターン)/AC7/AC9 に対応)。
  • satellite fixture ファイル(paired_critical_path / evidence_hard_failure / comparability_classification / fingerprint_validation / post_filter_sample_floor / rerun_attempt_selection)の run_attempt 欠落 fixture を trusted 値(run_attempt: 1)へ是正し、新シグネチャ(タプル返却)への追従修正を行った。
  • docs/dev/e2e-performance-benchmark.md の既知制限の記述を、gate/collector 統一後の挙動へ更新した。

Checks

Schema Change Applicability

  • decision: not_schema_change
  • reason: テストファイルと docs の変更のみであり、schemas/ 配下や JSON Schema、外部消費される producer/consumer 契約のキー・型は変更していません。_select_initial_attempt_baselines() / _gate_ready_post_filter_sample_count() の戻り値契約変更はこのモジュール内部のヘルパー関数シグネチャであり、外部 schema ではありません。

Schema Consumer Inventory

N/A
reason: schema_change ではないため対象消費者の before/after 差分は発生しません。

Safety Claim Matrix

N/A
reason: 変更対象は tests/ci/ 配下のテストファイルと docs/dev/ の 1 ドキュメントのみであり、transport / permission / sandbox / auth / mcp / .claude/skills/ / .github/workflows/ のいずれにも該当しない safety-sensitive ではない変更です。

Notes

  • Related issue: 実装: e2e performance gate 側の _normalize_run_attempt を missing run_attempt 除外ポリシーに統一する #2187
  • Closes 実装: e2e performance gate 側の _normalize_run_attempt を missing run_attempt 除外ポリシーに統一する #2187
  • 親 Issue: なし(PR fix: e2e performance benchmark の rerun attempt 選択を決定論的にする #2182 の OWNER adversarial review issuecomment-5302595322 由来の単独 follow-up)
  • Runtime Verification Applicability: not_applicable(本 Issue の変更は producer 側ではなく、consumer 側 trust rejection ロジックの是正であり、pytest による behavioral regression test で検証が完結するため)
  • CI_TEST_PERFORMANCE_DECISION_V1(advisory、.claude/skills/ci-test-performance/SKILL.md 参照):
    • decision_scope: review_only(.github/workflows/** 自体は変更していません。Bash ツール実行時に .github/workflows/ci.yml の既存 fixture 文字列を読み取り用に参照したことで advisory が発火しましたが、実際の変更対象は tests/ci/*.py と docs/dev/e2e-performance-benchmark.md のみです)
    • lane_classification: python_unit / contract_artifact(tests/ci/test_ci_performance_gate*.py の変更)
    • changed_paths: tests/ci/test_ci_performance_gate.py, tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py(新規), tests/ci/test_ci_performance_gate_rerun_attempt_selection.py, tests/ci/test_ci_performance_gate_paired_critical_path.py, tests/ci/test_ci_performance_gate_evidence_hard_failure.py, tests/ci/test_ci_performance_gate_comparability_classification.py, tests/ci/test_ci_performance_gate_fingerprint_validation.py, tests/ci/test_ci_performance_gate_post_filter_sample_floor.py, docs/dev/e2e-performance-benchmark.md

…empt 除外ポリシーに統一する (#2187)

gate 側の trust 判定を collector 側 `_classify_run_attempt` と同じ
missing-key-excludes-from-cohort ポリシーへ統一する。

- `_normalize_run_attempt_trusted()` を新設し、missing run_attempt を
  trusted cohort から除外する(`None` を返す)。既存の
  `_normalize_run_attempt()` は identity collision グルーピング専用
  ヘルパーとして責務分離のうえ維持する(missing→1 の挙動は変更しない)。
- `_select_initial_attempt_baselines()` を `(selected, evidence_errors)`
  のタプル返却に変更し、missing-key 除外を `legacy_unverified_run_attempt`
  reason で記録する。
- `_pair_by_workflow_run_id()` の `all_ids` を raw input の
  `workflow_run_id` 集合から構築し、core/responsive 双方が missing で
  除外された `workflow_run_id` も evidence_errors から消えないようにする。
- `_cli_run_details_from_pairs()` の `or 1` フォールバックを削除し、
  missing/invalid な attempt から `run_attempt: 1` を合成しないようにする。
- `_gate_ready_post_filter_sample_count()` に attempt selection /
  `workflow_run_id` dedupe を適用し、`(count, evidence_errors)` を返す
  よう変更、呼び出し元 `run_evidence_gate()` を追従させる。
- 新規回帰テスト `test_ci_performance_gate_rerun_attempt_trust_boundary.py`
  を追加。satellite fixture ファイル(paired_critical_path /
  evidence_hard_failure / comparability_classification /
  fingerprint_validation / post_filter_sample_floor /
  rerun_attempt_selection)の run_attempt 欠落 fixture を trusted 値へ
  是正し、新シグネチャに追従させる。
- `docs/dev/e2e-performance-benchmark.md` の既知制限の記述を統一後の
  挙動に更新する。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Preview URL

✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2383/

The preview will be removed when this PR is closed.

@squne121

Copy link
Copy Markdown
Owner Author

結論

verdict: REQUEST_CHANGES
reviewed_head_sha: "26a1a396335e1ecd0b9de48fd02b575172cb73bc"
blocking_findings:
  P1: 2
non_blocking_findings:
  P2: 2

PRの方向性は正しいです。起点となったPR #2182のレビューでは、collector側だけがmissing run_attempt を拒否し、gate側は暗黙にattempt 1へ昇格する非対称性が明確にブロッカーとして指摘されていました。GitHub Actionsでも、同一runの再実行では GITHUB_RUN_ID は維持され、GITHUB_RUN_ATTEMPT が1から増えるため、missing値を1と推測せず、明示されたattempt 1だけを採る設計は妥当です。 ([GitHub Docs]1)

主要CIは成功し、実装完了コメントでもgate関連52件成功・3件SKIP、Ruff成功と報告されています。ただし、現在のテストは後述する「診断情報を捨てる挙動」を一部正解として固定しており、greenであることはその問題を反証しません。


P1ブロッカー

P1-1: gate-ready側の evidence_errors がproduction pathで計算後に捨てられている

_gate_ready_post_filter_sample_count() は今回、(count, evidence_errors) を返すようになりました。しかし run_evidence_gate() は次のように受け取っています。

before_gate_ready_count, _before_gate_ready_evidence_errors = ...
after_gate_ready_count, _after_gate_ready_evidence_errors = ...

その後の _evidence_readiness_hard_check_post_filter() にはprovider側のエラーとgate-ready側の件数しか渡されず、gate-ready側のエラー一覧を受け取る引数自体がありません。失敗結果にもgate-readyの除外ID・理由は残りません。

コード上、以下の入力ではPRの中心目的である「silent evidence lossをなくす」が成立しません。

provider:
  20件の正規サンプル

gate-ready:
  20件の正規 attempt-1 サンプル
  1件の missing / invalid / collision サンプル

gate-ready helperは count=20 と非空の evidence_errors を返しますが、後者は捨てられます。provider側に問題がなければhard-checkを通過でき、問題の1件は結果から完全に消えます。19件の正規サンプルと1件の不正サンプルなら失敗はしますが、結果に残るのは主に件数不足であり、どの workflow_run_id がなぜ落ちたのかは失われます。これはコードからの推論です。

最小修正

_evidence_readiness_hard_check_post_filter() に、次のような引数を追加してください。

gate_ready_evidence_errors: dict[str, list[dict]]

呼び出し側ではbefore/afterをそのまま渡し、少なくとも結果JSONには構造化して残します。

{
    "before": before_gate_ready_evidence_errors,
    "after": after_gate_ready_evidence_errors,
}

現行provider側と同じポリシーに揃えるなら、非空のgate-ready errorも insufficient_evidence にするのが最小差分です。余剰の不正サンプルがあっても有効20件を満たせば通したいなら、それは可能ですが、provider側も含めて「件数を満たせばcomplete、除外はstructured warning」という一貫した方針へ変更すべきです。今回だけgate-readyのエラーを捨てるのは最も悪い中間状態です。

追加すべき回帰テストは最低限、次の2つです。

20 trusted + 1 missing
  -> missing ID/reasonがproduction resultから消えない

20 trusted + 1 collision
  -> run_attempt_identity_collisionがproduction resultから消えない

P1-2: missing / invalid / later-attempt / collision の分類が不完全で、テストがsilent exclusionを固定している

Issue #2187のCurrent Validated Scopeは、missing・invalid・trustedを明示的に区別するclassifierベースの設計を要求しています。しかし実装は、missing専用の _normalize_run_attempt_trusted() を追加しただけで、除外理由の生成は次の状態です。

  • missing key: legacy_unverified_run_attempt を生成
  • explicit invalid値: エラーを生成せず除外
  • attempt 2以降しかない: エラーを生成せず除外
  • identity collision: エラーを生成せず continue

実際に _select_initial_attempt_baselines() はcollisionを無言でスキップし、trusted attempt 1がない場合もmissing keyが含まれるときだけエラーを追加しています。_dedupe_by_workflow_run_id() は返されたエラーを明示的に捨てています。

新規テストも、attempt 2だけのgate-readyレコード20件について、件数が0になることを確認する一方で、evidence_errors == [] を正解として固定しています。これでは「水増しは防ぐ」が「理由を残す」より優先され、PRが解消しようとしているsilent evidence lossを別の入力形状で残します。

一方、collector側には既に ok / missing / invalid のclassifierがあり、初回attemptを選べない場合は、全件missingなら legacy_unverified_run_attempt、それ以外なら missing_or_invalid_initial_attempt_excluded_from_sample を出す設計です。

さらに更新後の設計文書は、gate側がcollectorと同じtrust-state semanticsを持ち、attempt 1欠落・不正・collisionの除外が evidence_errors に記録され、黙って消えないと説明しています。現在のコードと一致していません。

最小修正

collectorと同程度の小さなclassifierをgate側にも置くのが適切です。クラスや新スキーマは不要です。

def _classify_run_attempt_trusted(
    baseline: dict,
) -> tuple[int | None, str]:
    if "run_attempt" not in baseline:
        return None, "missing"

    value = _normalize_run_attempt(baseline)
    if value is None:
        return None, "invalid"

    return value, "ok"

_select_initial_attempt_baselines() では、選択されなかったraw workflow_run_id ごとに理由を必ず一つ生成します。

collision
  -> run_attempt_identity_collision

全レコードがmissing
  -> legacy_unverified_run_attempt

invalid / attempt 2以降のみ / attempt 1不在
  -> missing_or_invalid_initial_attempt_excluded_from_sample

最低限、次のテストを追加または反転すべきです。

attempt 2 only
  evidence_errors == [] ではなく、識別可能な理由を要求

explicit None / bool / 0 / negative / nonnumeric
  invalid理由を要求

same identity + differing content
  run_attempt_identity_collisionを要求

なお、gate側のproducer-shaped文字列 "1" 受理は維持してください。関連CI producerは GITHUB_RUN_ATTEMPT を環境変数からJSONへ書くため、実際の形は文字列です。collectorのint限定実装をそのままコピーすると正常なCI baselineまで失います。


P2品質上の問題

P2-1: built-in smoke fixtureがsample-floor検証ではなくmissing-key検証に変質している

現在のIssue AC7は、built-in fixtureの失敗理由が件数不足から legacy_unverified_run_attempt に変化することを明示的に許容しています。したがって、これは現在のIssue契約に対するブロッカーではありません。

しかし品質面では弱くなっています。built-in fixtureの本来の目的は、3サンプルしかないため MIN_COHORT_RUN_COUNT=20 のhard-checkがproduction CLIで発火することの確認です。新規テストは実ワークフローと同じく全レコードから run_attempt を省略し、結果理由に legacy_unverified_run_attempt が含まれれば成功します。これではsample-floor判定を壊しても、provider evidence errorだけでテストが通り得ます。

推奨修正

実際の .github/workflows/ci.yml のbuilt-in fixtureと、それを再現するテストfixtureの各レコードに、producer形状で次を追加します。

"run_attempt": "1"

これにより、次を分離して検証できます。

trusted 3-sample fixture
  -> sample-count不足で insufficient_evidence

missing-key poison fixture
  -> legacy_unverified_run_attemptで insufficient_evidence

.github/workflows/ci.yml が現在のAllowed Paths外なら、この3フィールド追加だけを許す狭いscope amendmentで十分です。新しいworkflowやlive harnessは不要です。


P2-2: _comparable_cohort() 経路では新しいエラー情報が引き続き捨てられる

_dedupe_by_workflow_run_id() は、新シグネチャの _select_initial_attempt_baselines() から返る _evidence_errors を明示的に捨てています。コメントにも「callersは現在エラーチャンネルを持たない」と記載されています。したがって、production CLIとは別のcomparable-cohort探索経路では、missing/invalid/collisionによる除外が件数減少としてしか観測できません。

この経路がclose判定に直接使われない限りmerge blockerにはしません。ただし、設計文書の「除外は黙って消えない」という説明と合わせるなら、次のいずれかが必要です。

  • _dedupe_by_workflow_run_id() も (selected, errors) を返す
  • _comparable_cohort() がjob別diagnosticsを返す
  • この経路はcount-onlyのexploratory pathであると文書を限定する

趣味開発としては、関数の大規模再設計より、戻り値へ diagnostics を追加して失敗メッセージに出す程度で十分です。


評価できる点

以下は正しく、維持すべきです。

  • collision grouping用のmissing→attempt-1扱いと、trusted eligibility用のmissing拒否を別関数へ分離した
  • provider pairingのID集合をselected後ではなくraw入力から作り、両laneともmissingのIDが消えないようにした
  • _cli_run_details_from_pairs() の or 1 によるprovenance合成を削除した
  • gate-ready laneにも workflow_run_id dedupeとinitial-attempt選択を適用した
  • explicit integer 1 とproducer-shaped string "1" の両方を受理した

これらの中心ロジックは、Issue #2187が解消すべきprovenance launderingとsample-count inflationに対して有効です。

スキーマを変更して run_attempt を必須化する必要もありません。optional fieldを過去データとしてparseできることと、trusted consumerがmissing値を拒否することは両立します。JSON Schemaの default も、通常のvalidation時に欠落値を自動注入するものではありません。 (JSON Schema)


推奨する最小修正セット

  1. _select_initial_attempt_baselines() が、missingだけでなくinvalid・later-attempt-only・collisionについてもstructured errorを返す。
  2. run_evidence_gate() がgate-ready errorsを捨てず、hard-checkおよび結果JSONへ渡す。
  3. built-in fixtureをtrusted "run_attempt": "1" の3サンプルに直し、missing-key poison fixtureを別テストにする。
  4. 次の回帰テストを追加する。
test_gate_ready_surplus_untrusted_sample_is_not_silent
test_gate_ready_attempt_2_only_reports_exclusion_reason
test_gate_ready_invalid_attempt_reports_exclusion_reason
test_gate_ready_collision_reports_collision_reason
test_builtin_fixture_exercises_post_filter_sample_floor

検証はfixture-driven pytestとRuffで十分です。現在のproducerは正常経路で run_attempt を常に出すため、missing-key分岐のためだけにlive workflow dispatchや外部API harnessを増やす必要はありません。Issueの事前レビューでも、poisoned operator fixtureとproducer-shaped "1" のpositive fixtureによる検証が推奨されています。


GitHubへ投稿するレビュー要約

REQUEST_CHANGES

実装方針は妥当ですが、gate-ready側で生成した evidence_errors が run_evidence_gate() で捨てられており、20件の有効サンプルに不正サンプルが混在した場合、そのIDと理由がproduction結果から消えます。

また _select_initial_attempt_baselines() はmissing keyにしかstructured errorを生成せず、invalid値・attempt 2以降のみ・identity collisionをsilentに除外しています。新規テストもattempt 2 onlyで evidence_errors == [] を正解として固定しており、collector側および更新後ドキュメントのdiagnostic-preserving契約と一致しません。

gate-ready errorsをhard-check/resultへ伝播し、全除外状態へ識別可能なreasonを割り当ててください。併せてbuilt-in 3-sample fixtureにはproducer-shaped "run_attempt": "1" を追加し、sample-floor pathとmissing-key poison pathを別々に検証するのが最小かつ有用な修正です。

…さを是正する (#2187)

OWNER REQUEST_CHANGES (PR #2383, issuecomment-5458167419) 対応:

- P1-1: run_evidence_gate() が _gate_ready_post_filter_sample_count() の
  evidence_errors を `_` で握りつぶしていた問題を修正。
  _evidence_readiness_hard_check_post_filter() に
  gate_ready_evidence_errors 引数を追加し、production result
  (insufficient_evidence / complete 両方) に
  gate_ready_evidence_errors: {before: [...], after: [...]} として
  構造化して残す。
- P1-2: _select_initial_attempt_baselines() の missing/invalid/
  later-attempt-only/collision 分類が不完全で、silent exclusion を
  固定していた回帰テストを反転。_classify_run_attempt_trusted() を
  追加し、collision には run_attempt_identity_collision、
  invalid/attempt2以降のみ/attempt1不在には
  missing_or_invalid_initial_attempt_excluded_from_sample、
  全レコード missing には legacy_unverified_run_attempt を
  必ず1件ずつ付与する。
- P2-1: built-in insufficient-evidence smoke fixture が sample-floor
  検証と missing-key 検証を混同していた点を、別テスト
  test_builtin_fixture_exercises_post_filter_sample_floor で分離
  (.github/workflows/ci.yml の実フィクスチャは変更不可のため、既存
  test_builtin_insufficient_evidence_fixture_remains_insufficient_evidence
  は温存)。
- P2-2: _dedupe_by_workflow_run_id() が evidence_errors を捨てる経路を
  count-only exploratory path と明記するコメントを追加。

新規回帰テスト:
- test_gate_ready_surplus_untrusted_sample_is_not_silent 相当
  (test_run_evidence_gate_surfaces_gate_ready_missing_attempt_evidence_error_in_production_result)
- test_gate_ready_attempt_2_only_reports_exclusion_reason
- test_gate_ready_invalid_attempt_reports_exclusion_reason
- test_gate_ready_collision_reports_collision_reason
- test_builtin_fixture_exercises_post_filter_sample_floor
- test_run_evidence_gate_surfaces_gate_ready_collision_evidence_error_in_production_result

tests/ci/test_ci_performance_gate*.py 全PASS、Ruff PASS。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@squne121

Copy link
Copy Markdown
Owner Author

fix_delta 対応完了 (OWNER REQUEST_CHANGES issuecomment-5458167419 対応)

head SHA: 8f4d4a29a38be5ad0706698ea5e32cd0d3c4f3f5

P1-1(必須・解消)gate-ready 側 evidence_errors の欠落

run_evidence_gate() が _gate_ready_post_filter_sample_count() の evidence_errors を _before_gate_ready_evidence_errors / _after_gate_ready_evidence_errors として握りつぶしていた点を修正しました。

  • _evidence_readiness_hard_check_post_filter() に gate_ready_evidence_errors: dict[str, list[dict]] | None 引数を追加し、provider lane と同様に非空の gate-ready evidence_errors を fail-closed 対象にしました。
  • run_evidence_gate() の production result(gate_status: insufficient_evidence / complete の両方)に gate_ready_evidence_errors: {"before": [...], "after": [...]} を構造化して残すようにしました。

P1-2(必須・解消)missing/invalid/later-attempt/collision 分類の不完全さ

_classify_run_attempt_trusted()(collector 側と同型の三値classifier)を追加し、_select_initial_attempt_baselines() が選択されなかった workflow_run_id グループごとに必ず1件の識別可能な理由を生成するよう修正しました。

  • collision → run_attempt_identity_collision(新規定数 RUN_ATTEMPT_IDENTITY_COLLISION_REASON)
  • 全レコード missing → legacy_unverified_run_attempt(既存)
  • invalid値 / attempt 2以降のみ / attempt 1不在 → missing_or_invalid_initial_attempt_excluded_from_sample(新規定数 MISSING_OR_INVALID_INITIAL_ATTEMPT_EXCLUDED_REASON)

silent exclusion を固定していた既存テスト2件を反転:

  • test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_gate_ready_attempt_2_never_substitutes_for_missing_attempt_1
  • test_ci_performance_gate_rerun_attempt_selection.py::test_pair_excludes_run_when_attempt_1_missing_never_substitutes_attempt_2

gate 側の producer-shaped 文字列 "1" 受理ロジック(_normalize_run_attempt 委譲)は変更していません。

P2-1(対応済み)built-in smoke fixture の混同

.github/workflows/ci.yml の実フィクスチャ(run_attempt キーなし)は Out of Scope のため変更していません。既存 test_builtin_insufficient_evidence_fixture_remains_insufficient_evidence はそのまま温存し、新規 test_builtin_fixture_exercises_post_filter_sample_floor を追加してサンプル数不足のみを分離検証するテストとしました(producer-shaped "run_attempt": "1" を付与した variant fixture を使用、実 CI フィクスチャの形状主張はしていません)。

P2-2(対応済み)_comparable_cohort() 経路の evidence_errors 破棄

_dedupe_by_workflow_run_id() の docstring を更新し、この経路は AC11 close-verification hard-check パス(_gate_ready_post_filter_sample_count / _provider_post_filter_sample_count / _evidence_readiness_hard_check_post_filter、これらは evidence_errors を production result まで伝播する)とは別の count-only exploratory path であることを明記しました。戻り値のシグネチャ自体は変更していません(多数の exploratory テスト呼び出し元への影響を避けるため)。

新規回帰テスト(tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py)

  • test_gate_ready_attempt_2_only_reports_exclusion_reason
  • test_gate_ready_invalid_attempt_reports_exclusion_reason(None/bool/0/negative/non-numeric string 全部)
  • test_gate_ready_collision_reports_collision_reason
  • test_builtin_fixture_exercises_post_filter_sample_floor
  • test_run_evidence_gate_surfaces_gate_ready_missing_attempt_evidence_error_in_production_result(「20 trusted + 1 missing」が production result から消えないことを run_evidence_gate() 経由で確認)
  • test_run_evidence_gate_surfaces_gate_ready_collision_evidence_error_in_production_result(「20 trusted + 1 collision」が production result から消えないことを確認)

VC 実行結果

$ uv run --locked pytest tests/ci/test_ci_performance_gate.py tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py \
    tests/ci/test_ci_performance_gate_rerun_attempt_selection.py tests/ci/test_ci_performance_gate_paired_critical_path.py \
    tests/ci/test_ci_performance_gate_evidence_hard_failure.py tests/ci/test_ci_performance_gate_comparability_classification.py \
    tests/ci/test_ci_performance_gate_fingerprint_validation.py tests/ci/test_ci_performance_gate_post_filter_sample_floor.py -q
54 passed, 3 skipped

$ uv run --locked pytest tests/ci/ -q
67 passed, 7 skipped

$ uv run --locked ruff check tests/ci/
All checks passed!

Issue #2187 の AC1〜AC11 の Verification Commands(rg static check 群 + AC 別 pytest 群 + AC11 broad pytest tests/ci/ -k test_ci_performance_gate -q)も全て再実行し PASS を確認済みです。

Allowed Paths 外への変更はありません(変更ファイルは tests/ci/test_ci_performance_gate.py / tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py / tests/ci/test_ci_performance_gate_rerun_attempt_selection.py の3ファイルのみ)。

@squne121

Copy link
Copy Markdown
Owner Author
verdict: APPROVE
reviewed_head_sha: "8f4d4a29a38be5ad0706698ea5e32cd0d3c4f3f5"
blockers: []
warnings:
  - "PR本文に「## 受け入れ条件の達成状況」の専用見出しは無いが、本リポジトリの実際の .github/pull_request_template.md はこの見出しを要求しておらず、Summary/Checks形式でAC1-AC11個別対応が記述されている。この形式は非blockerと判断した。"

OWNER の REQUEST_CHANGES(P1-1: gate-ready 側 evidence_errors の欠落、P1-2: missing/invalid/collision 分類の不完全さ)に対する fix_delta を独立検証しました。

  • P1-1: run_evidence_gate() が gate-ready 側 evidence_errors を捨てずに gate_ready_evidence_errors として結果へ伝播することを確認。「20 trusted + 1 missing」「20 trusted + 1 collision」の指摘シナリオを再現するテストが存在し PASS、該当行を削除する mutation で FAIL することも確認(非空洞テスト)。
  • P1-2: _classify_run_attempt_trusted() 三値classifier が新設され、collision/missing/invalid の理由が個別に識別可能であることを確認。
  • P2-1/P2-2 も non-blocking として妥当に対応済み。

Allowed Paths Gate: ok。required CI(lint/test/build/typecheck/validate-generated-artifact)全PASS。独立worktreeで pytest tests/ci/ -k test_ci_performance_gate -q(58 passed, 3 skipped)、ruff全PASSを自力再実行済み。

blockerなし。

@squne121
squne121 marked this pull request as ready for review August 28, 2026 22:22
@squne121
squne121 merged commit e9e19c7 into main Aug 28, 2026
42 checks passed
@squne121
squne121 deleted the worktree-issue-2187-run-attempt-trust-boundary branch August 28, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

実装: e2e performance gate 側の _normalize_run_attempt を missing run_attempt 除外ポリシーに統一する

1 participant