Skip to main content

Module bakeoff

Module bakeoff 

Source
Expand description

L1-L3 bake-off milestone exit gate (#5441).

Why: verify_gate and redundant_run act inside a single run; this acts on the evidence a whole milestone’s bake-off left behind. #5441 makes a real L1-L3 run the condition for closing a Trusty Code milestone, and the first qualification attempt showed prose cannot enforce it — three passing levels were still disqualified because nothing mechanically checked that the retained metadata identified the candidate build, the runner, or the sources it consumed. What: bakeoff::preflight() rejects incomplete L1-L3 coverage, missing artifacts or provenance, mock-only evidence, a stale runner, and results produced by a different tcode build; bakeoff::compare_against_baseline blocks correctness and completion regressions against the previous accepted baseline and requires a written disposition for cost/token/turn/duration changes outside tolerance. Entirely offline — it reads a retained bundle and never runs a model. Operator surface: tcode bakeoff-gate. Test: bakeoff::tests::*, plus tests/bakeoff_gate_e2e.rs. L1-L3 bake-off milestone exit gate (#5441).

Why: every Trusty Code milestone is supposed to close only after a real coding-harness bake-off completes levels 1-3 with no unexplained regression against the previous accepted baseline. The first independent qualification attempt showed why prose alone cannot enforce that: three levels ran and every verifier check passed, yet the evidence was still disqualified because the retained metadata named no candidate commit, no binary hash, no runner/challenge revision and no source digests, nothing mechanically rejected that, and L3’s +27% wall-clock / +50% turns had no recorded disposition. This module is the missing mechanism.

What: a pure, offline evidence gate over a retained bundle. preflight rejects the five conditions #5441 names — incomplete L1-L3 coverage, missing artifacts or provenance, mock-only evidence, a stale runner, and results produced by a different tcode build — and compare diffs a candidate bundle against the previous accepted baseline, blocking correctness or completion regressions outright while requiring a written disposition for cost/token/turn/duration changes outside tolerance. Both produce Violations collected into one GateReport. Nothing here runs a model, spawns the runner, or touches the network: the expensive real-model L1-L3 run happens once after a milestone candidate is frozen, and this gate reads only what that run retained. The operator surface is tcode bakeoff-gate (wired in src/cli/bakeoff.rs); the bundle layout and a worked invocation are in docs/reference/bakeoff-exit-gate.md.

Test: bakeoff::tests::*, plus the binary-level tests/bakeoff_gate_e2e.rs.

Re-exports§

pub use compare::Baseline;
pub use compare::ComparisonInputs;
pub use compare::compare_against_baseline;
pub use metadata::LevelMetadata;
pub use preflight::Bundle;
pub use preflight::Pins;
pub use preflight::load_bundle;
pub use preflight::preflight;

Modules§

compare
Candidate-versus-baseline comparison (#5441).
metadata
metadata.json — the retained-evidence schema every bake-off level must carry (#5441).
preflight
Bundle loading and the five rejections #5441’s preflight owes.

Structs§

GateReport
The gate’s verdict over one bundle, optionally compared to a baseline.
Violation
One reason the gate is refusing to pass.

Enums§

Rule
Why a bundle failed the gate.

Constants§

CLEAN_STATUS
The single terminal status a bake-off level may finish with.
DISPOSITIONS_FILE
Optional bundle-level file recording accepted performance changes.
LEVELS
The three levels a milestone exit gate must cover.
REQUIRED_ARTIFACTS
Files every level directory must contain, non-empty.