test(snapshot): pin exact run() output for every algorithm
The full-codebase mutants run showed ~600 of the 902 surviving mutants are arithmetic / comparison flips inside algorithm run() bodies — the per-helper Phase 1 tests don't reach the optimization loop itself, and the existing deterministic-with-same-seed tests can't catch them (both the clean and mutated runs use the same seed, so they still match). This extends the async-parity sweep: each of the 33 parity tests now also asserts the sync run's result against an exact captured snapshot (best objectives for single-objective algorithms; sorted pareto-front objective tuples for multi-objective ones). Any arithmetic flip anywhere in run() perturbs at least one f64 and breaks the snapshot. Fixtures are deliberately multi-dimensional — SnapSphere (3-D sum of squares), SnapMo (3-variable / 2-objective), a 6-city TinyTsp, a 3-D SnapSpherePartial for Hyperband. A 1-D problem leaves the per-axis / covariance-matrix / simplex machinery degenerate, so arithmetic mutations there wouldn't change the result; 3-D exercises the full loop body. Snapshots captured from the un-mutated implementation; an intentional algorithm change requires regenerating them, by design. The assertions live in the async-gated module because they reuse its per-algorithm constructions — active during the mutation campaign (--features async,serde) and under cargo test --features async.
This commit is contained in:
+722
-196
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user