test(sgcr): serious stress harness (scale, adversarial, modes, annotations)#199
Merged
Conversation
…tions)
A CI-able stress harness (`npm run sgcr:stress`, or
`node e2e/sgcr-stress.mjs [fuzzCount]`) that drives the engine + checker +
annotation placer across six dimensions and proves P1–P10 hold:
1. high-volume property fuzz × 4 directions × {orthogonal, octilinear}
2. scale & performance (50 → 4000 nodes, with per-node timing + a budget)
3. adversarial archetypes (K8×8, 20×20 grid, 5461-node tree, 500-deep chain,
300-wide star, all-self-loops, 100 parallel edges, nested cycles, forest,
dense hairball) × all directions
4. determinism (byte-identical) + order-invariance (geometry-identical under
shuffle — multi-edge fallback ids legitimately permute, so compare geometry)
5. annotations under load (P10-clean, placement rate, perf)
6. edge cases (empty, dangling, duplicate ids, huge labels, isolated nodes…)
Exits non-zero on any invariant violation or perf-budget blowup; prints a
reproducing seed/spec for every failure. Also builds annotate.mjs in the e2e
bundle so the harness can exercise the annotation placer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
CI-able stress harness —
npm run sgcr:stress(ornode e2e/sgcr-stress.mjs [fuzzCount]) — driving the engine + checker + annotation placer across six dimensions to prove P1–P10 hold. Exits non-zero on any violation/budget blowup, printing a reproducing seed for each failure.Serious run (fuzz=20000): 40,060 layouts in 70.5s — ZERO violations
Findings (noted, not regressions)
Also bundles annotate.mjs into the e2e build.