Skip to content

Instantly share code, notes, and snippets.

@copyleftdev
Created July 25, 2026 06:08
Show Gist options
  • Select an option

  • Save copyleftdev/277e48079658f6f89deb2254701ebcf7 to your computer and use it in GitHub Desktop.

Select an option

Save copyleftdev/277e48079658f6f89deb2254701ebcf7 to your computer and use it in GitHub Desktop.
Oddly Exact NIST mutation record: 389 tests passed, Longley caught the formula defect

Oddly Exact: NIST mutation record

This record supports the article “389 Tests Passed. NIST Still Caught the Bug.”

  • Pre-repair baseline: 8e87c2fbee580efb7d38690634a0ee60d0d77dff
  • Rust package: agent-calc 0.1.0
  • Contract: calc1/0.1.0
  • Mutation runner: cargo-mutants 27.0.0
  • External reference: NIST Statistical Reference Datasets, Longley linear regression data

Mutation

The selected mutation changed the multiple-regression standard-error formula:

- residual_std_dev * sum_sq.sqrt()
+ residual_std_dev + sum_sq.sqrt()

Command

cargo mutants \
  --file src/stats.rs \
  --re '^src/stats.rs:1867:30: replace \* with \+ in multiple_linear_regression$' \
  --timeout-multiplier 3.0 \
  --jobs 1 \
  -- --locked

Recorded library-harness outcome

390 tests run
389 passed
1 failed: stats::tests::multiple_regression_nist_longley_passes_certified_values

The mutation run stopped after the failed library harness. This record does not claim that Longley was the only test in the entire repository capable of detecting the mutation. It establishes the narrower observation that 389 other tests in that harness tolerated the changed formula while the independently anchored Longley assertion rejected it.

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