Skip to content

fix: apply a request timeout to every forge HTTP client (RIG-3585) - #6

Draft
rigel-mintaka wants to merge 1 commit into
mainfrom
upstream-vcs/rig-3585-forge-timeout
Draft

rigel-mintaka wants to merge 1 commit into
mainfrom
upstream-vcs/rig-3585-forge-timeout

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

reqwest applies no request timeout by default, so a forge that accepts the connection but never responds hangs the whole process in a socket read — no output, no self-timeout, exit only on an external kill. This is the RIG-3585 symptom: jj-vine submit blocked in recvfrom on a GitHub socket. The GitHub, GitLab, Forgejo and Azure DevOps clients were each built with a bare reqwest::Client::builder().

Build every forge client through a shared http_client_builder() that applies a 30s HTTP_TIMEOUT, so no client can be constructed without one. Tested against a black-hole server (accepts, never responds): the timeouted client returns a timeout error in under 5s, while a a_timeoutless_client_would_hang control proves the pre-fix bare builder is still pending at the deadline.

Spec-impact: none. Refs RIG-3585

Co-authored-by: Matt Wilkinson matt@rigel.build

@linear-code

linear-code Bot commented Sep 11, 2026

Copy link
Copy Markdown

RIG-3585

`reqwest` applies no request timeout by default, so a forge that accepts the connection but never responds hangs the whole process in a socket read — no output, no self-timeout, exit only on an external kill. This is the RIG-3585 symptom: `jj-vine submit` blocked in `recvfrom` on a GitHub socket. The GitHub, GitLab, Forgejo and Azure DevOps clients were each built with a bare `reqwest::Client::builder()`.

Build every forge client through a shared `http_client_builder()` that applies a 30s `HTTP_TIMEOUT`, so no client can be constructed without one. Tested against a black-hole server (accepts, never responds): the timeouted client returns a timeout error in under 5s, while a `a_timeoutless_client_would_hang` control proves the pre-fix bare builder is still pending at the deadline.

Spec-impact: none. Refs RIG-3585

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the upstream-vcs/rig-3585-forge-timeout branch from 1a12c26 to 997aff9 Compare September 11, 2026 23:24
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