Skip to content

fix(test): seed the perturbed graph robustness tests - #41

Merged
Mearman merged 2 commits into
mainfrom
fix/ci-checks
Oct 29, 2026
Merged

Mearman merged 2 commits into
mainfrom
fix/ci-checks

Conversation

@Mearman

@Mearman Mearman commented Oct 29, 2026

Copy link
Copy Markdown
Owner

The method ranking test in the perturbed graph robustness suite builds its perturbed graphs with Math.random and asserts DP wins or ties path diversity on two of three. Over 200 local trials DP won the 5% removal case in 167 and the 10% addition case in 160, so the test failed on a few percent of runs; CI runs it in both vitest projects, and it failed on Test (shard 3/4) of the readme badges PR twice in a row. Both copies of the test now draw perturbations from a fixed seeded generator, and the shuffle is a Fisher-Yates instead of a sort comparator.

perturbEdges and addRandomEdges take their random source from the
caller, and shuffle with Fisher-Yates instead of a biased sort
comparator.
The method ranking test compared path diversity on graphs perturbed
with Math.random, so DP lost on two of three perturbations on a
fraction of runs and failed CI nondeterministically. Both copies of the
test now draw their perturbations from a fixed seeded generator.
@Mearman
Mearman marked this pull request as ready for review October 29, 2026 15:42
@Mearman
Mearman merged commit 98a0e71 into main Oct 29, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Mearman
Mearman deleted the fix/ci-checks branch October 29, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant