Skip to content

fix(029): prioritize reproducibility exceedances over unknowns - #172

Merged
bartekus merged 1 commit into
mainfrom
fix/029-reproducibility-order
Oct 22, 2026
Merged

bartekus merged 1 commit into
mainfrom
fix/029-reproducibility-order

Conversation

@bartekus

Copy link
Copy Markdown
Contributor

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.

@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the three changed files for bugs, security issues, and governance inconsistencies.

specs/029-evaluation-repeatability/spec.md

The spec update extends the acceptance test bullet (under the reproducibility coverage list) to describe two new sub-cases: a config/split mismatch combined with an exceedance stays NotReproducible, and a split mismatch without drift stays Unknown. This is an additive editorial change to the acceptance description; it does not alter lifecycle, frontmatter, or authority claims, and no normative text is added.

crates/rustev-eval/tests/reports.rs

The new block is inserted immediately before the existing // Another repeat configuration: unknown. paragraph, which re-declares let other = repeat_config(...) with an identical value. Rust shadowing means the first other (from the new block) is still used for lines 2 and 4 of that block before being shadowed; the compiler will not warn on it. Both bindings carry the same value so the test is not affected.

Logic trace:

  • expected = reproducibility(&baseline, &drift, &config) — captures the definite exceedance verdict.
  • Asserts that passing a mismatched other config instead of config yields the same verdict — tests that the comparison code doesn't gate on config equality when an exceedance is already determined.
  • mismatched.repeat_config = other.id().unwrap() then same assertion — tests the report's internal config ID field.
  • mismatched.split = Split::Calibration with assert_ne!(mismatched.split, baseline.split) confirms the mismatch is real, then same assertion.
  • set_pooled(&mut mismatched, "coverage", base) resets the drift; the follow-up Unknown { reasons } if !reasons.is_empty() assertion checks that without exceedance a split mismatch correctly degrades to Unknown rather than silently passing.

No logic inversion or off-by-one is apparent; the assertions directly encode the spec claim in 3.9 (exceedance is preserved; mismatches alone without exceedance produce Unknown).

crates/rustev-eval/src/baseline.rs (deletions only)

Three lines were removed. The deletion is not shown as diff text so I cannot identify what was removed. No assertion in the new test block depends on a removed function that is absent from the codebase (functions called — reproducibility, repeat_config, set_pooled, Split::Calibration, .id() — are all used in the surrounding, unchanged code), so there is no concrete evidence of a broken dependency.

No findings.

{"head": "846fa45eced30a5de4756c9e7014d74504d9a5ae", "verdict": "no-findings", "findings": []}

Subject: bb83627...846fa45, diff digest 3701c24c9ee924952d78b336ba3dba3866fa2c465407f16084bdeec6b3e272e7, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus enabled auto-merge (squash) October 22, 2026 20:13
@bartekus
bartekus merged commit cd3bc11 into main Oct 22, 2026
31 checks passed
@bartekus
bartekus deleted the fix/029-reproducibility-order branch October 22, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant