Skip to content

fix(auth): answer a paused no-auth provider with a retryable cooldown - #15402

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
maxmad64bis:fix/noauth-refusal-pause-retryable
Oct 6, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
maxmad64bis:fix/noauth-refusal-pause-retryable

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #15306

Summary

During a refusal pause, requests using the shared no-auth connection failed with 401 and the client stopped instead of retrying. The pause path returned no connection, which reads as missing credentials. It now returns a retryable cooldown, so the request waits or receives 429 with Retry-After until the pause ends. Builds on @rapha4lx's diagnosis from #14977.

Related Issues

Validation

  • Change type: provider
  • Focused tests and category gates from the golden path — focused suites green at the head; the full unit suite, Vitest, the coverage gate, and the production build run in CI.
  • npm run lint
  • Reconciled with the current active release base; focused checks rerun afterward — rebased on the current release base; focused tests rerun.
  • Production-code changes include a new or updated automated test in this PR — new regression test added in this PR covering the changed paths.

Tests Added Or Updated

  • tests/unit/noauth-pause-retryable-cooldown.test.ts — 16 cases covering the pause reader, the pause cooldown shape, the six selection criteria, the 429 with Retry-After reply, storage expiry, the refuse-then-request flow, and the combo fallback to the next target.

Coverage Notes

  • src/sse/services/auth.ts — covered by tests/unit/noauth-pause-retryable-cooldown.test.ts (pause site answers the cooldown; the other three sites stay unchanged).
  • open-sse/services/opencodeFreeTierSkip.ts — covered by tests/unit/noauth-pause-retryable-cooldown.test.ts (remaining-time reader cases).
  • src/sse/services/noAuthModelCooldown.ts — covered by tests/unit/noauth-pause-retryable-cooldown.test.ts (envelope shape cases) plus tests/unit/noauth-model-lockout-retryable.test.ts staying green (6 cases).

Reviewer Notes

Paused no-auth selection returned null (401); now returns a connection-scoped 429 cooldown, proven by 16 passing selection tests (incl. combo fallthrough).
@maxmad64bis
maxmad64bis force-pushed the fix/noauth-refusal-pause-retryable branch from b1acdd6 to 900ab7b Compare October 4, 2026 12:52
@diegosouzapw
diegosouzapw merged commit 55bc0d4 into diegosouzapw:release/v3.8.52 Oct 6, 2026
42 of 85 checks passed
diegosouzapw pushed a commit that referenced this pull request Oct 6, 2026
Onda 8. Este squash entra com o crédito de @maxmad64bis (fix(noauth): show active free-tier pauses on the account card).

#15402 e #15443 já estavam neste branch e entram com ele. O comportamento que o #15436 já publicou ficou o da release. O cartão de pausa e a rota de visibilidade são deste PR. O teto de file-size fica para o follow-up da onda.

⚠️ base-red inherited: #15306

Obrigado, @maxmad64bis.
@maxmad64bis
maxmad64bis deleted the fix/noauth-refusal-pause-retryable branch October 7, 2026 20:37
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.

2 participants