Skip to content

[Feature]: report pass@k / pass^k and flaky scenarios across repeated release-test runs #772

Open

Description

@CuSO41108

Summary

release_audit.py benchmark --run A B already accepts several run directories
and aggregates them per case, but it treats them as unrelated evidence:

  • different candidate builds are averaged together without a warning;
  • the only stability signal is pass_rate, so a scenario that passes 2 of 3
    times is reported as an average instead of as a 0% pass^k failure;
  • nothing distinguishes a deterministic pass from a scenario that intermittently
    fails and will therefore bite a release.

Please report pass@k, pass^k and an explicit flaky list when several runs of
the same build are supplied, and refuse to aggregate runs that do not share
one candidate.

Current behavior

aggregate_multi_run_benchmarks() (scripts/release_audit.py) collects
runs, passes and pass_rate per case, and summary.candidates lists every
candidate it saw. A two-run synthetic ledger reproduces it:

"candidates": ["aaaaaaa", "bbbbbbb"],
"summary": { "runs_count": 2, "full_pass_runs": 1, "mean_success_rate": 0.8334 },
"cases": [
  { "id": "ARENA-JOINT-FORMS", "runs": 2, "passes": 2, "pass_rate": 1.0 },
  { "id": "LIVE-V2EX",         "runs": 2, "passes": 1, "pass_rate": 0.5 },
  { "id": "PLAN-BATCH-FORM",   "runs": 2, "passes": 2, "pass_rate": 1.0 }
]

Two different candidates are averaged into one mean_success_rate, and the
intermittent LIVE-V2EX failure has no dedicated field.

Why it matters

gate requires every planned scenario to pass in a single authoritative round,
which is the right release bar. But when the same build is exercised more than
once, a single boolean per scenario cannot answer the question a release
actually asks: does this pass every time?

  • pass@k (at least one success in k trials) always improves with k and is the
    wrong headline for a release gate.
  • pass^k (all k trials succeed) is the release-relevant number: a scenario
    with 75% single-run success has only ~42% pass^3.
  • The flaky list is the entry point for the transcript review that currently
    has to be done by hand from commands/*/meta.json.

Reporting only pass_rate also hides a genuine integrity problem: nine clean
runs plus one unrelated build produce plausible-looking numbers that mean
nothing.

Proposal

Extend the existing multi-run path rather than adding a parallel command:

  1. Fail closed on mixed candidates. Require every supplied run to share
    candidate, entry_sha256, binary_sha256, and the plan.json digest.
    Otherwise error out and name the run that differs.
  2. Report stability per case. Add pass_at_k (passes > 0), pass_all_k
    (passes == runs), and flaky (0 < passes < runs) to cases, plus
    pass_at_k_overall, pass_all_k_overall and flaky_ids to summary.
    k is the number of runs supplied; treat fewer than two runs as a plain
    benchmark and do not emit stability fields.
  3. Render it. Add a stability table to
    render_multi_run_markdown(): case id, runs, passes, pass_rate,
    pass@k, pass^k, flaky marker.
  4. Leave gate alone. Trials are additional evidence. The release verdict
    keeps requiring every planned scenario to pass in the authoritative round,
    so this change cannot lower the bar.

Non-goals

  • The helper does not execute browser work; trials are still produced by the
    agent running fresh init rounds. Each run must be an independent round with
    its own fixtures, port and sessions, which is what makes the trial meaningful.
  • No change to result, results.json or the gate contract.
  • No probabilistic extrapolation: pass@k/pass^k here are empirical over the
    supplied runs, not estimates over unseen trials.

Scope

Roughly 80 lines in release_audit.py (aggregation, summary, markdown) plus
unit tests in test_release_audit.py using synthetic run directories. No
browser execution, no CLI schema change.

Open questions

  1. Should the same-build check be unconditional in benchmark --run ..., or
    opt-in via a flag so mixed-build comparisons still have an escape hatch?
  2. If a caller supplies trials, should gate gain an optional
    --require-pass-all mode, or stay strictly single-round?
  3. Are pass_at_k / pass_all_k the field names you want in
    benchmark-multi.json, or should the report use pass@k / pass^k literally?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions