Skip to content

fix(limits): bound stale Codex token refresh - #148

Merged
pitimon merged 1 commit into
mainfrom
fix/144-bound-codex-refresh
Aug 5, 2026
Merged

fix(limits): bound stale Codex token refresh#148
pitimon merged 1 commit into
mainfrom
fix/144-bound-codex-refresh

Conversation

@pitimon

@pitimon pitimon commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • create the timeout-wrapped provider fetch before the serial stale-Codex refresh prelude
  • pass that AbortSignal-enabled fetch into refreshCodexTokens
  • keep the same configured providerTimeoutMs contract for OAuth refresh and provider requests
  • prove joined callers settle and the single-flight slot can retry after timeout

Verification

  • RED on origin/main: hanging refresh held the shared flight past the test deadline
  • GREEN: hanging fetch receives an abort; joined callers share the bounded result; reset starts a successful second refresh
  • focused usage-limits, Codex refresh, failure-visible, and single-flight suites pass
  • npm run ci:local passes: dashboard 320/320, root 1036/1036, all validators green
  • independent review: PASS, no blocking findings
  • static scan: no secrets, debug artifacts, or dangerous execution added

Closes #144

@pitimon
pitimon force-pushed the fix/144-bound-codex-refresh branch from 83f13ef to ba673d4 Compare August 5, 2026 08:58
@pitimon
pitimon merged commit 5993ad2 into main Aug 5, 2026
1 check passed
@pitimon
pitimon deleted the fix/144-bound-codex-refresh branch August 5, 2026 09:00
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.

limits: bound the serial Codex token refresh so single-flight cannot hang every caller

1 participant