Skip to content

test(agent): use a fresh HTTP client for the continued GitHub device page - #172

Open
LutzLange wants to merge 1 commit into
agentdesktop-dev:mainfrom
LutzLange:fix/device-page-test-port-reuse
Open

LutzLange wants to merge 1 commit into
agentdesktop-dev:mainfrom
LutzLange:fix/device-page-test-port-reuse

Conversation

@LutzLange

Copy link
Copy Markdown
Collaborator

device_page_shows_code_and_tracks_completion_without_exposing_tokens aborts the first device page server, starts the continued page on the same port, and then requests it with the same reqwest::Client. That client may still pool a keep-alive connection to the aborted server, and a request sent on it is reset. The test failed in CI this way twice in a row on #171 (Connection reset by peer at github_oauth.rs:445), although that PR doesn't touch this code.

The continued page now gets a fresh client. Test-only change.

I couldn't reproduce the failure locally: 0 failures in 240 runs on main, including the test alone pinned to one CPU. The cause above is the most likely one, not confirmed.

…page

The test aborts the first device page server, starts the continued page
on the same port and requested it with the same client, which may still
pool a keep-alive connection to the aborted server; a request sent on it
is reset ("Connection reset by peer" in CI). Use a fresh client for the
continued page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LutzLange
LutzLange requested a review from peterj October 15, 2026 09:33

This branch has not been deployed

No deployments
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