test(playwright): lift node budget in variant-scoping graph invariant (#436)#491
Merged
Merged
Conversation
…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
There was a problem hiding this comment.
⚠️ 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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
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" assertsfullNodes >= scopedNodes. The dogfood dataset grew past 200 requirement nodes, so the unscoped/graph?types=requirementnow exceeds the 200-node render budget and returns the "above node budget" placeholder — 0 rendered nodes. SofullNodes(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=2000on both fetches (the patterngraph.spec.tsalready 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