Repository navigation
fix(web): retry transient cookie renewal during startup - #504
Conversation
A transient renewal failure (network, HTTP 5xx, renewal store) while the durable renewal secret is still valid now yields a retryable startup result with capped backoff and a reconnecting surface instead of the pairing prompt. Definitive rejection still requires pairing. Implemented by GPT-6.1 Sol (Codex in T3 Code); committed by the backlog coordinator because the worker's commit was blocked by a hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Luna review round 1 at 230a6a9: CHANGES REQUESTED
The requested auth behavior otherwise checks out: the server maps a rejected renewal secret to 401 / |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Luna review round 2 at 96be3c6: APPROVE |
* fix(web): retry transient cookie renewal during startup A transient renewal failure (network, HTTP 5xx, renewal store) while the durable renewal secret is still valid now yields a retryable startup result with capped backoff and a reconnecting surface instead of the pairing prompt. Definitive rejection still requires pairing. Implemented by GPT-6.1 Sol (Codex in T3 Code); committed by the backlog coordinator because the worker's commit was blocked by a hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(fork): list PR #504 in paired-session-renewal record Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
What: A paired browser whose cookie renewal fails briefly at startup now shows a reconnecting state and retries, instead of asking to pair again.
Why: Startup caught every renewal failure as
nulland returnedrequires-auth, even when the durable renewal secret was still valid and the failure was transient.So what: Luna review and CI, then the backlog coordinator merges.
Problem
apps/web/src/environments/primary/auth.tsturned any renewal failure (network error, HTTP 5xx, renewal-store failure) intorequires-auth, so a returning paired browser saw the pairing prompt during a short server or network hiccup.Fix
retryablestartup result with capped exponential delays (500, 1000, 2000, 4000, then at most 5000 ms).packages/client-runtime/src/connection/supervisor.tsis untouched (PR fix(auth): pace renewal when the client clock is ahead #473 owns its pacing).Upstream
No matching fix in pingdotgg/t3code; renewal is fork-owned. Details: #330 (comment)
Proof
vp test run apps/web/src/authBootstrap.test.ts: 38 passed (worker, and again by the coordinator after rebasing onto7f300491d3).auth.tswithrequires-authinstead ofretryable; definitive rejection passes on both.SessionRenewalwith fake transport and storage boundaries.apps/webtypecheck passed (worker);scripts/fork-check.shOK after rebase.Elon record
auth.ts.Closes #330
Implemented by GPT-6.1 Sol (Codex harness in T3 Code). Committed, rebased and opened by Claude Opus 5.5 (Claude Code in T3 Code) because the worker's
git commitwas blocked by a ContextMD hook.🤖 Generated with Claude Code