Skip to content

test(playwright): lift node budget in variant-scoping graph invariant (#436)#491

Merged
avrabe merged 1 commit into
mainfrom
fix/playwright-graph-variant-budget
Jun 5, 2026
Merged

test(playwright): lift node budget in variant-scoping graph invariant (#436)#491
avrabe merged 1 commit into
mainfrom
fix/playwright-graph-variant-budget

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Jun 5, 2026

Fixes the one red gate on main — the Playwright E2E failure that was keeping CI from being conclusively green (now visible, not cancelled, thanks to #481).

Root cause (verified locally — full suite: 399 passed / 1 failed)

rendering-invariants.spec.ts:195 "/graph?variant=minimal-ci IS scoped" asserts fullNodes >= scopedNodes. The dogfood dataset grew past 200 requirement nodes, so the unscoped /graph?types=requirement now exceeds the 200-node render budget and returns the "above node budget" placeholder — 0 rendered nodes. So fullNodes(0) >= scopedNodes(1) failed.

This is the same recurring dataset-growth fragility as #435/#436 (the graph E2E tests render against the live, growing corpus), just in a different test.

Fix

&limit=2000 on both fetches (the pattern graph.spec.ts already uses) so neither view is budget-clipped; the "scoping reduces node count" invariant stays meaningful as the corpus grows.

Verification

Local (correct pinned chromium): the exact test passes; the full rendering-invariants.spec.ts (13 tests) passes; full suite was 399✓/1✗ and this was the lone failure.

tests/ only — no product code. Refs REQ-171 (the prior budget-bounding fix for these E2E graph tests).

🤖 Generated with Claude Code

…iant so dataset growth doesn't fail it (#436)

The one red gate on main. `rendering-invariants.spec.ts` › "/graph?variant=
minimal-ci IS scoped" asserts `fullNodes >= scopedNodes`, but the dogfood
dataset grew past 200 requirement nodes, so the UNSCOPED
`/graph?types=requirement` now returns the "above node budget" placeholder
(0 rendered nodes) instead of an SVG — making fullNodes=0 < scopedNodes and the
test fail. Added `&limit=2000` to both the scoped and full fetches (same pattern
graph.spec.ts already uses) so neither view is budget-clipped and the
scope-reduces-nodes invariant stays meaningful as the dataset grows.

Verified locally: the exact failing test passes, and the full
rendering-invariants.spec.ts (13 tests) passes. Full suite was 399 passed /
1 failed before this — this was the only failure.

Refs: REQ-171
@avrabe avrabe merged commit 00b59a5 into main Jun 5, 2026
17 of 19 checks passed
@avrabe avrabe deleted the fix/playwright-graph-variant-budget branch June 5, 2026 20:34
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 1a3b279 Previous: aec3351 Ratio
traceability_matrix/1000 63696 ns/iter (± 1691) 44115 ns/iter (± 1808) 1.44
diff/10000 10183753 ns/iter (± 1178671) 8255813 ns/iter (± 263660) 1.23
query/10000 360740 ns/iter (± 1949) 236912 ns/iter (± 8509) 1.52

This comment was automatically generated by workflow using github-action-benchmark.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant