Repository navigation
fix(google): add timeout to Vertex ADC token refresh - #102050
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 9, 2026, 7:55 AM ET / 11:55 UTC. Summary PR surface: Source +19, Tests +48. Total +67 across 2 files. Reproducibility: yes. from source and contributor proof: current main performs the authorized_user refresh without an AbortSignal and constructs GoogleAuth without transporter timeout options. I did not execute a local repro in this read-only review. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 this narrow deadline if maintainers accept 30 seconds as the Vertex ADC auth contract; otherwise route the same boundaries through an owner-approved provider timeout policy before merge. Do we have a high-confidence way to reproduce the issue? Yes, from source and contributor proof: current main performs the authorized_user refresh without an AbortSignal and constructs GoogleAuth without transporter timeout options. I did not execute a local repro in this read-only review. Is this the best way to solve the issue? Yes, if the fixed deadline is accepted: the PR changes the actual token-refresh boundaries and uses google-auth-library's supported transporterOptions timeout path. The safer alternative is only policy-level, not a mechanical code defect. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1fdb0e79d329. Label changesLabel justifications:
Evidence reviewedPR surface: Source +19, Tests +48. Total +67 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 (5 earlier review cycles)
|
6d24dad to
a3e1593
Compare
a3e1593 to
a5c39cf
Compare
|
Land-ready review complete at exact head Maintainer refinements:
Proof:
Proof gap: no live Google OAuth, Workload Identity, or Vertex credentials were available. The deterministic coverage exercises both the custom fetch deadline and the library owner boundary, including timeout recovery. |
|
Merged via squash.
|
* fix(google): add timeout to Vertex ADC token refresh * test(google): consolidate ADC timeout proof * fix(google): bound all ADC token refreshes * test(google): observe ADC timeout before advancing time * fix(google): keep dependency timeout claims exact * fix(google): bound library-managed ADC refreshes * fix(google): recover after ADC refresh timeout --------- 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).
* fix(google): add timeout to Vertex ADC token refresh * test(google): consolidate ADC timeout proof * fix(google): bound all ADC token refreshes * test(google): observe ADC timeout before advancing time * fix(google): keep dependency timeout claims exact * fix(google): bound library-managed ADC refreshes * fix(google): recover after ADC refresh timeout --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit e5259fa)
What Problem This Solves
Google Vertex Application Default Credentials refresh could wait indefinitely. The custom
authorized_userOAuth path had no request deadline, and library-managed ADC sources such as Workload Identity Federation or GCE/GKE metadata could also leave OpenClaw waiting forever.Why This Change Was Made
google-auth-libraryfallback has an owner-level 30-second deadline. This is necessary because the pinned library uses separate transports for some STS and metadata refresh paths, so configuring its top-level Gaxios transporter would not cover every ADC source.Credential discovery, token caching, response-size limits, gzip handling, and error parsing are unchanged. No config or environment surface was added.
User Impact
Vertex authentication failures now return within 30 seconds instead of leaving provider work stuck indefinitely, including
authorized_userrefresh and library-managed ADC resolution.Collision / Differentiation Check
Evidence
2cc02c4f41d35d530e0754fbd781f10eca1a6f29aws, leasecbx_9013e7de2edc, runrun_3acff6e93db3):pnpm test extensions/google/transport-stream.test.ts— 1 file, 85 tests passed.git diff --check: clean.Mutation proof: the focused tests hang without the corresponding deadline and reject with
TimeoutErrorwhen the production deadline is restored.Google contracts checked: OAuth refresh-token flow and Application Default Credentials.
Not tested: a live Google OAuth, Workload Identity, or Vertex tenant; no live ADC credentials were available. The deterministic tests cover both the custom fetch path and the
google-auth-libraryowner boundary.