Skip to content

test(serve): stabilize test_reload_yaml_error flake (status==0 → retry)#331

Open
avrabe wants to merge 1 commit into
mainfrom
fix/test-reload-yaml-flake
Open

test(serve): stabilize test_reload_yaml_error flake (status==0 → retry)#331
avrabe wants to merge 1 commit into
mainfrom
fix/test-reload-yaml-flake

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 24, 2026

Summary

Stabilizes `test_reload_yaml_error_returns_error_response` against the same transient-connection-drop flake class `fetch_page_with_retry` already handles for GETs (observed in PR #328's CI run, which doesn't touch any serve code — the failure was the test, not the production code).

The raw `TcpStream` POST + `read_to_end` occasionally returns empty data on self-hosted-runner contention, leaving the HTTP status parsed as `0` and the assertion failing with `got status 0`. Extract a `post_reload_status` helper that retries once on `status == 0` after a 200 ms backoff — mirrors `fetch_page_with_retry` exactly.

Test plan

  • `cargo test -p rivet-cli --test serve_integration test_reload_yaml_error_returns_error_response` — PASS

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 24, 2026

📐 Rivet artifact delta

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

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: 7c24058 Previous: fce5dff Ratio
link_graph_build/10000 35759577 ns/iter (± 2730637) 27552219 ns/iter (± 1885336) 1.30
validate/10000 22973605 ns/iter (± 2730246) 13419892 ns/iter (± 138543) 1.71

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe avrabe force-pushed the fix/test-reload-yaml-flake branch 4 times, most recently from 0d3c632 to 6714248 Compare May 25, 2026 11:21
Same transient-connection-drop flake class that landed in
fetch_page_with_retry (PR-train preceding v0.13.0). The raw
TcpStream POST + read_to_end occasionally returns empty data on
self-hosted-runner contention, leaving the HTTP status parsed as 0
and the assertion failing with "got status 0" — observed on PR #328
(no serve-code change in the PR, the failure was the test, not the
production code).

Extract a `post_reload_status` helper that retries once on
`status == 0` after a 200 ms backoff (mirroring fetch_page_with_retry
exactly), and use it from test_reload_yaml_error_returns_error_response.
The other reload tests already work fine via fetch_with_timeout so
they don't need the helper yet.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@avrabe avrabe force-pushed the fix/test-reload-yaml-flake branch from 6714248 to 7c24058 Compare May 25, 2026 13:26
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