Skip to content

test(sgcr): serious stress harness (scale, adversarial, modes, annotations)#199

Merged
ivanmkc merged 1 commit into
masterfrom
feat/sgcr-stress
Jun 22, 2026
Merged

test(sgcr): serious stress harness (scale, adversarial, modes, annotations)#199
ivanmkc merged 1 commit into
masterfrom
feat/sgcr-stress

Conversation

@ivanmkc

@ivanmkc ivanmkc commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What

CI-able stress harness — npm run sgcr:stress (or node 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

Dim Coverage Result
1 fuzz 40,000 layouts (20k graphs × 4 dirs × {orthogonal, octilinear}) clean
2 scale/perf 50→4000 nodes; 4000-node ~1.9s layout, sub-quadratic within budget
3 adversarial K8×8, 20×20 grid, 5461-node tree (~1s), 500-chain, 300-star, all-self-loops, 100 parallel edges, nested cycles, forest, dense hairball × all dirs clean
4 determinism/order-inv 400 × 40-node multi-edge 400/400 byte-identical; 400/400 geometry-identical under shuffle
5 annotations up to 371n/571 annotations, multi-layer P10-clean
6 edge cases empty, dangling, duplicate ids, huge labels, isolated… clean

Findings (noted, not regressions)

  • Annotation placement is slow at scale (~5–12s for hundreds of annotations — O(anns×candidates×obstacles)); spatial index is the follow-up if bulk placement is needed.
  • ~45% placement on dense graphs — expected, rest correctly defer (no overlap).
  • Order-invariance is geometric for multi-edge graphs w/o explicit edge ids (fallback id counter permutes — cosmetic); harness compares canonical geometry.

Also bundles annotate.mjs into the e2e build.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants