From 3842776c9d43e2d09684de69106f5d649d8a9999 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 30 Oct 2026 13:06:31 +0000 Subject: [PATCH] test(web): warm the traces tier in C9 so arm (b) claims at adoption C9 (b) reads a container-trace arg, whose materializer is the frames client's traces tier (plan step C3, `tierLoaders.trace`, a dynamic import). The spec never warmed it, so the marker held the occurrence (frame-client.ts `needsTrace`) until the import landed, a module load that two fixed `quiesce()` rounds only sometimes outlast. When it lost, (b) saw no fill, and the orphaned held frame then mounted on the late install's flush during (c), logging (b)'s key miss into (c)'s page. Warm it once in `beforeAll`, as C19 and C11 do; the cold hold keeps its own pin (tier-trace-hold.spec). Assertions unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 --- .../web/test/consistency/c09-no-phantom.spec.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/web/test/consistency/c09-no-phantom.spec.tsx b/packages/web/test/consistency/c09-no-phantom.spec.tsx index 55197a6815..0e5c30dc66 100644 --- a/packages/web/test/consistency/c09-no-phantom.spec.tsx +++ b/packages/web/test/consistency/c09-no-phantom.spec.tsx @@ -20,13 +20,21 @@ * claim walk), and `hydratedCreateLoadingBoundary` (a boundary with nothing * pending hydrates straight through). * + * Arm (b)'s materializer is the frames client's traces tier (plan step C3), + * loaded through `prepareTier("trace")`; these cells run with it RESIDENT + * (warmed once below, as C19 does), so the claim reads the delivered + * snapshot synchronously. Cold, the marker HOLDS the occurrence until the + * import lands — a module load no fixed `quiesce()` count can wait out — + * and that hold has its own pin (`tier-trace-hold.spec`). + * * Observation: a MutationObserver frame recorder over the container (a * fallback frame would appear as a distinct text), the dev key-miss warning, * and node identity of the claimed `_hk` element. */ -import { afterEach, describe, expect, test, vi } from "vitest"; +import { afterEach, beforeAll, describe, expect, test, vi } from "vitest"; import { Loading } from "solid-js"; import { hydrate } from "@solidjs/web"; +import { prepareTier } from "../../frames/src/frame-client.js"; import { bootPage, fillHtml, @@ -45,6 +53,8 @@ afterEach(async () => { await page?.cleanup(); page = undefined; }); +// The traces tier, resident before any page boots (see the module doc). +beforeAll(() => prepareTier("trace")); const keyMisses = (p: Page) => p.warnings.filter(w => w.includes("Hydration key miss"));