Repository navigation
fix(chutes): add timeouts to OAuth HTTP requests - #102026
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 9, 2026, 2:39 AM ET / 06:39 UTC. Summary PR surface: Source +16, Tests +260. Total +276 across 2 files. Reproducibility: yes. from source and PR proof: current main sends Chutes token and userinfo fetches without a request signal, and the PR adds loopback tests for accepted-but-hung HTTP requests. I did not execute tests in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land the Chutes plugin timeout after maintainers accept or tune the 30s auth deadline, keeping the shared OAuth request-signal helper and loopback regression coverage. Do we have a high-confidence way to reproduce the issue? Yes from source and PR proof: current main sends Chutes token and userinfo fetches without a request signal, and the PR adds loopback tests for accepted-but-hung HTTP requests. I did not execute tests in this read-only review. Is this the best way to solve the issue? Yes for the active Chutes plugin login path: the fix is narrow and reuses the shared OAuth request signal helper instead of duplicating timeout logic. A deprecated SDK compatibility login path remains separate and unbounded, but no current internal production caller uses it, so it is not a blocker for this plugin fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 20f355f2368c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +16, Tests +260. Total +276 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (3 earlier review cycles)
|
18b8f18 to
3d77a72
Compare
737178d to
c21fb87
Compare
|
Land-ready at Maintainer fixups now apply one fixed 30-second request deadline to Chutes authorization-code exchange, optional userinfo, provider refresh, and the retained core compatibility refresh path. Optional userinfo failure preserves issued tokens; the test-only timeout surface was removed. Fresh autoreview completed with no accepted/actionable findings. Exact-head proof:
Proof gap: a full credentialed Chutes login was unavailable because the approved environment has no Chutes OAuth client credentials. Live unauthenticated discovery, userinfo, and malformed-token probes all returned promptly. |
|
Merged via squash.
|
* fix(chutes): add timeouts to OAuth HTTP requests * fixup: reuse OAuth request signal helper for Chutes * fix(chutes): bound OAuth requests * test(chutes): normalize abort rejections --------- Co-authored-by: Peter Steinberger <[email protected]>
Google Chat auth requests made through createGoogleAuthFetch() had no request deadline, which could leave token refresh and cert fetch operations waiting indefinitely when a Google auth endpoint accepted the HTTP connection but never responded. Add a 30s request timeout (GOOGLE_AUTH_REQUEST_TIMEOUT_MS) to the guarded fetch call inside createGoogleAuthFetch(), matching the deadline used by Vertex ADC (openclaw#102050), Chutes OAuth (openclaw#102026), and the sibling googlechat cert fetch path (openclaw#102924).
What Problem This Solves
Chutes OAuth login and token refresh could remain pending indefinitely when a provider endpoint accepted the HTTP request but never completed it.
Why This Change Was Made
The callback deadline did not bound the token, userinfo, or refresh HTTP requests themselves. This change applies one fixed 30 second request deadline to authorization-code exchange, optional userinfo enrichment, provider-owned refresh, and the retained core refresh compatibility path. Optional userinfo failure no longer discards valid issued tokens, and no new config or public timeout API is introduced.
User Impact
Users now receive a bounded OAuth failure when required Chutes token work stalls. If only optional profile enrichment stalls, login completes with the valid tokens and omits unavailable profile metadata.
Evidence
Exact head:
c21fb87f448e41c0297fc0ebe7fe74042f0b39a0run_e9c7d2653ab4; 15 Chutes OAuth tests passed.run_640153cffd61; passed.run_dbb8299986e3; passed.The focused tests use a real loopback HTTP server that accepts requests without responding. They prove bounded token exchange and refresh, best-effort userinfo timeout handling, and the fixed production deadline contract.
Full credentialed Chutes login was not tested because
CHUTES_CLIENT_IDandCHUTES_CLIENT_SECRETare absent from the approved environment.