Skip to content

test(serve_integration): graph_focused_view 5s timeout chronic flake#284

Merged
avrabe merged 1 commit into
mainfrom
fix/graph-focused-view-test-timeout
May 15, 2026
Merged

test(serve_integration): graph_focused_view 5s timeout chronic flake#284
avrabe merged 1 commit into
mainfrom
fix/graph-focused-view-test-timeout

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 15, 2026

Summary

Multiple PRs today (#279, #281, and previously #275 / #278) failed CI on the same test: `graph_focused_view_renders_svg`. Cause is structural, not a real flake:

  • The test's `fetch()` helper hardcodes a 5-second read timeout (`rivet-cli/tests/serve_integration.rs:126`).
  • The focused `/graph` endpoint takes ~5 seconds on the dogfood corpus (742 nodes, 1477 edges) — BFS frontier + etch layout pass.

The test sits exactly on the edge. CI runner load tips it over. Every PR that runs the `Test` job rolls a die.

The fix

Add a `fetch_with_timeout(port, path, htmx, timeout)` variant. Keep the default 5s `fetch()` for everything else (most endpoints are sub-millisecond and benefit from a tight upper bound). Bump the graph test's deadline to 15s — well past the genuine wall-clock for this endpoint, short enough that a real performance regression still surfaces.

The wall-clock `Instant::elapsed()` log line stays in the test, so an actual slow regression would still be visible in the test output even though the read timeout no longer blocks it.

Test plan

  • `cargo test -p rivet-cli --test serve_integration graph_focused_view_renders_svg --exact` — passes in 2.79s with the new helper
  • No semantic change to any other endpoint test (default 5s timeout preserved)
  • CI green on this PR (the test that was flaking now has the right budget)

Once this lands, PRs #279 and #281 should rebase / re-run and inherit the fix.

Trailer

Refs: REQ-007 (CLI surface)

🤖 Generated with Claude Code

Three PRs today (#279, #281, and previously #275/#278) failed CI on
the same test: `graph_focused_view_renders_svg`. Cause is structural,
not a real-flake: the test's `fetch()` helper hardcodes a 5s read
timeout, and the focused /graph endpoint takes ~5s on the dogfood
corpus (742 nodes, 1477 edges) — BFS frontier + etch layout pass.
The test sits exactly on the edge; CI runner load tips it over.

Add a `fetch_with_timeout(port, path, htmx, timeout)` variant. Keep
the default 5s `fetch()` for everything else. Bump the graph test's
deadline to 15s — well past the genuine wall-clock for this endpoint
and short enough that a real performance regression still bubbles up.

The wall-clock `Instant::elapsed()` log line stays, so an actual slow
regression would still be visible in the test output even though the
read timeout no longer blocks it.

Verified locally: `cargo test -p rivet-cli --test serve_integration
graph_focused_view_renders_svg` passes in 2.79s with the new helper.

Refs: REQ-007 (CLI surface)
@github-actions
Copy link
Copy Markdown

📐 Rivet artifact delta

No artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph.

@avrabe avrabe merged commit 7327365 into main May 15, 2026
14 of 15 checks passed
@avrabe avrabe deleted the fix/graph-focused-view-test-timeout branch May 15, 2026 06:11
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 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