Repository navigation
fix(web): retry boot chunk failures up to 3 times per minute (CLO-1310) - #241
nullStack65 wants to merge 2 commits into
Conversation
The chunk reload guard allowed one automatic reload per build per tab, forever. When a network blip failed the entry chunk and the reload hit the same blip, the tab dead-ended on "T3 Code failed to start", and any later transient failure in that tab got no retry at all. Allow up to 3 automatic reloads in a 60 second window, with growing delays (0.75 s, 1.5 s, 2.25 s), counted per build in sessionStorage. A chunk that is really gone still stops after 3 attempts; a blip after the window has passed gets a fresh set. Further preload errors in a document that already scheduled a reload share it instead of spending attempts. Model: claude-opus-5-5 Task: fix Agent: Builder Lane: magpie Harness: t3/claude-code Model-family: Claude Opus (runtime model label) Model-generation: 5.5 (runtime model label) Skills-SHA: unknown (no Skills consulted) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
Auto-rebase escalated (not pushed). Head checked: 345ac90. Rebasing onto the current release/native-0.1.10 conflicts in three files: This is a semantic conflict, not a textual one. The base already contains the pull request that merged as 53ae52a ("reload up to three times on a failed chunk instead of dead-ending"). It implements the same behavior with a different design:
A human or System-2 should decide whether this PR is now redundant (close it) or whether only the 60-second window should be kept on top of the base's implementation (a small follow-up change). |
|
Auto-rebase escalated (not pushed). Head stayed 345ac90. The rebase onto
The base branch already contains "reload up to three times on a failed chunk" (the earlier web fix, merged as #240). It implements the same behavior as this PR with a different design: a list of reload timestamps in a 10-minute window, with Decision needed (System-2 or a human): drop this PR as superseded, or reduce it to only the delta wanted (for example the 60 s window or the options-object API) rebuilt on top of the base implementation. A mechanical conflict resolution would pick one design silently. |
The base already carries the CLO-1310 chunk reload retry from the merged "reload up to three times on a failed chunk" change, so the conflicts resolve to the base version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Conflict repair: merged The base already carries the same fix for the same ticket (CLO-1310, boot chunk failures dead-ending): the merged change "reload up to three times on a failed chunk instead of dead-ending" (#240). It caps reloads at three per build in a 10 minute sliding window, spaced 0.75 s and growing. This PR's version did the same thing with a fixed 60 s window. All three conflicting files ( Tests: Recommendation: close this PR as superseded instead of merging an empty change. |
Problem
The web app dead-ended on "T3 Code failed to start" when the network flapped during boot (the boot recovery issue, CLO-1310).
chunkReloadGuardreloaded the page once per build per tab, ever. If that reload hit the same blip, the user was stuck on the boot error screen, and a later transient failure in the same tab got no retry either. The CLO-1299 sweep measured this at 2 of 100 cold loads on a busy host, and 7 of 248 page loads in the full sweep.Change
apps/web/src/lib/chunkReloadGuard.ts: up to 3 automatic reloads per 60 s window, with growing delays (0.75 s, 1.5 s, 2.25 s), counted per build in sessionStorage. A chunk that is really gone still stops after 3 attempts, and after the window passes a later blip gets a fresh set. Furthervite:preloadErrorevents in a document that already scheduled a reload share that reload instead of spending attempts. The old plain-string marker is read as a fresh window.chunkReloadGuard.test.tscovers the cap, the delays, window expiry, counting across reloads inside the window, a build change, the legacy marker and blocked storage.bootstrap.test.tsadds "reloads again when the first automatic reload hit the same blip" and "shows the boot error once every automatic reload failed".Evidence (head 345ac90, base release/native-0.1.10 @ 9fd13fa, Node 26.13.1)
vp test run --project unit src/lib/chunkReloadGuard.test.ts src/bootstrap.test.ts src/bundledDev.test.ts: 3 files, 14 tests passed.reloads again when the first automatic reload hit the same network blipfails, so it catches the dead end.vp linton the changed files is clean, andvp fmt --checkpasses.vp test run scripts/feature-map.test.tspasses (4 tests).effect-tsgo tsrs --noEmitinapps/web: none of the errors are in the changed files. The 9 existing errors inSidebar.logic.test.tsandbotOrgTree.test.tsare present on the base.Not verified here: the browser repro (
qa/specs/70-reliability.spec.tsfrom the sweep harness) is not in this repo, so I did not re-run it against this build.Prior art
vite:preloadError+window.location.reload()pattern: already in use. This change only bounds it per window instead of once.vite:preloadError(Nov 2026).Model: claude-opus-5-5
Task: fix
Deploy: fleet
🤖 Generated with Claude Code