Skip to content

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

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "PR #2182(Closes #2179)の OWNER adversarial review(issuecomment-5302595322)で pr-reviewer が確認した gate 側 _normalize_run_attempt の missing-key trust asymmetry を解消する"
change_kind: code

Parent Issue

なし(単独 follow-up。起点は PR #2182 のレビューコメント #2182 (comment) と originating Issue #2179)

Parent Goal Ref

  • Goal: tests/ci/test_ci_performance_gate.py::_normalize_run_attempt の「run_attempt キー欠落を attempt 1 として信頼する」挙動を、scripts/ci/collect_e2e_performance_benchmark.py::_classify_run_attempt の是正済みポリシー(キー欠落は legacy_unverified_run_attempt として trusted cohort から除外)に統一する
  • Desired Destination: N/A(単独 follow-up のため親 Issue のスコープなし)

Current Validated Scope

  • tests/ci/test_ci_performance_gate.py の gate 側 rerun-attempt 処理を、missing/invalid/trusted の 3 態を明示的に区別する classifier ベースの設計へ責務分離する(trust 判定と collision grouping を同じ戻り値で兼用しない)
  • provider lane(_pair_by_workflow_run_id 経由)だけでなく gate-ready lane(_gate_ready_post_filter_sample_count 経由)にも同じ attempt selection / workflow_run_id dedupe を適用する
  • _cli_run_details_from_pairs() の _normalize_run_attempt(core) or 1 fallback を削除し、missing/invalid な attempt から run_attempt: 1 を合成しない
  • producer-shaped 数値文字列 "1"(GITHUB_RUN_ATTEMPT 由来)は引き続き trusted attempt-1 として受理する preservation 契約を維持する(collector とのこの型差異は意図的であり統一しない)
  • missing record が silent に消えず、workflow_run_id と除外理由(legacy_unverified_run_attempt 等)が evidence errors に残ることを保証する
  • tests/ci/test_ci_performance_gate_rerun_attempt_selection.py(gate-side rerun policy の canonical regression suite)に新規回帰テストを追加する
  • docs/dev/e2e-performance-benchmark.md の既知制限の記述を現行仕様に更新する
  • 上記変更後も tests/ci/ 配下の全 test_ci_performance_gate*.py と Ruff が PASS する状態を維持する

Remaining Parent Gaps

なし

Outcome

tests/ci/test_ci_performance_gate.py の gate 側 rerun-attempt 処理が、collector 側 _classify_run_attempt(scripts/ci/collect_e2e_performance_benchmark.py)と同じ trust-state semantics(run_attempt キー欠落は trusted cohort から除外し legacy_unverified_run_attempt として記録する)を持つ状態になり、かつ以下が同時に満たされている。

  • trust 判定(missing/invalid/ok の分類)と collision grouping(missing record は既存契約どおり attempt-1 slot として扱う)が責務分離されている
  • provider lane だけでなく gate-ready lane にも同じ attempt selection / workflow_run_id dedupe が適用されている
  • _cli_run_details_from_pairs() が missing/invalid な attempt から run_attempt: 1 を合成しない
  • producer-shaped 数値文字列 "1" は引き続き trusted attempt-1 として受理される
  • missing record が silent に消えず、workflow_run_id と除外理由が evidence errors に残る
  • docs/dev/e2e-performance-benchmark.md の既知制限の記述が現行仕様に更新されている
  • tests/ci/ 配下の全 test_ci_performance_gate*.py と Ruff が PASS する

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 対象コードは .github/workflows/ci.yml から CLI として実行される production-callable evidence gate だが、本 Issue の変更は producer(workflow/schema)側ではなく、現行 producer が生成しない missing-key poison input に対する consumer 側 trust rejection ロジックの是正である。検証は pytest による behavioral regression test(_normalize_run_attempt / _select_initial_attempt_baselines / _pair_by_workflow_run_id / _gate_ready_post_filter_sample_count / _cli_run_details_from_pairs の直接呼び出し)で完結し、実際のワークフロー実行・外部通信・I/O は不要。

In Scope

  • tests/ci/test_ci_performance_gate.py::_normalize_run_attempt の missing-key 挙動を、trust 判定用途では None(除外)を返すよう変更する。ただし既存の _detect_run_attempt_identity_collisions が依存する「missing は collision grouping では attempt-1 slot として扱う」契約は、trust 判定から独立した形で保持する(責務分離、一行修正ではなく classifier ベースの設計変更)
  • _select_initial_attempt_baselines() の戻り値契約を (selected, evidence_errors) のタプルへ変更し、missing record が legacy_unverified_run_attempt 相当の理由で evidence_errors に記録されるようにする
  • _pair_by_workflow_run_id() を、all_ids の union を selected map の key からではなく raw input の workflow_run_id 集合から構築するよう変更し、core/responsive 双方が missing で除外された workflow_run_id も evidence_errors から消えないようにする
  • _cli_run_details_from_pairs() の "run_attempt": _normalize_run_attempt(core) or 1 fallback を削除し、missing/invalid な attempt から attempt 1 を合成しないようにする
  • _gate_ready_post_filter_sample_count() の戻り値契約を (count, evidence_errors) のタプルへ変更し、内部で _select_initial_attempt_baselines() による attempt selection / workflow_run_id dedupe を適用する。呼び出し元 run_evidence_gate() を新シグネチャに追従させる
  • explicit integer 1 と producer-shaped string "1" を trusted attempt-1 candidate として引き続き受理し、bool/null/0/negative/non-numeric な値は invalid として拒否する既存の型変換ロジックは変更しない(preservation)
  • _normalize_run_attempt() の docstring から、これから変更する旧挙動の記述(「A missing key defaults to 1 and is treated as a TRUSTED attempt-1 candidate」)を削除し、新ポリシーを反映する。_select_initial_attempt_baselines() の docstring から「THIS gate module intentionally still defaults a MISSING run_attempt key to 1 for trusted-cohort eligibility」という記述も同様に是正する
  • 新規ファイル tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py を追加し、以下の新規回帰テストをまとめて置く(本リポジトリの VC 契約規約上、既存ファイルへの新規 test 関数追加は禁止されているため、新規テストは新規ファイルに集約する):
    • missing record が legacy_unverified_run_attempt 相当の理由で trusted cohort から除外されることを示すテスト
    • core/responsive 双方 missing でも workflow_run_id が evidence_errors から消えないことを示すテスト
    • _cli_run_details_from_pairs() が missing/invalid から attempt 1 を合成しないことを示すテスト
    • gate-ready lane が missing attempt / 重複 workflow_run_id / attempt 2 以降のみのレコードで sample floor を水増しできないことを示すテスト(4 パターン: missing fails closed、重複 workflow_run_id が水増ししない、attempt 2 以降が代替されない、正規の一意 attempt-1 レコードは sample floor を満たす)
    • .github/workflows/ci.yml の built-in insufficient-evidence fixture(3 サンプル)が本変更後も sample-count 不足を主理由として insufficient_evidence になり続けることを示すテスト
  • tests/ci/test_ci_performance_gate_rerun_attempt_selection.py の既存テスト test_missing_attempt_baseline_colliding_with_explicit_attempt_1_baseline_is_unaffected_by_grouping の挙動(collision grouping 契約)が、責務分離後も壊れないことを確認する(このテスト自体は既存なので変更不要、壊れていれば既存テストの範囲内で修正する)
  • tests/ci/test_ci_performance_gate_paired_critical_path.py の _baseline() helper、tests/ci/test_ci_performance_gate_comparability_classification.py と tests/ci/test_ci_performance_gate_fingerprint_validation.py(いずれも _comparable_cohort() 経由で run-attempt selection の影響を受ける)、tests/ci/test_ci_performance_gate_post_filter_sample_floor.py(_gate_ready_post_filter_sample_count() の新シグネチャに追従する既存呼び出しの調整)、tests/ci/test_ci_performance_gate_evidence_hard_failure.py を調査し、新ポリシーで壊れる既存 fixture / 呼び出し箇所があれば是正する(新規 test 関数は追加しない。既存 test 内の fixture 調整のみ)
  • docs/dev/e2e-performance-benchmark.md の「gate 側はこの collector 側の是正をまだ完全には反映していない」という既知制限の記述を、統一後の正しい挙動に更新する
  • _normalize_run_attempt() はそのまま残し、_detect_run_attempt_identity_collisions() の collision grouping 専用ヘルパーとして維持する(missing→1 の既存挙動を変更しない)。trust 判定側(_select_initial_attempt_baselines())には、missing を None(trust対象外)として明示的に扱う別のヘルパー関数を新設する。同一関数に両方の意味を持たせない
  • _select_initial_attempt_baselines() が返す per-baseline の除外理由(legacy_unverified_run_attempt 等)を、_pair_by_workflow_run_id() および _gate_ready_post_filter_sample_count() の evidence_errors へマージして伝播させる。両関数の evidence_errors の reason フィールドが固定文字列(例: missing_pair_e2e-core)のままにならないようにする
  • .github/workflows/ci.yml の built-in insufficient-evidence fixture(Allowed Paths 外、変更不可)については、本 Issue の変更後は run_attempt 欠落による除外が新たな真の除外理由になり、サンプル数が 3 から 0 に変わることを許容する。回帰テストは「gate_status が insufficient_evidence のまま維持されること」と「除外理由に run_attempt 起因(legacy_unverified_run_attempt 相当)が含まれること」を検証する(「sample-count のみが理由」という主張はしない)

Out of Scope

Acceptance Criteria

  • AC1: _normalize_run_attempt() の型変換ロジック(explicit int 1 / producer-shaped string "1" を trusted 候補として受理し、bool/null/0/negative/non-numeric を拒否する)が変更後も保持されている
  • AC2: _select_initial_attempt_baselines() が (selected, evidence_errors) のタプルを返し、run_attempt キーが欠落している baseline は selected に含まれず、legacy_unverified_run_attempt 相当の理由で evidence_errors に記録される
  • AC3: _detect_run_attempt_identity_collisions() の既存契約(missing record と explicit run_attempt: 1 record が同一 workflow_run_id/job で内容不一致なら collision として扱う)が、trust 判定の分離後も保持されている
  • AC4: core/responsive の双方が missing run_attempt で除外された場合でも、その workflow_run_id が _pair_by_workflow_run_id() の evidence_errors に残る(all_ids が selected map の key ではなく raw input の workflow_run_id 集合から構築される)
  • AC5: _cli_run_details_from_pairs() が _normalize_run_attempt(core) or 1 フォールバックを持たず、missing/invalid な attempt から run_attempt: 1 を合成しない
  • AC6: _gate_ready_post_filter_sample_count() が _select_initial_attempt_baselines() による attempt selection / workflow_run_id dedupe を適用し、missing attempt・重複 workflow_run_id・attempt 2 以降のみのレコードが sample floor を水増しできない
  • AC7: .github/workflows/ci.yml の built-in insufficient-evidence fixture(3 サンプル、run_attempt キーなし)が、本変更後も gate_status: insufficient_evidence を維持する。除外理由が sample-count 不足から run_attempt 起因(legacy_unverified_run_attempt 相当)へ変わることは許容され、そのことを示す回帰テストが追加され PASS する
  • AC8: _normalize_run_attempt() と _select_initial_attempt_baselines() の docstring から、これから変更する旧挙動を前提とした記述(「A missing key defaults to 1 and is treated as a TRUSTED attempt-1 candidate」「THIS gate module intentionally still defaults a」)が削除・是正されている
  • AC9: _select_initial_attempt_baselines() の missing-key 除外理由が _pair_by_workflow_run_id() の evidence_errors にマージされ、reason に legacy_unverified_run_attempt(またはそれに相当する識別可能な文字列)が含まれる
  • AC10: docs/dev/e2e-performance-benchmark.md の「まだ完全には反映していない」という既知制限の記述が、統一後の正しい挙動を反映するよう更新されている
  • AC11: tests/ci/ 配下の全 test_ci_performance_gate*.py(test_ci_performance_gate_clock_alignment.py を含む、実際の call graph 調査で無関係と判明したファイルは無変更で良い)が変更後も PASS する。Ruff(uv run --locked ruff check)も成功することを実装者が確認する(VC preflight の実行可能コマンド allowlist に ruff が含まれないため、本 AC の Ruff 部分は本 Issue の Verification Commands では機械実行しない。pr-reviewer / CI の標準 lint gate で別途確認される)

Verification Commands

AC1: producer-shaped string "1" 受理ロジックが保持されていることの確認(変更しない既存コードなので baseline から PASS が期待される)。

# AC1
# baseline-expect: pass
$ rg -qF "value.isdigit()" tests/ci/test_ci_performance_gate.py

AC1: bool 拒否ロジックが保持されていることの確認(変更しない既存コードなので baseline から PASS が期待される)。

# AC1
# baseline-expect: pass
$ rg -qF "isinstance(value, bool)" tests/ci/test_ci_performance_gate.py

AC2: missing-key trust rejection の新規回帰テスト(新規 Allowed Path ファイルのため baseline では FAIL が期待される)。

# AC2
# baseline-expect: fail
$ pytest tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_missing_run_attempt_is_excluded_with_legacy_unverified_reason -v

AC3: 既存の collision grouping 契約が責務分離後も保持されていることの確認(既存テスト)。

# AC3
# baseline-expect: pass
$ pytest tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_missing_attempt_baseline_colliding_with_explicit_attempt_1_baseline_is_unaffected_by_grouping -v

AC4: core/responsive 双方 missing でも workflow_run_id が evidence_errors から消えないことの新規回帰テスト(新規 Allowed Path ファイルのため baseline では FAIL が期待される)。

# AC4
# baseline-expect: fail
$ pytest tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_both_lanes_missing_run_attempt_do_not_disappear_from_evidence_errors -v

AC5: or-1 フォールバックが現行コードから削除されていることの静的確認(negative assertion。現時点ではパターンが存在するため FAIL するのが期待される baseline 挙動)。

# AC5
$ ! rg -qF "_normalize_run_attempt(core) or 1" tests/ci/test_ci_performance_gate.py

AC5: cli_run_details が missing/invalid から attempt 1 を合成しないことの新規回帰テスト(新規 Allowed Path ファイルのため baseline では FAIL が期待される)。

# AC5
# baseline-expect: fail
$ pytest tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_cli_run_details_never_synthesizes_missing_attempt_1 -v

AC6: gate-ready lane の sample floor 水増し防止の新規回帰テスト(新規 Allowed Path ファイルのため baseline では FAIL が期待される)。

# AC6
# baseline-expect: fail
$ pytest tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_gate_ready_missing_run_attempt_fails_closed tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_gate_ready_duplicate_workflow_run_ids_do_not_inflate_sample_floor tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_gate_ready_attempt_2_never_substitutes_for_missing_attempt_1 tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_gate_ready_unique_explicit_attempt_1_records_meet_sample_floor -v

AC7: built-in insufficient-evidence fixture の失敗理由維持を示す新規回帰テスト(新規 Allowed Path ファイルのため baseline では FAIL が期待される)。

# AC7
# baseline-expect: fail
$ pytest tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_builtin_insufficient_evidence_fixture_remains_insufficient_evidence -v

AC8: 旧挙動 docstring 記述1件目の削除確認(negative assertion。現時点ではパターンが存在するため FAIL するのが期待される baseline 挙動)。

# AC8
$ ! rg -qF "A missing key defaults to 1 and is treated as a TRUSTED attempt-1 candidate" tests/ci/test_ci_performance_gate.py

AC8: 旧挙動 docstring 記述2件目の削除確認(negative assertion。現時点ではパターンが存在するため FAIL するのが期待される baseline 挙動)。

# AC8
$ ! rg -qF "THIS gate module intentionally still defaults a" tests/ci/test_ci_performance_gate.py

AC9: _select_initial_attempt_baselines() の除外理由が evidence_errors の reason に legacy_unverified_run_attempt 相当として伝播することの新規回帰テスト(新規 Allowed Path ファイルのため baseline では FAIL が期待される)。

# AC9
# baseline-expect: fail
$ pytest tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py::test_evidence_errors_carry_legacy_unverified_run_attempt_reason -v

AC10: docs 既知制限記述の是正確認(negative assertion。現時点では旧記述が存在するため FAIL するのが期待される baseline 挙動)。

# AC10
$ ! rg -qF "まだ完全には反映していない" docs/dev/e2e-performance-benchmark.md

AC11: 全体回帰。

# AC11
# baseline-expect: pass
$ pytest tests/ci/ -k test_ci_performance_gate -q

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
  • 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

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合(例: scripts/ci/collect_e2e_performance_benchmark.py 側の再変更が必要と判明した場合)
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

なし

Required Design References

Scope Delta(任意)

N/A

Notes for Reviewer

Activity

  1. squne121 commented on Aug 15, 2026

    @squne121
    OwnerAuthor

    create-issue transaction partial-failure

    Issue: #2187
    Failure stage: dedupe-race-detection
    Message: dedupe-search failed

    Requested:

    • labels: phase/implementation, triage-required, agent/implementer
    • parent: (none)
    • blocked-by (dependencies): (none)
    • blocking: (none)
      Completed steps: create

    Failure context: command=gh issue list --repo squne121/loop-protocol --state open --search in:title "実装: e2e performance gate 側の _normalize_run_attempt を missing run_attempt 除外ポリシーに統一する" --limit 200 --json number,title,url
    output=Post "https://api.github.com/graphql": dial tcp 20.27.177.116:443: connect: network is unreachable
    matching_issue_numbers=[]
    issue_number=2187

    Recovery hint: dedupe-race-detection — automatic recovery is not possible.
    Manual action required: inspect open issues with the same title and decide which to close.
    gh issue list --repo squne121/loop-protocol --state open --search '<title>'
    idempotent re-run: no (requires manual deduplication first)

    Please recover deterministically before re-running the create issue transaction.

  2. added
    phase/implementation
    triage-required
    agent/implementer
    on Aug 15, 2026
  3. squne121 commented on Aug 17, 2026

    @squne121
    OwnerAuthor

    結論

    verdict: REQUEST_CHANGES
    reviewed_main_sha: "2b20de74683cc01d0a7e466f63268fb880f4280a"
    issue_contract_ready: false
    recommended_disposition: reframe_in_place
    blocking_findings:
      P0: 7
      P1: 3

    Issue #2187 の問題設定自体は正しいです。collector は missing run_attempt を legacy_unverified_run_attempt として trusted cohort から除外する一方、gate は現在も missing を attempt 1 に昇格しています。しかし、Issue の AC・Verification Commands・Allowed Paths のまま実装すると、テストを通しながら provenance laundering、silent evidence loss、sample-count inflation を残せます。Issue は OPEN で、GitHub 検索上は #2187 を実装して閉じる PR はまだ確認できず、#2182 が follow-up として参照している状態です。

    GitHub Actions では GITHUB_RUN_ID は rerun 後も不変、GITHUB_RUN_ATTEMPT は 1 から開始して rerun ごとに増加します。したがって missing attempt を推測で 1 に変換する必要はありません。また、JSON Schema で field を optional のまま読み取れることと、trusted consumer が missing を拒否することは両立します。JSON Schema の default も validation 時に欠落値を注入しません。方向性としては「schema parse compatibility と trust eligibility の分離」が正解です。 (GitHub Docs)


    P0 ブロッカー

    P0-1: AC1・AC3・AC7 の Verification Commands が判定を逆転させる

    Issue の AC1、AC3、AC7 は、削除されるべき文字列を単に rg -c で検索しています。ripgrep は match があれば exit 0、match がなければ exit 1 です。つまり現行の不正なコードでは PASS し、正しく修正すると FAIL します。Issue の機械検証契約として致命的です。 (GitHub)

    現行 VC の意味は次のように反転しています。

    状態 | rg -c "禁止文字列" -- | -- 不正な実装が残存 | exit 0=PASS 正しく削除済み | exit 1=FAIL

    Issue に次の preservation AC が必要です。

    explicit integer 1 と producer-shaped string "1" は引き続き受理される。
    bool、null、0、負値、非数値文字列は拒否される。

    これを追加しないと、collector 実装のコピーによって全実 CI baseline が trusted cohort から消える可能性があります。


    P0-7: Allowed Paths と repository asset inventory が不足・矛盾している

    最も重大な欠落は tests/ci/test_ci_performance_gate_rerun_attempt_selection.py です。このファイルが gate-side rerun policy の canonical regression suite であり、missing-vs-explicit-attempt-1 collision test と _cli_run_details_from_pairs() の test を既に所有しています。しかし Issue の Allowed Paths にありません。

    さらに以下の不整合があります。

    • Issue は「同ディレクトリ内の新規ファイル」への test 追加を許容するよう記述していますが、Allowed Paths は個別ファイル列挙であり、新規ファイルを許可していません。

    • docs/dev/e2e-performance-benchmark.md は Required Design Reference ですが、Allowed Paths にありません。現在の文書には「gate はまだ missing を attempt 1 とする」という既知制限が明記されており、実装後は必ず stale になります。

    • Notes は主に paired-critical-path と evidence-hard-failure の二ファイルが影響するとしていますが、comparability、fingerprint、post-filter fixtures も missing run_attempt の baseline を selector/pairing 経路へ渡しています。

    • .github/workflows/ci.yml の built-in insufficient-evidence fixture も、修正後に「3件なので不足」ではなく「missing attempt なので untrusted」という別理由で失敗する可能性があります。workflow を変更しない場合でも、意図した sample-floor failure reason を維持するテストが必要です。

    推奨 Allowed Paths は次です。

    tests/ci/test_ci_performance_gate.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

    .github/workflows/ci.yml は次のいずれかを Issue 内で明示的に選ぶべきです。

    1. narrow scope で Allowed Paths に追加し、built-in fixture に producer-shaped "run_attempt": "1" を加える。

    2. Out of Scope を維持する代わりに、built-in fixture が引き続き「sample count不足」を主理由として fail-close することを別の regression test で保証する。

    test_ci_performance_gate_clock_alignment.py は現在 run-attempt selector を直接経由していないため、実際の call graph 調査で不要なら Allowed Paths から外してよいです。


    P1 指摘

    P1-1: pytest -k missing_run_attempt は AC の正確な証明にならない

    pytest の -k は、function name だけでなく filename・class name などを含む case-insensitive substring expression です。正確な regression test の存在・実行を保証するには node ID を固定すべきです。また、対象 test が存在しなければ pytest は exit 5 です。 (pytest)

    推奨:

    uv run --locked pytest \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_missing_run_attempt_is_excluded_with_legacy_unverified_reason \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_both_lanes_missing_run_attempt_do_not_disappear_from_evidence_errors \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_missing_and_explicit_attempt_1_still_collide \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_cli_run_details_never_synthesizes_missing_attempt_1 \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_producer_string_attempt_1_remains_eligible \
      -q

    P1-2: Runtime Verification Applicability がない

    対象コードは単なる test helper ではなく、.github/workflows/ci.yml から CLI として実行される production-callable evidence gate です。

    一方、現行 producer は常に run_attempt を出力するため、missing-key poison branch は live workflow を通常実行しても再現しません。したがって推奨契約は次です。

    runtime_verification_applicability:
      decision: not_applicable
      reason: >
        workflow/schema producer の変更ではなく、現行 producer が生成しない
        missing-key poison input に対する consumer-side trust rejection である。
      required_behavioral_evidence:
        - production CLI subprocess with poisoned operator-supplied fixture
        - producer-shaped string "1" positive fixture
        - optional schema parse success and trusted rejection coexistence

    .github/workflows/ci.yml を実際に変更する場合は、少なくとも workflow syntax/static verification を追加し、上記 decision を再評価すべきです。


    P1-3: 関連 Issue の実装順を契約化すべき

    Issue #2180 は現在 OPEN で、test_ci_performance_gate.py、paired-critical-path test、設計文書を同時に編集対象とします。機能的には独立ですが、同一ファイルへの並行変更になります。先着 PR 優先、後着側 rebase を Notes だけでなく Delivery Rule に明記すべきです。

    Issue #2184 は head_sha の別 trust-boundary 問題であり、現状どおり #2187 から分離する判断は妥当です。

    また、#2187 の create transaction は dedupe-race-detection で partial failure を記録していますが、現在の exact-title search では該当 Issue は #2187 の一件だけです。この operational comment は non-blocking として「manual dedupe recovered」と整理できます。


    推奨する Acceptance Criteria 再定義

    以下まで拡張すれば、Issue の目的を実際に証明できます。

    1. AC1 — classification
      missing / invalid / ok を区別する gate-side classifier が存在する。

    2. AC2 — producer compatibility
      integer 1 と producer-shaped string "1" を trusted attempt 1 として受理し、bool/null/0/negative/nonnumeric を拒否する。

    3. AC3 — missing rejection with diagnostics
      missing record は trusted cohort から除外され、legacy_unverified_run_attempt が structured evidence error に残る。

    4. AC4 — no silent disappearance
      core/responsive の双方が missing の場合も、その workflow_run_id と除外理由が evidence errors に残る。

    5. AC5 — collision preservation
      missing record と explicit attempt 1 record が同一 identity slot で内容不一致なら、従来どおり collision として sample 全体を除外する。

    6. AC6 — no provenance synthesis
      _cli_run_details_from_pairs() その他の出力経路が missing record から run_attempt: 1 または policy 名を合成しない。

    7. AC7 — provider lane
      provider pairing の片側・両側 missing、attempt 2 only、collision がすべて fail-closed かつ diagnostic-preserving である。

    8. AC8 — gate-ready lane
      gate-ready cohort にも initial-attempt selection と workflow_run_id dedupe を適用し、missing/duplicate/later-attempt で sample floor を水増しできない。

    9. AC9 — parse/trust separation
      optional schema parsing の成功と trusted-cohort rejection が同時に成立する regression test がある。

    10. AC10 — documentation and full regression
      既知制限の文書を現行仕様へ更新し、全 gate tests と Ruff が成功する。


    推奨 Verification Commands

    uv run --locked pytest \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py \
      tests/ci/test_ci_performance_gate_evidence_hard_failure.py \
      -q
    uv run --locked pytest \
      tests/ci/test_ci_performance_gate.py \
      tests/ci/test_ci_performance_gate_*.py \
      -q
    uv run --locked ruff check \
      tests/ci/test_ci_performance_gate.py \
      tests/ci/test_ci_performance_gate_*.py
    uv run --locked python3 - <<'PY'
    from pathlib import Path
    

    source = Path("tests/ci/test_ci_performance_gate.py").read_text(encoding="utf-8")

    for forbidden in (
    'if "run_attempt" not in baseline:\n return 1',
    '"run_attempt": _normalize_run_attempt(core) or 1',
    "gate module intentionally still defaults a MISSING",
    ):
    assert forbidden not in source, forbidden
    PY

    workflow fixture を変更する場合のみ追加:

    uv run --locked python3 -c 
    'import yaml; yaml.safe_load(open(".github/workflows/ci.yml")); print("workflow_yaml_ok")'

    最終 disposition

    reframe_in_place が妥当です。

    新規 Issue への分割は不要です。#2187 の中心目的は維持しつつ、実装開始前に以下を Issue 本文へ反映すべきです。

    • Verification Commands の反転修正

    • classifier と collision grouping の責務分離

    • structured exclusion diagnostics

    • _cli_run_details_from_pairs() の or 1 削除

    • gate-ready lane への attempt selection/dedupe 適用

    • producer-shaped string "1" の preservation AC

    • canonical rerun test file・設計文書を含む Allowed Paths 拡張

    • exact node ID による behavioral verification

    • Runtime Verification Applicability の明示

    #2155 はこの gate を用いて実 CI データから上位 Issue を close する downstream verification です。したがって #2187 を単なる fixture cleanup として処理せず、close-decision evidence の trust-boundary correction として扱う必要があります。

    ## 結論
    verdict: REQUEST_CHANGES
    reviewed_main_sha: "2b20de74683cc01d0a7e466f63268fb880f4280a"
    issue_contract_ready: false
    recommended_disposition: reframe_in_place
    blocking_findings:
      P0: 7
      P1: 3

    Issue #2187 の問題設定自体は正しいです。collector は missing run_attempt を legacy_unverified_run_attempt として trusted cohort から除外する一方、gate は現在も missing を attempt 1 に昇格しています。しかし、Issue の AC・Verification Commands・Allowed Paths のまま実装すると、テストを通しながら provenance laundering、silent evidence loss、sample-count inflation を残せます。Issue は OPEN で、GitHub 検索上は #2187 を実装して閉じる PR はまだ確認できず、#2182 が follow-up として参照している状態です。

    GitHub Actions では GITHUB_RUN_ID は rerun 後も不変、GITHUB_RUN_ATTEMPT は 1 から開始して rerun ごとに増加します。したがって missing attempt を推測で 1 に変換する必要はありません。また、JSON Schema で field を optional のまま読み取れることと、trusted consumer が missing を拒否することは両立します。JSON Schema の default も validation 時に欠落値を注入しません。方向性としては「schema parse compatibility と trust eligibility の分離」が正解です。 ([GitHub Docs]1)


    P0 ブロッカー

    P0-1: AC1・AC3・AC7 の Verification Commands が判定を逆転させる

    Issue の AC1、AC3、AC7 は、削除されるべき文字列を単に rg -c で検索しています。ripgrep は match があれば exit 0、match がなければ exit 1 です。つまり現行の不正なコードでは PASS し、正しく修正すると FAIL します。Issue の機械検証契約として致命的です。 ([GitHub]2)

    現行 VC の意味は次のように反転しています。

    状態 rg -c "禁止文字列"
    不正な実装が残存 exit 0=PASS
    正しく削除済み exit 1=FAIL

    禁止文字列の検証は、少なくとも明示的な negative assertion に置き換える必要があります。

    uv run --locked python3 - <<'PY'
    from pathlib import Path
    
    source = Path("tests/ci/test_ci_performance_gate.py").read_text(encoding="utf-8")
    
    for forbidden in (
        'if "run_attempt" not in baseline:\n        return 1',
        "baselines collected before this field existed",
        "gate module intentionally still defaults a MISSING",
        '"run_attempt": _normalize_run_attempt(core) or 1',
    ):
        assert forbidden not in source, f"forbidden legacy behavior remains: {forbidden}"
    PY

    ただし、静的 grep だけで AC を満たすべきではありません。後述する behavioral regression tests を authoritative verification にし、grep は補助確認へ格下げすべきです。


    P0-2: missing の trust rejection と collision grouping が同じ関数に結合されている

    現在の _normalize_run_attempt() は missing を 1 にし、その同じ戻り値を _detect_run_attempt_identity_collisions() と _select_initial_attempt_baselines() が共有しています。単純に missing を None へ変更すると、trust eligibility は改善しますが、collision detector から missing record も消えます。

    既存の専用 regression test は、次のケースを collision とする契約を明示しています。

    • record A: missing run_attempt
    • record B: explicit run_attempt: 1
    • 同一 workflow_run_id / job
    • 内容が不一致

    これは collector 側と同じく、missing をtrusted sample としては拒否するが、衝突検出上だけ attempt 1 slot に置くという意味です。設計文書もこの特殊な collision grouping を明記しています。

    必要なのは一行修正ではなく、最低でも次の責務分離です。

    def _classify_gate_run_attempt(
        baseline: dict,
    ) -> tuple[int | None, str]:
        """
        Returns:
          (value, "ok")
          (None, "missing")
          (None, "invalid")
        """
        ...
    
    def _effective_attempt_for_collision_grouping(
        baseline: dict,
    ) -> int | None:
        value, status = _classify_gate_run_attempt(baseline)
        if status == "ok":
            return value
        if status == "missing":
            return 1
        return None

    使い分けは以下で固定すべきです。

    • trusted selection: status == "ok" and value == 1 のみ
    • collision grouping: missing は attempt 1 slot
    • malformed value: trusted selection にも collision grouping にも入れない

    既存の test_missing_attempt_baseline_colliding_with_explicit_attempt_1_baseline_is_unaffected_by_grouping は名称を変更してもよいですが、その挙動自体は保持しなければなりません。


    P0-3: missing record が evidence error を残さず消える

    現行 _select_initial_attempt_baselines() は selected dictionary だけを返します。_pair_by_workflow_run_id() は、その selected dictionary の key の union を all_ids にしています。したがって、両 lane の同じ workflow_run_id がともに missing run_attempt で除外された場合、raw input に存在した ID 自体が all_ids から消え、evidence_errors に何も残りません。これはコードから直接導ける silent evidence loss です。

    起点となった OWNER review は、missing record について次の性質を明示的に要求しています。

    • schema parsing は許容
    • trusted cohort からは除外
    • legacy_unverified_run_attempt を記録
    • verified attempt 1 として再出力しない

    現行 Issue の AC2 は「selected cohort に入らない」ことしか要求しておらず、専用 reason の保存を要求していません。これでは record の欠落と trust rejection を区別できません。

    推奨する API は次のどちらかです。

    selected, evidence_errors = _select_initial_attempt_baselines(baselines)

    または、

    @dataclass(frozen=True)
    class AttemptSelectionResult:
        selected: dict[object, dict]
        evidence_errors: list[dict]

    さらに _pair_by_workflow_run_id() は selected map の key ではなく、raw input の workflow_run_id 集合を authority にする必要があります。

    必要な negative tests は最低でも次の二つです。

    test_missing_run_attempt_is_excluded_with_legacy_unverified_reason
    test_both_lanes_missing_run_attempt_do_not_disappear_from_evidence_errors
    

    production gate の返却 JSON にも、文字列化された reason だけでなく、少なくとも次を保存すべきです。

    {
      "before_evidence_errors": [],
      "after_evidence_errors": []
    }

    P0-4: assessment serialization に第二の or 1 fail-open が残っている

    _cli_run_details_from_pairs() は現在、次の fallback を持っています。

    "run_attempt": _normalize_run_attempt(core) or 1

    このため _normalize_run_attempt() を missing→None に修正しても、何らかの経路で missing record が pair に到達すると、assessment 出力時に再び verified attempt 1 へ昇格します。Issue の AC はこの call site を対象にしていません。

    必須修正は以下です。

    1. or 1 を削除する。
    2. core と responsive の normalized attempt が両方 explicit 1 であることを検証する。
    3. 不一致・missing・invalid は assertion ではなく、production gate の structured evidence error として fail-closed にする。
    4. missing inputから run_attempt: 1 または rerun_attempt_selection_policy が生成されないことをテストする。

    推奨テスト名:

    test_cli_run_details_never_synthesizes_missing_attempt_1
    test_cli_run_details_rejects_cross_lane_attempt_disagreement
    

    P0-5: gate-ready lane が rerun-attempt policy を完全に迂回している

    run_evidence_gate() の provider lane は _pair_by_workflow_run_id() を経由しますが、gate_ready_baselines は _gate_ready_post_filter_sample_count() へ直接渡されます。この関数は timestamp が揃った record 数を数えるだけで、run-attempt selection も workflow_run_id dedupe も行いません。

    その結果、operator supplied fixture において次が可能です。

    • missing run_attempt の gate-ready records が sample floor に算入される
    • 同じ workflow_run_id を 20 回複製して sample count 20 にできる
    • attempt 2 以降を別サンプルとして混入できる

    さらに production-callable gate の sufficient-evidence positive fixtures は、provider baselines と gate-ready baselines の双方で run_attempt を持たないまま gate_status: complete を期待しています。fixture を更新しなければ、実装者はテストを通すために別の fail-open を導入する誘因を持ちます。

    _gate_ready_post_filter_sample_count() は、最低でも次の契約へ変える必要があります。

    def _gate_ready_post_filter_sample_count(
        baselines: list[dict],
    ) -> tuple[int, list[dict]]:
        selected, evidence_errors = _select_initial_attempt_baselines(baselines)
        latencies = _gate_ready_latency_seconds(list(selected.values()))
        return len(latencies), evidence_errors

    必須 regression tests:

    test_gate_ready_missing_run_attempt_fails_closed
    test_gate_ready_duplicate_workflow_run_ids_do_not_inflate_sample_floor
    test_gate_ready_attempt_2_never_substitutes_for_missing_attempt_1
    test_gate_ready_unique_explicit_attempt_1_records_meet_sample_floor
    

    Issue #2187 の Outcome が「gate 側の missing exclusion policy 統一」である以上、provider lane だけ直し、gate-ready lane を残す実装は不合格です。


    P0-6: gate と collector の型ポリシーを機械的に同一化すると実 producer を拒否する

    collector の _classify_run_attempt() は構造化 JSON の integer を受け取り、文字列型を invalid とします。一方 gate の実 producer shape は、workflow の環境変数を os.environ["GH_RUN_ATTEMPT"] から JSON に書くため "1" という文字列です。現行 gate はこの数値文字列を意図的に受理し、PR #2182 の再レビューでも collector との差異は intentional/non-blocking と確認されています。

    したがって「collector と同じポリシーに統一」は、次の意味に限定しなければなりません。

    • 同一化するもの: missing / invalid / trusted の trust-state semantics
    • 同一化しないもの: producer representation の parser

    gate 側の推奨 decision table:

    gate input parse trusted attempt-1 candidate collision slot
    key absent readable no 1
    integer 1 valid yes 1
    canonical string "1" valid yes 1
    explicit attempt 2+ valid no actual attempt
    null / bool / 0 / negative / nonnumeric invalid no none

    Issue に次の preservation AC が必要です。

    explicit integer 1 と producer-shaped string "1" は引き続き受理される。
    bool、null、0、負値、非数値文字列は拒否される。
    

    これを追加しないと、collector 実装のコピーによって全実 CI baseline が trusted cohort から消える可能性があります。


    P0-7: Allowed Paths と repository asset inventory が不足・矛盾している

    最も重大な欠落は tests/ci/test_ci_performance_gate_rerun_attempt_selection.py です。このファイルが gate-side rerun policy の canonical regression suite であり、missing-vs-explicit-attempt-1 collision test と _cli_run_details_from_pairs() の test を既に所有しています。しかし Issue の Allowed Paths にありません。

    さらに以下の不整合があります。

    • Issue は「同ディレクトリ内の新規ファイル」への test 追加を許容するよう記述していますが、Allowed Paths は個別ファイル列挙であり、新規ファイルを許可していません。
    • docs/dev/e2e-performance-benchmark.md は Required Design Reference ですが、Allowed Paths にありません。現在の文書には「gate はまだ missing を attempt 1 とする」という既知制限が明記されており、実装後は必ず stale になります。
    • Notes は主に paired-critical-path と evidence-hard-failure の二ファイルが影響するとしていますが、comparability、fingerprint、post-filter fixtures も missing run_attempt の baseline を selector/pairing 経路へ渡しています。
    • .github/workflows/ci.yml の built-in insufficient-evidence fixture も、修正後に「3件なので不足」ではなく「missing attempt なので untrusted」という別理由で失敗する可能性があります。workflow を変更しない場合でも、意図した sample-floor failure reason を維持するテストが必要です。

    推奨 Allowed Paths は次です。

    tests/ci/test_ci_performance_gate.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
    

    .github/workflows/ci.yml は次のいずれかを Issue 内で明示的に選ぶべきです。

    1. narrow scope で Allowed Paths に追加し、built-in fixture に producer-shaped "run_attempt": "1" を加える。
    2. Out of Scope を維持する代わりに、built-in fixture が引き続き「sample count不足」を主理由として fail-close することを別の regression test で保証する。

    test_ci_performance_gate_clock_alignment.py は現在 run-attempt selector を直接経由していないため、実際の call graph 調査で不要なら Allowed Paths から外してよいです。


    P1 指摘

    P1-1: [pytest](https://docs.pytest.org/en/stable/how-to/usage.html) -k missing_run_attempt は AC の正確な証明にならない

    pytest の -k は、function name だけでなく filename・class name などを含む case-insensitive substring expression です。正確な regression test の存在・実行を保証するには node ID を固定すべきです。また、対象 test が存在しなければ pytest は exit 5 です。 (pytest)

    推奨:

    uv run --locked pytest \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_missing_run_attempt_is_excluded_with_legacy_unverified_reason \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_both_lanes_missing_run_attempt_do_not_disappear_from_evidence_errors \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_missing_and_explicit_attempt_1_still_collide \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_cli_run_details_never_synthesizes_missing_attempt_1 \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py::test_producer_string_attempt_1_remains_eligible \
      -q

    P1-2: Runtime Verification Applicability がない

    対象コードは単なる test helper ではなく、.github/workflows/ci.yml から CLI として実行される production-callable evidence gate です。

    一方、現行 producer は常に run_attempt を出力するため、missing-key poison branch は live workflow を通常実行しても再現しません。したがって推奨契約は次です。

    runtime_verification_applicability:
      decision: not_applicable
      reason: >
        workflow/schema producer の変更ではなく、現行 producer が生成しない
        missing-key poison input に対する consumer-side trust rejection である。
      required_behavioral_evidence:
        - production CLI subprocess with poisoned operator-supplied fixture
        - producer-shaped string "1" positive fixture
        - optional schema parse success and trusted rejection coexistence

    .github/workflows/ci.yml を実際に変更する場合は、少なくとも workflow syntax/static verification を追加し、上記 decision を再評価すべきです。


    P1-3: 関連 Issue の実装順を契約化すべき

    Issue #2180 は現在 OPEN で、test_ci_performance_gate.py、paired-critical-path test、設計文書を同時に編集対象とします。機能的には独立ですが、同一ファイルへの並行変更になります。先着 PR 優先、後着側 rebase を Notes だけでなく Delivery Rule に明記すべきです。

    Issue #2184 は head_sha の別 trust-boundary 問題であり、現状どおり #2187 から分離する判断は妥当です。

    また、#2187 の create transaction は dedupe-race-detection で partial failure を記録していますが、現在の exact-title search では該当 Issue は #2187 の一件だけです。この operational comment は non-blocking として「manual dedupe recovered」と整理できます。


    推奨する Acceptance Criteria 再定義

    以下まで拡張すれば、Issue の目的を実際に証明できます。

    1. AC1 — classification
      missing / invalid / ok を区別する gate-side classifier が存在する。

    2. AC2 — producer compatibility
      integer 1 と producer-shaped string "1" を trusted attempt 1 として受理し、bool/null/0/negative/nonnumeric を拒否する。

    3. AC3 — missing rejection with diagnostics
      missing record は trusted cohort から除外され、legacy_unverified_run_attempt が structured evidence error に残る。

    4. AC4 — no silent disappearance
      core/responsive の双方が missing の場合も、その workflow_run_id と除外理由が evidence errors に残る。

    5. AC5 — collision preservation
      missing record と explicit attempt 1 record が同一 identity slot で内容不一致なら、従来どおり collision として sample 全体を除外する。

    6. AC6 — no provenance synthesis
      _cli_run_details_from_pairs() その他の出力経路が missing record から run_attempt: 1 または policy 名を合成しない。

    7. AC7 — provider lane
      provider pairing の片側・両側 missing、attempt 2 only、collision がすべて fail-closed かつ diagnostic-preserving である。

    8. AC8 — gate-ready lane
      gate-ready cohort にも initial-attempt selection と workflow_run_id dedupe を適用し、missing/duplicate/later-attempt で sample floor を水増しできない。

    9. AC9 — parse/trust separation
      optional schema parsing の成功と trusted-cohort rejection が同時に成立する regression test がある。

    10. AC10 — documentation and full regression
      既知制限の文書を現行仕様へ更新し、全 gate tests と Ruff が成功する。


    推奨 Verification Commands

    uv run --locked pytest \
      tests/ci/test_ci_performance_gate_rerun_attempt_selection.py \
      tests/ci/test_ci_performance_gate_evidence_hard_failure.py \
      -q
    uv run --locked pytest \
      tests/ci/test_ci_performance_gate.py \
      tests/ci/test_ci_performance_gate_*.py \
      -q
    uv run --locked ruff check \
      tests/ci/test_ci_performance_gate.py \
      tests/ci/test_ci_performance_gate_*.py
    uv run --locked python3 - <<'PY'
    from pathlib import Path
    
    source = Path("tests/ci/test_ci_performance_gate.py").read_text(encoding="utf-8")
    
    for forbidden in (
        'if "run_attempt" not in baseline:\n        return 1',
        '"run_attempt": _normalize_run_attempt(core) or 1',
        "gate module intentionally still defaults a MISSING",
    ):
        assert forbidden not in source, forbidden
    PY

    workflow fixture を変更する場合のみ追加:

    uv run --locked python3 -c \
    'import yaml; yaml.safe_load(open(".github/workflows/ci.yml")); print("workflow_yaml_ok")'

    最終 disposition

    reframe_in_place が妥当です。

    新規 Issue への分割は不要です。#2187 の中心目的は維持しつつ、実装開始前に以下を Issue 本文へ反映すべきです。

    • Verification Commands の反転修正
    • classifier と collision grouping の責務分離
    • structured exclusion diagnostics
    • _cli_run_details_from_pairs() の or 1 削除
    • gate-ready lane への attempt selection/dedupe 適用
    • producer-shaped string "1" の preservation AC
    • canonical rerun test file・設計文書を含む Allowed Paths 拡張
    • exact node ID による behavioral verification
    • Runtime Verification Applicability の明示

    #2155 はこの gate を用いて実 CI データから上位 Issue を close する downstream verification です。したがって #2187 を単なる fixture cleanup として処理せず、close-decision evidence の trust-boundary correction として扱う必要があります。

  4. squne121 commented on Aug 28, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  5. self-assigned this
    on Aug 28, 2026
  6. squne121 commented on Aug 28, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-08-29)

    • PR: fix: e2e performance gate 側の _normalize_run_attempt を missing run_attempt 除外ポリシーに統一する #2383
    • Worktree: .claude/worktrees/issue-2187-run-attempt-trust-boundary
    • Branch: worktree-issue-2187-run-attempt-trust-boundary
    • head SHA: 26a1a396335e1ecd0b9de48fd02b575172cb73bc
    • Verification: 全 Verification Commands(AC1〜AC11)を実行し意図通りの結果を確認
      • pytest tests/ci/ -k test_ci_performance_gate -q → 52 passed, 3 skipped(既存の Runtime Verification Applicability SKIP)
      • ruff check tests/ci/test_ci_performance_gate*.py → All checks passed
      • AC2/AC4/AC5/AC6(4パターン)/AC7/AC9 の新規回帰テスト(tests/ci/test_ci_performance_gate_rerun_attempt_trust_boundary.py)は追加前 collect error(baseline-expect: fail 相当)→ 追加後 PASS
      • AC1/AC3/AC11 は baseline-expect: pass のまま PASS を維持
      • AC5/AC8/AC10 の negative assertion(rg)はいずれも意図通り是正済みを確認
    • 後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup
  7. squne121 commented on Aug 28, 2026

    @squne121
    OwnerAuthor

    fix_delta 完了報告(OWNER REQUEST_CHANGES on PR #2383, issuecomment-5458167419)

    PR #2383 の head を 8f4d4a29a38be5ad0706698ea5e32cd0d3c4f3f5 に更新しました。詳細は PR コメント(https://github.com/squne121/loop-protocol/pull/2383#issuecomment-5458288317)を参照してください。

    サマリ:

    • P1-1: run_evidence_gate() production path で _gate_ready_post_filter_sample_count() の evidence_errors が捨てられていた問題を修正し、gate_ready_evidence_errors として production result に構造化して残すようにしました。
    • P1-2: _select_initial_attempt_baselines() の missing/invalid/attempt2以降のみ/collision 分類が不完全だった点を _classify_run_attempt_trusted() classifier で補完し、silent exclusion を固定していた既存回帰テスト2件を反転しました。
    • P2-1: built-in smoke fixture の sample-floor 検証と missing-key 検証を分離する新規テストを追加(.github/workflows/ci.yml の実フィクスチャ自体は Out of Scope のため変更なし)。
    • P2-2: _dedupe_by_workflow_run_id() の evidence_errors 破棄経路が count-only exploratory path であることを docstring で明記。

    tests/ci/test_ci_performance_gate*.py 全PASS(67 passed, 7 skipped for tests/ci/ 全体)、Ruff PASS。Issue #2187 の AC1〜AC11 Verification Commands も再実行し全て PASS を確認済みです。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent/implementerphase/implementationtriage-required

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions