mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-23 21:25:02 +00:00
`test_diskann_basic` and the other random-data tests in `crates/ruvector-diskann/src/index.rs` used `rand::thread_rng()`, so each CI run drew different vectors. The test asserts that the nearest neighbour of `vec-42` is `vec-42` itself; with unfavourable random draws the ANN graph traversal happened to settle on a near-duplicate (seen on main as `left: "vec-364"` vs `right: "vec-42"`) and the assertion failed. Fix: replace `thread_rng()` with `StdRng::seed_from_u64(0xD15CA77)` in `random_vectors()`, `test_recall_at_10`, and `test_scale_5k`. Output is fully deterministic across runs and platforms; verified locally with three repeats of `test_diskann_basic` and the full lib-test suite (17/17 passing in 49.6s). No production-code changes; tests-only. Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||