Repository navigation
fix: e2e performance gate 側の _normalize_run_attempt を missing run_attempt 除外ポリシーに統一する - #2383
Conversation
…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]>
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2383/ The preview will be removed when this PR is closed. |
結論verdict: REQUEST_CHANGES
reviewed_head_sha: "26a1a396335e1ecd0b9de48fd02b575172cb73bc"
blocking_findings:
P1: 2
non_blocking_findings:
P2: 2PRの方向性は正しいです。起点となったPR #2182のレビューでは、collector側だけがmissing 主要CIは成功し、実装完了コメントでもgate関連52件成功・3件SKIP、Ruff成功と報告されています。ただし、現在のテストは後述する「診断情報を捨てる挙動」を一部正解として固定しており、greenであることはその問題を反証しません。 P1ブロッカーP1-1: gate-ready側の
|
…さを是正する (#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]>
fix_delta 対応完了 (OWNER REQUEST_CHANGES issuecomment-5458167419 対応)head SHA: P1-1(必須・解消)gate-ready 側
|
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 を独立検証しました。
Allowed Paths Gate: ok。required CI(lint/test/build/typecheck/validate-generated-artifact)全PASS。独立worktreeで blockerなし。 |
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 から除外する」ポリシーへ統一します。_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_attemptreason で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_iddedupe を適用し、(count, evidence_errors)を返すよう変更、呼び出し元run_evidence_gate()を追従させた。tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.pyを追加(AC2/AC4/AC5/AC6(4パターン)/AC7/AC9 に対応)。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
uv run --locked pytest tests/ci/ -k test_ci_performance_gate -q— 52 passed, 3 skipped(既存の Runtime Verification Applicability SKIP、fabricated PASS ではない)uv run --locked ruff check tests/ci/test_ci_performance_gate*.pySchema Change Applicability
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
not_applicable(本 Issue の変更は producer 側ではなく、consumer 側 trust rejection ロジックの是正であり、pytest による behavioral regression test で検証が完結するため).claude/skills/ci-test-performance/SKILL.md参照):.github/workflows/**自体は変更していません。Bash ツール実行時に.github/workflows/ci.ymlの既存 fixture 文字列を読み取り用に参照したことで advisory が発火しましたが、実際の変更対象はtests/ci/*.pyとdocs/dev/e2e-performance-benchmark.mdのみです)tests/ci/test_ci_performance_gate*.pyの変更)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