You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4b907f4
Browse filesBrowse the repository at this point in the historyBrowse files
* fix(ppr): dev shell endpoint signals boot-race NOT-READY; read-through re-polls to keep first-request HIT (#719)
Root cause: the dev `/__rsc_shell` endpoint boots its capture realm lazily on
the first hit — temp server (Cloudflare preset), registry import, and a Vite
dependency re-optimization the first shell-capture import can trigger. All are
transient. The read-through fired once and mapped any non-2xx to a hard
first-request MISS, so a Prerender+ppr route's FIRST request lost the race and
served axis-1 (x-rango-shell: MISS) while a later poll HIT — the build-time
first-request-HIT contract held only after a warm-up. Fast machines lose the
race deterministically; slow CI arrives after the boot infra settled, so it
read "consistent locally, 0-flake on CI". warmToHit in the tests masked it, but
the literal first-request-HIT contract was broken.
Fix: the endpoint tags the transient not-ready branches with
`x-rango-shell-dev: NOT-READY` (HTTP 503) — re-optimization catches, missing
runners, and an empty registry. The read-through re-polls ONLY that signal, a
bounded await of readiness (10s deadline, 150ms interval). Every genuine
outcome — a served entry, a real negative (404: not prerenderable / capture
refused), or a network fault — resolves on the first attempt, so a non-baked or
already-warm route pays zero extra latency. The endpoint half lives in the Vite
plugin, so `pnpm build-router` is required for dist/vite to reflect src.
Closes#719.
* test(ppr): scope settled-fast assertions under the settled container to skip a hidden fizz artifact (#718)
The `*-settled-fast` duplicate is a benign, hidden fizz artifact, not a bug.
When the nested-promise Flight payload fills the dehydrated boundary before the
trailing `$RC("B:0","S:0")` completeSegment script runs — a streaming window
that #706's byte-copy fragment splice widens (the baked payload now finishes
well ahead of the resume) — React client-renders the boundary in place and
`$RC` leaves fizz's hidden segment container (`<div hidden id="S:0">`) orphaned
as a direct child of `<body>`. It carries the `hidden` attribute: invisible,
zero layout, out of the a11y tree — but it holds a second `-settled-fast` node,
so a bare testid locator strict-mode-collides with it.
Fix: scope the `-label` / `-fast` assertions under the visible settled
container (`data-testid="shell-settled"` / `ppr-settled`) so the strict-mode
locator selects only the in-place copy; the orphan lives outside it. Confirmed
once-on-wire; reproduced 6/6 by widening the $RC delay, 1/1 after the scope fix.
Closes#718.
* fix(ppr): narrow dev readiness NOT-READY to reoptimization only — terminal temp-server/registry failures fail fast, not 10s-retry; + cold/injection dev coverage. Addresses review P2/P3 on #719.
0 commit comments