Skip to content

fix(playwright): bound graph E2E node count so dataset growth doesn't trip render budget (REQ-171)#435

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

fix(playwright): bound graph E2E node count so dataset growth doesn't trip render budget (REQ-171)#435
avrabe merged 1 commit into
mainfrom
fix/playwright-graph-dataset-budget

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Jun 3, 2026

Finding (self-found triaging red Playwright E2E)

Three graph/diagram E2E tests have been failing reproducibly (through the
CI retry) across multiple merges. It went unnoticed because Playwright E2E
is a non-required check and main runs are concurrency-cancelled
, so it
never reports a conclusive green — see companion issue.

Root cause is dogfood-dataset growth, not a serve regression (verified in a
real browser locally):

Test URL Why it failed
graph.spec.ts custom polygon shapes /graph?types=requirement,design-decision&depth=2 (no ?limit=) Dataset grew past the default 200-node render budget for that filter → view returns the "above node budget" placeholder (no SVG) → svg polygon count = 0
diagram-viewer.spec.ts graph: viewer toolbar present /graph?limit=2000 (full ~871-node graph) Page now heavy enough that goto+settle exceeds the timeout → .svg-viewer checks fail
diagram-viewer.spec.ts graph: fullscreen toggles class same same

Fix (test-only)

  • Polygon test: add &limit=2000 (the filtered subset still renders fast).
  • diagram-viewer graph case: point at a focused subgraph
    /graph?focus=REQ-001&depth=1&limit=2000 — this test pins the .svg-viewer
    toolbar invariant, not graph size, so a bounded graph exercises the same
    wrapper deterministically.

Verification

Ran the affected specs in a real Chromium locally: 7/7 passed (was 3
failing). rivet validate still PASS.

Verifies: REQ-171 · Refs: FEAT-001

🤖 Generated with Claude Code

… trip render budget (REQ-171)

Self-found triaging why Playwright E2E was red across multiple merges (masked:
it's a non-required check and main runs are concurrency-cancelled, so it never
reports a conclusive green). Three graph/diagram tests failed reproducibly
(through CI retry) — root cause is dogfood-dataset growth, not a serve bug:

- graph.spec.ts "custom polygon shapes" hit /graph?types=requirement,
  design-decision&depth=2 with no ?limit=. The dataset grew past the default
  200-node render budget for that filter, so the view returns the "above node
  budget" placeholder (no SVG) and the polygon count is 0. Add &limit=2000.
- diagram-viewer.spec.ts graph page used /graph?limit=2000 (full ~871-node
  graph), now heavy enough that goto+settle exceeded the timeout, failing the
  .svg-viewer toolbar/fullscreen checks. Point it at a focused subgraph
  (/graph?focus=REQ-001&depth=1&limit=2000) — same wrapper invariant, fast.

Verified green in a real browser locally: 7/7 in the affected specs (was 3
failing). `rivet validate` still PASS.

Verifies: REQ-171
Refs: FEAT-001

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

📐 Rivet artifact delta

Change Count
Added 1
Removed 0
Modified 0
Downstream impacted (depth ≤ 5) 0

Graph

graph LR
  REQ_171["REQ-171"]:::added
  classDef added fill:#d4edda,stroke:#28a745,color:#155724
  classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
  classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
  classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Loading
Added
  • REQ-171

📎 Full HTML dashboard attached as workflow artifact rivet-delta-pr-435download from the workflow run.

Posted by rivet-delta workflow. The graph shows only changed artifacts; open the HTML dashboard (above) for full context.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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: 0835015 Previous: 897de61 Ratio
store_insert/10000 17074997 ns/iter (± 1290257) 13207612 ns/iter (± 898633) 1.29

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

@avrabe avrabe merged commit 7c05634 into main Jun 3, 2026
23 of 39 checks passed
@avrabe avrabe deleted the fix/playwright-graph-dataset-budget branch June 3, 2026 15:16
avrabe added a commit that referenced this pull request Jun 5, 2026
…436) (#481)

Issue #436: Playwright E2E (and Criterion benchmarks) were red/cancelled across
consecutive main merges and nobody noticed, because main never reached a
conclusive result. Root cause (verified): the concurrency group fell back to
`github.ref` on push, so every main commit shared one group
(`<workflow>-refs/heads/main`). With `cancel-in-progress` false the *running*
job completes, but GitHub still supersedes *queued* runs in the group — so in a
PR-merge train each new main push cancelled the previous queued run, and main
rarely produced a conclusive Playwright/benchmark result. A real regression in
any covered view would have looked identical to the benign dataset-growth
failures (#435).

Fix: fall back to `github.sha` (not `github.ref`) on push, so every main commit
gets its own concurrency group and is never superseded. PRs are unchanged —
`head_ref` still groups per source branch, so cancel-in-progress keeps
superseding stale PR runs. Applied to both workflows that shared the pattern
(ci.yml, benchmarks.yml).

This is the pure-hygiene half of #436; whether to promote Playwright to a
required status check remains a separate maintainer decision.
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