Repository navigation
impl(029): held-out ledgers, baselines and reproducibility checks - #169
Conversation
ae9a275 to
5a2e17b
Compare
AI review (findings)Reviewing the two new modules (
In if let Some(HeldOut::Counted(r)) = &report.held_out
&& (r.count == 0
|| r.plan_count == 0
|| r.count > r.dataset_count
|| r.plan_count > r.dataset_count)
{
return Err(BaselineError::Binding(
"the held-out record is not a count".into(),
));
}The
The double-push risk (both
Masking Spec increment text and archive-policy Both match the implementation. The archive-policy additions for {"head": "5a2e17bd7d2554502f3effdba7c47ca03b92cd37", "verdict": "findings", "findings": [{"path": "crates/rustev-eval/src/baseline.rs", "line": 117, "summary": "The error string 'the held-out record is not a count' is semantically inverted: the if-let arm matches only when the variant IS HeldOut::Counted, so the message fires when the variant is correct but the count values are invalid (zero or exceeding dataset_count), misleading operators into diagnosing the wrong problem."}]}Subject: ed1d191...5a2e17b, diff digest c5f905f2b35f654bac7a99d254bb678bf1886206a3179772d25a1b6077d4bdfc, 1 call(s). An AI comment is not an approval. |
5a2e17b to
50e8d04
Compare
AI review (no-findings)Reading through each changed file carefully.
Chain verification in
The held-out masking (
The early return on config/dataset/split/evaluator_config/repeat_config/plan mismatch is before the exceedances loop. The spec says
Tests
Spec and archive policy Increment list renumbering and increment 4 narrative are internally consistent. No concrete defects found. {"head": "50e8d04ddbb905899f0ae08c85e6c9921f27d23d", "verdict": "no-findings", "findings": []}Subject: f66e2cb...50e8d04, diff digest 313b0e50c4bcd88a8203924f184ccadfb18f290c26829e1b747c105190a5a53f, 1 call(s). An AI comment is not an approval. |
Runtime-planned batch members with equal remaining budgets previously received slightly different deadlines because each member started its budget during preparation. When the earliest deadline ended the shared transport, a later member could receive a transient transport failure while its siblings expired. This is the runtime_batch CI failure seen on #169. Implements the owner-authorized fix under spec 020's existing dispatch-budget and no-replenishment requirements: capture one monotonic instant at batch entry and derive all member deadlines from it. Preparation consumes the budget, and distinct remaining budgets stay distinct. A paused-clock regression covers preparation time and expiry; the existing batch-versus-independent loopback test is unchanged. Validation: make gate, cargo fmt and git diff --check pass. Hosted code and binding checks pass, including the new paused-clock regression and the unchanged runtime_batch differential test. The rebased review identified an in-place normative amendment. The approved normative text is now unchanged; the implementation record explains how this fix enforces the existing requirements. AI review reports no findings on current head 9ebf3de. CI is running; auto-merge is enabled. Pushed before local workspace tests at the owner's request. Rebased onto merged #168. Rebase #169 onto this fix after it merges. Requires current-head no-findings AI review and green CI.
50e8d04 to
e2d2ff9
Compare
AI review (findings)Reviewing the diff across
When
The spec (added text in
// baseline.rs ~lines 224–237
if config.id().ok().as_ref() != Some(&baseline.repeat_config) {
reasons.push(…);
}
if run.dataset != baseline.dataset || … || run.plan != baseline.plan {
reasons.push(…);
}
if !reasons.is_empty() {
return Reproducibility::Unknown { reasons }; // ← exits before exceedance loop
}When a configuration mismatch co-occurs with a metric exceedance that would trigger The fix is to compute exceedances before the final verdict, then apply the spec's priority: if any exceedances were found, return {"head": "e2d2ff993cec36886a30c8a60f3d307e0426565e", "verdict": "findings", "findings": [{"path": "crates/rustev-eval/src/baseline.rs", "line": 235, "summary": "reproducibility returns Unknown early on a config/dataset/plan mismatch before computing exceedances, violating the spec's ordering that NotReproducible takes priority over Unknown regardless of what else is unknown."}]}Subject: bee731c...e2d2ff9, diff digest 313b0e50c4bcd88a8203924f184ccadfb18f290c26829e1b747c105190a5a53f, 1 call(s). An AI comment is not an approval. |
A configuration or report binding mismatch combined with a metric exceedance returned `Unknown` before computing the exceedance. Compute all exceedances first and apply spec 029's existing priority: `NotReproducible`, then `Unknown`, then `Reproducible`. This follows up the unresolved structured AI finding on PR #169, which already merged at bb83627. Regression coverage combines drift with configuration and split mismatches, verifies the complete exceedance remains intact, and checks that a split mismatch without drift remains unknown. The spec edit records coverage only; its contract is unchanged. Baseline diff and increments 5/6 remain outside this repair. Validation: the regression failed against the original implementation and passes with the fix. `make gate`, pinned spec-spine 0.31.0 coupling, `cargo fmt --all --check`, and `git diff --check` pass. Full `make code` runs concurrently with hosted CI. This PR requires an explicit structured no-findings verdict on its latest head and green required CI; no owner exception should bypass findings.
Adds the held-out ledger, baseline records and reproducibility checks from spec 029 sections 3.7 to 3.9. The ledger verifies its hash chain and bounded entries; baseline creation reproduces and checks the supplied repeat report; reproducibility reports exceedances and unknown evidence explicitly.
Tests cover ledger counts and tampering, bounds and round trips, baseline bindings, exact band boundaries and unknown evidence.
This is the first part of increment 4. Section 3.10's diff document and rendering are still to follow before candidate comparison and selection gates. Spec 029 remains in progress. Brier per-case measures remain absent and their interval unknown pending a concrete compatibility decision on D-029-1.
Validation: make gate and pinned spec-spine coupling pass. AI review reports no findings on 50e8d04. CI code hit the existing runtime_batch deadline race, addressed separately in #170; rebase and fresh checks follow that merge. Local code validation is queued behind the current shared-target run; pushed before it completes at the owner's request.
Merge order: after #168 and the runtime batch race fix #170. Auto-merge stays off pending that order, a current-head no-findings AI review and required checks.