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 1315b06
Browse filesBrowse the repository at this point in the historyBrowse files
A slot handler awaiting ctx.use(SlotLoader) during PPR shell capture executed
the loader and tripped the cookies() identity guard, refusing the capture
forever (x-rango-shell: MISS permanently) with a warning blaming a bake-lane
loader that did not exist. This affected EVERY route (the issue's working "/"
was a stale-shell artifact).
Resolution: align PPR capture with the cache()/"use cache" precedent instead
of adding masking machinery. The CONSUMPTION-LANE RULE, now doctrine: for any
shared-artifact capture, server-side handler consumption via ctx.use(loader)
yields a BAKED copy with cookies()/headers() reads permitted — the same
documented footgun cache() already carries ("Cache purity & tainted objects");
client-side useLoader is the live lane. DSL segment lanes are untouched: a
live-lane (loading()) registration still masks its segment — so for the
parallel-slot shape the slot stays a LIVE hole (the segment mask pins the
boundary; the handler's baked copy is discarded with the postponed subtree),
and the baked copy materializes only where the value renders as unshielded
shell material.
Mechanism: the loader-body ALS scope (which already carries loaderId for
guard attribution) gains handlerInvoked, set when the invoking ctx.use ran
outside DSL loader scope; the shell-capture identity guard in cookie-store
exempts handler-invoked loader bodies. Nothing else: no priming, no release
machinery, no new request-context fields. refuseOnGuardTrip now names the
actual tripping loader; the misleading bake-lane attribution is gone.
Locked in as doctrine: semantic-matrix row [PPR3] (dev+prod) +
docs/internal/execution-model.md; e2e pins for BOTH artifact types
(shell-cache slot-use cases both modes; new cache() handler-consumed baked-
copy cases both modes); design docs (ppr-shell-resume.md, incl. the masking
history as scar tissue; loader-container-bake.md); skills (/rango invariant,
/ppr, /parallel, /caching, /use-cache, /loader).
Tests: guard exemption proven red (2 failed with the exemption disabled);
full router suite 4937 passed; shell-cache e2e 22/22 both projects; semantic
matrix 21 dev / 24 production; cloudflare-basic ppr-shell 19/19 both
projects (confirms the slot settles and ring-3 writes serialize — no hang);
typecheck 15/15; lint; skills/doc-links/docs-api guards green; gen files
regenerated.
// The CONSUMPTION-LANE RULE (issue #672 / #674): server-side handler
629
+
// consumption via `await ctx.use(loader)` is the BAKED lane in every shared
630
+
// artifact — cache(), "use cache", and the PPR shell. During capture the
631
+
// loader EXECUTES with identity reads (cookies()/headers()) permitted
632
+
// (mirroring the cache() purity allowance), so the capture is never refused;
633
+
// the value freezes as a capture-time copy wherever it renders as
634
+
// unshielded shell material. DSL segment lanes are unchanged — a loader
635
+
// ALSO registered live-lane (loader()+loading()) still masks at capture and
636
+
// keeps its boundary a live hole. Client-side useLoader is the live lane.
637
+
{
638
+
id: "PPR3",
639
+
contract:
640
+
"consumption-lane rule: handler ctx.use of a cookie-reading loader executes at capture (no refusal); unshielded value bakes frozen; a registered live-lane slot stays a live hole",
0 commit comments