The compiler reports an unsplit route once per dev server; on the Alpine
runner the second test reused the host that compiled the route for the
first one, so its diagnostics window held no warning ("0 of 0").
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The consumer's resolve and transform hooks compared Vite's module ids
(forward slashes on every platform) with the recorded inputs' native paths
(backslashes on Windows), so no fixture module was ever recognised there:
every route's file was null and no import edge was recorded.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pnpm links workspace packages on Windows with relative directory symbolic
links where it may create them (the CI runners). Windows resolves a
relative symbolic link reached through a junction against the junction's
own path, not its target's, so through the junctions the harnesses made
to the packages' `node_modules`, `@tanstack/react-router` led nowhere:
`existsSync` was false and Node's, Vite's and the optimizer's resolvers
all missed it ("Cannot find module '@tanstack/react-router'" in the
generator's consumer runs; the dev servers served the router package raw
with its CommonJS dependency, after "Failed to resolve dependency ...
present in optimizeDeps.include"). Verified in a diagnostic run of the
Compiler Platforms workflow: a directory symbolic link resolves, a
junction does not, on either drive. `linkDirectory` makes a symbolic
link and falls back to a junction where the process may not (where pnpm
falls back too, so its own links are absolute).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Main ran the plugin-order check in the code-splitter plugin, so only with
`autoCodeSplitting` on; the single compiler plugin ran it in every mode and
failed the router-monorepo example builds (`react()` before
`tanstackRouter()`, splitting off). Without splitting, route HMR works
whatever the order: the HMR block is appended to what the framework plugin
emitted. Verified on a real page (integration/route-hmr-browser-plugin-
order.test.ts): with the framework plugin first and splitting off, an edit
of a named or inline React component shows in place keeping its state, a
Solid edit shows in place, no warning; with splitting on, the dev server
refuses to start. The six example reorders are reverted: main's order builds
again, and the example builds of the PR workflow cover the restored gate.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Alpine's distribution Chromium (a full browser, not Playwright's headless shell) requests /favicon.ico, which no test app serves; the page harness reported it as a failed module. The generator's fast tier timed out at Vitest's default 5 s on the macOS arm64 runner (a generator run plus a Vite load per test): 15 s.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
On the Nx Cloud agents (--parallel=3) the router-plugin integration tier took 405-438 s at 4 workers against its 80 s hard limit and 47 tests hit their 30 s / 10 s timeouts; the fast tier took 62 s against 10 s. Each tier starts four Vitest workers with Vite dev servers and Chromium pages. Mark the tiers parallelism: false (as test:e2e is) and use min(4, max(1, cpus / 2)) workers.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A library build (build.lib, external dependencies) lists the external packages among a chunk's imports; the walk from the entry chunk dereferenced them as chunks and failed the build with "Cannot read properties of undefined (reading 'modules')" (the router-monorepo examples once their plugin order was fixed).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The branch's compiler plugin checks the plugin order in every mode (main only did with autoCodeSplitting on), so these six library builds failed with "Plugin order error: '@vitejs/plugin-react' is placed before '@tanstack/router-plugin'".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
On the Windows runners os.tmpdir() is an 8.3 short name (C:\Users\RUNNER~1\...), while fs.promises.realpath reports long names (C:\Users\runneradmin\...): 225 generator tests failed with "No fixture inputs recorded for ...". The run directory now uses realpathSync.native, and the consumer-inputs registry canonicalises recorded roots and looked-up files the same way.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The fast tier runs its client checks in a headless Chromium (route-app.ts), which no runner had ("Executable doesn't exist" on Windows, macOS, Linux arm64 and Alpine); start-plugin-core's unit tier depends on the Solid and Vue Start builds, which the install filter left out ("Cannot find package 'vitest'" loading their vite.config.ts).
Install Playwright's Chromium (with its Linux dependencies) and the react/solid/vue Start packages. Alpine has no Playwright build: install the distribution's Chromium and name it through TANSTACK_COMPILER_TESTS_CHROMIUM, which the browser helper passes as executablePath.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
K2 made it module-private; K1's path-normalization test imports it to
compute the expected ids.
[final-head]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: purity.ts keeps K1's empty-set guard on top of core
unwrapExpression; pipeline.ts takes K1's identity-recipe and plan
fingerprint helpers with K2's self-contained comments; import-protection
utils.ts keeps K2's removal of the unused clearNormalizeFilePathCache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Start's Rsbuild dev server, an edit that adds `createServerFn` to a
code-split route whose page is open fails when the server fn is used by
the component: Rspack's `splitChunks` (its default cache groups on Start's
`chunks: 'async'` client) moves the gained `node_modules` modules into a
new async chunk, and the hot update of the already loaded component chunk
re-executes the route's component module before anything loads that chunk
(`Cannot read properties of undefined (reading 'call')`). Upstream
(Rspack's HMR runtime, web-infra-dev/rspack#11324, #11922): a plain
Rsbuild app without any TanStack code fails the same way, so the test is
a `.fails` pin. A loader-only edit works (the loader chunk loads only when
the loader runs), and so does the same component edit when the client
entry already imports a server fn (no new chunk): both are regular tests.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Same digest as digestOf of the record (unit test), without the generic
canonicalJson walk: edge keys, and so import protection's edge module ids,
stay identical to the previous ones.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The row failed only through the page harness's stale `?t=` snapshot; it
passes with the harness fix (10/10 whole-file runs under load, 5/5 with
COMPILER_TESTS_PINS=run), so it joins the ordinary rows.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The page harness snapshotted the `?t=` stamps of the app's files before the
page ran and `app(file)` preferred that snapshot. When the previous route's
reference module imported a file the new one imports only from a chunk, Vite
prunes the file while the page loads the new route module and gives it a new
HMR time, which the chunk then imports by: two URLs, two instances of the
file (the module-state rows of pages/known-bugs-code-splitter with
`calls === 0`). The page now asks the dev server for the current URL at
import time (`/__route-app__/stamped`), after the URL it already requested
the module by; the snapshot is gone.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Two generations of 4,096 ids instead of a Map that only grew (ids of
deleted files stayed for the session). A miss costs ~0.3 µs, a hit ~0.03 µs,
so the memo stays; it now holds at most 8,192 ids.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Lazy plan fingerprint (only the Rsbuild session reads it), edge keys as a
digest of the joined fields, process.env read once at module scope,
stringLiteral fast path, numeric clusterReads memo, revision() once per
request, canonicalJson in loops, identity env emission without a map
(every host passes an unchanged env module through), hit validation and
snapshot validation with Promise.all. Tier 0 reads import/export bindings
from Yuku's module records (no node index for Tier-0-only modules); purity
skips the callee reference lookup when no callee is declared pure.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comments and test names cited design sections, rulings and notes that are not
in the repository; state the reason, point to the compiler README, or cite the
SPEC clause instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core comments and test names cited design sections, rulings, lanes and review
ids that are not in the repository; state the reason, point to the compiler
README, or cite the SPEC clause instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comments in router-plugin, router-generator, react-start-rsc and the oracle
cited design sections, rulings and notes that are not in the repository; state
the reason instead, or point to the compiler README / SPEC. The oracle docs
describe the Babel/unplugin implementation in the past tense.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TSR_COMPILER_NO_CACHE and TSR_COMPILER_STATS(_BYTES): what they do, what they
cost when unset, and when to reach for them on a user report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vite 5 cannot be installed under the workspace's trust policy, so support for
it cannot be tested; the plugin is smoke-tested on Vite 6, 7 and 8.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- import protection: delete the unused debug/candidate helpers, the unused
constants module (with the TSR_IMPORT_PROTECTION_DEBUG(_FILTER) env reads)
and the unused adapter-config fields
- delete zero-reference exports (emitOutput, CompilerError, planCacheFor,
describeCluster, readStringLiteral, isComponentTagName, jsxText,
RegionTable.isWithin, HYDRATE_QUERY_KEY, PROVIDER_QUERY and the re-exports of
routerRouteId/EDGE_MODULE_PREFIX), and barrel re-exports nobody imports
- one unwrapExpression/isExpressionWrapper in the core instead of six copies
with different wrapper sets
- Start drops its copy of the import-attributes keyword rewrite (the core's
applies to every output)
- one OWNED_QUERY_RE (derived from OWNED_QUERY_KEYS) and one derived-sibling
resolver (resolveDerivedSibling) for both Vite hosts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The `assert` → `with` rewrite searched the text between the specifier and
the attributes for the word, so `/* assert */ assert { … }` rewrote the
comment and kept the keyword browsers reject. Skip whitespace and comments and
look at the first word.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
compiler-test-utils pins yuku 0.23.0 like the product packages; 0.23.0 is
older than the minimumReleaseAge window, so the exclusion is no longer needed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tree re-read check read `parentRoute.children` of the router's route,
which throws for the root route, so every root route edit failed to apply
and fell back to a full reload.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the resolution cache and the emitted-output memo (R54), with
fileSetVersion-gated re-validation of recorded resolutions; router-core
applyRouteHmr tracks every route evaluation; Rsbuild/Vite
route-edit-after-tree-rebuild integration tests. Merged cleanly on top of
the main merge and the DCE merge (no overlapping files).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A function-level initialiser calling a hook (useX, ns.useX) stays as a
statement with its imports whatever they are; a plain call whose imports
nothing else reads is server-only code and leaves with them (the oracle's
'drops vars nested in blocks only the server implementation reads').
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- an identifier option value naming a reassigned module binding stays in the
route module with a not-split:reassigned warning (the route holds the value
it had when it was created)
- an object-form loader passed by reference with options next to handler is
split inside its object (staleReloadMode stays with the route), or stays
with a not-split:loader-object warning when other code reads the object
- Hydrate's server-side orphan pass is the core cleanUp (R56)
- tests: nested server fns in the separate provider env keep what their
chains read; hook calls and their imports survive on the client and under
<ClientOnly> on the server; captures of the enclosing function are compile
errors in client, ssr and rsc (planner level, Vite host, Vite RSC, Rsbuild
RSC layer) and the non-capturing case is hoisted everywhere; isomorphic
and env-only replacements after an unterminated statement; the route
module re-exports an exported let with its setter
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Vite hosts returned an absolute derived id (`?tsr-split=…`,
`?tss-hydrate=…`) verbatim from `resolveId`, meant for ids the compiler
itself constructed under a project path with a `#`. In dev, a browser's
root-relative URL (`/src/route.tsx?tsr-split=component`) is absolute too,
so it was never resolved to its file and failed to load. Derived ids are
resolved as the importer's sibling, as before; `load` serves them.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- an edit overriding a claimed placeholder counts as reads of the enclosing
region in that output (a nested server fn chain kept in place with its stub
lost every import and const it read in the separate-provider env)
- the renderer guards a statement start whose rendered first token could
continue the previous unterminated statement with a ';' (ASI hazard of
'(() => 1)()' replacements and orphaned initialisers)
- an extracted-export output re-exports every exported symbol of the moved
cluster (an exported let and the function writing it)
- regex literals are not copyable primitives (identity and lastIndex)
- an orphaned function-level call initialiser always stays as a statement
with the import it reads (hook calls never dropped)
- pre-existing dead pure cycles are kept like a dead self-recursive function
- compileModule serves the last overtaken attempt's plan (unpublished, with
a compile-overtaken warning) instead of throwing after 3 attempts, and
discards the dependency ledger when an attempt throws
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Start Rsbuild host and the router webpack host reset their warning
ledger in every environment compiler's `beforeRun`, so a file's warning
(a route built by a helper call, an option that reads `this`) repeated
once per environment of a build. The client environment's run starts the
ledger, as in the Vite hosts (SPEC J2.19).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Compiler Platforms workflow ran one integration test per project on
Windows, macOS arm64, Linux arm64 and Alpine. Its unit step now includes
the compiler core (router-utils), and the smoke step runs the production
bundle checks on Vite and Rspack, the project-path rows (`#`, `%`, spaces,
non-ASCII) and the unparsable-module rows on every bundler, and the
non-ASCII route file rows, all without a browser; Start's smoke adds its
project-path and unparsable-module builds on Vite and Rsbuild.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The peer range admits Vite 5 to 8 while the suite runs on 8. A new
private, test-only package, @tanstack/compiler-vite-versions, holds Vite 6
and 7 as aliased packages (vite6, vite7); each ships a `vite` binary, so
they live apart from any package that builds with Vite (installed as
devDependencies of router-plugin they shadowed its `vite` binary, and the
library build ran under Vite 7). The smoke builds a route app with each
version (the component is a lazy chunk and renders) and serves it to a
real page (the component is split; a route option edit hot-updates the
page's router in place). Vite 5's latest release fails the workspace's
no-downgrade trust policy and cannot be installed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The route HMR runtime re-read the tree on every route update (two tree
processings per edit); now only when the parent's children no longer hold
the router's route, which is what a re-executed tree module leaves behind.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`yuku` is ESM-only and the CommonJS builds of router-utils, router-plugin
and router-generator (and the `tsr` binary) `require()` it: Node loads an
ES module through `require()` without a flag only from 20.19 and 22.12
(23 and later always). `engines` of those packages, and of router-cli,
now say `^20.19.0 || >=22.12.0` instead of `>=20.19`, which admitted
21 and 22.0–22.11, where a `webpack.config.js` requiring the plugin throws
ERR_REQUIRE_ESM. Loading yuku through a dynamic `import()` instead would
make the synchronous parse API asynchronous, so the range is the fix.
The Start and router-plugin changesets open with what changes for an app
that upgrades: every server function id changes, `generateFunctionId`
receives the stable name, production refuses HTTP calls to server
functions no client module imports, unparsable modules fail the client
build, esbuild refuses code splitting, the removed experimental hooks,
the one-time route tree formatting change, and the Node range.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A module Yuku could not parse was returned untouched by every host, on the
assumption that the bundler's own parser rejects it too. SWC and esbuild
accept TypeScript grammar errors Yuku (and tsc) reject, e.g. a definite
assignment assertion with an initializer, so a Start module defining a
server function could ship to the client untransformed.
Start (Vite and Rsbuild): a module that names a Start or Router package
and does not parse fails the client build with an error positioned in the
file; server environments warn once. Modules naming no such package keep
the safe pass-through (CommonJS scripts, J4.16). Router plugin: a route
module that does not parse stays unsplit and is reported once per file per
run, naming the file (J2.8, J2.19). The router Vite host resets its
warning ledger once per build run, not once per environment.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A `#` in the project path (`C#`, `project #2`) was read as a URL fragment
by the compiler's id parsing (`identify()`, the route split planner's
sibling specifier, import protection's path stripping), so every module of
such an app was passed through untouched: no route split, no HMR and, in
Start, no server-function, environment or import-protection transform. A
`#` is now a fragment only after the query.
Rspack and webpack escape a `#` of the path in the loader's `resource`
(`#`, `\0#`); both loaders now unescape it, so the path matches the
route registry and the file system. The Vite hosts load their own derived
ids (`?tsr-split=`, `?tss-hydrate=`, `?tss-serverfn-split`) and resolve
absolute ones verbatim, since Vite's load fallback and file resolution cut
an id at the `#`.
Tests: identity unit test; router builds under `#`, `%`, spaces and
non-ASCII directories on Vite, Rspack and webpack assert the split; a
Start build under a `#` directory asserts the handler is not in the client
bundle and the route is split, on Vite and Rsbuild.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A route option `deleteNodes` erases (Start's client `server` handlers) now
takes with it the destructuring leaves only it read, with the imports their
defaults or computed keys read, as babel-dead-code-elimination did on main.
The route-split planner runs the core's `cleanOrphanedDeclarations` after
its erasures (start-env's run happens before the router planners in Start).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Start-env's cleanup of declarations only removed code read moves into the
compiler core (`cleanOrphanedDeclarations`) so that every planner that erases
code can run it. Found by running babel-dead-code-elimination's test suite
through the Start compiler:
- an orphaned object rest element is removed, so a sibling whose default
reads a server-only import can go too (the import no longer reaches the
client);
- a function-level pattern whose every binding is orphaned goes whole
(`const {} = serverConfig` kept the import);
- a removed trailing array element leaves a hole, so the iterator is
stepped as often as in the source;
- an impure initialiser kept for its effects parses when it starts with
`{`, `function` or `class`, and cannot continue the previous line;
- a bail-out no longer cancels the round's progress (the fixpoint could
stop early).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without the resolution cache every plan hit (derived ids included) asked the
bundler's resolver for each recorded resolution again: +7% Vite build, +18%
compile-all, +9% Rsbuild build in interleaved runs. A resolver's answer only
changes when a file appears or disappears, so the caches carry a file-set
version (bumped by invalidate on add/unlink, and per Rsbuild watch
compilation, which gets no event for files nothing imports) and validation
skips the resolutions of a plan validated at the current version. No
resolution is stored anywhere.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
After a route is added or renamed, the regenerated route tree module
re-executes and imports each route module's current export, so the router
can hold a later evaluation of a route than the first one the HMR runtime
recorded; every later edit of that route was ignored (found by the compiler
soak on Rsbuild: a loader edit after an inline server fn cycle never showed).
applyRouteHmr now records every evaluation of a route id, syncs the router
with the tree before choosing the live route, and updates that one.
Regression tests on Start's Rsbuild and Vite dev servers (a loader edit
after a route added and after a route renamed) and a router-core unit test.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Brings in Node 26.12.1, Version Packages (#8745), the TanStack Markdown
rendering guide (#8808) and the Nx 24 upgrade (#8807). Conflicts were
limited to a version bump in the Solid Rspack quickstart example and
pnpm-lock.yaml, which was regenerated with pnpm install.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolutions are recorded per compile in the dependency ledger (one answer
per attempt) and validated through the environment's own resolver; nothing
caches them across compiles, so add/unlink no longer clears anything and the
Rsbuild session's forgetMisses only marks missing files. Emission from a
frozen recipe is not memoised on the plan. The TSR_COMPILER_NO_CACHE knobs
'resolutions' and 'emitted', their counters and stats go with them.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Lane L: compiler cache stats and knobs, caches bounded by the live plans and
files (Vite and Rsbuild), marker-only target fingerprints, soak tooling in
benchmarks/compiler-perf. Its changeset is folded into the consolidated
compiler-core-yuku and start-compiler-yuku changesets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The inlined probe saved ~1 ms per process start but diverged from exsolve on
edge cases (a srcDirectory that does not exist also looked in its parent,
unreadable candidates were skipped, percent-decoding and queries), so keep
exsolve. Pass cache: false instead: its process-wide cache kept misses, so a
dev server restart did not see an entry file created since. The plugin already
resolves the entries once per instance; a restart pays ~0.3 ms more.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
unplugin already imports @jridgewell/remapping at plugin startup, so loading it
lazily in the loaders saved nothing and only made composeMap async.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tanstack/router-core/tooling exports rootRouteId, the path helpers and the manifest
link helpers. The route generator and the Start plugin import them from it instead
of loading the router runtime through the root entry at startup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The four entry lookups join the entry to srcDirectory and try the extensions in
order, returning the real path as exsolve did, without exsolve's process-wide cache:
a missing entry created later is found and memory no longer grows across builds.
exsolve stays a devDependency for the test helpers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jiti is only needed for virtual route configs, @jridgewell/remapping only when a
Rspack/webpack loader receives another loader's input map, and lightningcss only
for inline CSS with rewritable urls: none of them loads at plugin startup anymore.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
revision/digestOf (plan freshness, digests, edge keys), the default server function
id and the Hydrate file hash use crypto.hash instead of createHash().update().digest().
Same bytes; available since Node 20.12 (engines: >=20.19).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove the unused logDiff (with ansis and diff) and createIdentifier/decodeIdentifier
exports from router-utils, and router-plugin's redundant chokidar dependency: the
watcher lives in router-generator, which declares it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- router-utils/src/compiler/README.md: the model (one analysis per env and
module, rewrite tree, reachability = splitting = DCE by provenance,
OutputBuilder emit with source maps, summaries and values), the
pipeline phases, plan cache + dependency ledger + invalidate(), hosts,
where each planner lives, adding a planner, tests and perf harnesses
- router-plugin/ARCHITECTURE-CODE-SPLITTING.md: replaces the Babel-era
document with the planners' outputs, rules and route HMR
- AGENTS.md pointers (packages, router-utils, router-plugin,
start-plugin-core) and the Rsbuild architecture links; drops references
to handleRouteUpdate and to deleted INTERNALS.md files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- esbuild: autoCodeSplitting is refused; the esbuild installation docs
and quickstart examples no longer enable it
- automatic code splitting: callbacks reading this stay unsplit; route
CSS moves with the split components only when all are split
- Start: server functions only server code calls are not HTTP-callable
in production (dev answers and warns); generateFunctionId arguments
and the default ids; onViolation timing in builds; route CSS loading
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the 15 lane changesets with six: compiler core (router-utils),
route generator, router plugin, route HMR runtime (framework routers),
Start, and React Start RSC. Adds what lanes C2/C3a left out: dev-only
/hmr subpaths, production HTTP gating of server-only server fns with
the dev warning, #8688 and #7943.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rspack's MultiCompiler runs a compiler again when a dependency was
invalidated while it compiled (running-outdated), from nodeDone on the
next tick after its done hooks; the MultiCompiler's done (onAfterBuild)
fires before that. The tracker settled the edit and closed the watcher
in between, so the SSR bundle kept pre-edit code (start-compiler-build-
inputs 'rsbuild build --watch > an edit of an aliased env-only
factory...'). A compiler now counts as compiling until a macrotask after
its afterDone, by which a re-run has announced itself (invalid).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A known package resolves to its own specifier (D4), and dependencyPaths
turned it into a file for the host's addDependency: Rspack watched
'@tanstack/react-start' as a missing path, reported it removed, and
rebuilt every environment once after the first watch-mode build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rspack reports a deleted file only while a module depends on it, so a module
the app stopped importing and then deleted got no unlink: its plans, raw
facts, import-protection records and per-resource fingerprints stayed for the
session (soak: plans +20, fingerprints +100 per 100 cycles). After each dev
compilation the session retains what the environment's fileDependencies
still contain (RawFactsCache.retain, ImportProtection.retain).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The compile that registers a plan's violations prints them; a compile the
plan cache answered again (an importer Rspack rebuilt for a dependency's
edit) still asks `onViolation`, as every compile does under `always`, but
no longer prints them a second time. The warning ledger keeps its
once-per-run contract (the oracle pins "warns once per file" across dev
rebuilds), so the `watchRun` reset is dropped.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Takes the oracle's deletion of react-start-rsc rsc-start-private.test.ts
(conflicted with our comment update on its pin) and the rsc-start-page.ts
trim; nothing else imports the removed `page` helper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With RSC the provider environment builds before the client (plugin-rsc:
rsc, client, ssr; Rsbuild: interleaved by the RSC coordinator), so its
manifest was generated before the client's references were known and
every registered server function was HTTP-callable in production (J4.2).
The manifest must still list every function: server-origin calls (the
SSR RPC stubs, a handler calling another function) resolve through it. The
gate is therefore by call origin, decided where the client build's
references are known:
- Vite: the caller (ssr) environment builds last; its resolver module is
now a gate over the set of client-referenced ids in front of its own
forward to the provider (served by a second virtual module).
- Rsbuild: the manifest carries a placeholder literal for the set, which
the server asset pass that already fills the Start manifest (after the
client build exists) replaces with the client-referenced ids.
- Rsbuild RSC also never listed a function reached only through a provider
module (the resolver's rebuild is what builds those modules, after the
manifest was generated): the resolver is now regenerated and rebuilt
while its content changes, bounded.
Tests: react-start-rsc `rsc-start-build` and `rsc-start-rsbuild-build` "a
server function only server code calls is not callable from the browser"
(the real request envelope sent to the private function's URL is refused,
to the exposed one answered; the handler's own call of it works).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
In dev, an HTTP call by id may run any server function: dev compiles
lazily, so it cannot know what the client references, and a page left
open across a restart must keep working (J4.4). The refusal of server
fns no client code references applies to production builds only.
SPEC J4.2 and G13 say so; the Vite dev RSC pin that asserted the
refusal (and its now unused page helper) is removed, and KNOWN-BUGS
lists the production pin only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The router calls a method or function-expression callback as a method of
the options object; a split chunk's `lazyFn` wrapper calls the chunk's
export detached, changing its `this`. Such a callback stays in the route
module with a `not-split:this-reference` warning naming the file (J2.8:
informed, never broken); `this` of nested functions and classes, and arrow
functions (the module's `this` wherever they evaluate), split as before.
Also enables route HMR in the frozen-import regression test, where the
development marker is written.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A `require()` edge carried no names, so import protection's mock of a
denied CommonJS or unknown target exported `default` only and
`const { secret } = require('./x.server')` read `undefined` instead of
the safe mock. The analysis records the keys the importer destructures,
the static member reads of the binding holding the result or of the call,
and `'*'` when the result escapes (`[]` for `import()`); the edge records
of both tiers carry them.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- dev `log: 'always'`: a compile the plan cache answered reported its
violations twice and asked `onViolation` again (`afterCompile` already
reports every compile; the extra `reportAgain` is gone).
- `needAdditionalPass` is a bail hook: answering `false` silenced later
taps asking for a pass; the tap now answers `undefined` when it has no
vote.
- the warning ledger resets on `watchRun` too, so a module a dev
compilation rebuilds reports its compiler warnings again.
- modules kept across a compilation report again under their canonical
resource (the RSC proxy query is dropped), the identity their edges
were registered under.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The dev refresh marker (`page.$$tsrRefreshId = …`) was written onto the
export of another module when a split option named an imported binding
(or a member of one): a frozen component threw "object is not
extensible". React Refresh registers a component where it is declared;
the marker is only written on this module's own declarations.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- A recursive component rendering itself inside its own boundary moved
into the chunk with the lazy const only it reads, next to the chunk
component of the same name (a SyntaxError). The lazy const gets a
distinct name when the children reach the unexported declaration
holding the boundary (a bounded walk over module-level declarations).
- The inserted `h`/`p` attributes go right after the last attribute or
the tag name, never inside a comment written before `>`.
- Solid: a capture that a `ref={x}` or a reassignment writes is passed
through a getter-inducing expression (`(() => x)()`), so the chunk reads
its current value instead of the value at render.
- React development with route HMR: the chunk component carries the
`$$tsrRefreshId` marker (R41), as split component chunks do, so an
update of a boundary's chunk is kept by React Refresh, not swapped
(`refreshMarkers` in the planner config, set by both hosts).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
With a derived provider module (Vite RSC `rsc` env), a nested site
(`export default createServerFn()…`, an object property, a class field)
was hoisted into the provider output and the env module imported the
hoisted binding from `?tss-serverfn-split`, so the rsc env evaluated the
provider module (and everything its handlers import) and called the
handler in-process, unlike its top-level siblings. The env module now
keeps the chain in place with its `createSsrRpc(id)` stub (an edit on
exactly the claimed region overrides the placeholder there).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`RegionTable.register` scanned every region to deduplicate a
registration and `buildUnits` searched every top-level item per hoisted
`var` declaration (quadratic in large route modules); a range+kind map
and a binary search over the source-ordered items replace them.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`invalidate()` checked every environment's resolution fingerprints with
the one host it was given (the Start hosts passed whichever environment's
hook ran first), and `resolveCached` stored that environment's answer in
the other environments' resolution caches: a per-environment alias or
condition (`browser` vs `node`, `react-server`) resolved to the wrong file
until the next add/unlink. `invalidate` takes one host or a host per
environment name; the Vite Start host passes each dev environment's own
resolver, the Rsbuild session each environment's registered resolver.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Placement (reach.ts): a cluster the env module roots (an exported `Route`)
that a derived output reaches is imported from the env module, so its live
reads are now evaluated in the env module's tree, not the requesting
output's: the splitter replaces `component: Page` in the env output only,
and a loader chunk importing `Route` no longer "needs" `Page` (which went
to a bogus `shared~component+loader` module: one more request per
navigation). A cluster pinned elsewhere reads in its pin; provider outputs
(self-contained copies) keep their own tree.
The `env-declared` fallback (J2.8 R-27) no longer fires for an exported
pure component the route module also reads: the exported pattern is a
value merged with an exported binding it writes; the value being the
export itself is the §3.5.2 import.
Rendering (plan.ts): when a renamed export drops a multi-declarator
statement's `export` keyword (R38), the other exported declarators of the
statement are re-exported by the same glue (`export const a = 1, page =
…` kept `a` exported).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Two neighbouring function-local declarators orphaned by one erasure
(`const a = 1, b = 2` read only by a removed `createServerOnlyFn` body)
got two overlapping removal ranges and the compile threw "partially
overlaps". The removals of a multi-declarator statement are now computed
per statement from its final kept set, as runs with their separators
(the whole statement with its line when every declarator is gone), so
neighbours never partially overlap and a later round's run encloses the
earlier one. Same for `let a, b` and blocks of the module level.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Rsbuild dev defines TSS_SHELL like Vite's dev server: with SPA mode the
dev server answers the shell instead of rendering routes and running
their loaders (#8543).
- server.compress is only defaulted to false, no longer forced over the
app's config (#8544).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Generator plugins given as router.plugins run next to Start's own (Vite
and Rsbuild), instead of being replaced by them (#7768).
- Start's route tree footer follows router.quoteStyle and
router.semicolons (#8437's footer half).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A createFileRoute('/id') call without the options call, or a constructor
imported as a type only, was reported as not created by createFileRoute.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A route tree event is a tree change only when the file on disk is no longer
the one published; the watcher echo of every publish rebuilt, printed and
notified the plugins for nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A virtual route config naming one file for two routes (two route()
entries, two physical() mounts of a directory, a __virtual.ts entry for a
file the directory scan routes too) is an error naming the file, instead
of a tree importing the file twice or an ENOENT from two concurrent
writes.
- Two routes with one id (posts.tsx + posts/route.tsx with a child) are an
error naming both files, instead of the router's startup invariant.
- AtomicPublisher numbers its temporary files: writes in flight never share
one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- DependentsIndex keeps each plan key's buckets (planKey -> paths): publishing,
discarding and evicting touch the key's rows only (was a scan of every
bucket per publication, quadratic in the session), publication replaces the
previous plan's rows (stale rows accumulated on import-target changes), and
empty buckets are removed.
- PlanCache retires a key's generation and latest revision once it has no
plan and no attempt in flight (begin/end around each attempt); they were
kept for every id ever compiled, deleted files included.
- RawFactsCache forgets a deleted file's facts on unlink and never stores a
missing file's facts (stale entries of deleted files were kept).
- Import protection forgets a deleted importer's edge index rows, violation
keys and scope-cache entry (Vite and Rsbuild hosts, on unlink).
Found by the compiler soak (500 edit cycles with unique file adds, deletes
and renames) and code review findings 1-2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A file whose implied route changed (virtual config route() path, physical()
prefix, __virtual.ts subtree) without a content change was skipped by the
stamp/content fast path and kept its old id. File state now records the
route it was analysed for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A warm rsbuild dev restart restores importers whose import-protection
violations another session judged: the new session neither asked
onViolation nor reported them. In dev, a restored module whose record holds
violations this session has not registered is rebuilt (once per session)
before the finishMake replay.
compiler-test-utils: RsbuildDevServer.restart() starts a new dev server
(new plugin instances) on the same app directory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports upstream #8799's normalization tests: literal query keys, first value,
+/% decoding, lookalike keys, concatenateModules on and off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A module Rspack restores from its persistent cache is not compiled, so the
edge index that gives trace steps their specifier and position knew nothing
of it: a warm build's violation traces lost those steps' locations. Each
compiled module's Rspack buildInfo record now carries its indexed edges,
replayed at finishMake for a module the index does not know (replayed by
its canonical resource, the compile's id).
Ports upstream #8798's e2e test (cold vs warm Rsbuild build with
performance.buildCache: no errors, identical warnings).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- TSR_COMPILER_STATS=1 registers cache-size readers (WeakRef, process-global)
for the compiler caches, host sessions and the route generator;
TSR_COMPILER_NO_CACHE=plans|facts|targets|resolutions|all disables a cache
(measurement knobs, inert otherwise, never in a bundle).
- Import protection's file/marker rule read a target's whole J6 target facts,
so an importer's plan depended on the target's import list: editing the
imports of a route module re-planned the route tree and Vite fully reloaded
every page. A 'target-marker' fingerprint (PolicyContext/PrefetchContext
targetMarker) records only the marker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An importer Rspack restores from its persistent cache (performance.buildCache)
in a new process requests edge modules nothing registered: the warm build
failed with "Can't resolve .../edge.<key>.mjs" for every edge module. The
importer's request now carries the module's content (?tss-ip=<base64url>,
checked against the key that digests it); a normalModuleFactory beforeResolve
tap defines unknown edge modules and the runtime from it before they resolve.
The rewrite of every known edge module at thisCompilation is gone.
Tests: Rsbuild cold+warm builds with buildCache in error and mock mode and with
an onViolation veto; Rsbuild dev edits that add a .server import, add or remove
a server-only marker of an unchanged importer's dependency (upstream #8798,
#8801 scenarios).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An edit of an Rsbuild watch build or dev server was taken as applied at the
first end of the compiles that read it. Rspack can still owe a compile then:
a file written after a compile began is reported only by the next watcher,
and an environment that depends on another one runs again after the end is
reported. The edit now also waits, once the watchers are attached, until no
compile started and none is pending.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An import() of a route module the router's async chunk also holds made
Rspack copy it and its imports into the resolver's chunk; a shared cache
group traded the copy for one more chunk loaded at cold start. Rsbuild
bundles every provider module, so the production manifest imports them
statically: 6 chunks loaded like main, gzip below main. The cache group
of the server environments is dropped (superseded).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The /* @__PURE__ */ hint only serves the client's tree shaking; a server
bundle keeps every route. The manifest's unused access parameter keeps
its name (one byte shorter than the lint-style underscore).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
R44 as rewritten: a client-origin call of a server fn whose defining
module the client environment compiled is answered as before; one no
client module references is answered too, with one warning per function
naming it and saying a production build refuses it. The on-demand client
graph walk is gone (it proved nothing and cost a crawl of the app).
Vite's lookup warns through the plugin context; Rsbuild's dev manifest
carries the warning per unreferenced entry. Production stays the strict
manifest filter. The RSC dev pin asserting a refusal stays pinned.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Vite bundled dev without lazy compilation (TanStack Start sets
devMode.lazy: false) compiles an HMR patch's import() to
__rolldown_runtime__.initModule(id), which throws MissingFactoryError
synchronously when the split chunk never loaded on the page. The held lazy
wrapper now re-imports through a wrapper that falls back to the importer it
was created with (the initial bundle's import of the real chunk) for that
error only, matching main's behaviour of reusing the original importer.
Dev-only (inside applyRouteHmr's NODE_ENV gate), client-only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Start loader no longer reports a parse error itself (the compiler
returns the input untouched with its diagnostic), so SWC reports it with
a code frame. SPEC §5.7 leaves the wording and the channel free but the
file and the position must be shown: the overlay snapshot asserts the
file and the error line instead of the loader's message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds decide violations after tree-shaking (SPEC J6.4): compiler-leak's
leakyReference is exported but imported by nobody, so its secret.server
edge is dead in the client build and is not reported. The build variants
of 'compiler leak violation includes line/col' and 'compiler-processed
module has code snippet' now assert that the dead edge is not reported;
the dev variants keep their assertions.
Traces follow the bundler graph from the real entry through framework
package modules (packages/*/dist, node_modules), whose steps may carry no
line (SPEC J6.5 optional fields): the line-number checks skip those steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new compiler passes the stable key (export/variable name) as
functionName instead of main's generated handler name. SPEC C5/J4.4
leave the value unspecified, but apps keyed on the old
'_createServerFn_handler' names silently fall back to default ids, so
the release notes must say so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
enableRouteTreeFormatting now defaults to false: the e2e builds rewrote
their committed routeTree.gen.ts unformatted (prettier-normalised content
identical), and a pathless layout directly inside a root-level group
gets fullPath '/' (generator J1.13: the types use router-core's
Route.init formulas). Regenerated by the apps' builds, not edited.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plugin-rsc builds the provider before the client, and the provider's graph
unfolds from its own manifest; the SSR scan deletes handlers with the
imports only they read, so a 'use client' component a handler renders and
the server-fn modules it imports were seen by no environment before the
client build (#7943). The provider's real build now starts by walking the
raw reach of every registered server-fn module (static and the new
TargetFacts.lazyImports) and compiling the candidate modules in the
provider environment, outside any transform, so the manifest lists them.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
R44 in development: a server fn is HTTP-callable once the client
environment compiled its defining module. Vite's dev resolver passes the
caller's origin to the lookup; a client-origin lookup of a module the
client has not compiled walks the client module graph on demand from the
client and router entries (each module transformed by the client
environment, outside any transform of the provider), then the registry
decides. Rsbuild's manifest is gated in development as in a build: its
client compiles whole and its replay rewrites the resolver before the dev
middleware answers.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The esbuild plugin refuses route code splitting with a clear error
(DECISIONS: esbuild generator works, autoCodeSplitting refuses, SPEC
J2.18), so the vue-router esbuild app failed to build. The react and
solid configs are unused by their builds (esbuild CLI) but are updated
alike.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rsbuild session now tells import protection which paths are app
entries (as the Vite host does), so the planner's own-marker rule reports
a marked entry; the host's separate selfMarked bookkeeping and
selfMarkedReport are gone.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Rsbuild's server default is no chunk splitting, so Rspack copied every
route module the server-fn resolver imports (and their imports) into the
resolver's async chunk next to the router's (+16.6 KB on the full
scenario). The non-RSC server environments now put modules two async
chunks share into one shared chunk; Rspack's default groups stay off.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
applyRouteHmr and the frameworks' __tsrRouteHmr/__tsrRouteChunkHmr were
exported from the production index, so Node loaded hmr.js at server cold
start. They live on @tanstack/router-core/hmr and @tanstack/<fw>-router/hmr
now; only the compiler's dev-only HMR block imports them. Both Vite hosts
pre-bundle the subpath (no source file imports it: discovering it on the
first route module would re-optimize and reload).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The production manifest already lists only client-referenced server
functions (R44), so the per-entry isClientReferenced flag and the
never-throwing origin check only cost bytes in every server entry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The core's cached resolution asks the host only for specifiers that can
name a project module or a package. A Node builtin or a URL-scheme
specifier (node:, bun:, cloudflare:, data:) resolved only for the analysis
made Vite's client resolver warn "has been externalized for browser
compatibility" about an import a deleted handler read (G16, J4.12).
`virtual:` passes: a bundler's virtual module may be a project module.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Dead-code shapes (a class and a const that read each other) through every
Start removal and the code splitter, the server twin of the class row,
Hydrate's diamond and cycle rows, and the JSX element parentheses pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A route module that reads a member of a JSX element, `(<Tag />).props`,
is printed as `<Tag />.props`, which does not parse, so the route module
fails to load. Same upstream printer bug as the other S3 pins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests that left it open whether the server keeps neutral modules only
client-only code reads now require the drop, checked by outcome:
- `<ClientOnly>` children: the libraries only the children import throw
when they load, so the server render fails if it loads them.
- An aliased re-export of createClientOnlyFn: the SSR environment does not
load the neutral `./browser` module.
- The dead-code shape table runs the server-side removals over a neutral
module instead of a `*.client.*` file.
- The `<ClientOnly>` build adds a neutral module with a top-level effect:
it is absent from the server bundle.
All pass on main. Comments cite J4.11 instead of the removed §5.12.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
J4.11 now requires the server to drop what only client-only code reads
(`<ClientOnly>` children, `createClientOnlyFn` bodies, isomorphic
`.client()` implementations) for every imported module, not only
`*.client.*` and client-only-marked files: a neutral module or a package
left behind reaches the server just like a client-only file would. The
§5.12 freedom is removed, and G3, G16 and C15 follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The leak check passed edits without the dev server, so a failing edit crashed
while building its error message; name the cycle as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One list of shapes (@tanstack/compiler-test-utils/dead-code-shapes): a
chain, a diamond, mutual recursion, a class and a const that read each
other, a helper kept code reads too (through typeof, a shorthand, JSX and
export { a as b }), code already dead before the transform, a let a
function assigns, an object and an array holding the helper, a closure a
factory call returns, a default parameter, a namespace import and a
top-level await. Each shape runs through every removal: server fn
handlers, createServerOnlyFn and isomorphic .server() on the client,
createClientOnlyFn and isomorphic .client() on the server, <Hydrate>
children in the parent, split route options and deleteNodes options in
the route module. Each cell checks that the module loads and gives the
right values in both environments, that the module only the removed code
needed is not loaded, and that kept and already-dead code stay.
Main fails ten cells. New root cause S7: the const of a class and const
cycle is removed and the class kept, so the module throws when it loads
(every Start removal, split option, deleteNodes). New J5 entry: the
parent of a <Hydrate> keeps the shared end of a diamond and both halves
of a cycle, with their import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Edits sort zero-width first, so an insert at an edit's own start is its
sibling, rendered before it; a slice of the edit's body starting there
rendered it again. The core's import recipe keeps the comment before an
import statement (slice from the item's start): with a leading comment
(`/// <reference types="vite/client" />`) and an import that loses a
name, the after-header units (lazy importers, glue imports) were
printed twice and the route module declared them twice (react-start and
solid-start basic e2e: root routes failed to build).
Tests: router-utils placement 'renders them once when the import
statement the core rewrites starts with a leading comment'; router-plugin
code-splitter-route-options 'are split when the route module starts with
a comment before an import the component shares' (both failed before).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
server.mjs builds the Start scenarios with their server environment and
reports server bytes, the chunks and modules a first request to / loads, and
process spawn → first SSR response on a quiet machine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The React apps written for Solid (same seeded structure, probes and server
functions), Vite only. React workload hashes are unchanged. Run with
--variants solid-start,solid-router.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rspack gives a loader in a "type": "module" package type 'module' and
import()s it, so the require cache wrapper never saw Start's compiler loader
(the Rsbuild floor replayed 3 hooks and measured the real build). A load hook
now serves a wrapper module under the loader's URL; the loader request is
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a server env, locals of one object pattern that only <ClientOnly>
children read are orphaned together; each property's removal took the
separator to its neighbour, so two neighbours gave partially overlapping
edits and the compile threw ('conflict: start-env ... partially
overlaps'): react-start/basic's root route failed to build (Vite and
Rsbuild). The properties a round prunes are now removed per pattern,
one range per run of removed properties.
Test: clientOnlyJSX 'a boundary with locals of one pattern only its
children read renders its fallback on the server...' (failed before).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A browser-only package (it reads window when it loads) that only a
createClientOnlyFn body and an isomorphic .client() read, through a
diamond and a cycle of helpers, never loads on the server: in dev (the
SSR environment) and in Vite and Rsbuild builds, where the server build
must neither bundle it nor warn about its importer, and SSR runs. A new
S2 pin covers the server twin of the class rows: a class only a
client-only fn uses keeps its client-only import on the server today.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The unresolvable-imports build now also fails when the Vite client build
swaps in a browser stub and warns about the importing module (checked by
file and severity), which it did not notice before. It adds a
createServerOnlyFn body and an isomorphic .server() reading node:buffer
through a helper. The server-only routes app gives a page route a server
handler over node:buffer, which deleteNodes removes on the client. The
side-effect hints app adds an unannotated initializer only the handler
reads, which must not reach the client.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Whatever a transform removes takes with it, in that module and before the
bundler, everything only the removed code used, through any shape; it keeps
what kept code reads and what was already dead. Per module only: J4.12 now
says a neutral module's export is the user's, and server-only helpers
belong in *.server.* files. A leftover import of a module the environment
cannot or must not load is not G8 dead code: no stub, no warning, no
polyfill. Cross-references in G8, J4.12 and §5.9.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PROPOSAL (contradicts DECISIONS D6 'derived provider modules only for
Rsbuild RSC and Vite RSC use-client modules'; architect's call).
With the route module itself as the rsc env's provider, the provider
evaluates the module's client-only module-level code under react-server:
a route defining a server fn next to React.createContext(...) failed
with 'createContext is not a function' (react-start/rsc e2e rsc-context,
Vite; main passes, Rsbuild passes since it always derives). The rsc env
now gets the ?tss-serverfn-split provider output (what the server fns
reach), as on Rsbuild.
Test: react-start-rsc rsc-start-build 'a server fn runs in the provider
next to its route module's client-only code' (failed before).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In production Rspack scope-hoists modules: connections from outside a
ConcatenatedModule move to it (their target stays resolvedModule), and
a connection from one names the ConcatenatedModule as origin (the
importing module is getParentModule(dependency)). The trace view read
neither, so mock-mode build traces of split route components stopped
at the route file (react-start/import-protection e2e, rsbuild).
Oracle: reported-location-trace 'the trace of a mock-mode build reaches
a split route component from the entry'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Effectful clusters homed in the env module for their derived needers
become env roots after homes are decided; what they read in the env
module was homed as if the env module did not need it. A generated
import an env-scoped edit reads (the tsrSsrRpc stub glue of a server fn
that a split component and the Rsbuild RSC provider output need) was
removed as an orphan: the SSR build referenced tsrSsrRpc undeclared
and every page of the react-start/rsc e2e app (rsbuild-ssr) failed.
Such clusters are now homed like any env-needed cluster.
Tests: router-utils placement 'keeps a generated import an env-scoped
edit reads...'; react-start-rsc rsc-start-rsbuild-build (Rsbuild RSC
production build, a server fn only its route's component calls).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With behavior "error" a denied importer fails to build in dev (SPEC J6.3), so
the page throws that denial instead of running the real code: the harness's
client runner rejects on it, for an .mdx page exactly as for a JS importer
(verified). The two rows are plain tests; the custom-type rows stay pinned
(Rspack rules select by resource, not by module type). Also the changeset of
the lane and a typing fix of the resolver-warning unit test.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The route module's code does not change when only a split non-component
option does, so nothing re-ran it: the chunk's export was a React Refresh
boundary (a capitalised binding), its update stopped there and the route kept
its old data. Non-component split bindings are now lowercase (no boundary),
so the update bubbles to the importer, which re-imports the chunk; the chunk's
dev block (webpack style only) then asks the live route to refresh through a
new dev-only helper of the framework routers (__tsrRouteChunkHmr →
router-core applyRouteChunkHmr). Flips the two Rsbuild split-loader cells of
known-bugs-route-hmr; Rspack's default lazy-compilation proxies re-resolve the
module the same way.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The helper fetched a guessed Hydrate child id (?tss-hydrate=0_<hash>);
ids and which module holds the edited component are compiler-internal.
Follow the route module's derived modules from the route instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Playwright read whitelistErrors: [/mock/i, /…/i, /…/i] as a
[value, options] fixture tuple (its second item is an object), so the
whitelist never applied. Main logged nothing in builds; mock-access
diagnostics now log in production too (SPEC J6.3). Whitelist exactly
that diagnostic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC J6.5 requires a code frame in the report; the import-edges planner
located violations but recorded no source text, so reports (and
onViolation's optional snippet) had none. The planner now records the
original lines around the location (the input text, or the input map's
sourcesContent) for each violation. Oracle: reported-location-trace
'the printed report shows the importer's original source at its
location' (Vite and Rsbuild).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
generateFunctionId receives the server fn's stable key as functionName
(DESIGN 3.13.1, SPEC J4.4/C5: greetUser, no longer the generated
greetUser_createServerFn_handler).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the SSR env as the server-fn provider, an SSR caller holds the
provider's extractedFn (createServerRpc with id, name and filename), so
client middleware run during SSR received the full ServerFnMeta while
its type (ClientFnMeta) and the browser give only { id }. Found by the
react-start server-functions e2e ('function middleware receives
serverFnMeta in options'). The client branch folds away.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the SSR environment as the provider, the resolver imports each server fn
module lazily and the server bundle imports the same module statically, so
every production build printed INEFFECTIVE_DYNAMIC_IMPORT for each of them.
The plugin's config composes the app's onwarn and drops that hint for the
resolver only. Flips the Vite row of "in mock mode, an unused denied module
leaves nothing in the client bundle and no warning" (its import-protection
part already passed; the hint was the last report on a channel).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A CommonJS dependency with a top-level `return` is no ES module: the core
reports a parse error and leaves the module as it is, and Vite's own parser
reports real syntax errors at the user's position (as the Rsbuild loader
already did). Flips the Vite row of "a CommonJS dependency with a top-level
return builds and keeps its meaning".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Target facts counted `import '@tanstack/react-start/server-only'` as a bare
import that evaluates a module and as an own effect, so import protection
judged a marked module effectful whenever the marker specifier did not
resolve to a side-effect-free file (Rsbuild's resolver answers nothing for
it): the mock's effect witness kept the edge alive wherever a barrel
re-exporting the module evaluated, and an unused re-export failed the build.
Flips the Rsbuild barrel row of importProtection/build.test.ts.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
computeStaticDependencyChunks took the union of the chunks of every group a
shared chunk belongs to, so a module duplicated into each route's chunk made
the shared chunk depend on both routes' chunks and each route's page linked
the other route's CSS. The intersection over the groups (with their
ancestors) keeps a per-group dependency out of the shared chunk's imports.
Flips the four shares-module rows of known-bugs-route-css-rsbuild.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A cancelled extracted-export candidate (an exported component nothing extracted
needs) becomes an env root again, but orphans were computed from the env
liveness before that: an import the candidate reads was removed when an erased
range (server-only code) had read it too, so a <Hydrate> after erased server
code lost its Hydrate/idle imports on the client. Flips 3 known-bugs-hydrate
pins; the 5 other rows of the file were fixture problems (load() boundaries
render no id for the helper to find; isomorphic fns rendering different trees
per env are a hydration mismatch by construction) and are plain tests now.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Both Start hosts compile through the Yuku core now, so the interim modules
each lane kept for the other bundler are dead: hydrate-when-transform.ts,
start-compiler/{utils,babel-types}.ts, import-protection/{analysis,rewrite,
sourceLocation,virtualModules,extensionlessAbsoluteIdResolver}.ts and the
import-protection INTERNALS.md that described them; router-utils' Babel
helpers (ast.ts, compiler-helpers.ts) and their root exports, which no
package imports. Dependencies dropped: @babel/code-frame, @babel/core,
@babel/types, source-map, @types/babel__code-frame, @types/babel__core
(start-plugin-core); @babel/generator, @babel/parser, @babel/types,
babel-dead-code-elimination, @types/babel__generator (router-utils); the
unused `@babel/types` catalog entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: planners/edges.ts keeps lane V's own-marker rule for entries
(Vite passes `isEntry`) and lane B's R46 import-rewrite loop; the Hydrate
planner keeps one `extractExports` (lane V's, with the core's region-written
cluster rule in reach.ts instead of lane B's planner-side writer check).
Shared per-bundler pins that both lanes flipped are plain tests now
(hydrate pages/build cases, import protection build-markers, build-mock,
exemptions, known-bugs(-dev), reported-location(-trace)).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
React wraps a match in Suspense when its error component is lazy and Solid's
hydration keys follow the component tree, so an unsplit server (R24) renders
a tree the split client cannot hydrate: React regenerates the page and the
nested route never renders (perf app /s00 layout, HMR hydrate probe). Main
split both environments; the Start host does again.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A run of deleted properties that is the whole options object took no comma
(the last property takes its leading one, the first has none), so a server
route compiled in the client env became createFileRoute(...)({ , }): a parse
error in dev. The run now takes the trailing comma, as does a sole property
range for handler deletion.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The chunk component keeps its TsrHydrate<n> name but is exported as H<n>
(the parent's lazy wrapper reads 'H<n>'): the export name is production
bytes twice per boundary, and main used H<n>. The boundary id's prefix is
the boundary's ordinal in the pristine source, as on main, not the opening's
offset. A Solid chunk component takes its props parameter only when the
chunk reads it. The two deferred-hydration bundle scenarios were 10 to 12
gzip bytes over main; they are byte-identical now.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Keep the Vite route CSS flips (shows-component, shows-error,
shows-not-found pass) in the oracle's new routeCssSuite form.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The route CSS rows (SPEC J2.22) now live in route-css-cases.ts and run
for each bundler from its own file: known-bugs-route-css.test.ts on Vite
dev and build, known-bugs-route-css-rsbuild.test.ts on the Rsbuild dev
server and an Rsbuild production build served as `rsbuild preview` does
(new StartBuild.preview() of the build harness).
New rows: two routes whose components import their own CSS and share a
module. On a route, the other route's styles must not apply, after a
client-side navigation and in the page the server renders there. Vite
passes; on Rsbuild, with the shared module in a chunk of its own, the
page links the other route's stylesheet (Start's Rsbuild manifest, #8780),
pinned as a separate known bug.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The exported writer of module state (export function bump() { clicks++ })
may leave for its extracted output with the state when only a chunk reads
it (an exported function over module state loads with its chunk). Only a
binding some sub-region writes (Hydrate children, a split option value) keeps
its cluster out of the candidates, so the single-writer rule still refuses a
chunk assigning an import. The Hydrate unit test that pinned the live
binding's home is adjusted (the extracted output, not the parent).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Vite's dependency optimizer resolves a bare import to its bundle before the
bundle is written, so target facts read through that path saw a missing
module and the edge module's mock lost the target's export names (a dev
page loading a mock without the names it re-exports, timing-dependent). The
host maps an optimizer id back to the dependency's source entry through the
optimizer metadata: deterministic facts, stable resolution fingerprints.
Pins flipped (normal mode: every pin ran as an ordinary test and passed):
hydrate pages and module-level pins (48), Solid and React page suites (6,
Rsbuild rows stay pinned), import protection build/dev/exemption/trace/
location/alias/policy pins (64), dev-server pins (2). Rsbuild rows keep
their .fails (the Rsbuild path is still on the previous compiler).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Solid's hydration keys follow the component tree: the client renders a
split route component under the lazy wrapper's Lazy and Dynamic components,
so Start's Solid server env splits like the client (what main did for every
framework); React and Vue keep R24. Every split route hydrated with a
mismatch before (hydrate-dev-solid).
Vite answers an empty sourcemap chain with an identity map over the input,
counted by LF only; the host passes no input map when the map's single
source content is the input text, so a lone CR is a line terminator again
(reported-location, R-11 probe), and the Locator counts a real map's
generated lines by LF.
A server-only-marked client entry compiled in the client is its own marker
violation (located at the marker; the mock keeps the effect witness although
the marker module is empty, so the build verdict sees whether the entry
survived). Only entries: a marked module is otherwise judged through its
importers, so an exempt importer gets it (J6.7). The session takes isEntry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The client build capture of the manifest plugin skips a generateBundle whose
bundle import protection emptied (a non-final pass of the veto rebuild). Two
hydrate-build cases the Yuku Hydrate planner fixes stay pinned for Rsbuild,
still on the previous compiler.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A unit-level write (export function bump() { clicks++ }) unions the writer
with the written let into one declaration cluster, which passed the
extracted-export candidate check: state moved to ?tsr-split=export~bump, and
a Hydrate children region also writing the binding escaped the single-writer
rule (no hydrate-module-write, a chunk assigning an import). A cluster that
declares a module-level symbol with a live write is no candidate.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A production entry is a ConcatenatedModule without a resource of its own,
so the trace of a violation never recognised it as the entry when a module
imported the entry back. The pinned test is a plain test; its entry calls
its own start so the chain stays live on Rspack, which drops an entry's
unused exports.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The registry property name moves to its own module so that Rspack is the
first to load compiler-loader.js. Tooling that wraps loaders as they load
(the compiler-perf floor) could not see a file the plugin had already
imported.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A trace built from a loader read the module graph during make, which
Rspack aborts on; the import-protection graph view is set at finishModules.
The raw-facts cache no longer publishes a read in flight when the file is
marked stale meanwhile. The Rsbuild compile tracker of the test harness
counts the runs of dependent compilers (MultiCompiler dependencies) and
waits for them, so a watch edit's outcome includes the server compile.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The core copies what a provider output's roots reach instead of importing
the SSR stub from the env module (DESIGN §3.10.5, J4.14); Rspack's RSC
proxy query is no part of the source identity; the RSC layer does not split
routes; the manifest virtual path is read after the root is resolved. Flips
the Rsbuild RSC pins (CSS of helper modules, the diagnostics, the resolved
root) and the Vite 'use client' provider pin.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Edge modules keep the JavaScript module type under import attributes; the
dev reporter uses the current compilation's graph and no timers; failed
resolutions and missing-file facts are forgotten at watchRun (Rspack
reports no event for a recreated file nothing depended on); dependency
reads bypass Rspack's cached input file system; log 'always' reports again
on cache-hit compiles and kept modules; a marked entry reports itself;
server environments split routes too (Solid hydration keys); the Hydrate
planner extracts exported pure declarations only chunks need (DESIGN
§3.5.3) so they load lazily on Rspack.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Start's Vite compiler plugin now runs every planner in the core's fixed
order - start-env, hydrate, rsc-css, route-split, route-hmr, import-edges -
in one compileModule per (environment, module), serving the derived
?tsr-split= and ?tss-hydrate= ids from the same plan (R11), with the router
planners configured as Start wired them (client: split + HMR with deleteNodes
ssr/server/headers; servers: deleteNodes only, R24; never in a separate
provider env). The import-protection host side follows the lane E contract:
edge module resolveId/load, dev graph + reporter per env (flushed after each
compile), build witness in generateBundle with the fixed-point veto rebuild
wrapped around every builder.build of a Start environment (also when
plugin-rsc drives the builds), a post-order late pass for non-JS importers
(R48), and tsconfig verbatimModuleSyntax read for J6.2.
Deleted: the interim Babel Hydrate post-pass (vite/hydrate-interim.ts, the
chunk load plugin), today's Vite import-protection plugin
(vite/import-protection-plugin/*), vite/module-id.ts, the separate router
transform instances of Start's router plugin, and the constants only they
used. hydrate-when-transform.ts and import-protection/* stay for the Rsbuild
path (lane B).
The Hydrate planner extracts exported pure declarations only a chunk needs
into extracted-export outputs (3.5.3), as the Babel transform did for
"an export only the children use loads lazily".
Pins flipped: start-compiler-jsx-pragma (2), hydrate-build (2). Test
adjusted: reported-location-trace "imports the entry back" keeps the client
entry's code alive (SPEC J6.4: dead edges are not reported).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Start Vite host runs the router planners inside its own compile, so it
needs what the standalone host had privately: a registry view by real path
(RouteRegistryView, now exported from /planners with routeEntryDigest) and
the registry change listeners (onRoutesChanged, changedRoutePaths, exported
from /context).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
One compile per (environment, layer, module) through a pre loader per Start
environment: start-env, hydrate, rsc-css (RSC layer), route-split/route-hmr
(client) and import-edges planners; buildInfo persistence and finishMake
replay of server-fn facts and import-protection records; witness verdicts
with needAdditionalPass; generator as a precondition of every compiler;
client route tree pruning; virtual modules under the resolved root. The
Babel Start compiler and the old Rsbuild import protection are removed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- imported route options never ship server handlers silently (refused; Vite, Rsbuild)
- boundaries in split route options another option reads (Vite, Rsbuild)
- route CSS loads with the chunk of a split component (3 rows x dev/build;
the pending/no-component rows stay pinned)
- Rsbuild client source maps of split route components (2 rows)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A route factory called without options (`createRootRoute()`) has nothing
to remove: it failed every Start client build as "not an object literal".
A spread of a module object literal of static keys nothing else reads, or a
computed key naming a module string const, provably holds none of
`deleteNodes`: no error (start-plugin-core server-only-routes builds).
Other spreads and computed keys still refuse the build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`tanStackRouterCodeSplitter` and `TanStackRouterCodeSplitter{Rspack,Webpack}`
split whatever `autoCodeSplitting` says, as the Babel splitter plugin did
(`autoCodeSplitting` selects the splitter in the composed plugin; Start's
schema omits it and wires the splitter alone): Start's client builds kept
every route component eager.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Hydrate: the core now reads a Solid `use:x` directive as a value ref
(router lane, R39 by the core), so the planner's own module-binding
directive rewrite is gone; a captured local a directive names stays a
local (`const x = props.x`, no substitution into the attribute name,
which rendered `use:props.x`).
- Env: a `var` hoisted out of a nested block is now declared by the
effect unit holding it; the orphan cleanup still removes its declarator
when the planner erased every reference (J4.12), as before.
- Hydrate test: a component only the chunk reads moves with its own
property writes (R29 (b), now implemented as designed by the router
lane) instead of being imported from the parent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The router host answered every core-derived id of a non-route file with
`export {}` (J2.13), including Start's `?tss-hydrate=` chunks, which
Start's compile produces in its own pass before the router's transform:
the Hydrate chunk was emptied (start-compiler-jsx-pragma "a Hydrate chunk
keeps the file-level @jsxImportSource pragma"). The router now only
transforms plain ids and its own `?tsr-split=` outputs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts in router-utils core: plan.ts includedUnitsOf keeps Lane S's
rule (inline type specifiers of a statement with no included value
specifier are dropped, and the export { T } naming them) together with
Lane R's route-module rules (inline type specifiers and export { T } of a
type-only binding excluded everywhere, ambient value declarations copied
into derived outputs); reach.ts duplicate inclusion keeps Lane D's version
(copy where rooted, then follow readers), a superset of Lane R's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The exported-import row keeps its `$name` form (pinned on rspack, webpack and
rsbuild without a `sideEffects` field), the two-options row its template
name, so the oracle comparison sees no renames. The "type alias that reads
it" state row passes alone and in pins mode but fails in some whole-file
orders (two instances of `state.ts` in the page): kept as a pin with the
diagnosis next to it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`export { Page as component }` instead of `const TsrSplitComponent = Page`
and an aliased export: the alias cost 8 raw bytes per split route in every
production bundle against main (Rolldown keeps `var r=n`). The chunk's own
declaration remains for inline values, methods and `handlers.handler`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Removes `.fails` from every integration pin the splitter now passes
(property writes, destructured call results, symlinked route files, object
loaders by reference, type-only re-exports, pragma leadingness, source maps,
app paths, exported bindings, server-only options through spreads and calls).
Still pinned: the Rsbuild split-loader HMR edit; an exported component another
route's chunk imports, on rspack/webpack/rsbuild without a `sideEffects`
field; the type-alias state row, which depends on this file's order.
Adjusted: the exported-let SSR row's entry re-exports `count` (the script read
it from the entry, which never exported it); partially passing tables are
split into a passing and a pinned table.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Identifier option values are symbol roots of their chunk; the core's
`env-declared` and `shared-writer` fallbacks (reported at the declaration
of the binding) keep the option in place with a `not-split` warning.
- With `deleteNodes`, opaque, spread or computed route options are an error
naming the file (never shipped silently; J2.8/J2.14). Errors bypass the
once-per-file warning ledger.
- `loader: handlers` naming a module const `{ handler }` splits like the
inline object form (the chunk exports the handler).
- The session resolves a registry miss through the real paths of the
registry's files (symlinked route files, DESIGN §3.5.1).
- The Vite and Rspack/webpack hosts warn once per (route file, export) when an
extracted-export output lands in an initial chunk (an entry module imports
it through the route file): the page code is eager whatever the splitter did.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- A cluster of pure declarations and the top-level augmentations of its own
bindings (`function Page(){}` + `Page.displayName = …`) is a declaration
cluster the R29 loop decides (movable with its chunk, else an effect root);
an effectful initialiser among the augmentations (A7) stays an effect root.
`isMovable` (b) rejects external mutation only, as DESIGN §3.4.2 and
DECISIONS R29 word it.
- R7 is position-aware for relocated reads: a claimed option value read after
every mutation of a cluster is no ordered-effect fallback.
- `RootRef { t: 'sym' }`: a derived output rooted in a module binding; when the
binding stays in the env module by its effects (a call result, a
destructuring) or with an exported binding it writes, the placement reports
`env-declared` at its declaration (J2.8 R-27).
- `export { X }` of a binding without a runtime value is a type unit, dropped
with the inline type specifier it names in route modules.
- A derived output never opens with a pragma comment the source wrote after
its first statement: `export {}` keeps it non-leading (J2.16, Oxc).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The in-place provider's dev self-accept glue uses import.meta.hot, which
Vite's SSR transform turns into __vite_ssr_import_meta__: Vite's name,
present in any module using import.meta whatever compiles it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The RSC provider environment builds before the client (plugin-rsc's
buildApp), so its production manifest cannot know which server functions
the client references: the origin check is emitted only for the SSR
provider, whose client builds first (R44). Rsbuild rows keep their pins.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- `unlink` events no longer hard-invalidate the dependents of the deleted
file at once: Vite propagates the deleted module's update to its importers
and a dependent transformed while the file is missing fails in
`vite:import-analysis`, which marks it not self-accepting, so its later
updates go through its importers (a route module whose split component is
never re-imported). They re-transform when a file appears (`add`), with
the R47 dependents of that event.
- Full integration tier green on the compiler host (1392 passed, 0 real
failures); the pins that now pass are plain tests: import-protection dev
rows (edit, warm-up, served-while-transforming, error-mode lookups, alias
report after Start), Start dev-server rows (factory edits through
re-exports, fresh-server lookups, pre-bundled top-level calls), Vite build
rows (call shapes, env separation, user code, export cache, determinism,
compose route module once, library server fns, class and type-only
imports, Vue SFC type assertions, RSC warnings). Rsbuild rows keep their
pins (previous compiler).
- Changeset and lane notes (16–19).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Import protection relied on the previous compiler's side effects: its
resolves of a module's imports recorded graph edges before the transform,
and its hotUpdate re-transformed every Vite importer of a changed module.
The host does neither (recognition-time resolves are marked and ignored,
dependents only). `ImportGraph.invalidate` now keeps a changed module's
incoming edges (its importers are not transformed again) and unreachable
pending violations stay pending until an importer records the edge (the
bundled-dev rule, for every dev mode). Flips the pinned "added by an edit"
/ warm-up / served-while-transforming rows.
- The compiler always emits a map in build mode: downstream positions go
through the combined map whatever `build.sourcemap` says.
- The dev self-accept glue starts with a newline (sources without a trailing
newline).
- The `invalidate()` resolves carry the compiler-resolve marker too.
- Lint fixes; smoke tests follow the export-named wrapper.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Every exported pure, unwritten declaration of a route module may leave for
an extracted-export output (one instance for importers, lazy when nothing
imports it); the 'exported' not-split warning is gone.
- Consecutive deleted properties form one erasure (their comma ranges
overlapped and failed the compile under Start's deleteNodes).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- PlanContext.extract(sym, output): an exported, pure, unwritten declaration
a planner allows out moves to a side-effect-free derived output when only
derived outputs need it and none of its eager reads is env-live; the env
module re-exports it under every public name; export companions
(specifiers, export default x) fold into that glue; chunks' reach stops at
extracted clusters.
- A declaration orphaned by an identifier replacement is still evaluated
for moving with the chunk that needs it; a pure unexported declaration
nobody needs is dropped when it would keep a chunk dependency eager.
- Inline type specifiers of a route module are dropped from the env output
(verbatimModuleSyntax would keep the bare import); ambient value
declarations are copied into derived outputs so TS transforms resolve them
the same way (Oxc inlines declare enum members).
- vars hoisted from nested blocks belong to the statement that holds them;
import assertions print as attributes; a React binding counts as the
implicit JSX factory when no pragma decides the runtime; Solid use:
directives read their function.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pins now passing (.fails removed): esbuild refusal (2), rspack and webpack
production builds without splitting (6), route HMR in real pages: inline
component shapes, lowercase and renamed components, removed split options,
routes exported under another name, Solid and Vue split identity, .ts route
modules, apps without plugin-react, Rsbuild without React Refresh (33).
Adds the changeset for the router-plugin rewrite.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Lowercase local components are renamed whether split or not, so React
Refresh registers them in the chunk; identifier option values are replaced
by an env-only edit and read as a symbol from the chunk (no claim: the HMR
rename's ref edit would override the placeholder).
- Casts and parentheses around hoisted and chunk component values are dropped
so Refresh registers a bare function; the chunk refresh marker names the
registered binding, so a rename is a new family.
- Routes not created by a factory call bound to the Route export (helpers,
IIFEs) and second factory calls are reported once naming the file, from
the split planner or, with autoCodeSplitting off, from the HMR planner.
- Warnings are once per (file, reason, wording) per run and are not repeated
by an edit that leaves the finding as it is.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- renameRefs(sym, to, scope, by, except?) leaves references inside the given
ranges to their owner (the splitter replaces identifier option values with
its own edit and reads the symbol from the chunk).
- A cluster orphaned by an env erasure is removed only when no derived output
needs it; a chunk whose roots reach it gets it by the home table.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Core: concurrent export resolutions keep separate active stacks (a two-star
barrel is no cycle), inline type-only imports with no live value specifier
leave with their type re-exports, header pragmas may follow the directive
prologue, export default expressions are summarised. Planner: identity
helpers (wrap(x)) are climbed through, nested server fns are refused at the
capture in every env, unsupported computed members are left to the runtime
and reported where they may leak, import-alias cycles settle, orphaned
destructuring elements and server-only local declarators are pruned, assert
import attributes become with. Remove .fails from the 130 known-bug pins
the new compiler passes (COMPILER_TESTS_PINS=run confirmed).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
R47: a failed resolution has no path for the dependents index, so a plan
that could not resolve a specifier was never invalidated when the target
appeared (J6.13 delete/recreate). The ledger now indexes unresolved
resolution fingerprints under a reserved bucket of each env's dependents
index (same publish/discard/eviction lifecycle), and `invalidate()` re-resolves
that bucket on `add`/`unlink` events and returns plans whose resolution changed.
R48: `CompileInput.lang` gives the language of code the bundler hands us for
an id that is not JS/TS (`.vue`, `.mdx`, custom types); such ids run Tier 0
planners only (the late J6-only pass).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One pre plugin per Start env compiling every id through compileModule,
invalidation through the core's one operation on hotUpdate/watchChange,
a shared server-fn registry, dev lookup by id through a per-id virtual
module (compiling the defining module on a fresh server), the production
resolver from the client registry (HTTP-callable set, R44), custom-id
patching at renderChunk, library discovery from the Vite root. RSC
integrations pass rsc: { loadCssExpression, providerDirective }; the
Babel-typed compilerTransforms/StartCompilerPlugin options and
react-start-rsc's rscCssTransform export are removed (the Rsbuild host
keeps the previous compiler internally for now). The router splitter
and the Babel Hydrate transform keep running on this plugin's output in
the interim.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The recognizer table by specifier, phase A value prefetch through
summaries (re-exports, namespaces, aliases, user factories, stored and
callable builders, cycles), candidate chains climbed from Start-valued
bindings, the start-env planner (client stubs with createClientRpc, SSR
stubs, in-place provider handlers with a generated createServerRpc
export, validator and middleware link stripping, isomorphic and env-only
rewrites, ClientOnly children on server envs, nested server fns hoisted
or refused at the capture, orphaned local declarators and destructuring
elements), the rsc-css planner, server-fn ids (short default id, dev id,
custom-id placeholders and the global occupied-id allocator), the
registry and the resolver module generators.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Calls and members of unresolved imports stay symbolic terms a consumer
reduces once it knows the imports (applyMember/applyCall exported,
stampSites for adopted link sites). Known package specifiers of the
recognizer table never resolve: RawFactsCache answers synthetic summaries
and resolveCached returns the specifier (D4). A planner's prefetch may
return false to withdraw while its recorded dependencies keep the plan
cached, PrefetchContext gains resolveFrom, walk and the Yuku node types
are re-exported, and an import whose value specifiers were all orphaned
drops its type-only specifiers.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pins now passing (.fails removed): imported route options split or
reported (2), JSX tags starting with _, $ or a non-ASCII letter (3),
pragma leadingness and the classic factory in the route module (3), exported
class / aliased / overloaded components (3), a user binding named Map (1),
route HMR generated code (10: options in a variable, a binding named hot,
lowercase function components, destructured and call-created bindings, an
export list).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replaces the Babel code splitter, the stringified HMR handlers and the
unplugin transform wiring with planners on @tanstack/router-utils/compiler
and native hosts:
- planners/route.ts recognises the route by the factory's import binding
(aliases, type arguments, namespace members, TS wrappers) bound to the
binding exported as Route, resolves options inline or from a module-level
constant, reads codeSplitGroupings from a literal or a constant.
- planners/split.ts (route-split): one derived output per group, chunk units
declaring the exports from claimed option values (init, method, shorthand,
object-form loader handlers), lazyRouteComponent/lazyFn placeholders with
one importer per group, deleteNodes as env-only erasures, not-split
fallbacks with one warning per file and reason, route CSS moved into the
component chunks when every component option is split (R42), React
refresh markers in dev chunks.
- planners/hmr.ts (route-hmr): hoists/renames unsplit React component
options into registrable bindings before the options, then appends the
dev block with the literal import.meta.hot.accept( (or webpackHot),
__tsrRouteHmr(routeId, Route, meta) and the refresh anchor on Vite.
- hosts/vite.ts: native plugin with hook filters, derived ids compiled in
transform, owned-query resolveId, watchChange invalidation, warnings
through this.warn once per file per run, mode from the bundler command.
- hosts/webpack.ts + loader/index.cjs: our own loader for Rspack and webpack
(input maps composed with @jridgewell/remapping, absolute map sources,
this.sourceMap switch), route-file rule, sideEffects:false rule for
extracted-export ids, watchRun invalidation.
- esbuild: autoCodeSplitting refuses with an error; the generator works.
- @tanstack/router-plugin/planners exports the planners for Start's host.
- codeSplittingOptions.compilerPlugins is removed; @babel/* dependencies
dropped (Babel core stays a test devDependency).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Copyable clusters (import specifiers, primitive consts) homed 'duplicate'
are placed only where an included cluster reads them, not in every output
that reaches them through a cluster homed elsewhere (a chunk importing
Route no longer copies the loader's imports, J2.5).
- renameRefs records the rename: glue imports/exports and SymRef rendering
print the new name; only the renamed symbol's own declaration name of a
destructuring is rewritten, as 'key: NewName' for shorthand patterns; an
overloaded exported function gets one export specifier.
- End-anchored generated text starts on its own line when the source does
not end with a line terminator.
- License comments between items belong to no item: they stay in the env
module when the item below them moves or is removed (G12).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The J6 spike's case matrix (C1–C9, S1–S2) through minimal hosts that follow the
integration contract: reported iff the edge survives tree-shaking, onViolation
once per surviving edge, a veto gives the real module after one more pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Through compileModule and an in-memory host, client and server, React and
Solid: recognition by binding and look-alikes, ids and prefix symmetry,
chunk shapes (fragments, text, expression and children-prop children),
captures (shadowing, tags, enums, this/arguments, key/ref/children),
nested boundaries forwarding captures through substitution, Solid
callee/shorthand/ref setter/use: directives, module-level placement,
rejections, fallback stripping with its orphans, ancestor erasure with a
toy env planner, composition with a toy route splitter, source maps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prefix (and p) attributes go right after the last attribute instead of
after the whitespace before `/>`; an enclosing boundary skips every nested
boundary the client extracts when it validates, also one that failed its
own validation; lazy consts and prefixes are emitted in source order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The import-edges planner (phase C policy over every output's surviving edges),
the resolved config and rules, per-edge mock/allowed edge modules and the
mockAccess runtime, original positions through input maps, traces over the
bundler graph, the dev report queue, build verdicts with the fixed-point veto,
the Vite/Rolldown and Rspack survival witness readers, and the session facade
hosts call. Host-agnostic; not wired into the Start hosts yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The J6 effect classification follows evaluated imports itself (R36), so it needs
the effects of a module's own statements without its imports and re-exports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recognises boundaries by the Hydrate binding of a Start package (named,
renamed or a namespace member), gives each one the id of its pristine
offset and path hash and inserts it as the `h` prefix in every env (R10),
strips a statically visible fallback on the server (with the locals only it
read), and on the client claims the children for a fixed-home chunk unit of
`?tss-hydrate=<id>` with captures computed innermost first (R39): React
destructures them (key/ref/children renamed), Solid reads them through a
substitution environment (callee, shorthand, nested placeholders, ref
setters, use: directives). A /* @__PURE__ */ lazy const placed by needers
loads the chunk. Rejections (J5.5) are positioned at the boundary.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A copyable cluster (an import specifier, a primitive const) was copied into
every output that reached it, also through a cluster that output imports
from its home: a Hydrate chunk importing `Route` from the route module
copied `createFileRoute` and `Hydrate` imports it never reads (dead code,
and an import edge J6 would judge). A copy now goes where it is rooted and
follows the outputs whose included clusters read it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A region that assigns or updates a module binding (`x = 1`, `++x`) needs
the binding in its output: placement counted reads only, so the env module
rooted a binding only a split group or Hydrate chunk writes, and the
single-writer rule then refused the split. Symbols generated text reads
(a Solid `use:x` directive, which the semantic model does not see) no
longer pin a zero-value-ref import to a non-route env module, so a
child-only import moves into the chunk (R9).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- edge names: specifiers used as values (incl. export { x }), namespace member reads ('*' when opaque), in both tiers
- TargetFacts: evaluated imports, star re-exports, module format (digest covers them)
- PolicyContext: input text and lazily read input map (original positions)
- substituted specifiers go through the shared string-literal escaper
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges t3/implement-route-hmr-runtime (router-core, react-router,
solid-router and vue-router HMR runtime). No conflicts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges t3/yuku-route-generator-rewrite. pnpm-lock.yaml auto-merged and
passes a frozen install.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Engine-level coverage of the rewrite tree, reference rewrite contexts,
claims/substitution, statement-level cuts, clusters/provenance (A1, A6, A7,
R29/R31 N3), name allocation, and the DESIGN §6.1 core gates (a) direct,
(b) derived-first, (c) async denied edge, (d) overlapping save, (e)
consumer invalidation, (f) in-flight dependency edit, (g) foreign-query
identity, (k) ancestor erasure, (l) retained heap over the package corpus,
(m) map positions with a raw U+2028 and a lone-CR file. Planners are toys
living in the test helpers.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The shared core of the compiler rewrite (DESIGN §1.2/§2), alongside the
Babel helpers other packages still use:
- identity: canonical ids with foreign queries, deriveId over owned keys,
sibling glue specifiers, revisions/digests
- Tier 0/Tier 1 analysis over one Yuku parse: import/export tables and
evaluation edges, header/pragmas, purity and own effects, items, units,
regions, one symbol id space, classified references
- rewrite tree: edits with nested retained slices, structured text with
SymRefs, spec fragments, context-aware ref rewrites, claims with anchors,
auto/fixed homes, ancestor erasure, substitution environments, per-output
conflict checks, statement-level recipes
- placement: clusters from live writes, single-writer rule, provenance-based
orphans, R29/R31 movable effects, ordered evaluation, needers/homes for
{R, G_i, H_j} with lazy shared modules, glue imports/exports
- AnalysisPlan.freeze() -> plain EmitPlan, recipe renderer on the own
OutputBuilder (ECMAScript lines, word/punctuator segments, map:false)
- summaries with the export-facts digest, abstract values with the callable
builder transition, batch-memoised export resolver, RawFacts
- PlanCache with validated hits, DependencyLedger with in-flight
registration and snapshot validation, invalidate(), compileModule phases
A-D with the restart loop and the planner contract
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pins yuku 0.23.0 exactly (D14), adds vitest and @jridgewell/trace-mapping as
dev dependencies for the core tests, declares the ./compiler entry and lets
the package build both entries.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Rsbuild dev server now sees route files created under physical()
mounts and created before they parse: their scenario rows run like Vite's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a rescan, files whose modification time and size did not change are
not read again; the route tree is not read back when it is as published;
string literals without characters to escape are built directly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rspack and webpack watch the route roots (routes directory, physical()
mounts, the virtual route config and the route tree) with the generator's
own watcher for every event, instead of watching created files only. Vite
keeps its watcher and also watches the route roots outside its root. The
CLI uses the same watcher.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client route tree (without server-only routes) is printed from the
generator's tree model and served for the exact route tree module: by
Vite's load hook (an escaped, anchored id filter instead of an unescaped
RegExp of the path) and by an Rsbuild transform of the client
environment, which had no pruning. Routes whose recorded options may hold
an unread key are never pruned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Solid's JSX compiler wraps a ternary prop in a memo, which kept the dev
branch in production bundles; Vue's render function gained a local. Branch
before the JSX and move Vue's hot swap into a client-only watcher, so
production client bundles are byte-identical again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- route files are read by a Yuku-based analyser: the Route export through
the export table, its constructor by binding (aliases, namespace imports;
the app's own constructors are left alone), option keys with an unknown
flag, edits as offset splices, imports inserted after pragmas
- the tree is a pure model rebuilt every generation from the scan and
per-file facts; ids, full paths and `to` use router-core's formulas, and
the runtime tree and its types are printed from it
- a direct printer emits quoteStyle/semicolons; Prettier is only loaded
when enableRouteTreeFormatting is true (now false by default)
- one drain loop handles queued events; content-based change detection,
the tree compared with the disk, an unchanged-facts fast path
- atomic writes with an EXDEV fallback beside the destination; a bad
bracket escape throws instead of exiting the process
- deterministic scans, `.lazy.vue` as a component piece, pieces of
directory routes, unique route variables, escaped literals
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lazyRouteComponent keeps one client-only shallowRef per wrapper, shared by
all of its instances, so a hot swap re-renders every instance with the new
component. A held component is kept only when the loaded export has the same
plugin-vue-jsx __hmrId; function components are always swapped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lazyRouteComponent keeps a client-only signal read by its Dynamic, so a hot
swap renders in place without recreating the wrapper. MatchInner re-keys in
dev when route HMR replaced the live route's component. Split components are
kept only when the re-imported export is the same object; unsplit
solid-refresh proxies of the same binding are kept for solid-refresh to
patch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
applyRouteHmr updates the live route of window.__TSR_ROUTER__ from a new
evaluation of a route module, keeping lazy wrappers and asking each
framework adapter whether a held component is kept. React's __tsrRouteHmr
registers plugin-react's ignored exports, probes the Vite and webpack/Rspack
refresh runtimes, compares $$tsrRefreshId markers and kicks enqueueUpdate
after a keep. lazyRouteComponent gains a client-only __tsrHot slot whose
newest import is the only completion that counts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pre-run sample missed contention that slowed one series by ~10%. Each run
now records the cores other processes used while it ran (system busy time
minus the harness's process tree) and is flagged above --max-busy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generates deterministic large Start and Router apps, measures dev startup
(listen, first hydrated page, compile-everything), HMR save-to-DOM per edit
kind, and production builds (Vite, Rsbuild), with CPU-profile and plugin-hook
attribution and a compare command.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the strict-runner adapter (makeRunnerStrict) and its contract test.
With it switched off, every test of the oracle (router-generator,
router-plugin, start-plugin-core, react-start-rsc test:unit and
test:integration) kept its state, pins included.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README gives one command for the whole oracle and its time, says the
budgets only report unless COMPILER_TEST_BUDGETS=strict, describes the
COMPILER_TESTS_PINS=run switch and the three tables of today's behaviour it
covers, and no longer counts the harness's own tests as part of the
oracle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The footer Start adds to the route tree declares Register on the app's
framework package. A framework column adds a Solid row (with src/start.ts)
to the type check, next to the two React rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A client-rendered Solid app's __root.tsx edit hot-updates in place on
Vite, with and without automatic code splitting. On Rsbuild the page keeps
the old root component, like an unsplit Solid route there: pinned next to
that pin and listed under its cause in KNOWN-BUGS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The index route component of a Solid Start app holds a <Hydrate> itself,
so the route's split chunk is split again for the children. On the Vite
and Rsbuild dev servers the page hydrates, a click loads the boundary's
code, and the child counts, with no errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A directive such as `<span use:tip>` names `tip` only in a JSX attribute;
Solid's JSX transform turns it into a call of `tip` wherever the JSX ends
up. A split Solid route component keeps working (router-plugin, passes).
Split Hydrate children throw "tip is not defined" for a directive declared
in the module or in the component: pinned on Vite and Rsbuild and listed
in KNOWN-BUGS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `let input` in the component and `<input ref={input} />` inside a
<Hydrate>, the component's `let` must get the element, as it does with
split={false}. Today the chunk gets `input` as a prop and assigns its own
copy, so the component's `input` stays undefined. Pinned on Vite and
Rsbuild, listed in KNOWN-BUGS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A boundary inside a component whose children read that component's
reactive props (props.count) must keep reading them live after its code
is split. Runs on Vite and Rsbuild, with split={false} as the reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server fn and isomorphic fn rows of start-build-env-separation now run
for a Solid app too, on Vite and Rsbuild builds. Until now Solid's J4 was
only checked on the Vite dev server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seven checks asserted that the client output does not contain a piece of
handler code such as `db.inner()`, which depends on how the compiler
prints. The handlers now hold a `MARK_` string as a fallback they never
return, and the checks look for that string.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A setup file shared by the compiler test projects clears each pin's
`.fails` before it runs, and the shared reporter lists the pins that
passed. The two tables in router-plugin that leave out or loosen cells by
today's behaviour require every cell when the switch is on. Without the
switch nothing changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment said every boundary's id is compared. The test compares the
ids of the outermost boundaries only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rsbuild RSC CSS rows ran for dev and for the production build in one
file, which took about 14 s against the 15 s per-file limit. The rows now
live in rsc-css-rsbuild-app.ts. rsc-css-rsbuild.test.ts runs them on the
dev server, and the new rsc-css-rsbuild-build.test.ts runs them in the
production build, so the two run in parallel. The rows are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A denied JSON package imported with `with { type: 'json' }` is a new
mock-shapes case: in Vite dev and in mock-mode Vite and Rsbuild builds,
the importer gets a safe mock and none of the package's data. This
passes on all three.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Vite RSC production build gets the helper-module row: a server fn calls
a module that renders a server component with its own CSS module, and the
page shows it styled. This passes.
The Rsbuild RSC CSS rows now also run in a production build, served by
`rsbuild preview` (a new small helper next to the Vite one). The rows in a
server fn module pass. The helper-module row fails as in dev and stays
pinned under the same cause.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lowercase component names, a root route with shellComponent, a root route
with context and an undefined component had lost their production check.
They now build for production on Vite and Rspack with the plugin's default
addHmr, and each bundle must equal the build with route HMR off, chunk for
chunk. All pass. The route shapes move to production-bundle.ts, so the
dev rows with addHmr off and the production rows share them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In mock-mode builds (Vite and Rsbuild, client and SSR) a violation was
checked only through onViolation. Each mocked row now also needs a printed
warning at the importer's line of the import or of its use, or at a marked
module's marker. The Rsbuild dev row of a server import of a .client file
checks the same. All pass. Only the warning, its file and its line are
checked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An exported route option that stays unsplit must be reported once, naming
the route file. The four "keep working" rows of exported options now check
this whenever the option is not lazy. A new row checks it with route HMR
on: an exported component that another route imports, after its split
modules are served, the route module is transformed again and the route
is served again. Both pass. Only the warning, its file and its count are
checked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With RSC on, the provider compiles server fn modules alongside the RSC CSS
transform. A server fn module that names only createServerFn calls
env-only fns re-exported under other names in a project module. In the
Vite RSC production build, the server-only fn runs and the client-only fn
throws, whether SSR or the browser calls the server fn, and the
server-only body is in no client file. This passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A server fn whose handler is a createServerOnlyFn call or a
createIsomorphicFn chain now has a build row on Vite and Rsbuild: it must
work, or the build must fail with an error naming the file. Today the
build succeeds, and the SSR server entry throws while it loads. The two
rows build on their own, so the other call shapes keep sharing one build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two dev edits of a module a factory comes from (the end of a re-export
chain, and a renamed env-only factory) now also run under
`rsbuild build --watch`, where the first build has filled the build's
resolution caches. After the rebuild, the importers run the edited code.
Both pass. The edits move to the shared inputs module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Start compiler resolves factories through build-only paths in a
production build. The dev rows for factories from other project modules,
export * chains, packages that re-export Start, a virtual module factory,
handler forms, builders called as factories and renamed or namespace
createServerFn imports now also run in a Vite and an Rsbuild build. Their
inputs move to a shared module, so both modes read the same rows.
Each build row checks that the client bundle has none of the row's
server-only code, that server fns are callable from the client and run on
the server in place and by id, and that the other exports behave per
environment. Three Rsbuild rows are pinned: an `export *` of the Start
package makes the build fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With route HMR on, a plain const page = make() that the loader and the
split component read and that is also the pendingComponent is created
twice: the route module keeps the declaration React HMR renamed, and the
split component gets the shared one. The new expected-fail test expects
make() to run once and the page to render. The passing control next to
it (the same const as component and pendingComponent only) stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC gets J2.22: the CSS a route module imports loads only when that route
matches, whatever it mounts (component, errorComponent, notFoundComponent,
pendingComponent, or no component).
New expected-fail test in start-plugin-core: a React Start app with one
route per case, each importing its own CSS, in a real page on Vite's dev
server and in a production build. At / the route's style must not apply;
after navigating to the route it must. Today the style already applies at
/, in dev and in the build.
The router-plugin test that expected a route's CSS import to load with
the route module no longer checks the CSS; it still checks that an import
whose specifiers all moved is not left behind as a side-effect import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A server fn whose handler is a createServerOnlyFn call, or a
createIsomorphicFn chain, may either work or be reported: a compile error
naming the file, or in dev a warning naming it. Both pins now accept either
outcome. They still fail: today the module compiles without a report and
the server fn does not run its handler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In Vite dev, the maps of the split component's module and of the shared
module name the route file with the code splitter's query
(index.tsx?tsr-split=component, index.tsx?tsr-shared=1), so a debugger sees
another file than the route file. The Vite test now runs one row per throw:
each still maps to its line in the route file, and its module must name
the route file as its source. The loader row passes; the shared and split
rows are expected to fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A library that Start discovers through its peer dependency on
@tanstack/react-start is left out of Vite's dev pre-bundling, so a named
import it makes from a CommonJS dependency fails in the browser and the
client route using it does not run. The new expected-fail test opens such
a route in a real page and clicks a button that calls the library.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With route HMR on, a lowercase binding that a split option and an option
kept in the route module both read:
- a destructuring read by the loader, the split component and the unsplit
pendingComponent (the input of #8455) does not compile: pinned;
- a lowercase function component shared by the loader and the split
component fails to load its chunk: pinned, with the arrow form as a
passing control;
- a component created by a call and used as both the component and the
pendingComponent is created once: passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In a production RSC build, a server fn whose only importer is a 'use client'
component rendered by a server component answers 500 when clicked: the
build never registers it. The new expected-fail test clicks the button and
expects the handler's result.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rulings now cite SPEC clauses; pass, round and variant names and
documents outside the repository are gone. Comments only, plus internal
codes dropped from a few test titles.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README: what the suite is, how to run and read it, the implementer's
rules. KNOWN-BUGS: one entry per root cause with clause, pins and the
fix's goal, plus the upstream issues that affect the suite. AGENTS:
hard rules, helpers, running, budgets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each decision is now a plain statement in the clause it affects. Clause
ids are unchanged; history, dates and justification prose are gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
route-hmr-page: routerOptions, plugins, readyTimeout and edit's timeout
(and both HMR pages count requests with hmr-sync's trackRequests instead
of a copy of it); generator-dev-scenarios: the pinVirtualConfigEdits
branch both callers turn off, and the never-passed bounds;
generator-dev-app: bundler, logs() and close(); route-app:
plugins.compilers; build-harness: extraPlugins and buildAndRun's
sideEffects; dev-server: the function form of plugins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plugin hosts' settleTimeout/eventTimeout/compileTimeout, build({ mode })
and describe(env, { env, entry }); the Vite dev server's eventTimeout (now
the constant it always was) and its copy of stripAnsi.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every channel records the console and the process streams: no caller
set anything but those defaults.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pluginNames (ctu build-harness) replaces five copies of the same
plugin-name scan in router-plugin, start-plugin-core and react-start-rsc;
startRuntimeLinks(framework) carries the Solid links the three Start
harnesses each added; the RSC apps load Start's plugin through
start-plugins and Vite's RSC plugin through one rscPluginFactory.
startRsbuildDevServer loses its never-passed generateFunctionId, and
startRscProtectedDevServer its never-passed importProtection and router.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
imports.ts (no importer since the final pass), the fast-tier copy of
expectSourceError (the integration one is the one in use), the unused
re-exports of regression-helpers, StartHostBuild, expectNoPageErrors,
and the function form of StartHostOptions.plugins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jsxImportSource (always react), DescribeBuildInput.minify (never read),
ParsedModules.resourceById (written, never read), the unreachable
no-evidence branch of countsAsDangling; webpack and Rspack builds create
their compiler and read their stats in one place.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RULINGS: "sensible, not paranoid", loaders after a hot edit, sibling
options next to an inline component, split groups and forwarding modules,
unused code is judged after the bundler, route tree quoteStyle and
semicolons. SPEC: J1.4 (quoteStyle, semicolons), J2.2 and §5.3 (forwarding
modules), J2.5 and §5.9 (unused code after tree-shaking; ideal goals, not
gates), J3.1 (loader at least once), J3.2 (sibling options).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- R17: split-mode-parity and the page-code / property-write entries find
routes by their public `id` / `fullPath` (a router over the route tree),
not by the `id` / `path` options the generator writes.
- R18: the whitespace precondition accepts any quote around the path.
- Vacuous check: the split-id directory pin reads directory-safe parts of
the split ids and reports itself (passes) when it has nothing to probe.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- V10: the source-map test finds the user's throw by its marker literal.
- V13 / ruling: a hot edit runs each changed loader at least once (not
exactly once); the obsolete loader still must not run again.
- R6 / ruling: an edit adding sibling options before an inline component
must show in place; its state need not survive.
- Vacuous checks: the "no route HMR code in SSR" check recognises the hot
API in either member spelling and needs the client to have it; the app's
deliberate "loader failed" error is told from reports quoting it
(isAppError); the HMR pins use the default bounds.
- R20: process output outside an app's context counts for an app when no
other app was open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Pipeline (audit V6, V7, V8): no test imports an emitted module by its id
with a cache-busting query (Vite strips it from file ids; real requests
with it are covered by the edit tests); module labels do not depend on
request order; the directive check uses a unique marker and string
values skip module specifiers.
- groups() (ruling 2026-10-24, R2): a module that only imports and
re-exports does not split a group; a new file of the app does.
- Unused code (ruling 2026-10-24, R10): the dead-code page tests check the
production bundle (RouteApp.production(), markers) instead of import
specifiers of emitted modules.
- Vacuous checks: requested() lists app modules by path; servedImports
includes literal dynamic imports; readsImport sees default, namespace
and re-exported bindings; the bindings pin uses servedImports; servedGraph
follows virtual modules.
- R15: page tests that require no errors count uncaught ones only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit V9: the default build entries re-exported the whole route module
(`export *`), so an export a compiler adds (allowed, ruling P1) shipped.
They now import `Route`, as an app's route tree does; tests that need
another export re-export it by name. The Vite "without code splitting has
no dev-only code" React pin passes with such an entry (the refresh export
the HMR compile adds is not imported by the app) and becomes a passing row;
its KNOWN-BUGS entry goes. Also (vacuous checks) the symlink pin recognises a
refusal by the route file it names (`mentionsFile`), and the production
warning pin counts any page log of the production bundle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- generator-dev-app.ts expectRouteFile (audit V1): the import statements
are compared by what they bind, the rest of the file byte for byte
(ruling Q10), with the blank lines a removed import leaves.
- R5: on Vite, errors() counts what the dev server logged after the last
edit settled (SPEC §8: the state after the last write), as on Rsbuild.
- Vacuous checks: the generator-watching pins wait as long as the passing
scenarios do; the "generator stops with the server" check watches at
least three times as long as the running generator took to react.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vacuous checks of the outcomes-only audit, harness side:
- strict-runner.ts: the named-import check also covers virtual modules an
app module imports (a compiler's support module), with a contract test.
- build-harness.ts: MODULE_LEVEL_DIRECTIVE warnings of virtual modules are
kept (only linked files outside the app root are silenced).
- dev-server.ts: payloads sent on the server's WebSocket channel are
recorded too, where it is not the client environment's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- owned-edits.ts (audit V3): blank lines next to lines holding only import
statements, or at the start of the file, are not compared: a generator
that deletes exactly an import statement keeps every byte outside it
(J1.2, ruling Q10).
- determinism-app.ts (vacuous check): withListingOrder permutes
fs.promises.readdir, fs.readdir and fs.readdirSync, and fails when the
generation listed no directory through them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RULINGS: client middleware options, mock access diagnostics, Hydrate chunk
directives, child-only module evaluation, SSR route splitting, and the
clause readings applied without a new ruling; Q3 and Q8 updated. SPEC:
J4.8 (extra fields), J4.17, J5.6, J5.9, J6.3, §5.3 (SSR splitting a goal, not
a gate), §5.18, §8.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Mock access diagnostics: one row checks that calling a mocked import is
reported per mockAccess; the rows pinning string conversion, toString(),
new and property writes are deleted.
- Hydrate chunk directives: a client-only split chunk need not repeat
'use client'; the parent keeps its directives.
- Child-only module evaluation: a module only <Hydrate> children import is
not downloaded early (now checked for both boundaries); when its top-level
code runs is not checked.
- SSR route splitting: not required; the client placement is checked and
both builds still run the loader and render the page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Client middleware: check `type` and that no server implementation or
validator ships (`clientMiddlewareOf`), not the whole `.options` object:
extra fields are allowed (user ruling 2026-10-24, §5.19; Q3 is about stubs).
- Module directives: each user directive is kept; another one is not
forbidden (G12).
- Dev server fns: checked through the public `url` and the request sent,
not `serverFnMeta.id` or a RegExp built from the dev id (J4.4, §5.19).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The outcomes audit (B) found import-protection rows that a correct compiler
fails: a trace listed entry last (allowed by J6.5 and ruling "restructured
compilers", R10) and a specifier violation without `resolved` (optional,
J6.5, §5.14). `traceFromEntry` orients a trace from the entry to the
importer for every reader (`violationsOf`, build-markers' blamed importer);
`resolved` is checked only when given.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quick wins: checkDanglingNames reads each source once per build (dd95e2a0b8,
kept over the equivalent dd9b33bc9c from quickwins-spc), and scriptHolds
parses each loaded script once per marker (bb200e381a).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
exsolve 1.1.3 no longer retains callers through cached failed lookups,
which kept compilers alive across builds in one process.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-plugin-core resolves Start's entries and, in Rsbuild's import
protection, extensionless absolute ids with exsolve's
`resolveModulePath(..., { try: true })`. exsolve caches every failed
lookup as an `Error` in its process-wide `globalThis.__EXSOLVE_CACHE__`.
In 1.1.1 the error's not-yet-formatted stack keeps its call sites alive,
and with them the Rsbuild transform closure of that build: its `compilers`
map, every `StartCompiler` (Babel ASTs in `moduleCache`) and the Rspack
compilation. exsolve 1.1.3 (#63, "Don't keep callers alive through
cached errors"; 1.1.2 shipped without a rebuilt dist) reads `error.stack`
before caching the error, so only the formatted string is kept.
Measured on this machine (heap snapshots, V8 ephemeron-aware
reachability), 25 Start Rsbuild production builds in one process, each in
a fresh app directory, forced GC:
- 1.1.1: 50 `StartCompiler` objects alive (all builds), heap 426 MB,
RSS 2.3 GB; 75 cached errors.
- 1.1.3: 2 alive (the build still in scope), heap 175 MB, RSS 1.7 GB;
the same 75 cached errors retain no compiler.
start-plugin-core `test:integration`, 4 workers, same session (the
PERF-STUDY method: resource-profile sampler + tool hook):
- 1.1.1: peak PSS 17.3 GB, top worker 4.49 GB, 96.3 s, all pass.
- 1.1.3: peak PSS 13.0 GB, top worker 3.21 GB, 93.7 s, all pass.
(PERF-STUDY: 17.1 / 4.46 GB; its `cache: false` prototype 13.1 / 3.6.)
Only the lockfile changes (`pnpm update exsolve --recursive --no-save`):
exsolve 1.1.1 -> 1.1.3 for start-plugin-core, c12, env-runner and
pkg-types. exsolve's negative cache itself is unchanged: a Start entry
added after a failed lookup stays unresolved until the process restarts
(reproduced with 1.1.1 and 1.1.3; not addressed here).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
expectLoadedOnNavigation checks the page's scripts before and after the
navigation; the scripts loaded before were parsed again in the second check.
A loaded script's code does not change, so its answer per marker is kept for
that script record (a WeakMap on the test's own script objects).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The attribution of a dangling name read every module holding the name again
for each candidate name (2,961 reads of 230 distinct sources in router-plugin
test:integration). The reads are memoized per build: the same sources give the
same names, so the decisions are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The five compiler test packages (compiler-test-utils, router-generator,
router-plugin, start-plugin-core, react-start-rsc) now set
`test.maxWorkers: 4`; every project inherits it (`extends: true`), and
`--maxWorkers=<n>` or `VITEST_MAX_WORKERS` still override it.
Each worker runs real bundlers, dev servers and its own Chromium, and Nx
runs 5 tiers at once: at Vitest's default (cores - 1 = 15) the default
whole-set command started 54 workers and about 270 Chromium processes,
needed more than 27 GB and failed (78 failures, 35-53 GB of swap written;
PERF-STUDY 2026-10-23).
Measured locally (16 cores, 27 GB), `nx run-many -t
test:unit,test:integration,test:noncompiler -p <the five> --skip-nx-cache
--excludeTaskDependencies`, no flags: 166.5 s wall, 1,591 CPU-s, all 12
tasks pass, peak PSS 18.8 GB, 8.5 GB swapped out, at most 21 workers and
90 Chromium processes.
The compiler-test AGENTS.md no longer tells people to pass
`--maxWorkers=4`: the budgets are measured at the configs' default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user, on whether the generator may touch other import statements when it
adds a missing route constructor import: "I don't think we should specify
that. Let it." expectOnlyOwnedEdits no longer caps how many router package
imports change, nor keeps any import statement byte for byte. It still
checks the outcome: everything outside the import statements keeps its
bytes, and the imports bind the same names (imported and local name, source,
type/value meaning, attributes; side-effect imports stay), apart from the
route constructor's own binding.
Validated with a correct generator variant (temporary) that reprints every
import and merges same-source imports: the old helper failed 4 rows, the new
one passes. Records the ruling in RULINGS, SPEC J1.2 and the README (no
ruling pending).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-measured at c2161c4d14 (both rulings branches merged): counts (start-plugin-core
integration 1205 / 294, react-start-rsc integration 108 / 14), no #34 hit in 65
beetle jobs, R2 clean, the greens, the 17 reds the rulings touched, the sweep.
The #34 caveat goes; the Chromium shared-memory exhaustion (FINAL-PASS #40) is
recorded as an open caveat with its upstream draft.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RULINGS Q1, Q2, Q5, Q8, Q9, NEW-1 and NEW-2; SPEC J1.10, J1.13, J3.11,
2.2, 5.5, 5.20, 8 and 9; README pending table, counts and status;
KNOWN-BUGS counts and the moved K-19 pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Q5: replace the jsdom updater test with a real page row (Vite and
Rsbuild): an app that creates a second router after its own keeps
working through a route edit. Q8: delete the two-router-plugins row and
the hand-built Start composition sharing a plugin context; the rest of
router-plugin-context.test.ts is code-splitter-edits.test.ts. Q9: delete
the immediate tsr.config.json reload pin. NEW-1: the decorator pin is a
real bug. jsdom is no longer used by router-plugin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Q1: delete concurrent-write.test.ts, whose tests inject an fs into the
generator; the K-19 pin keeps its real-filesystem part (tmpDir on
/dev/shm, files replaced by a rename) in generator-options.test.ts.
Q2: the nested type tests check InferFileRouteTypes<typeof routeTree>
instead of the generated FileRouteTypes name, and run on a copy of the
fixture (integration/fixture-types-nested.test.ts): the types project,
its tsconfig and the last write into the package are gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ruling Q4 (2026-10-23): a name re-exported with export * from a denied
module is a complete safe mock; otherwise a build fails and dev warns at
the export *; never the denied module's value or a crash. The dev pin now
accepts the warning and checks every resource the page loaded for the
secret (a denied package of its own, so a leak is visible); new build rows
on Vite and Rsbuild (pinned on Rsbuild for a denied specifier, whose build
succeeds with the name undefined).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vite 8.3.4's optimizer keeps writing node_modules/.vite/deps_temp_* after
close() resolved (final-pass #34), so removing the app failed with
ENOTEMPTY, or the optimizer's write into the removed app was an unhandled
rejection. closeViteServer waits until each environment's optimizer has
initialized and scanned and no deps*_temp_* directory is left, then
closes. The ctu dev server harness and the raw Vite servers of
start-plugin-core's known-bugs-start-compiler-dev and hydrate-build-dev use
it. Authorized by the user's ruling of 2026-10-23.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rsbuild's RSC CSS transform only rewrites server function provider modules
(`serverFnProviderOnly: true`, react-start src/plugin/rsbuild.ts), so a
server component a helper module renders gets no CSS. The e2e spec
rsc-css-helper was the only pin of that; the Rsbuild oracle now holds it as a
test.fails row (red today, green when serverFnProviderOnly is dropped). The
Vite half is covered by rsc-css.test.ts. Restores e2e/react-start/rsc to main;
its route tree is what the app's build generates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pin "transforms a client module with a server fn and a top-level call
of a pre-bundled dependency" passed once under load (green-sol/17). Vite's
dependency optimizer ends its first crawl of static imports when no request
is in flight 50 ms after it starts. The harness made its first request after
createServer(), which had already started the optimizer, so a loaded machine
could delay the request past those 50 ms: the transform was then not in the
crawl, Vite optimized zod in a later run, and the deadlock did not happen.
The harness now creates a listening server, requests src/fn.ts, waits until
Vite loads it, and only then calls listen(), which starts the optimizer. The
transform is in flight when the optimizer starts, so it is always in the
crawl.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The R7 coupling, the watch-mode row and the run directory left in the
temporary directory are fixed; the re-measurement at 57addcc41e (3 unpatched
runs, R1-R11, the 34 valid greens, 18 reds) and its one open finding, a
dev-server deadlock pin that passed once under load, are in the status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each test process removed its shared app directories when it exited, and
the last workers exit while Vitest runs the global teardown, which removes
the whole run directory. Node's fs.rmSync (24 and 26, not 22) returns
without an error and leaves the rest of a tree behind when another process
removes part of it meanwhile, so the run directory and its generator/ were
left in the system's temporary directory. With a run directory, the
teardown is now the only one to remove it; without one, the processes still
clean up on exit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The session's first build wrote the route tree, so webpack always rebuilt
right after it, and a route file the test created then could meet the
pinned generator bug (router-generator generator-dev.test.ts "events that
arrive together"). The app now gets its route tree from a real build first
and its files are a minute old, so nothing is pending when the test creates
the route file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generator.run ends a batch whose events all changed nothing with an early
break, without looking at the events queued meanwhile. A route file created
while webpack's rebuild runs the generator for the unchanged route tree is
then neither scaffolded nor routed. This is what made router-plugin's
generator-watch-mode row fail now and then (more often with /tmp on tmpfs).
Pinned deterministically through the public Generator, with a control that
sends the same events one after the other.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
expectNoOtherErrors took the importer's file as everything before its first
colon, so Rsbuild dev's `webpack:/src/a.tsx:2:1` (the F2 pin) gave `webpack`
and the row passed only because the bundler's error text contained that word.
Locations are now split at a trailing `:line(:column)` only (locationParts),
and the other-errors check asks whether an error names the importer's app file
(mentionsFile), so it depends on the file alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured at f16aae85ac (beetle, 3 trees x 4 workers; budgets locally): counts
confirmed in every tier and lane, R1-R11 (R2: only Q5; R7: one row that
depends on the bundler error's wording), V4 90/90 reds caught and 34/34
greens clean, stability (#34 only), the git-status sweep, strict budgets.
Also records the tmpfs-dependent router-plugin watch row and the run
directories left in the system temporary directory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README (Diagnostics, G8, Status, counts re-run at F-L), RULINGS
(import-protection reports through onViolation) and SPEC G8 say what the
tests now check: each import-protection violation is printed, log is
judged on printed warnings, the typeof exemption is per module, and a
position counts after the file is named. The MDX dev row titled "logs a
warning at each importer" now checks the printed warnings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
router-generator's Vitest config uses the shared run-directory global
setup, like the other compiler-test packages: the generator's own
temporary files (TSR_TMP_DIR) and the harnesses' apps (runDirectory())
live in the run's directory, removed when the run ends, also after a
crash.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
expectCompileError passes the module's file (CompileFailure records it),
so a compile error at the right line of another module no longer passes.
The shared diagnostic matcher reads a line:column or :line only after the
text names the expected file (a code frame's highlighted line anywhere),
so a stack frame or a trace step before the file no longer stands in for
the position.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Function-valued Rspack rule fields must survive the RSC setup
(enableSwcReactServerComponents): Rsbuild configuration plumbing, not a
compiler. Restored unchanged from main and run by test:noncompiler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chunk's free names keep the names it also probes with typeof
(readNames keepProbed); each module decides for itself whether its read is
guarded. A module that probes the name explains the read; a module whose
rendered code in a Vite build lost the name (Rolldown's OutputChunk.modules)
is no reader. Start's Vite builds now record the same module evidence as
the other harnesses. A chunk Yuku reports a parse error for fails the check
instead of being half read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
settle (node, page prelude and the local page helpers) now takes the
function to call and gives back a value that is no function as it is, so
throwsError no longer accepts a compiler that replaces a wrong-environment
createServerOnlyFn/createClientOnlyFn with no function at all (J4.10).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
expectViolationsAt also asserts, for a run that records what it printed
(a dev server, a build), that each violation onViolation received is
printed as a warning or an error naming its importer and position (SPEC
J6.3). The log rows count the printed warnings naming the importer
instead of onViolation calls (J6.5: log governs printing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: ctu build-harness.test.ts keeps simplify-b's deletion of the
dangling-name block (F-J's two .dependency- createAppDirectory sites were
inside it; the now-unused imports dropped). The implementation lane stays
deleted (F-J's comment edit of route-hmr-debug-output.test.ts dropped,
router-generator's implementationTests constant not restored; F-J's
JITI_FS_CACHE setting kept). ctu exports: ./app-directory and
./run-directory added, ./added-code stays removed. rp
generator-watch-session.ts imports createAppDirectory without the unused
expect. README: F-J's status paragraph says its counts were measured on its
own baseline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: the legacy helpers S-B edited (spc, rp outside-compiler-corpus,
already deleted here) stay deleted, and S-B's spc
outside-compiler-corpus/legacy/validate-module.ts is dropped (no user: the
implementation lane is gone). ctu validate-module.ts stays deleted. In rp
code-splitter-imports-exports neither side's removed import is kept.
Lockfile: S-B's; pnpm install --no-frozen-lockfile changes nothing, frozen
install passes. Also deleted: ctu knownGlobals (its last user was
validate-module), unused spc PageFixture and rsc NO_BACKGROUND. README and
SPEC G8 describe the free-name and production-bundle checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README counts, lanes (no implementation lane) and legacy note; RULINGS
'oracle tests only', F1 and real-requests entries; SPEC internal-controls
and C10 lines; KNOWN-BUGS without the F1 caret pin (362 pin sites in 100
files, J4 81); AGENTS without the implementation lane and the Node
stand-ins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- start-plugin-core: the legacy regression helpers, tests/start-runtime.ts,
importProtection/mock-modules.ts and compiler-transforms-seam.ts (their
last users were deleted by main-tests and nol-delete); the F1 caret pin
known-bugs-start-compiler-code-frame.test.ts with its code-frame reader
(printed message text, code frames included, is not tested); the unused
reactStartPackage and two unused importProtection option helpers.
- compiler-test-utils: the Node stand-ins module-linker, render and
lazy-probe, importBindings and keptDynamicImports, with their controls;
an unused escape helper. native-import.cjs stays: start-compose-app.ts
imports the real SSR build with it.
- router-plugin: the unused pageDiagnostics.
- The implementation lane is empty in every package: its Vitest projects,
test:implementation scripts and Nx targets, router-generator's
tsconfig.implementation.json, the root test:pr/test:ci/vite-ecosystem-ci
entries and the compiler-platforms step are removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: the import gate and its control (deleted by simplify-a) drop
main-tests' noncompiler-list edits; the tests/noncompiler-tests.json lists
stay for Vitest and ESLint. compiler.test.ts header takes main-tests'
wording. Files main-tests deleted stay deleted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: files nol-delete deleted stay deleted; the build harness keeps
simplify-a's onViolation recorder without the removed corePlugins option;
README counts are rewritten after the last merge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
router-generator's test:implementation type-checks with tsc 6, which
cannot infer the loop's `end` and `whole` (TS7022).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With behavior "error", onViolation may receive the other importer's
violation more than once (seen under V4 green-sol/19, which does not touch
import protection); assert that a violation is reported and that none is
at the exempt importer instead of counting the callback's calls.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An app's temporary directory now mirrors the path of the directory it
stands in for from the repository's root (the outermost node_modules),
with the node_modules links, tsconfig.json and package.json at their
mirrored places. Apps stay as deep as they were: router-plugin's
relocation test, which serves the same route from project roots at
different depths, still serves it from different depths, and no longer
creates those roots in the package.
The oracle README's #34 caveat names the other form of the race: the
optimizer's write into an app removed meanwhile, an unhandled rejection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vite prints a file relative to the working directory
(tests/integration/.plugin-host-x/src/label.ts): with a root, a longer path
ending with the project-relative path names the file when the absolute
path ends with it; a leading slash (webpack:/src/a.ts) counts like ./.
The router-plugin host control accepts a warning printed on more than one
channel, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README "Lanes" and AGENTS.md: the corpus is the compilers' test suite;
main's tests of features that are not compilers stay at main's paths with
main's content and run in test:noncompiler (listed in
tests/noncompiler-tests.json); main's tests of compiler internals are
deleted because the corpus covers their behaviour. Implementation and
noncompiler counts updated; acceptance counts unchanged. Root AGENTS.md
lists test:noncompiler among the targets to run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The oracle (acceptance) is the compilers' test suite. Main's own tests split
in two:
- Tests of features that are not compilers (start-plugin-core: manifest,
sitemap, prerender, CSRF config, schema, entry planning, post-build,
output directory, watch-ignored, createVirtualModule, dev styles, utils,
Rsbuild normalized client build; react-start-rsc: ClientSlot,
ReplayableStream, ServerComponent, SlotContext, createRscProxy and the
three type tests) are restored to main's paths and content
(git checkout origin/main). Each package lists them in
tests/noncompiler-tests.json: the `noncompiler` Vitest project
(test:noncompiler) selects them, the corpus projects, the import gate and
start-plugin-core's ESLint leave them out. react-start-rsc type-checks and
lints tests/integration only, as main does not check these files.
- Tests of today's compiler internals that the branch had moved under
outside-compiler-corpus/ are deleted: router-generator config, transform,
param-name-warnings, virtual-routes; router-plugin config and the
handle-route-update controls (the Q5 control stays); start-plugin-core
compiler-instances, compiler-member-call-receivers, compiler-seams,
importProtection analysis/defaults/matchers/rewrite/sourceLocation/trace/
utils/virtualModules, Rsbuild server-fn-resolver-rebuild and swc-rsc,
server-fn-resolver-module, Vite module-id and start-compiler-utils. The
corpus covers their behaviour. No real-bug pin was in them.
Corpus comments that pointed at the deleted files now name main's sources.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The implementation lane now holds main's relocated tests of compiler
internals and the Q6/Q7 legacy harness only; its counts drop
(router-generator 114/2 -> 51/0, router-plugin 104/1 -> 17/0,
start-plugin-core 609/9 -> 468/0). Acceptance tiers and the noncompiler
lane keep their counts. The F-F gap about `corePlugins` is gone with the
option.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC G5, J2.8, J2.19, J4.10, J6.12, §5.7 and the code-frame note now ask for
file and position only; RULINGS records the 2026-10-22 user rulings
(diagnostics: file and position only; import-protection reports through
onViolation; no import gate) and supersedes "explaining a diagnostic";
KNOWN-BUGS drops the deleted pins and renames the changed ones; README and
AGENTS describe the remaining checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User rulings of 2026-10-22: a diagnostic is checked only for being reported,
at its severity where a test needs it, naming the file and the position; and
import-protection violations are read from Start's public onViolation
callback, never parsed from the printed report.
- compiler-test-utils diagnostics.ts keeps the collection (diagnosticsOf,
captureThrow, captureConsole), expectDiagnostic/findDiagnostics with
severity, file (absolute or project-relative as a whole path) and position
(line:column, or the line) only. Deleted: explains and its word lists,
causes, names, prose, distinctFrom, code-frame and prose parsing,
importLines, importedBindingUses/scopeBindings, the reported-location
oracle, expectFrameAt and the environment-restriction grammar. Its
controls are deleted with them; the real-channel controls stay.
- start-plugin-core: the violation-report reader, its 124 controls and
channels.ts are deleted; the harnesses record what onViolation receives
(dev servers, builds, StartBuildError) and tests compare it with literal
places (use, import line). Printed reports are checked for file and
position only (expectPrinted). original-location.ts takes literal places;
its 13 controls are deleted.
- J4.10 runtime errors are checked by the call throwing (throwsError).
- Callers in router-generator, router-plugin, react-start-rsc and
start-plugin-core drop names/explains/prose/distinctFrom/source.
- Pins whose only subject was message content are deleted (the warning
names the binding, not the option; the rejection of this/super names no
fix); the F1 column pins in createServerFn.test.ts check the line (F1
stays pinned in known-bugs-start-compiler-code-frame.test.ts); the
export * pin asks for the mock (today's warning already names the file
and line).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the pending-rulings files gone, delete the tests of test helpers
that only exercised the legacy in-process harness (start-plugin-core
legacy-regression-helpers, render-host, known-bugs-start-compiler
controls, known-bugs-hydrate controls, createServerFn controls, the
outside start-compiler-runtime-contract; router-plugin's fast-tier
regression-helpers controls), delete the legacy render and diagnostics
modules, trim the legacy helpers to what the remaining implementation
tests use, drop the Q6/Q7 entries of the import gate's allowlist, and
record the rulings in the oracle docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A CommonJS package in node_modules whose code has the text .handler(
reaches the Start compiler in Vite's client build (and SSR with
noExternal), both Rsbuild builds and Rsbuild's dev server; the compiler
parses it as an ES module and fails on a top-level return that the same
package without that text builds and runs with. The in-process pin is
replaced by real-app pins (both builds, Rsbuild dev): red today for that
parse error, green under a correct fix (checked with a reverted
temporary fix). The octal escape and with forms break these apps
without Start too and carry no pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ruling Q6 (2026-10-22): the rows that hand-write a fake
@tanstack/start-client-core and drive the internal StartCompiler are
deleted. What they meant is decided through the public Start host:
- Start's own built createCsrfMiddleware (an isomorphic fn whose server
implementation builds a middleware) is a no-op in the client and a
request middleware on the server (added);
- createMiddleware read as a member of a namespace import of a project
module that re-exports it (added next to the createServerFn and
createIsomorphicFn rows of the same form).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Start's production client builds read process, Buffer, setImmediate, global
and __REACT_DEVTOOLS_GLOBAL_HOOK__ behind typeof checks; no globals set
holds them for a browser. One rule replaces the old guard analysis: a
module that probes a name with typeof reads it knowing it may not exist.
It also covers @vitejs/plugin-react's WorkerGlobalScope check, so the
client globals go back to the browser set alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deletes the user-approved out-of-scope files of `outside-compiler-corpus/`
(NON-ORACLE-LANES 2026-10-22): the tests of test helpers (H, 22; the
start-plugin-core `legacy-regression-helpers.test.ts` goes with Q6/Q7),
the new tests of today's compiler internals (I, 22; `mock-modules.ts`
stays while the relocated main tests `analysis.exports` and
`virtualModules` use it), the new non-compiler
tests (N, 6) and the router-plugin legacy harness (L, 3).
Also removes the helpers only they used: the `corePlugins` option of the
Start build, Vite dev and Rsbuild dev harnesses (and `CoreStartPlugins`),
`warnMeTransform`, the generator file-watcher inventories
(`expectGeneratorWatchersClosed`, `expectWatchSessionWatchersClosed`), and
the export of `stringValues`. Comments that pointed at the deleted files
now stand alone. The real bugs pinned only in the deleted files are
recorded outside the repo (FOLLOWUPS).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A `declare` binding has no runtime value: the route file reads it free.
Erasing TypeScript with Vite's Oxc transform says so without relying on
Yuku's binding flags (an ambient var merged with an interface of the same
name loses the Ambient flag in Yuku 0.22.1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ctu AGENTS.md says how tests get app directories (app-directory,
run-directory) and that they never write into the repository; the oracle
README's #34 caveat no longer describes the leftovers in the packages; the
.gitignore entry now covers only what older checkouts may hold.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A module's free names are now Yuku's unresolved references (free-names.ts):
no type positions, no `typeof x` operand, and `arguments` read where
Yuku's binder stops at a non-arrow function is that function's implicit
`arguments`. Client globals are the `globals` package's browser and
worker sets.
- compiler-test-utils: delete validate-module.ts (analyzeScopes, typeof
guards, declaredNames, the Rolldown module-alone mode for G8 decisions,
source-map attribution of shipped free names) and source-attribution.ts,
with their controls (validate-module unit and build tests, the 32
dangling-name rows of build-harness.test.ts). The build harness's
dangling-name check keeps its attribution policy and reads free names
from free-names.ts.
- router-plugin: expectValidModules = parse errors plus free names minus
browser/worker globals, the refresh globals and what the route file reads
free; when a module has one, the app's production build decides through
the build harness's dangling-name check (G8). The two page tests that
called getModuleErrors use expectValidModules. Legacy implementation
helpers drop their own expectValidModules and its control row.
- start-plugin-core: the legacy helpers (implementation lane and pending
rulings Q6/Q7) keep getModuleErrors/keptDynamicImports in
outside-compiler-corpus/legacy/validate-module.ts, on free-names.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Yuku 0.22 is the first release with the semantic API (scopes, bindings,
references); it was published 2026-10-22, inside the workspace's 24-hour
minimumReleaseAge window, so it is excluded from that window by name
(user-approved) until it ages past it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the statement-diff evidence (added-code), the dev-global trap and
the dev-API regex of production-bundle.ts with one outcome: the production
client bundle renders the route in a real browser and its chunks equal the
control build's (addHmr: false, NODE_ENV=production), chunk for chunk.
Delete compiler-test-utils' added-code.ts and its controls. global-trap.ts
stays: start-plugin-core's start-host (an acceptance user, with no control
build) still uses it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user ruled to delete the static import gate entirely, with no
replacement: its script, its control, the test:import-gate* targets of
the five compiler packages, the nx target default, the root test:pr/test:ci
target and the compiler platform workflow step, and its documentation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The harnesses created their temporary apps as hidden directories of the
packages' tests/ so that Node resolution found the dependencies. What tools
wrote into an app after its removal (Vite's optimizer after close(), #34)
stayed in the package (about 1,900 directories per tree after 50 runs) and
broke start-plugin-core's test:eslint.
Every app now lives in a temporary directory that stands in for the
directory it was created in (`@tanstack/compiler-test-utils/app-directory`):
the node_modules directories above that directory are linked at the same
depth, so imports resolve to the same real paths; its tsconfig.json (class
fields, JSX, decorators) and the type/sideEffects of its package.json
apply as before; Vite dev servers allow what Vite allowed for an app in the
package and keep their dependency cache in the app. A global setup
(`run-directory`) gives each run a directory, removed when the run ends,
for the apps and for the route generator's temporary files (TSR_TMP_DIR,
on the apps' filesystem: K-19), which went to the packages' .tanstack/.
router-generator runs its fixtures on copies instead of the checked-in
directories (a correct generator may rewrite their route files); the tree
of the nested fixture is still written next to it for the types project
(Q2). Its Vite servers keep their dependency cache in the app, and jiti's
file cache is off under Vitest: both went to the package's node_modules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R1–R11, V4 rounds 1+2, stability and strict budgets re-measured at 633a4c0917
(after F-F, F-G1, F-G2, F-G3, V-G1), and start-plugin-core again at
d07614d3b3 (after F-I). Counts at d07614d3b3. #34 is now frequent (single
rows, also in alone re-runs) and leaves app directories that fail
start-plugin-core's eslint; #42 did not occur. The two slow tiers are 2–5 s
under their hard budgets. red-astra-r2/15 is now caught by its own row only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F-I stopped running the SSR-code half of the D6 control on Vite, because
whether the server fn is in the resolver there depends on the #7213 race.
After that change, no acceptance row caught a Vite compiler whose resolver
drops every server fn the client build did not find. A server fn that the
app's server entry defines is found when the SSR build compiles that
entry, before the build reaches any module the entry imports (the resolver
among them). So this control's order is fixed on both bundlers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A traced run of the start-plugin-core and react-start-rsc acceptance tiers
lists every Vite build whose resolver holds a server fn the SSR build found
in the same build step. Besides the #7213 block, only the D6 harness is one:
the server-only fn its control calls from SSR code reaches the resolver by
about 12 ms, and no app input orders the two.
Split the D6 control: the client-referenced HTTP call on both bundlers, the
call from SSR code on Rsbuild only. The D6 pin keeps asserting both and stays
red on Vite either way (for #7213 when the race is lost). React-start-rsc's
builds register their server fns in an earlier build step, and dev servers
have no generated resolver.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Vite row "a server fn that only a middleware .server() of another module
calls" passed only because the SSR build usually compiles the middleware's
module a few milliseconds before it loads the server fn resolver; under heavy
load it lost that race ("Server function info not found"). No app input
orders the two, so that Vite cell is no longer run (Rsbuild keeps it).
New rows build the same callers with the caller only client code imports.
The SSR build then reaches its handler and middleware only through the
resolver's generated imports, so on Vite the server fn is always missing
from the resolver: deterministic pins of #7213 for both callers (passing
rows on Rsbuild). KNOWN-BUGS and the oracle README follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fast-tier rows "leaves unrelated SSR middleware chains as written" and
"isomorphic, server-only and middleware implementations in one module" called a
middleware's .server() with a hand-written next. Each now calls a server fn
that uses the middleware (a user of the factory in another module, a
createServerFn().middleware([mw]) next to the case), from the client over HTTP
and from server code inside a real request, and reads what the middleware put
into the handler's context.
The env-separation pin "a function middleware validator on a builder variable"
called the validator directly. A server fn with that middleware now returns
the data the validator gave, called by id through Start's server entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page scripts clicked a deferred boundary every ~100 ms until its counter
read ":1", deciding on a 50 ms quiet period that cannot see a chunk still
loading. Under load the boundary's code takes longer than that, the repeated
clicks are replayed with the first once it hydrates, and the counter never
reads ":1" (seen: Solid "a boundary loads its children when it hydrates",
child:41). The prefetch rows read the prefetch before it finished loading
(prefetched: false).
`clickUntil` (in the page scope) does not click again after a click the
boundary took in (the page cancels it to redispatch it) until the page
changed and settled; the prefetch rows wait for the prefetch's request.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The harnesses imported outside-compiler-corpus/core-start-plugin.ts, so every
acceptance file using them statically reached tanStackStartVite /
tanStackStartRsbuild (68 files in the import gate's helper graph), and any
test passing `compilerTransforms` would silently get the core factory instead
of `tanstackStart()`. The implementation test now passes the plugins itself
(`corePlugins: coreStartPlugins(transforms)`); the harnesses only know the
type. No acceptance file reaches the core factory module any more.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ctu test:integration 171 (the invalidation control of hmr-sync), settlePage
covers invalidations, and the server-code claim is scoped to the build and
dev-server tiers: two fast-tier rows still call a middleware's .server() with
a stand-in next, listed under known gaps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
editOutOfOrder's stale page only makes the dev server compile the split
modules first; a stale module it asks for may fail as a stale request does
(e.g. a compiler that versions its split URLs). The fresh page judges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An accept callback that calls import.meta.hot.invalidate() (React Refresh on a
route module it cannot refresh) sends vite:invalidate back to the server, which
answers with an update or a full reload. The sync token could reach the page
before that answer, so settlePage resolved before the reload: shown with a
400 ms client->server delay on the addHmr: false React row (reload after
settle) and by a new control that fails on the previous helper.
The page now answers each sync token over the same WebSocket
(import.meta.hot.send); Vite handles a page's messages in order and an
invalidation synchronously, so a page counts as settled once its answer came
back with nothing else sent to the client since the token went out;
otherwise another token follows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
route-hmr-dev-addhmr-off's Vite rows waited at most 3 s for the edit to
show and took a timeout for 'not shown', then waited for network idle:
an update applied in place late under load could be missed. They now
settle with settlePage: the page took in and handled everything the dev
server sent (Vite's client handles messages in order, an update once its
modules are fetched and accepted), waiting through a reload, then judge
reloaded vs applied in place; a row also requires the edit to have shown.
hmr-sync.ts moves to compiler-test-utils (./hmr-sync, shared by
start-plugin-core and router-plugin) with hmrSyncInitScript for pages
whose own code does not import it, and gets controls
(tests/integration/hmr-sync.test.ts, discriminating: slow modules make a
helper that does not wait fail). The Rsbuild and webpack rows of the file
already settle on the shown text with failWhenQuietFor, in both outcomes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fast-tier row 'a request middleware server implementation called
through a computed member' of known-bugs-start-compiler.test.ts checked
the server side with mw.options.server({ next: () => 'next' }), a
hand-written middleware chain. Its build twin in
integration/start-build-call-shapes.test.ts has the same input, the same
call site and names for a rejection, and the same outcome (no server-only
module in the client, the middleware runs on the server), and runs the
middleware as the app's request middleware in a real request. The
fast-tier host has no start entry per case, so the row is deleted rather
than kept with a stand-in chain. The other rows of the table keep the dev
path of the same root cause. KNOWN-BUGS.md is unchanged (the table is
one pin site; its entry does not list rows).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Known gaps: the webpack addHmr cell, the hand-written next rows and the
300 ms settle are fixed; one fast-tier pin with a hand next is left
(named). How tests reach the compilers: webpack dev server, middleware
through requests, page-judged reloads. Counts: rp integration +1, spc
integration +1, spc implementation +1, with reasons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
probeMock's deepCall also called any.constructor.member() and
any.__proto__.member(): a mock that keeps its target's constructor and
prototype (SPEC §5.18 leaves the Proxy shape free) failed it. New harness
control: such a mock is safe; the rejecting controls still reject.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
known-bugs-hydrate expectNoUnusedChunks: the split modules are what Vite's
client module graph reaches from the case module (the case's code by
provenance), not import() specifiers parsed from the served code; the
page must have requested each. New passing control (JSX children).
known-bugs-dev-server editOutOfOrder: the dev server no longer gets
transform() calls in a test-chosen order; a real page whose HMR WebSocket
fails renders the route for the first time after the edit, so the browser
requests the split modules before the route module. Both pins stay red for
their stated reasons; controls pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-router-dev-server's quiet() (300 ms without HMR messages) and the
full-reload message counts of start-router-dev-server and v2-edits-page
are replaced by settlePage (integration/hmr-sync.ts): the server sends a
custom HMR event until the page holds its token (one WebSocket, in order),
waiting through a full reload the page announced (vite:beforeFullReload);
"no full reload" is then the page's load count.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows that called .options.server({ next }) or .options.server.handlers.GET()
with a hand-written next now go through Start's server entry: a server fn
with the middleware called over HTTP (callById / callServerFn), the app's
request middleware registered in src/start.ts, route handlers by
startServerEntry.fetch. start-build-env-separation (6 rows),
known-bugs-start-compiler (integration), start-compiler-dev-server,
start-build-call-shapes. start-compiler-dev-server keeps the absence of a
full-reload payload for J3.6 (the server side has no page), now after the
outcome, with the reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The webpack cell of plugin-options "with addHmr: false, a development
build with the HMR plugin has no route HMR code" looked for
/\bhot\.accept\(/ in the build: today's local name. It is replaced by two
rows of route-hmr-dev-addhmr-off.test.ts on webpack-dev-server with
hot: true (the webpack quickstart example's setup, new devDependency
webpack-dev-server ^5.2.4, already in the lockfile) and a Chromium page
(tests/webpack-hmr-page.ts): with addHmr: false a loader edit reloads the
page; the control, with route HMR, applies it in place. Catch proof: with
addHmr ignored (addHmr = !isProduction) the row fails with
{ reloaded: false }.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commit 3e3331caa3 swept in 299 fixture route files under
tests/generator/**/routes/** whose only change was ' to " around strings:
output of the V4 green-sol/01 variant (ids printed with double quotes),
which ran the generator fixtures in place (generator.test.ts runs a
fixture in its own directory). The commit's message names no fixture
change. The bytes equal main's again, so `pnpm format` leaves them alone
without an ignore pattern.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RULES-AUDIT §3 item 6 (hand-configured stand-ins).
- start-plugin-core: the build, Vite dev and Rsbuild dev harnesses create
Start's plugin with `tanstackStart()` of the built framework package
(`tests/start-plugins.ts`, shared with `start-host.ts`), so react-start's
config plugin (dedupe, externals, pre-bundling) and Solid Start's own
plugin apply; entries through the documented `client.entry`/`server.entry`
only where the app has none; React apps get `@vitejs/plugin-react` /
`@rsbuild/plugin-react` unless the test gives it; the harness's own
`ssr.noExternal` and start entry are gone. Vue hosts add
`@vitejs/plugin-vue-jsx` (new devDependency). `compilerTransforms`, which
no public option takes, stays for the one implementation-lane file through
`outside-compiler-corpus/core-start-plugin.ts`.
- router-plugin: Rsbuild builds use `pluginReact()` instead of a hand SWC
config; Vite builds add the framework's Vite plugin (`@vitejs/plugin-react`,
`@vitejs/plugin-vue-jsx`), not added again when a test gives it; webpack
and Rspack Vue builds compile JSX with Vue's Babel plugin.
- react-start-rsc and the spc RSC warning app: `pluginReact()` instead of a
hand SWC config.
No count or pin changed (beetle, every lane).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V-F validation of 88720e56a0: `expectValidModules` excused a dev module's
free name whenever the production build did not read that exact name, so
a compiler whose production output reads a different dangling name (e.g.
one that depends on the mode) passed 27 of 28 rows of
code-splitter-route-options (temporary compiler patch, reverted). The
escalation now also runs the build harness's own dangling-name check on
that production build (`describe('client')`, `DanglingNameError`), minus
the names the route file itself reads free; with the patch 22 of 28 rows
fail (the 6 others do not check modules), a G8-legal unused export with a
dangling read still passes.
`expectValidModules` reads the modules with the route file's language, so
code-splitter-scope's `.ts` row uses it instead of a direct module-alone
`getModuleErrors` (now decided on the production build like the others).
README: G8 sentence corrected, the remaining module-alone sites named.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Counts after F-F (four cells changed, with the reason), what F-F changed in
how tests reach the compilers (server fns by public URL, dev module graph
from Vite, G8 on the production build), the gaps the F-F audit found and
left open (hand-configured Start/framework options in the build and dev
harnesses, the webpack addHmr:false cell, a few option-object middleware
calls, a quiet-period settle), and the merged variant runner (patch set,
extra lanes, V4 rows). router-generator AGENTS.md: no expected snapshots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RULES-AUDIT §3 item 7 (R11(2)): router-plugin `expectValidModules` judged
G8 with the per-module approximation (the module bundled alone with every
export kept), which rejects a dangling read in an export the real graph
drops (§5.6, §5.9).
The module-alone check still runs first (no build for a correct
compiler); a module with a free name is checked again against a
`vite build` of the same app (the generated route tree as input, as the
app's router reads it), and the name counts only if the production client
chunks still read it free. A route compiled with route HMR keeps the
module-alone check: its HMR code runs in dev on an update, and production
drops it.
ctu `ShippedModule.module` is optional: without it a free name counts
wherever the build still ships it, so generated code without mappings
(§5.14) cannot hide a dangling read; control added.
Checked with temporary compiler patches (reverted): an unread export with
a dangling read (G8-legal) failed at least 20 of 28 rows of
code-splitter-route-options before and passes now; a shipped, unmapped
dangling read (`Route.options.x = () => undeclared`) is still caught.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Criterion 5 re-audit fixes (no re-implementation; client semantics in a browser):
- ctu dev server `load()` follows Vite's own module graph (`importedModules`
of each served module: static and lazy imports, `import.meta.glob`)
instead of parsing the served code for static imports; a marker leaked
into a lazily imported module is now seen. The deprecated Node stand-in
`evaluateServed` (no caller left but its own controls) is deleted with
its controls. The perEnvironmentStartEndDuringDev pin requests the eager
modules itself, so it keeps reproducing "the client loads late.ts after
the server rendered".
- start-plugin-core: server fns are identified by their public `url`
(SPEC J4.1), never by Start's own `serverFnMeta` field (§5.19):
`serverFnId()` in the SSR prelude and `callServerFn()` (dev) derive the
id from the URL and the base `createClientRpc('').url` gives; a value
without a server fn URL throws outside any `try`. The #42-held rows'
reads (start-compiler-dev-server :58, known-bugs-start-compiler-dev
:166) stay as they are.
- Diagnostics by content: `suggestedDirections` reads a direction from the
API named or from an explained suggestion naming one environment (no verb
list); `expectAliasFailure` uses `explains` and the resolver's name (no
wording regexes); `expectSourceError` requires `explains`; the imported
route options refusal or warning names the option and explains (J2.8).
- router-plugin: the Rspack entry's `addHmr: false` is decided by
behaviour on an Rsbuild dev page (the edit reloads, not applied in
place) instead of a regex on today's local name `hot`; the out-of-order
dev pins re-request every module the page loaded from the route on (no
path filter, #29 class); the inert `vi.mock('node:url')` leftover in
code-splitter-determinism is gone.
- Hydrate source-map row reads the case's split code (`client.chunks`),
not lazy URLs under the case directory (§5.3).
- Nx: start-plugin-core `test:integration` builds `@tanstack/vue-start`
(its Vue rows failed in a fresh worktree).
- FINAL-PASS #58: bundled-dev-styles listens and fetches on 127.0.0.1.
- Dead helper `start-plugin-core/tests/source-maps.ts` removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fill the F-E-b placeholders with the final measurements:
- restructure matrix R1-R11: no acceptance failures outside the 7 R2
rows held by Q5/Q6/Q7; expected pin flips R3 x6, R8 x6, R9 x3
- V4 rounds 1+2: 90/90 reds caught, 34/34 valid greens clean
- stability: 9 unpatched runs, identical counts except one #42 row
- strict local budgets for all five packages, and the counts per lane
- caveats: pending rulings, upstream flakes #42 and #34, repeat
test-aware adversarial rounds after major changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SPEC §5.5 stated that parentheses around component-defining expressions
are not free, citing a ruling that does not exist. It now records the
open question: "Pending user ruling NEW-2: whether redundant parentheses
around component-defining expressions are free; they break React Fast
Refresh registration under SWC/Rsbuild." RULINGS ("parentheses around
components (pending: NEW-2)") and the README's pending-rulings table say
the same.
- KNOWN-BUGS: the property-write pin was listed under a line of its body
("await entry.mount('/display-name')") instead of its title.
- README: the pin forms include the `{ fails: true }` option.
- AGENTS: the compiler platform workflow runs only `test:implementation:unit`;
root test:pr/test:ci run the whole implementation lane.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final pass F-E-a: listening dev servers bind 127.0.0.1 (#56, no family
selection for in-process clients), the strict import gate with an explicit
pending-ruling allowlist wired into root test:pr/test:ci, nx.json and the
compiler platform workflow, the rewritten oracle docs (README, RULINGS,
KNOWN-BUGS regenerated, SPEC, AGENTS), and cleanup of merged fork branches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ctu dev server (#56): a listening Vite dev server binds 127.0.0.1, as
every other harness server. Vite's `localhost` names ::1 and 127.0.0.1
while it listens on ::1 only; Node's address-family selection gives the
first address 500 ms on the event loop's clock, so a worker blocked past
that abandoned the connection the kernel made and was refused at
127.0.0.1 ("no HMR connection" at host start under load). Control in
tests/integration/plugin-host.test.ts (blocks the loop after each
connection attempt; red with `localhost`, green with the fix). No retry.
- Import gate (#17): strict mode is a CI target (root test:pr/test:ci,
Nx target default, compiler platform workflow; the target exists in
every compiler package so `nx affected` runs it). Its only exceptions are
`pendingRulingAllowlist` entries (Q5 control, spc pending-rulings Q6/Q7,
and the legacy helpers only they reach); each names its ruling, an
allowlisted helper another test reaches fails, a stale entry fails.
Controls on the fixture workspace.
- Docs (#18, #52): oracle README (measured status with TODO(F-E-b)
placeholders, entry points, hosts, browser, diagnostics and severity,
lanes, gate, variant runner, pending rulings), RULINGS (severity floor,
explains, restructure rulings incl. R10 entry-last and R3 flips,
budgets, export-* pins, real requests, F1, out-of-scope findings,
parentheses around components, 127.0.0.1), KNOWN-BUGS regenerated from
the corpus pins (367 sites in 102 files) with the upstream list and
harness locations, SPEC (G5 severity/explains, §5.5 component parens,
§5.7 severity, J6.5 trace order, §8 entry points), ctu AGENTS.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final pass F-B: speed and browser resources. A bounded run-page pool whose
runs leave their document before returning, per-test scope and per-file
env/cwd restore, leased dev servers (rp) and pooled Start hosts (spc),
`failWhenQuietFor` for edit waits, isolate: false; 13 rp and 5 spc page
files moved to `integration-pages`, over-limit files split. No retry for
#34 and no navigation retry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ctu browser: `runInPage` returns once its page left the run's
document. The page used to leave it after the run returned; a full
reload the dev server sent then (after the test's edit) started a
reload that outlived the page's way to `about:blank` and interrupted
the next run's navigation under load. The navigation retry that hid it
is gone. Control in tests/integration/browser.test.ts (a message the
dev server sends right after a run reaches no page; fails on the old
parking).
- rp known-bugs-code-splitter-bindings: served imports are compared by
path. On a host that served an earlier route with a file of the same
name, the dev server imports it with its HMR timestamp (`?t=`), and the
exact match missed it: the pin then passed.
- ctu build-harness: app removal no longer retries ENOTEMPTY (#34 is an
upstream Vite bug pending a ruling; its failures stay visible).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client checks of the fast tiers run in real Chromium pages and dev
servers; that made router-plugin and start-plugin-core `test:unit` take
26-39 s against hard limits of 10 s and 8 s (FINAL-PASS #13, #19), and
Chromium failed module requests under load (#40).
- ctu browser: `runInPage` runs on a bounded pool of pages per test
process (`runPageLimit`), each run holding its page alone and the page
leaving the run's document before another run gets it; `openPage`
keeps at most `openPageLimit` pages open.
- ctu test-scope: the test a piece of work belongs to, also in concurrent
files (an `aroundEach` setup file); per-test cleanups use it instead of
Vitest's global `onTestFinished`. The setup file also gives each test
file the environment and working directory it started with (a
`vite build` of an earlier file left `NODE_ENV=production` behind).
- ctu outcome: `failWhenQuietFor` ends an edit wait once every host stayed
quiet without the outcome; route HMR pins fail after 3 s quiet instead
of the 15 s bound.
- router-plugin route apps: hosts leased to one test at a time and kept
for the test process; the fast tier and the new `integration-pages`
project run the tests of a file concurrently, keep modules across files.
Twelve route-app files move to `tests/integration/pages/`.
- start-plugin-core: Start hosts kept across the files of a worker, each
host with a pool of pages for concurrent runs (in-flight requests reset
on a new document: a hydrate pin waited 10 s on stale counts); five
`<Hydrate>`/import-forms files move to `tests/integration/pages/`.
- Files over the 15 s slow-tier limit split in two or three.
- ctu import-gate control on a fixture workspace of its own (#51).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final pass F-E1: SSR scripts and dev-server calls run inside a real
request that Start's own server entry serves (tests/request-probe.ts: a
real router over the generated tree plus a probe server route);
testRequestContext() and its helpers are gone; each environment's bundler
warnings go through the app's own resolved onwarn.
Conflict in start-plugin-core tests/build-harness.ts (F-A2 structured
warnings vs F-E1 app onwarn): kept F-E1's onwarn routing, recording each
warning as F-A2's structured diagnostic (bundlerReports, 'warning').
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final pass F-A2: structured build diagnostics (severity kept end to end;
rp rows that must warn ask for 'warning'), one shared global trap in ctu
(own-property probes, definitions, deletions; the `in` limitation
documented), the Hydrate chunk rule's empty-map fallback limited to case
modules, provenance observing Promise and per-environment plugins, the
isKnownBug class row and the G6 split-text map pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ctu: BuildResult.warnings/consoleMessages and BuildError.warnings are
channel diagnostics with a severity (bundlerReports, statsDiagnostics);
a Vite logger error of a build that succeeds is reported as an error;
diagnosticsOf keeps a captured diagnostic's severity. Controls.
- rp build sites that must warn ask for severity 'warning'.
- ctu global-trap: shared G7 trap (reads, writes, own-property probes,
definitions, deletions) used by rp production-bundle and spc start-host;
rp asserts the no-router premise on the control page. Controls.
- rp route-app: provenance observes plugins given as Promises and returned
by applyToEnvironment. Controls.
- spc render: the Hydrate chunk rule's empty-map fallback walks the case
module's own graph only, and a module the dev server fails to serve is
never case code. Controls.
- Pins: a class only the unsplit loader reads, next to a split component
(isKnownBug row); the empty source map of a split text-only Hydrate
child (with control).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build harness no longer hand-builds Start's request context
(`testRequestContext()`, Start's internal field names): every build's
server bundle is Start's own server entry over a real router whose route
tree has a probe server route, and `ssr.run` scripts run inside a request
for that route, which the server entry serves. The dev-server harness gets
the same (`startRequestFiles`, `inDevRequest`), and start-host shares the
probe (`request-probe.ts`).
React Vite builds get `@vitejs/plugin-react`, as in every React Start app,
and the build's warnings go through the app's own `onwarn` chain (its
"use client" silencing). Test apps whose `getRouter` returned a stand-in
object get a real router.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- integration/code-splitter-dead-code: `ping` held its marker as
`'MARK_PING_END'.length`, which every minifier folds, so "ping: nowhere"
passed even with ping kept (probe: ping kept through a global
assignment, the row stayed green on Vite, Rspack and webpack). The marker
is now `('MARK_PING_END' + Math.random()).length`; the same probe fails
on all three bundlers, the row is green on the compiler.
- code-splitter-imports-exports "are not copied into another option's
chunk": the presence check looked only in the notFoundComponent's split
code when it is lazy, rejecting a valid compiler whose chunk imports the
exported `NotFound` back from the route module. It now reads the eager
modules and the lazy ones together.
- oracle/RULINGS.md D9 said `assert` "comes out as `with`", contradicting
the reworded SPEC J2.17: the printed keyword is free.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final pass F-D: router-plugin and router-generator severity floors, G7
production traps with a name-free globals comparison, route-app module
identity by provenance (wrapped load/transform of the public plugins), a
public webpack/Rspack server HMR host, D5 presence checks next to every
absence check, and SPEC J2.17/J4.17 reworded (printed keyword free).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"a module compiled under an id with another query keeps the server
boundary ids" rendered the route's lazy component, so the router code
splitter's `?tsr-split=component` module (whose map names the route file)
loaded after hydration started and satisfied the case-code chunk rule on
its own: with both boundaries `split={false}` the row still passed. Preload
the route component before rendering, as the router does; the same probe
now fails ("the case code the page requested once it hydrated: expected []
to not deeply equal []"), the row stays green on the compiler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final pass F-C (with F-A): start-plugin-core concepts restored (unresolvable
star export, Vue ClientOnly render, HTTP call by id), F1 pins for the six
location rows, #33a/#35 pins, G7 production traps, per-gate renderClient and
the case-code chunk rule, @vitejs/plugin-vue as a test devDependency (one
vite copy); F-A: actionable `explains`, the severity floor, exact carets,
idle HMR client, evaluate timeout, optional maps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Severity floor (#11, rg and rp side): the missing-Route warning (rg
known-bugs, generator-options logging, determinism) must be a warning
(the run goes on); the route-file upkeep reports must be a warning or an
error (refusal allowed); rp "left unsplit, reported" helpers and the
reported-fallback HMR helper must be warnings (the route works).
- J2.17 (#22): SPEC reworded: an `assert` import keeps working, the printed
keyword is free (no public host observes it); the behaviour rows stay.
- G7 outcome (#28): production pages trap the React Refresh globals, the
plugin-react ignored-exports hook and the router HMR globals before any app
module evaluates, assert none is touched, and compare the page's globals
with the control's; `addedCode` stays evidence only.
- route-app (#29): compiler-emitted modules are told by provenance (the
router plugin's own load/transform hooks, answered to the page by the dev
server), no longer by `/@fs/` or `/node_modules/` paths; controls for both
locations. The duplicate idle HMR client is gone (ctu hosts keep one).
- route-hmr (#30): the "webpack style, hot API present, no window" cell is
reached through a webpack/Rspack server build with HotModuleReplacement.
- D5 (#31): every absence check is paired with a presence check where the
code belongs; foldable markers replaced; the bindings table's loader-only
check is no longer vacuous; `stringValues` throws on parse errors;
generator-dev `scriptHolds` reads every script.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- factories: the unresolvable star export is a data: URL the bundler resolver gives no id for
- import-forms: Vue <ClientOnly> rows render on the server and the client (Vue's own JSX runtime)
- runtime-contract: HTTP call by id without client context (progressive-enhancement form post)
- hydrate pages: nested boundary behind its own gate (Vite and Rsbuild, source-loaded split)
- handler-scope isomorphic pin comment matches its red outcome
- drop the .cts dev pin and the # directory build pin (Vite upstream)
- @vitejs/plugin-vue test-only devDependency; Vue SFC pin on the public host
- production page trap for development-only globals (G7 behaviour)
- severity floor for array-shaped channel diagnostics and failed-build text
- render.ts: case-owned chunks, per-gate control; start-host warm-up on outcome
- excludeFiles dependency contrast (two pins), silent mock side effects, export-cache pins made deterministic
- the three flagged unit files moved out of the corpus; outside-root server fn row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- explains: require an actionable cause: the category in the diagnostic's
own words (internal-representation words and internal-error reports do
not count), plus the API it names or guidance (#3)
- merged-channel matchers: severity floor by default, warning or error; an
info line meets only an expectation that asks for info (#11)
- positions: no ±1 caret tolerance; a caret one column left is the
character before (#12, F1)
- plugin host: client hosts keep an idle HMR client connected, so a full
reload sent between runs is not handed to the next run's page (#21)
- runInPage: the import and script are bounded by the run's timeout (#21)
- describeBuild: a chunk without a source map file is described without a
map (#21)
- openPage: document that a given document is not for HMR checks (#16)
- git-ignore packages/*/tests/**/.start-*/ (#26)
Each change has a control that fails on the old behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repair B3: Start integration and import-protection tests on the built,
whole public Start plugin (Rsbuild loader shim deleted; integration and
implementation targets depend on the package's own build), a semantic
import-protection report reader over the merged channel, the internal IP
unit tests moved to outside-compiler-corpus with their concepts rerouted
into five public-plugin corpus files, the F2 importer-file pin and the
skipped-RSC-warning delivery pins. No conflicts with B1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- code-splitter-imports-exports "splits default, named and namespace
specifiers between the modules": the old import inventory was the only
check that the helpers only a split component reads (and the default,
named and namespace imports they read) leave the route module. The D5
markers sat on the components' JSX only. Markers in getDefault,
getTarget and getNamespaced: absent from every module that loads with
the route, present in what loading their component loads.
- known-bugs-route-hmr-bindings (G15 Map pin): the injected bookkeeping is
built by the first route module the page evaluates, which in an app is
the root route (the route tree imports it first). The pin's route was an
index route, red only because the harness imports it before the tree.
The route file is now the app's root; the stub is a map widget's class
named Map (immutable's Map has `set`, so it would not throw). Still red:
"tsrReactRefresh.ignoredExportsById.set is not a function"; control
green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repair B1: router-plugin tests on the public route app (composed
tanstackRouter + the framework's Vite plugin on the A2 host, routes
registered by the real generator, client checks in Chromium); D5 marker and
request checks instead of declaration/import inventories; addedCode as
evidence (N18); updater concepts on a live page
(integration/route-hmr-browser-updates); the old Node harness in
outside-compiler-corpus/legacy; the G15 Map pin. The Q5 control is
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- hydrate-split-modules: SPEC J5.2, a nested boundary has split code of
its own behind its own gate. The reroute dropped the chunk-count proxy
(old :613/:632) with nothing in its place. New row: outer load() gate,
inner never() gate; the outer children's module loads lazily, the inner
one does not. Green on the compiler; a probe with the inner boundary
unsplit (split={false}) fails it. The two old rows' titles no longer
claim "loaded from the source code alone".
- start-host serverLoads(): a module the SSR environment cannot compile
gave an empty graph, so not.toContain checks passed vacuously (e.g.
known-bugs-start-compiler "ssr: a declaration only a client-only fn
reads is not loaded"). It now transforms the module first and rejects on
a failure, as loads() does.
- start-compiler-factories "calls .handler() on an object that is not a
server fn": back to importing './secret.server' (the old input; import
protection is off on this host), so a compiler that strips server-only
file imports from the client is caught again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repair B2: the start-plugin-core compiler and <Hydrate> tests run on the
public Start host (built tanstackStart() in real Vite, client code in
Chromium, calls through Start's server entry, production build + preview);
render.ts hydrates in Chromium against the uncompiled source on a plain
Vite host; the legacy internal helpers live in outside-compiler-corpus/legacy
for implementation tests and pending-ruling rows; F1 code-frame and R8
outcome pins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: known-bugs-start-compiler-dev.test.ts keeps B3's rewrite (no
regression-helpers import); analysis.survival.test.ts (B3 moved
analysis.usage out of the corpus) imports the legacy helpers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the spc build harness records through withBuildEnvironment's channel
(its async scope and claimed app root), Rsbuild's logger through
rsbuildLogger, each compilation report once at an early done stage
- the violation reader reads only warnings and errors of a channel
(ruling 2026-10-21, diagnostic severity)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes the R10 (dev.test factory re-export trace) and R7 (extra generic
frame, short compile error naming the importer) rows of the beetle matrix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixed-name pins (createClientRpc/createSsrRpc/createServerRpc, opts) stay
(valid user input, N14) but a compiler that only renames its generated
bindings passes them (R3); the adaptive pin keeps that bug class red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B5 (RSC oracle repair, noncompiler lanes for react-start-rsc and
start-plugin-core, scoped capture) with the capture redesign: Rsbuild's
logger read through its public customLogger, the page's HMR client silent
again, native-callback output attributed by claimed app root (else shared,
marked), and each compilation report recorded once. No conflicts with B4;
the import gate's selection equals the acceptance lanes of every package
(213 files, compared with the Vitest file lists).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- delete the Rsbuild loader shim; test:integration builds the package and
imports its built public entries (externalized: one module instance with
the loaders Rspack loads)
- harnesses: whole public Start plugin only (no internal compiler/IP
registrations), explicit documented entries, public runWithStartContext,
configured entry names, one merged diagnostic channel (StartBuild /
StartBuildError diagnostics)
- violation-report: semantic reader of the J6.5 content (no label grammar,
order, numbering or entry marker; entry-last allowed)
- unit import-protection internals tests moved out; their concepts rerouted
into new public-plugin corpus files
- S6/S7 move-outs, splits and watch-list pins; F2 pinned; skipped-RSC
warning delivery pinned (Vite and Rsbuild dev)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B5 raised the Rsbuild hosts' logLevel to 'warn' so Rsbuild-logger warnings
reached the merged channel. That also raised the HMR client's log level
(Rsbuild ties dev.client.logLevel to logLevel), so pages logged Rsbuild's
own messages. And with output printed outside any async scope sent to every
open sink (b2857ec92e), Rsbuild's logger re-printed each compile's errors
and warnings ("Build errors: ...", "build failed in 0.12s") next to the
compilation's own report: 1 ctu and 19 spc integration failures.
- Rsbuild hosts: logLevel and dev.client.logLevel are 'silent' again (the
terminal and the page stay quiet); a customLogger (rsbuildLogger, from
Rsbuild's public createLogger) records Rsbuild's and the plugins'
warnings and errors in the channel, source 'rsbuild'.
- Compilation reports are recorded once, from the compilation, at an early
`done` stage (the build host moved off onAfterBuild). reportLogged drops a
logger message that quotes a recorded compilation message, and the
status line of a compile that failed (a one-line error naming no file,
in the same turn as that compile's report). Anything else is recorded.
- Output printed outside any async scope (Rolldown and Rspack native
callbacks) goes to the channel whose claimed app root it names (hosts,
dev servers and bundleApp claim theirs), else to all open sinks when they
are one line of nested work, else to every open sink marked `shared`
(expectNoProblems says so).
- budget-reporter.test.ts: concurrent tests clean up through their own
context's onTestFinished (the global one may delete another running
test's fixture).
Controls (each red on the old behaviour named):
- native-hook-capture.test.ts: native-callback console.warn on Vite build,
withBuildEnvironment, Rsbuild dev and build, and "nothing reported" fails
for it (red on B5's capture); concurrent Vite builds, Rsbuild dev servers
and builds keep output naming their app and share unattributed output
marked `shared` (red on B5's capture and on b2857ec92e's send-to-all).
- rsbuild-plugin-host.test.ts: a compilation warning and error appear once
on dev and build hosts (red without the dedup; the error rows also
without the status-line rule).
- browser.test.ts: Rsbuild's HMR client prints nothing in the page, a
compile warning included (red with the client at B5's 'warn').
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B4 replaced the singleton import set of "the route tree imports its runtime
from @tanstack/<target>-router" with runtime checks that only read user
files (the root route, the lazy route file). A generator that imports the
tree's own `createFileRoute` from another framework's router then passed
the whole fast tier (mutant: solid target with react-router's package;
only integration route-types caught it). Assert that the route the tree
creates for a lazy-only route is an instance of the target package's
`Route`: red on that mutant, green on the generator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repair B4: a public generator consumer host (Vite's module runner with the
real router/renderer packages, Chromium for client behaviour), the mixed
router-generator tests split (concept kept, layout/spelling dropped), ten
fixed-input controls moved to outside-compiler-corpus, and the `types`
project's program limited to acceptance tests (implementation files are
typechecked by test:implementation).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
render.ts renders <Hydrate> modules through the dev Start host: server
render in the SSR environment (react-dom/static), real hydrateRoot of that
HTML in Chromium with every gate opened, the uncompiled source rendered by a
plain Vite + React host as the reference, and semantic (normalized DOM)
comparison instead of byte HTML. Loads come from the page's resource timing;
chunk counts and ids are no longer asserted (N13). The rejection matcher
control moves outside the corpus.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B5 scoped console capture with AsyncLocalStorage and dropped output printed
outside any scope. Rolldown calls a Vite build's plugin hooks, and Rspack
its compiler/compilation hooks (other than loaders, which B5 re-enters),
from native code without Node's async context, so a compiler's
console.warn there was printed to the real console and lost to every
channel: plugin-host Vite builds, Rsbuild dev and build hosts, and
withBuildEnvironment (also Vite's default-logger warnings), which makes
"nothing reported" checks such as rsc-start-build's "production ... without
development warnings" vacuous for build-time output. The 00317474fd
capture recorded all of these.
Output printed in a scope still goes to that scope's sinks only; output
printed outside any scope now goes to every sink, as before B5.
New controls in tests/integration/native-hook-capture.test.ts: 4/4 red on
B5's console-hook, green now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repair B5: rsc-css-diagnostics through the real Start/RSC dev servers
(Vite, Rsbuild) and the merged channel; the private-server-fn pin through
the public `.url` and caller; the 49 RSC runtime tests and 17 Start
B-other files in a separately selected `test:noncompiler` lane (root
test:pr/test:ci, compiler platform workflow); async-scoped console
capture; the Rsbuild hosts' logger reaches the channel; the two
SYNTHESIS-listed duplicates deleted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Corpus rows run on tanstackStart() in a real dev server, a Chromium page and
Start's real server entry: real case files instead of stubs, client RPC and
in-request SSR calls instead of the provider/report harness, explains instead
of closed cause lists, an outcome R8 pin. Harness controls and internal-compiler
rows moved to outside-compiler-corpus/, Q6/Q7 and the Vue SFC pin moved
unchanged to pending-rulings/, build-mode export-cache rows to integration
(regression tests: a real build does not reproduce the pin). New pin: a dev
edit of a re-export chain's factory module leaves its importer stale.
Start host: links option, optimized-deps package names in loads, navigation
detection on page runs, build-mode case globs that skip denied files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reroute createServerFn/** through tanstackStart() in a real dev server
(client in Chromium, by-id calls through Start's server entry, server calls
in real requests); build-only rows to integration/start-compiler-build-ids
(vite build + Start's preview server); matcher controls out of the corpus;
the Q6 row moved unchanged to pending-rulings. New pins: a virtual factory
module served by exact id fails in dev; a .cts server fn fails in dev; a
server fn under a '#' directory fails to build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Capture all reporting channels and validate diagnostic determinism by a real missing-export probe. Wait for visible browser output through the shared outcome helper, with a public Vue async-component regression.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Route modules run where a dev server runs them: a real page (Vite's hot
API, React Refresh, the real router) or the SSR module runner, plus
Rsbuild hosts for webpack's hot API and a page without one. addHmr: false
is judged by the edit's outcome on a live router; production rows are
decided on the bundle (build-production*). The hot-collision pins probe
the names the HMR compile introduces, not one spelling. Route module
export helpers run in the page with the dev server's TypeScript defaults.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the public Start plugins for RSC acceptance tests and exercise CSS
warnings through real dev servers and merged diagnostics. Retain runtime
and build-plumbing tests in a separately selected CI lane.
Scope diagnostic captures to each app's async work, including native
Rspack loaders, and retain Rsbuild logger warnings. Add regression controls
for capture ownership, warning transport, lane selection, and budgets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takes B1's route-app (stamped app() URLs, package stubs in the host key,
frameworkPluginOptions); keeps F3's additive pageScript and pageDiagnostics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
route-app: additive options framework, config, pageScript; an app with
node_modules files gets its own host; app(file) goes through the route's
entry module (a stub edited for an earlier route is imported with its HMR
timestamp by the route); pageDiagnostics reads the page's console.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- route-hmr-page: public getConfig, app-scoped process warnings (async
context of the app's dev server), app-owned router reference
- production bundles: purpose-based dev-only absence (public dev APIs,
route module exports vs the control); addedCode as inspection evidence
- dev source maps: executed throws mapped through served maps
- build-frameworks: framework isolation by resolved package provenance
- generator dev app: outcome-based page settle, merged channel,
binding-aware createFileRoute, decoded markers; watcher handle
inventories moved out of the corpus
- moves: lazyFn this (runtime), harness and tool controls
- fix-agnostic split-id directory pin; R7/R9 couplings rerouted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use public router and renderer imports, fixture-owned source identity, and Chromium consumer coverage. Separate implementation controls and typechecking, preserve source-edit assertions, and repair mixed checks and pin fixtures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WIP base of workstream B2: tests/start-host.ts drives tanstackStart() of the
built framework package in a real Vite dev server with a Chromium page and
Start's real server entry; regression-helpers.ts and diagnostics.ts rebuilt on
it; the old StartCompiler-based helpers moved to outside-compiler-corpus/legacy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
recordViteModules keyed each module by its file (query stripped), so one
file served as several modules (a split route, `a.js` and `a.js?split`)
kept only the last module's code. A dangling read in the reference module
was then attributed to nothing and excused by the binding the split module
keeps: the shipped client code `var e=()=>lostFoo` passed the Vite check,
which the 1c4c5218dc harness (every free read counts) rejected. Key by the
module id, query included, as webpack/Rspack's `module.resource` does; a
module with a query has no file of its own and counts as virtual.
New control in the Vite block of build-harness.test.ts; red on the
query-stripping recorder, green now. Also: the deprecation note of
`evaluateServed` points to `runClient` (`./plugin-host`) / `runInPage`
(`./browser`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repair A2: public in-process plugin hosts (Vite, Rsbuild), a strict
module runner for named imports, one merged diagnostic channel, dangling-name
attribution from recorded module code, and outcome-bounded settling (incl.
router-plugin's route-hmr-page). No textual conflicts; ctu AGENTS.md keeps
both A1's import gate and A2's helper guide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repair workstream A2, the shared foundation of the compiler oracle repair:
- plugin-host / rsbuild-plugin-host: the public plugin array a user
configures, driven in process through real Vite (middleware dev server,
module runner, vite build) and Rsbuild's JavaScript API; no hook
recorder, module id, query or route registration.
- strict-runner: Vite's own module runner with ES named-import linking for
the app's modules (a missing import throws instead of reading undefined).
- browser runInPage: one Chromium page per test process for fast client
checks on served modules, with the real Vite client.
- diagnostic-channel + console-hook: console, process streams, Vite logger
and bundler compilations merged and scoped; the Vite and Rsbuild dev
harnesses expose it; expectNoProblems reads every channel.
- diagnostics: per-spelling column bases, positions tied to the named
file, semantic env-restriction reading, content-based explains (the
closed causes list is deprecated).
- build-harness dangling-name check: attribution by the build's recorded
module code (any transform, built-ins included), not by printed module
headers; works minified.
- validate-module: env-aware globals and real-build evidence.
- outcome / dev harnesses: edits settle on their bounded outcome; no
compile, round or update counts, no dependency-membership rule, no grace
period (router-plugin route-hmr-page moved to it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The status now also names the diagnostics read through today's report
format (289 cases fail on rewording alone) and the selected tests that do
not test a compiler (about a quarter of the declarations), so "the
exceptions the status describes" is complete. The restructures were meant
to keep behaviour; the 1,893 count excludes the few that changed it. The
gate's header cites the README section by its current name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repair A1: the oracle README and ctu AGENTS.md state that the suite is not
yet an oracle, give the implementer rule, and add the mechanical import gate
(test:import-gate report mode, test:import-gate:strict) with its control.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The oracle README and the package AGENTS.md claimed the suite uses no
copies of tools and is a validated oracle. Neither holds today: many
acceptance tests reach the compilers through internal modules, ids and
helpers (44% of test cases failed under behaviour-preserving
restructures), several helpers re-implement tool or runtime behaviour,
and some client checks run in Node. The docs now say so, say a repair is
in progress, and tell implementers to adapt only the harness entry points
until it lands.
src/import-gate.ts lists every import of a router-generator,
router-plugin, start-plugin-core, react-start-rsc or router-utils
internal (anything not reachable through the package's exports map) in
the acceptance test files and the helpers they reach. test:import-gate
reports and exits 0; test:import-gate:strict exits 1. Its control plants
files in memory next to router-plugin's real tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
packages/compiler-test-utils/oracle/ explains the compiler test oracle to
whoever replaces or rewrites a compiler:
- SPEC.md: the spec the tests cite (G rules, J1-J7 clauses, §5 freedoms,
§8 checking rules), with the maintainers' rulings folded in.
- RULINGS.md: the decisions behind the clauses, and the authorized test
workarounds for upstream bugs with when to remove them.
- KNOWN-BUGS.md: the .fails pins by compiler job, generated from the
tests, and the upstream issues.
- README.md: the goal, where each job's tests live, corpus vs
implementation tests, pins, and how the suite was validated.
The package AGENTS.md files point to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A project module re-exports createServerOnlyFn and createClientOnlyFn under
new names, and a module calls them as members of a namespace import of it
(SPEC J4.5, J4.10, J4.12). Outcome rows, in process for React, Solid and
Vue, and in real Vite and Rsbuild builds: the other environment neither
loads nor runs the implementation, and the owning one runs it.
- Next to a server fn: passing. Before these rows, no corpus test caught a
compiler that skips namespace receivers.
- Alone in its module: pinned. The bundler plugins pick modules by their
text, so a module that names no factory is left untransformed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's #8758 no longer treats `receiver.method()` on a named import as a
Start factory candidate, so the Vite dev client compiler no longer loads
`zod` from inside the transform for `z.object({})` with an empty dependency
cache. That row passes now and becomes a regression test.
The bug the pin described remains for a call of the import itself
(`import { object } from 'zod'; object({})`), which #8758 does not skip.
It is pinned in its place, verified red without .fails: "expected 'hang'
not to be 'hang'". zod 4.5.4 exports `object` by name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #8748, #8750, #8758 (start-plugin-core) and two CI changes.
No textual conflicts; product source is main's.
Main's new tests are implementation tests, so they move under
outside-compiler-corpus/ (packages/compiler-test-utils/AGENTS.md):
- compiler.test.ts "top-level member calls" (#8758) counts resolved and
loaded modules and reads printed code. It moves unchanged to
tests/outside-compiler-corpus/compiler-member-call-receivers.test.ts with
main's getDefaultTestOptions helper, which this branch's compiler.test.ts
no longer has (the auto-merged file did not type-check).
- tests/rsbuild/server-fn-resolver-rebuild.test.ts (#8750) counts resolver
rebuilds through internal helpers and a stand-in compiler. It moves to
tests/outside-compiler-corpus/rsbuild/.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W6-restore (DECISIONS 2026-10-20 "restore the two borderline corpus
removals"): the top-level block placement (J4.6) and the unrecognised
call shapes `['handler']` / `['server']` / `.bind(null)` (J4.5/J4.12)
are back as fix-agnostic pins (work, or fail clearly at the call; never
a silent leak or broken output) at unit and build level, plus the
createServerOnlyFn local-alias block row; string export names are
required to work (J4.5 re-exports). Tests only; no conflicts.
Validated (Nx, --skip-nx-cache, --maxWorkers=4): spc types/eslint
pass, unit 932/196 (1128), integration 850/212 (1062) x2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W6-flakes, the two spc integration flakes that aborted W6-scope's
first merge: runViteClient reads the Vite fixture's entry, uncaught
load errors and the script result in one evaluation of the current
document (a buffered full-reload landing between the wait and a
separate evaluate ran the script in a loading document); the I09
marker-exemption pin opens with the orders where the other importer is
nearer the entry, red on Vite and Rsbuild in every build, then the
racy orders. Tests only; no conflicts.
Validated (Nx, --skip-nx-cache, --maxWorkers=4; load 6-18, no
unhandled error): spc types/eslint pass, unit 931/189, integration
848/202 x3 clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coordinator follow-ups 2026-10-20:
- String export names (U047/U048) are a re-export form SPEC J4.5 lists
as recognised: the factories row and the build rows (Vite, Rsbuild)
now require support, with no rejection branch. Green on main; the
Start-compiler green V4 patches (green-sol 05/10/11/12, r2 08/09/10)
stay clean.
- KB "a createServerOnlyFn local alias called in a top-level block works
in each environment, or is rejected at the call" restores the row
deleted in a945fe4563 (J4.6 "block"). Either outcome: client throws the
server-only error without loading ./db.server and SSR runs it, or a
positioned compile error naming createServerOnlyFn/so with a placement
or call-shape cause. Pin, red on main: forbidden module ./db.server
loaded on the client (left untransformed). Control: the same check
passes for a top-level createServerOnlyFn. tsc 7.0.2 accepts the input.
The call-shape check is now a shared function (expectWorksOrRejectedAtCall).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mock-mode marker-exemption pin (V1R ip I09) passed on Vite in roughly
one run in 12: Vite mocks the other importer's import of a server-only-
marked module only when the marked module's marker import was resolved
first, which the exempt importer can cause, so the outcome is a race of
the build. Measured (loaded, 40 builds each): importers side by side leak
in 56/80, the exempt importer nearer the entry in 2/40, the other importer
nearer the entry in 80/80. Rsbuild mocks the exempt importer in every
order (50/50).
The pin now starts with the other importer nearer the entry (through
`src/mid-ignored.ts`, both export orders), so it is red on both bundlers
in every build, and keeps the racy orders after it, so it passes only once
no order leaks. No passing control for the other order: it leaks too in a
few Vite builds. The assertion is unchanged.
Red without `.fails`: Vite `other: 'MARK_SECRET'` (leak), Rsbuild
`ignored: 'a safe mock'`. 30/30 loaded runs (load 18-23): 2 expected fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`runViteClient` waited for `__ipEntry`, waited a turn (`settled`), then
read `window.__ipEntry` and ran the script in a separate evaluation. Vite
keeps a `full-reload` sent while no page is connected (an edit between two
runs, the dependency optimizer) and delivers it to the next page on
connect; when that reload landed after `settled` and before the evaluation,
the script ran in the new, still loading document: `globalThis.app` was
undefined and the v2-edits Vite dev rows failed with
"Cannot read properties of undefined (reading 'clientSide')".
Reproduced by waiting for a late navigation before the evaluation (3 of 8
runs failed with that error).
The fixture page now signals when its entry settled (`ip-entry` event), and
one evaluation waits for the current document's entry, waits a turn, checks
the errors the page did not catch while it loaded, runs the script and
returns its logs: every value comes from one document, and a reload during
it destroys the context, which alone is retried. Load errors, uncaught
load-time errors and script errors still fail immediately. No timers.
v2-edits.test.ts: 30/30 loaded runs (load 11-29) pass; with an injected
wait for a late reload before the evaluation, 8/8 pass (17 late reloads).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-20 ("restore the two borderline corpus removals"):
- U082/U086 (SPEC J4.6 "block"): placement "a block at the module top
level" in createServerFn/placements.ts (a declarator below the top
level). It joins the KB pins "with $head imported, a createServerFn in
$name does not ship its handler to the client" (expectNoClientHandler:
works through an RPC that reaches the handler, or a positioned compile
error naming createServerFn with a placement cause). Red on main:
createServerFn alone -> the client loads ./db.server (left
untransformed); another factory -> the provider exports
`inner_createServerFn_handler`, which it never declares. The loosened
declaration-sites regression and the KB "rejected at the call" pin now
leave declarators out (same set as before; the block's bug is the
declarator one, pinned above).
- U078-U081 (SPEC J4.5/J4.12): KB unit pin "$name: the client holds no
server code, or the module is rejected at the call" for
createServerFn()['handler'], createMiddleware()['server'],
createIsomorphicFn()['server'] and createServerOnlyFn(...).bind(null).
Each output rejects at the call (expectCompileError + callShapeCauses)
or follows its contract (no ./db.server load, no server code, RPC
reaches the handler / client impl / env restriction, SSR runs it).
Red on main for all four: forbidden module ./db.server loaded (every
output left untransformed). Control: the static-member forms pass the
same check.
- U047/U048 string export names: factories "builders re-exported under
string export names are recognised, or rejected clearly" (green).
- Build level: integration/start-build-call-shapes.test.ts, Vite and
Rsbuild, one shared build per bundler (each shape rebuilt alone if the
shared build fails). Works (client bundle 'nowhere', client behaviour,
SSR call by id) or a build error naming the shape's file and line
(expectSourceError). 5 pins per bundler red on main: server-only module
'eager' in the client bundle; string export names green. Controls:
static forms pass all 12; a position-less compile error is refused.
tsc 7.0.2 against the real start-client-core declarations accepts every
restored input (computed members, .bind(null), string export names, the
top-level block).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W6-scope: runtime bugs are out of the compiler corpus (DECISIONS
2026-10-20): the visible() HydrationBoundary pin (react-start-client
runtime) and its fixture are dropped; the Rsbuild unsplit Solid route
HMR pin now names its compiler cause (router-plugin
src/core/hmr/webpack-adapter.ts:71, `hot.data ??= {}` before
solid-refresh's $$refresh). Tests only; no conflicts.
Validated on the identical staged merge (Nx, --skip-nx-cache,
--maxWorkers=4): spc unit 931/189; rp integration 355/193; spc
integration 848/202 apart from two pre-existing flakes in untouched
files (ip build marker-exemption pin; v2-edits runViteClient race),
tracked and fixed separately (coordinator ruling: not blocking).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The webpack-style route HMR code runs before Solid Refresh's $$refresh in
the route module and assigns `hot.data ??= {}` on the first run; Solid
Refresh 0.6.3 reads a truthy hot.data as a previous run, so its dispose
saves no registry and the next update cannot patch the live component.
A probe that reads hot.data without assigning it (webpack-adapter.ts:71,
reverted) makes the pin pass; a plain Solid component module on Rsbuild
and the same route on Vite already apply in place. The pin stays: the
cause is in router-plugin's emitted HMR code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pin "a visible boundary next to a slow effect shows its fallback, then
the children, without an error" fails because of react-start-client's
HydrationBoundary (src/hydration/visible.tsx: use() only while the gate is
closed, then a hook), a runtime component the compilers do not emit. Per
the ruling that bugs outside the compilers do not belong in the corpus,
the test and its fixture are removed; the bug is tracked as a runtime
follow-up. The client-mount fallback rows keep their J5.3 assertions; their
comment now names the runtime bug instead of the pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W5-flakes, the three V4 round-3 flakes: a ctu Vite build ends once
every plugin hook it started has settled (the route generator's late
configResolved rename raced dispose()); the rp generator dev app also
waits for the page's HMR client (vite:afterUpdate, as route-hmr-page)
and no longer reads failed script responses (Playwright's refetch was a
late report of the broken version); a new spc product-bug pin for
react-start-client's visible() boundary (conditional use() vs React's
replay), on Vite and Rsbuild, with the 13 client-mount rows mounting
below the fold and scrolling once idle (assertions unchanged).
Validated (Nx, --skip-nx-cache, --maxWorkers=4; no unhandled error):
ctu 250, 111 x2; rp 445/179, 355/193 x2; spc 931/189, 848/204 x2;
rsc 108/11; rg 60/3; types and eslint pass for ctu, rp, spc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The V4 round-3 flake of "a direct fallback with split={false} shows, then
the children" (React: "There was an error during concurrent rendering but
React was able to recover…") is a product bug, not a harness race. The
cause is "Update hook called on initial render" in react-start-client's
visible.tsx HydrationBoundary: use() is called only while the gate is
closed, then useEffect. When the IntersectionObserver opens the gate
between a concurrent render that suspended there and React's replay, the
replay skips use() (react.dev/errors/607). Reproduced with CDP CPU
throttling 20x (each run had 1-4 of the client-mount rows failing), and
deterministically from user code with an effect of 40 ms next to the
boundary.
- New pin (Vite + Rsbuild): "a visible boundary next to a slow effect shows
its fallback, then the children, without an error". The page mounts the
boundary nine times. Verified red without .fails (18/18 mounts report the
error), green with a probe fix (hook above the conditional use(),
reverted), and red in 30/30 runs at load ~31 with 6x throttling, 6/6 at
20x.
- The client-mount rows (J5.3, the compiler keeps the fallback) mount the
page below the fold and scroll to the boundary once the page is idle
(requestIdleCallback), so they no longer race that bug. All assertions
are unchanged. 30/30 clean at 20x throttling and 10/10 at load ~30.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"a route file broken by an edit is reported, and fixing it brings the
route back" (Vite) failed once at load ~37 with an error after the fixing
edit's mark. The error is Vite's transform error for the broken content
(`export const Route = (`): a stale report of the earlier version, not an
error about the fixed file. Two harness causes, both reproduced (a timing
probe made the test fail 3/3 before, pass 3/3 after):
- settle() returned once Vite handled the file event, before the page's
HMR client fetched the updated module; that fetch's transform error could
be logged after the next mark. On Vite, settle() now also waits until the
page handled every update the server sent (vite:afterUpdate, which Vite's
client emits after the fetch, failed or not), received invalidations
were answered, or a full reload loaded the page (same signals as
route-hmr-page.ts).
- The record of loaded scripts read every script response's body; for a
500 response Chromium keeps no body and Playwright refetches it
(Network.loadNetworkResource), a late request of the harness's own that
Vite transformed and reported again. Error responses are now skipped
(they ran no code).
30 loaded runs of dev-server-new-routes.test.ts (load ~31): 0 failures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vite runs the plugins' configResolved hooks with Promise.all. In the
plugin-order rows of router-plugin's code-splitter-pragmas integration test
(a framework JSX plugin before the router plugin), the code splitter's hook
throws while the route generator's still runs: the build rejects, the
harness disposes the app, and the generator then renames routeTree.gen.ts
into the directory being removed (ENOTEMPTY when it lands between rm's
readdir and rmdir; ENOENT, printed to stderr, when it lands after). Before:
2 late renames in every run of the file (3/3 checked); after: none in 30
loaded runs.
buildWithVite now wraps each hook of the plain plugin objects it is given
to record the promise it returns, and waits for them all (also when the
build failed) before it returns or throws. The late write also no longer
prints into a later build's console capture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W5-fixup: react-start-rsc test:unit depends on
@tanstack/react-start-client:build (no Nx cycle); the budget reporter
treats a run with a failed or unloaded file, an unhandled error or an
interruption as no measurement (strict mode exits 1, report-only says
so), with a real-Vitest-CLI control. Tests and test config only.
Validated (Nx, --skip-nx-cache, --maxWorkers=4): ctu types/eslint pass,
unit 250, integration 111; rsc unit 50/1, integration 108/11;
rp unit 445/179 and spc unit 931/189 (no "not a measurement" misfire).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A run in which a test file failed (a failed test or a file that did not
load), an error escaped the tests, or the run was interrupted leaves out
or cuts short the failed work, so its time is not a measurement. Strict
mode now fails it as an invalid measurement instead of printing "passed";
report-only mode says its times are not a measurement. Control:
tests/integration/budget-reporter.test.ts drives the real Vitest CLI on a
fixture tier (verified red against the previous reporter).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/rsc-css-diagnostics.test.ts imports start-plugin-core's
tests/regression-helpers, which renders with the built
@tanstack/react-start-client. react-start-rsc's test:unit only had ^build,
so it failed in a fresh checkout. Declare the build like start-plugin-core
does for its own test:unit. test:integration already reaches it through
@tanstack/react-start:build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W5-final: ctu waits for Vite's full-bundle initialBuildCompleted before
closing a bundledDev server (user-authorized harness wait, FOLLOWUPS
"UPSTREAM (W5-ip)", remove once Vite handles the rejection);
importedBindingUses counts only runtime, unshadowed references; pin
Source lines name product file:lines; the MDX control's genuine use is
7:27 (`secret`), not 7:24 (`=>`); the ctu Rsbuild harness starts on
predated initial files and attributes compiles to an edit by file state
(DECISIONS 2026-10-20 "Rsbuild first-edit harness fixes", A/B); the
resolve-elsewhere row asserts per ruling C. Tests only; no conflicts.
Final validation of the whole corpus (Nx, --skip-nx-cache,
--maxWorkers=4, integration gate; load 1-8; no unhandled error):
ctu 250, 108 x2; spc 931/189, 848/202 x2, impl 246/7; rsc 50/1,
108/11 x2; rp 445/179, 355/193 x2, impl 53; rg 270/30, 60/3,
impl 81/2; types and eslint pass for ctu, spc, rsc, rp.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ruling DECISIONS 2026-10-20 "Rsbuild first-edit harness fixes" (C): moving
src/lib.ts to src/lib/index.ts in one edit passes through a state where
./lib resolves nowhere, which Rsbuild (aggregateTimeout 0) may compile and
report with no resolved path. The row now asserts that the new target is
reported last, that only undefined reports precede it since the edit, and
that no report from then on names src/lib.ts. A resolve cache serving the
old target (the R4 mutation) still fails it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ruling DECISIONS 2026-10-20 "Rsbuild first-edit harness fixes" (A, B):
- The app's initial files are dated 10 s back before the dev server starts,
as files on a user's disk are. Written a moment before the first compile,
they fell within watchpack's mtime accuracy, its first scan reported them
changed and Rspack started a second compile by itself, during a test's
first edit: a removal landing then was lost (FOLLOWUPS "UPSTREAM
(W3-harness2)"), and the edit's wait counted that compile.
- trackCompiles counts a compile toward an edited file only if, when it
started, the file was no longer as before the edit (contents or mtime).
A compile that started before the write no longer ends the wait. (Per
file, not "after the edit's last write": a compile the edit's first write
starts mid-edit legitimately compiles that write.)
Controls (ctu integration), each failing on the old harness: the initial
files predate the first compile by more than 2 s; a compile held in
watchRun from before the edit's write does not end its wait (also fails
with only the mtime fix).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`inPage` named the use of `secret` in `export const read = () => secret() +
leak()` as 7:24, which is `=>`; `secret` starts at column 27. A temporary
probe that let the import-protection transform cache record `.mdx` (reverted)
made the plugin report src/page.mdx:7:27, which the passing control rejected:
the corpus would have failed a correct fix. The control now passes under the
probe. The MDX location pin's Source also notes that, once located, the report
is logged twice (as written and as the resolved path): the pinned "'once' logs
one warning for one import" bug, which that pin also needs fixed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rsc "dev explains the CSS limitation once per source file…" and "a false
ternary stream carries its selected badge CSS" pins and the Vite MDX location
pin cited decisions or SYNTH items; their Source now names the product
file:line of the cause. Comments only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC J6.5 never accepts an erased type position, and a same-name local is
another binding. importedBindingUses (used by spc locatedImporters) now walks
the Oxc AST with scopes: it skips type-only code (TS type nodes, type keys,
declare, type-only exports), names a local binding shadows (params, let/const,
var, catch, function/class expression names), names that are not references
(keys, members, labels, exported names, re-exports from another module, JSX
attribute and intrinsic element names). Uses in removed boundary bodies are
not told apart; tests of those name the genuine use.
Controls: three ctu tests and two spc locatedImporters rows; all five fail on
the old helper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vite 8.3.4's BundledDev ends its initial build with a getBundleState() call
nothing awaits; closing the server while it is in flight makes Rolldown
reject it, unhandled ("Failed to get bundle state"). User-authorized harness
workaround (FOLLOWUPS "UPSTREAM (W5-ip)"): before vite.close() of a
bundledDev server, wait one turn at a time for BundledDev.initialBuildCompleted
(an internal; no public API, vitejs/vite#22991), with eventTimeout as a guard.
Evidence (temporary probe, create -> clientBundle() -> close at load ~10-17):
before 2/400 and 1/1000 unhandled rejections; after 0/3000. 32 loaded Nx
runs of importProtection/dev.test.ts afterwards (load 15.9-18.9): 0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W5-ip: ctu mentionsFile names files absolute or project-relative only
(DECISIONS 2026-10-20 "file names in diagnostics"), and the location
oracle rejects lines/columns below 1, so the ip adapter keeps no rule of
its own; expectMapsTo resolves map-relative sources against mapUrl; new
rg pin (the (group).tsx error names a routes-relative path); the
remaining exact, file-only and any-column ip location checks on the
shared oracle (locatedImporters, importedBindingUses); one Chromium
client runner core (withRecordedPage). Tests only; no conflicts.
Validated (Nx, --skip-nx-cache, --maxWorkers=4): ctu 247, 106 x2;
rg 270/30, 60/3 x2, impl 81/2; rp 445/179, 355/193 x2, impl 53;
spc 928/189, 848/202 x2, impl 246/7; rsc 50/1, 108/11 (consumer check);
types and eslint pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W4-ip's `client-pages.ts` and W4-shared's `runInClient` in
`rsbuild-dev-server.ts` both drove Chromium. Now one core,
`withRecordedPage` (rsbuild-dev-server.ts): a page recording console calls
and uncaught errors from its first statement on.
- Rsbuild: `runInClient`/`runRsbuildClient` are W4-shared's (page of the
recorded client entry files; a failed script load or an error thrown
while loading fails). client-pages re-exports them; its own Rsbuild page
path, the generated-HTML entry tweak and the favicon route are gone, and
its `startBrowserRsbuild*` use `clientPage`.
- Vite: `runViteClient` keeps the fixture page through Vite's HTML
pipeline and the optimizer-reload retry, now on the same core: an error
the page's code does not catch while the entry loads fails (new), as do a
failed entry import and a thrown script.
- No assertion changed; all ip pins fail for the same reason as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
J6.5 never accepts compiled coordinates: the remaining exact `file:line:col`
checks and the file-only/any-column checks of the ip tests now go through the
shared location oracle.
- Exact sites (merge W4-ip list): build-options 87/403/416/429/582,
build 730/1055, dev 1843, rsbuild 269/292/312/572, known-bugs 480, plus
dev MDX 733/760/831, marker reports (markerReport, 1324), 1362,
v2-alias 92, build "split route component" (file-name only).
- Which-importer helpers (build-options `outcome`, exemptions
`reportedFiles`, v2-hosts `reportedImporters`, known-bugs `loadOutcome`
and the custom-type pin, rule-outcomes) use `locatedImporters`: the
importer's file only at its import of the reported specifier or at a
reference to a binding it introduces (ctu `importedBindingUses`), or a
marked module's marker import (ASK-1); anything else stays visible with
its coordinates.
- `ExpectedViolation.otherUses`, `originalLocation(…, { unavailable,
others })`.
- Controls: ctu `importedBindingUses`, column 0 and basename locations;
spc `locatedImporters` (use, import, other line/column, compiled
coordinates, no coordinates, unknown source, marker origin, the dev
duplicate naming the resolved path).
- rsbuild "the file rule … naming the importer" keeps its file check: the
adjacent pin asserts the (wrong) location.
- All 123 ip pins fail for the same reason as on e0070dae57 (run without
`.fails` on both trees, failure messages compared).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W5 polish: rg prepareFixture clears leftover generated route files of
the file-modification fixture (with an outside-corpus control); rp
HMR-06 rows gain the window-defined variation (8 -> 16); three pins name
their user-visible impact and source; spc takes Miniflare from a
test-only devDependency (miniflare@4.20260317.0, the copy wrangler
already resolves; lockfile +3 lines, importer only); H10: spc render.ts
dispatches through createCompilerVirtualModuleIdPattern /
loadCompilerVirtualModule (control red on the old pre-query path check).
Validated (Nx, --skip-nx-cache, --maxWorkers=4; frozen install clean):
rg 274/26, 60/3 x2, impl 81/2; rp 445/179, 355/193 x2, impl 53;
spc 919/189, 848/202 x2, impl 246/7; types and eslint pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per DECISIONS 2026-10-20 "file names in diagnostics (§5.7)", ctu
`mentionsFile` accepts an absolute path or a relative path holding the whole
project-relative path, and rejects a part of it alone (`other.ts` for
`src/other.ts`). The location oracle also requires 1-based lines and
columns, so W4-ip's `originalLocation` adapter keeps no rule of its own.
- ctu controls for the new rule; each fails on the old behaviour (15).
- `expectMapsTo({ mapUrl })` resolves a map's relative source against the
module it belongs to, as the source map spec does; the Vite dev
source-map tests (rp, spc) pass the served module.
- rg: the route-group error names `(group).tsx` relative to the routes
directory: now a pin (verified red: "does not name
src/routes/(group).tsx unambiguously").
- The dev pin `other.ts:2:24` stays red through the shared oracle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W4-ip import-protection acceptance fixes (ip-SYNTH I01-I15; I16 kept
closed): suggestion sections, attributable added code, MDX coordinates,
mockAccess defaults, settled Rsbuild windows, public rule outcomes, real
Node SSR and Chromium client hosts. Tests only.
Resolution onto W4-shared (one location mechanism):
- Conflicted call sites take W4-shared's expectViolationsAt /
relevantViolations / expectReportFrame / expectMarkerViolation; W4-ip's
duplicate originalLocation assertions there are dropped.
- importProtection/original-location.ts is now a thin adapter over ctu
isRelevantLocation + expectFrameAt for W4-ip's remaining call sites,
keeping two J6.5/§5.7 constraints the shared mentionsFile lacks: a
1-based column, and an absolute or project-relative file name (without
the latter the dev.test pin "re-exports is reported ... with its path"
passed while the bug, `other.ts:2:24` for `src/other.ts`, is on main).
- W4-ip's copy of the added-code oracle replaced by
@tanstack/compiler-test-utils/added-code (identical code).
- Rsbuild/Vite client runners: files W4-ip moved to its Chromium
client-pages.ts keep it; the clientPage spreads W4-shared added for its
rsbuild-dev-server runner are dropped there.
Validated (Nx, --skip-nx-cache, --maxWorkers=4): spc types/eslint pass,
unit 913/189 (1102), integration 840/202 (1042) x2, implementation
245/7 (252).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
render.ts's client host only loaded ids whose path before the query was
the parent's, which constrained how a compiler may spell its virtual
module ids. It now hands the plugin the ids its virtualModuleIdPattern
matches and loads them through loadCompilerVirtualModule, as the Vite and
Rsbuild hosts do (the real host functions of src/start-compiler/host.ts,
no copied resolver); every other id the linker asks for is declined.
New harness control (outside the corpus): a relocated virtual id loads
and renders like the original; './unrelated-module' and its extension
probes never reach the plugin. Red on the old check ("No stub for import
/elsewhere/relocated-module.tsx?...") and on an ungated host (the probes
reach the loader).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cloudflare:workers contract test reached Miniflare through the e2e
Cloudflare app's wrangler, which only resolves after a full root install.
miniflare is now a devDependency at 4.20260317.0, the version wrangler
4.75.0 already resolves (one copy; lockfile regenerated with
pnpm install --no-frozen-lockfile: importer entry only). Coordinator-
approved test-only devDep (DECISIONS 2026-10-20).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- rp known-bugs-route-hmr: the split Solid/Vue identity pin names the
remount and lost local state (Vite: full reload).
- rp known-bugs-code-splitter: the look-alike createFileRoute pin gets its
Source line.
- spc start-build-determinism: the S03 fresh-build mapping pin no longer
claims unchanged app input; the entries differ in import order.
Comments only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The W4-hmr rewrite of HMR-06 dropped the browser-like evaluation with
`window = {}`. Each style/route now evaluates with and without a hot API,
with and without `window`. Probe: dropping the optional chaining on
`window.__TSR_ROUTER__` in the Vite adapter fails only the new
window-defined, hot-present rows (reverted).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A gitignored route file left in routes/(test) by an earlier run (e.g.
template-literal.tsx of the old harness) became one more route of the
fixture and failed generator.test.ts in that checkout only. The new
harness control (outside the corpus) fails on the old helper with
template-literal.tsx left over.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Check runtime conditional selection and effects, plain-model shape, and
look-alike argument values. Isolate two helpers in one module so one payload's
CSS cannot hide another's missing delivery, and cover JavaScript providers.
Add client-only CSS controls on Rsbuild dev and Vite production, strengthen
stream diagnostics, and use public server-function URLs for the D6 goal.
Split independent real app sessions and scope concurrent browser cleanup.
Validation twice: types, eslint, 51 unit cases and 119 integration cases.
New and changed pins are verified red with their expected-failure markers removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover eleven literal boundaries, inline edge spaces, shared fallback values,
digit-bearing hooks, below-JSX function declarations and computed-key module
dependencies. Observe independent child requests and HMR loading separately
from mounted-instance gauges, while allowing equivalent chunk layouts and
framework refresh replacement. Split independent host sessions for file budgets.
TypeScript 6.0.2 over real Hydrate declarations: the original string-returning
prefetch reports TS2322; the void-returning replacement passes.
Validation twice: types, eslint, 1298 unit cases and 1027 integration cases.
All 22 J5/J7 red variants are caught; all eight green variants pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Accept relevant original import/use locations and context-free source frames,
require mapped MDX positions, and scope suggestions and edit diagnostics to
their public outcomes. Use real browser client execution and Node SSR output;
exercise actual default mockAccess, exemption blame, and resolver guidance.
Add public rule outcomes for the V4 matcher and inherited mock-property gaps.
Move sourceLocation helper-preference controls outside compiler acceptance
(V1R I08 / SPEC section 8); retain public report shapes and add missing nested
middleware/server-isomorphic cases. No test was changed on a claim of invalid
TypeScript input. The isolated I11 edit row now passes without an expected-
failure marker and retains its exact empty final violation set.
Validation: types and ESLint pass; full unit (1308 tests) and integration
(1046 tests) pass twice with identical counts, including existing goal pins.
Verified 121 touched pins red; all 16 relevant red mutations are caught and
all 5 green rewrites have zero compiler-corpus failures. Detailed evidence
is in validation/waves/W4-ip.md under the compiler-test-intent cache.
No product or dependency changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W4-shared cross-slice harness fixes (lazy probe, effective-artifact
validator with the amended dangling-name attribution, host graph and
logger channel, semantic determinism, location oracle, prose/causes,
warning fallbacks, Chromium client runs, added-code oracle, kept dynamic
imports, stop()) and the outside-compiler-corpus selection convention
(test:implementation). Tests and test infrastructure only.
Conflicts with the merged W4 slice branches, resolved keeping both sides:
- rg determinism: both sides wrote determinism-app.ts. Kept W4-shared's
structure (expectDeterministic project option) with W4-gen's semantics
(logging enabled, diagnostics sorted, cwd variants compare routes only);
W4-gen's outside-compiler-corpus/tree-bytes.test.ts deleted as a
duplicate of W4-shared's route-tree-bytes.test.ts (same byte assertions
over listing order and cwd).
- rp generator-dev-app/scenarios: W4-shared's mark()/diagnostics(since)
capture replaces W4-gen's reportMark/reportsSince (same outcome, more
channels); W4-gen's close() kept beside diagnostics().
- rp integration regression-helpers: W4-shared's moved file under
outside-compiler-corpus/ plus W4-hmr's delayed-observation control and
W4-split's page-console warning row (W4-shared's bundler-channel rows kept).
- rp known-bugs-route-hmr / route-hmr-browser-plugin: shared
expectEditShownOrReportedFallback (same rule as W4-hmr's inline check).
- rp known-bugs-dev-server: HMR-27 block as moved to the integration tier.
- rp production-bundle: ctu addedCode (all frameworks) instead of
W4-split's react-only bundleAtoms oracle.
- rp dev-source-maps: isServedAppModule; route-hmr: W4-hmr comment kept.
- spc createServerFn: shared missingHandler matcher; W4-start's matcher
controls kept on top of it; resolver block as moved outside the corpus.
- spc rsbuild/dev-server: W4-start's hydrated-page rows kept (they already
replace the VM runner that W4-shared migrated to runInClient).
Validated (Nx, --skip-nx-cache, --maxWorkers=4): ctu 232 / 106 x2;
rp 437/179, 355/193 x2, implementation 53; spc 919/189, 814/201 x2,
implementation 223/7; rg 274/26, 60/3 x2, implementation 80/2;
rsc 49, 87/10 x2; types and eslint pass for all five.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W4-start acceptance fixes for the Start slice (start-SYNTH S03/S13/S17,
N02-N06, N08, N10-N12; S07/S49/N13/N14 left to their owners; V4 r2
escapes astra-r2/06-09 and fable-r2/13). Tests only.
Validated on the identical staged merge (Nx, --skip-nx-cache,
--maxWorkers=4): spc types/eslint pass, spc unit 1108/195 (1303),
spc integration 826/202 (1028) x2. Run 1 also reported the known
Rolldown "Failed to get bundle state" unhandled rejection in the
untouched importProtection/dev.test.ts (tracked separately; coordinator
ruling: does not block this merge).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Amended ruling "dangling-name attribution" (2026-10-20): the check
covers the app's modules (user and route code, split chunks), modules
without a file (virtual and support modules) and the dependency modules a
transform hook (a loader other than the bundler's built-in ones) saw in
that build. In such a dependency a free read counts only when the module
as the transforms left it reads the name free while its original source
does not; a dependency no transform saw is out of scope, whatever the
bundler does inside it (Rspack dropping import bindings). Controls,
each verified red by a mutation of the attribution: an untouched
dependency whose binding Rspack drops passes; a transform dropping a
dependency's binding fails; a transformed dependency's own free read
(seroval's shape) passes and the same code in the app fails; the dead
notDeclaredAnywhere in app code still fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ruling "dangling-name attribution" (2026-10-20): a dangling read in a
production client chunk counts unless it lies in a dependency's module
(outside the app or under node_modules) whose original source on disk
reads the name and binds it nowhere (e.g. seroval's
const RETURN = () => T, used through RETURN.toString()). A binding the
original source has, lost by a compiler or the bundler, counts, and so
does every read in the app's own and virtual modules. The bundler-lost
exemption is gone. Controls (each verified red by a mutation of the
attribution): a dependency's own free read passes and the same code in
the app fails; Rspack dropping a dependency's import binding fails (webpack
declares it); a transform dropping it fails on both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W4-split acceptance fixes for the split slice (split-SYNTH S02-S35 local
parts; S01/S03 host/S05/S21/S28/S36 left to W4-shared; V4 r2 escapes
astra-r2/04 and fable-r2/06). Tests only.
Conflicts with W4-hmr resolved keeping both sides:
- integration/regression-helpers.test.ts: W4-hmr's delayed-observation
control plus W4-split's app-logged warning control (both replaced the
same compiler-warning row; the W4-split row asserts its own marker).
- integration/route-hmr-browser-plugin.test.ts: no warning-excuses-failure
branch (both), and W4-hmr's in-place requirement when no warning names
the file (findDiagnostics import kept); comment updated.
Validated (Nx, --skip-nx-cache, --maxWorkers=4): rp types/eslint pass,
rp unit 460/181 (641), rp integration 365/191 (556, 45 files) x2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exercise async isomorphic promises, both environment-only call receivers,
provider default-export effects over HTTP, browser RPC cancellation, and
a validator schema also consumed by a hydrated form. Preserve module-load
checks while allowing harmless identifier spellings in dead code.
All five assigned round-two patches were applied independently, caught by
the relevant Start outcomes, and reverted. No product or dependency changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Check fresh collision mappings, nested RPC safety, independent capture
outcomes, actionable handler diagnostics, and consumed fixture exports.
Use srvx for HTTP/static hosting and real hydrated Start pages for global
middleware and Rsbuild factory/id workloads. Contract-test the retained
Cloudflare resolve hook against workerd and builtin delegation.
No input was deleted or reclassified as unsupported. Existing parsing,
transport, module-load and successful-build controls remain; new bug pins
were verified red without .fails. Test-only changes; shared helpers and
import-protection/hydrate files remain with their assigned owners.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W4-hmr acceptance fixes for the HMR slice (hmr-SYNTH HMR-06/07/31/34,
H08-H12; HMR-08/10/27 shared parts deferred to W4-shared). Tests only.
Validated (Nx, --skip-nx-cache, --maxWorkers=4): rp types/eslint pass,
rp unit 456/180 (636), rp integration 367/181 (548, 44 files) x2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps build-production-webpack within its budget: each chunk's atoms are
counted once (the oracle control adds its code as a module of its own
instead of editing the entry chunk, so the build's chunks are not
re-parsed).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rsbuild dev harness waits until the watchers (union of all compilers'
watchpack entries) know every app file before start/edit/settle resolve,
with two control tests; the ctu Vite self-test's generator writes
atomically. Re-merge after the aborted 89f5401d60 (RSC client compiler
ignores all watching; fixed by 1356241f94).
Validated (Nx, --skip-nx-cache, --maxWorkers=4): ctu types/eslint pass,
ctu unit 201, ctu integration 92 x2, rsc integration 87/10 x2,
spc integration 819/200 x3, rp integration 359/179.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The regression-helpers controls (both tiers: openRouteHmrPage, the
in-process host, loadRoute) check the test helpers, not the compiler, so
they move under outside-compiler-corpus/ (test:implementation); no V4 red
is caught by them alone. The out-of-order dev edit pins no longer require
more than one module and tolerate a pre-edit URL that no longer compiles:
the page loads the current graph from the route module (V1R hmr HMR-27).
Both pins verified red without .fails (Export 'CardB' is not defined;
B1/B1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They are the only corpus test catching a mutant that loses the lazy options
the route tree gave an edited route (V4 red-astra/08), so they decide a
user-visible outcome; the header names their category instead (hmr H12).
The corpus convention says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Link emitted route graphs to the real router and renderer, observe exported
component identity through eager importers, and keep reload/error results
live through final assertions. Require working factory edits even after a
warning. Cover metadata edits/removals and the fresh index Route.to on real
Vite/Rsbuild pages; add the Rsbuild Solid/Vue wrapper-preservation goals.
Remove component-key presence and private URL spelling assertions under
OQ14 and SPEC section 5.3. Existing nested Outlet and resolver-order controls
retain the behavior; no deletion claims type-invalid input.
Validation: types, eslint, unit (636), and integration (542) twice with
identical counts. Ten HMR red variants caught, four greens clean, and new
or affected goal pins verified red without .fails. Timing overruns and the
three W4-shared handoffs are recorded in the W4-hmr report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both dev-server harnesses get stop(): it closes the server and its watcher
and keeps the app directory, so an edit after the server stopped can be
observed; close() (what registerCleanup gets) still removes it. The
generator dev app reads every console method and direct stdout/stderr
writes, not only console.error/warn (W4-gen items 1 and 2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Files under tests/**/outside-compiler-corpus/ are implementation tests:
test:unit and test:integration leave them out, test:implementation (and
test:implementation:unit) run them, and the root CI scripts and the
compiler platform workflow run those targets too. The budget reporter
ignores the implementation projects. The internal resolver tests (start
N08) and the stringified handleRouteUpdate tests (hmr H12) move there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Production client bundles were compared with their route-HMR-off control as
sets of identifier tokens (split S14): a harmless private renaming failed,
and a development-only call built from names the bundle already had passed.
addedCode (compiler-test-utils/added-code) compares the two builds' statements
as multisets of shallow, alpha-equivalent, printer- and placement-independent
shapes: what the build ships that the control lacks is attributed to the
setting, whatever it is named. production-bundle.ts uses it for every
framework (the control is the same for all). Controls: fixed chunks and real
Vite/Rspack builds where a renamed helper adds nothing and one more
console.warn of existing names is added.
Route HMR in the environment plugin.vite.environmentName excludes (HMR-10)
and Start's server environment in dev (HMR-08) are now checked over every
module the environment serves from the route module, the router packages
and any compiler support module included; only Vite's client and
externalized packages are left out. The route-local literal positive scan
is gone; the real-page loader edit is the positive control.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1R split S03 (slice-local part): the out-of-order dev-edit walk kept only
imports resolving to the route file's own path, so a compiler emitting a
separate support module or another virtual scheme would not be compiled
and reloaded. The plugin-host graph part stays with W4-shared.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dev-server harness self-test "reports created, renamed and deleted
files to the plugins, and the files they write meanwhile" failed 3 times
in the V4 variant phase (load ~30): once with an extra `update
generated.ts` after `create generated.ts`, twice with "the file watcher
did not report generated.ts". Its generator plugin wrote with a plain
`writeFile`: a truncation and a write. Under load the watcher reports
the two steps of a new file as an `add` and a `change` (the extra
update), and for an existing file the harness can read the empty file
at the first event while the content lands in the same millisecond, so
chokidar's mtime check never reports the second step (the timeout). A
generator writes atomically (the router generator's `safeFileWrite`);
the self-test now does too, through the harness's `saveAppFile`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
moduleLoads unioned real module requests with every syntactic dynamic
import, so a correct compiler leaving an uncalled function with an import()
of a server-only module for the bundler to delete failed expectNotLoaded
(start N14). Real requests (static links, imports run while evaluating) stay
strict; a dynamic import counts when Rolldown, bundling the compiled module
alone with tree-shaking on and its exports kept, keeps it
(keptDynamicImports in compiler-test-utils, the same deciding bundler as
getModuleErrors' dead references). The new control lists imports in live
code (an exported caller, a top-level call) and not in dead code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1R split S16/S17:
- split-mode-parity: five splittable options per route, each importing a
load marker; routes in forward/reverse activation pairs; route groupings,
splitBehavior and defaultBehavior precedence; loader data and the route
rendered by the real router; the deleted headers code in no client
chunk. Expected groups are computed from the configured groupings. Vite
and Rsbuild, dev and build, all pass.
- the seven displayName host/hint cells removed by speedup 7 are restored
(with the Vite no-hint cell) in their own file, built concurrently
(7.4 s); every cell verified red (DanglingNameError: Page).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
generatorDevApp gains mark()/diagnostics(since): the generator's console
output plus the dev server's own errors and warnings (Vite's logger,
Rsbuild's compile diagnostics), as diagnostics. A broken route file must be
reported (naming the file, through any channel) by the edit that breaks it;
after the fixing edit, the route must come back and no error be reported
from then on, so a permitted report of the broken file no longer fails the
recovery (V1R gen G13, also for the created-broken-file Rsbuild pin).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check skipped unminified webpack and Rspack client builds, the artifacts
those configurations ship (split S36, gen G02, GEN-38). It now reads every
production client chunk. A dangling read is the bundler's only on evidence:
it lies in the bundler's region of a module, and that module, as the bundler
parsed it after its loaders and plugins (recorded by recordParsedModules),
binds every read of the name. Two bundler mechanisms produce such reads in
unminified output: Rspack 2.2.7 drops import bindings of unused code it keeps
(webpack declares them), and both remove declarations after a return they
computed while keeping function declarations that read them. The control now
rejects the unminified build's surviving dead dangling name, and new controls
prove both bundler mechanisms are attributed and a module that loses its own
binding is still rejected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- astra-r2/01: a routeToken /\p{L}+-layout/u makes posts/écran-layout.tsx
the /posts layout.
- astra-r2/02: a route file missing its constructor import next to
import { Link as Primary, Link as Secondary } keeps both aliases
(expectOnlyOwnedEdits bindings).
- astra-r2/03: with routeFileIgnorePrefix '', -health.tsx routes to
/-health.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- a binding whose only reader is a private method (#read) shared by the
eager loader and the split component: valid modules, one instance, one
init. red-astra-r2/04 applied: CAUGHT (the chunk loses the binding).
- component: memo(Page) / withAuth(Page) of a const arrow component renders
when the chunk loads. red-fable-r2/06 applied: CAUGHT (ReferenceError:
Cannot access 'Page' before initialization).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G27 (V1R gen), with the scenarios added to generator-dev-scenarios.ts in
the previous commit:
- Vite and Rsbuild dev servers on a real page: an edit of the
virtualRouteConfig file (path form) and of a __virtual.ts file must
change the live routes. Both are new pins on both bundlers: the tree is
not regenerated (Vite: checked with the tree file, no 'contact' route
4 s after the edit; the generator-level pin already in router-generator
generator-dev.test.ts names the path comparison and jiti cache; the
__virtual.ts source is suspected, a product probe was not permitted).
- Closing the Vite / Rsbuild dev server closes every file watcher it
held, the generator's included (positive control: a created route file
is scaffolded while it runs, and watchers exist). The harness removes
the app on close, so an edit after close is not observable here.
- router-generator: a createFileRoute declared in the file or imported
from an app module (a wrapper of the router's) must keep its meaning:
new pin (the generator recognises the constructor by name: it adds a
second binding or rebinds the import to the router package; red without
.fails); an inner-scope shadowing createFileRoute is left alone while
the Route is kept up (passes).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G13 (V1R gen): the broken-route-file scenarios read the report from the
plugins' console only, and recovery required no dev server error at all,
though the permitted report of the broken file may stay among them. Now
the report is any diagnostic (console or dev server error) naming the
file through the shared diagnostics oracle, marked from the breaking edit,
and only errors after the fixing edit must be absent; the recovered route
and navigation stay required. This also applies to the created-broken-file
Rsbuild pin (re-checked red without .fails: Rsbuild does not settle on the
fix, after the report check).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
expectEditShownOrReportedFallback (route-hmr-page.ts): an edit of a route
the compiler may leave to a reported fallback (R-09, D11) must show its new
loader data and component without errors; without a warning naming the
file it must also apply in place, with one a reload is allowed. Replaces the
catch-and-return of the factory-route rows and their helper-function pin
(V1R hmr H08, split S11). The warning-capture control now uses a synthetic
plugin warning through each bundler's own channel (Vite this.warn, an Rspack
compilation warning), positive and negative, instead of requiring the
compiler to warn about a split it may perform (H09, S09); openRouteHmrPage
takes extra test plugins. Controls of the helper's decision.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1R split S09/S10/S11/S12:
- the page-warning harness control logs a deliberate warning from the app
instead of requiring the compiler to warn about an exported page;
- exported errorComponent (as any): an entry importing it, the route's
error path rendered through the real router, the function rendered is the
imported one and its module state is created once (pin verified red:
labels 3, not one instance); placement stays a separate obligation;
- same-file route factories: the edit must show v2; a warning no longer
turns a stale page into a pass (all 10 cells pass today);
- the client-output source-names inventory is deleted (virtual source names
are free); executed throw maps now also cover route-module and shared
code on Rspack and webpack (new .fails rows, same unplugin map drop:
verified red on the line).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The readiness wait checked each compiler's own watcher, which can never
hold for Rspack's RSC client compiler: the RSC coordinator sets
`watchOptions.ignored = () => true` on it and has the server compiler
watch its files (merge validator: all 4 Rsbuild RSC dev starts in
react-start-rsc timed out). Now every app file any compile read or
looked for must be known to the union of the attached compilers'
watchers.
Control tests (ctu integration): after the start, the watcher knows
every app file the compile read; and a two-environment server whose
`node` compiler ignores every file (0 entries) still starts, with its
files known to the `web` compiler's watcher.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The out-of-order edit pins followed only imports whose query-stripped path
was the route file and evaluated the client output in Node with the SSR
router and this process's React (V1R hmr HMR-27, split S03). They now move
to the slow tier: a real Vite dev server with a browser page; the walk
follows every served module of the app or of a plugin (isServedAppModule:
not a dependency, not Vite's client), the page loads the route before the
edit and leaves, the test re-requests the modules in the forced order, and
a new page imports the route as the server serves it now and renders its
components with React, reporting render and link errors. The pins stay red
for their own reasons without .fails: 'Export CardB is not defined' and
B1/B1 (two module states). The dev source-map walk drops its /routes/
filter the same way. Control: isServedAppModule follows a plugin-served
module and another app module (red with the /routes/ rule).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runInClient and runRsbuildClient ran the dev server's client output in a Node
VM with copied web APIs (V1R start N03; hmr/start theme "client code run in
Node"): a client path that misbehaves only in a browser passed. They now open
a page of the dev server in Chromium (a server started with `clientPage`),
whose document loads the client entry's initial files from the dev server
(found in Rspack's stats; Start's dev server renders its HTML with the app's
server entry, which the harness apps do not have), record what the page's
code logs and throws from its first statement on, and run the script in the
page. webGlobals/webApis are gone; the same-named ids row runs on the page
too.
Control (integration/build-harness.test.ts): the entry reads document,
customElements and location (the VM run threw on document), the script runs
on the page after load, logs come with their levels, and a throw while the
page loads rejects both runs. Re-checked red without .fails, failing for
their stated reason: known-bugs custom-type and .mdx pins (not reported; a
denied specifier's real code runs), v2-policy permitted rows (a safe mock).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
openPage takes the document of its URL (a page of a dev server that serves
no HTML, whose other requests still reach the server) and a script that runs
before the page's own code (to record what it logs and throws from its first
statement on). Control: a page shows the given document at its URL, and the
init script ran first, on every load.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1R split S07/S22:
- JSX plugin before the router plugin: a working build may also keep the
component in the route with an actionable warning (naming the route file
or both plugins); an error must name both plugins by package, factory or
Vite plugin name, not literal package prose. Supported order unchanged.
- // @refresh reload rows: after the same click and edit, the split app must
show exactly what the unsplit app shows (count reset), not any count.
Probe (both Vite rows, 4 pages each): the count is 0 with and without the
pragma; the pragma's only other effect is a reload, which G10 forbids
requiring.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reports may name the importer at a genuine use or at any line of its
original import of the denied module (SPEC J6.5; V1R ip I01):
expectViolationsAt/relevantViolations match distinct reports to expected
violations with the shared isRelevantLocation, expectReportFrame checks the
highlighted original line and caret without requiring context, and
expectMarkerViolation also accepts the importer's import of the marked
module. Migrated: build.test default-rule rows, the chain build report,
reported-location's predicate, dev.test denied-file/marker/route-frame rows,
dev-page rows and the transformImport rows (no coordinates allowed there
only, §5.14). Controls on real formatViolation reports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1R split S19/S20/S29 (+ the slice-local S03 walk):
- autoCodeSplitting false/undefined: the generated tree exists and the real
router over it renders the index route at /, instead of a literal
"from './routes/index'" import spelling;
- the React Compiler transform-placement check moves to
outside-compiler-corpus/ (DECISIONS OQ16: third-party transforms on split
chunks are out of scope); ordinary split/render rows stay in the corpus;
- dev source maps assert the original column too; the Vite served-module
walk follows every app module and Vite-served virtual module, not only
/routes/. The Rsbuild pin is still red on the line (3 vs 6).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The (bar)/_layout.about and lazy _layout.xyz files had no (bar)/_layout
route while the other groups have identically named layouts; their root
parent in the table characterized today's choice between candidates the
docs do not rank (V1R gen G23). The fixture now has
(foo)/asdf/(bar)/_layout.tsx: the table nests about and xyz under it, and
their pages render inside it (/asdf/about, /asdf/xyz).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
routeTypeChecks indexed the tree's generated FileRoutesById interface and
one row indexed FileRoutesByFullPath: those names are not promised (SPEC
§5.1; the docs promise FileRoutesByTo through a consuming example), so an
equivalent linkage through typeof routeTree failed (V1R gen G21). Now
RouteIds / RouteById<typeof routeTree, id> (fullPath, parentRoute.id)
and RouteByPath<typeof routeTree, '/'> from @tanstack/router-core. The
documented FileRoutesByTo rows stay. Re-checked the three type pins red
without .fails: same fullPath '' vs '/' mismatches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC G4 frees emitted code across project roots and printing everywhere
(§5.5); the determinism tests compared normalized emitted modules (split
F10/S05), built files byte for byte, and the generator's raw tree text
(gen G07).
- ctu `expectDeterministic` takes a `project`ion and documents the
semantic projection every determinism/relocation check uses: executed
values, lazy groups, user modules loading on demand, relevant
diagnostics, contract ids; never bytes, generated names or complete
lazy inventories. Control: two outputs differing only in private names
and printing pass, another value or a broken shared identity fails (real
ESM through the module linker).
- router-plugin fast tier: each module id (other roots, Windows ids) must
give the reference lazy groups, loader data and rendered components, via
`expectRelocatable`.
- router-plugin slow tier: the app built in two directories (files written
in another order at the second) must run in a browser with the same
data, page and eager/lazy placement; each build checked on its own.
- router-generator: listing order and working directory must not change
the routes the real router builds (path, parent, file, the app's lazy
route files) nor the generation's warnings and errors.
The byte-equality checks stay as labelled implementation controls under
`outside-compiler-corpus/` (rp fast and slow tier, rg).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host followed only imports resolving to the route file with a query,
so a compiler emitting virtual or other-id modules failed every fast test
(V1R split S03). It now resolves every import through the host and tells
the route's modules by hook evidence: a module a host plugin loads, or one
the router plugin's transform changes. Untouched app files and packages
are not followed. The build host records importer-keyed resolutions (the
map was keyed by specifier only) and externalises packages and what
nothing resolves instead of everything off the route path.
Vite ran silent, so a plugin's this.warn never reached the diagnostic
capture (V1R split S21): the host logger now forwards warnings and errors
to the console.
Controls: a plugin serving a chunk and a support module under its own id
scheme (followed and evaluated; red with the old same-path filter in dev
and build), an untouched user file (not owned; red when every resolved file
counts), and a plugin's this.warn through the host (red with the silent
host).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1R split S14 (P1): the paired-build G7 oracle compared sets of identifier-
like tokens, which fails on harmless private renaming and misses dev-only
code built from tokens already present. It now compares, on the real
parser's syntax tree, counts of each node kind and of free-name reads,
property names and strings (chunk file names normalised). An inline oracle
control appends console.error("MARK_PAGE") (token set unchanged) and
requires the comparison to see it. Public hot-API checks unchanged. The
vite/react unsplit pin is verified red for the extra Refresh anchor.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
withoutQuotedSource now uses the shared diagnosticProse, which also drops
cropped and highlighted frame lines (V1R start N13). A misplaced server fn
rejection must explain the placement (placementCauses), a capture rejection
the capture (captureCauses), and a missing handler may be reported by the
API or its handler call with a missing-function cause (N04). Synthetic
controls: cropped-frame and positioned internal-crash negatives, clear
messages in varied layouts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piecesOf loaded every route before rendering its pieces, so a generator
importing the ordinary .component.vue pieces eagerly passed the lazy-piece
rows (V1R gen G18). piecesOf now requires no .vue file to be loaded once
the fresh tree is loaded, before any route is demanded; the pieces still
render with real Vue after loading (a probe confirmed the observation
channel lists the .vue files after loading).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G14: the footer is compared with the tree's last non-blank lines, not
from a literal 'export const routeTree'.
G15: addExtensions checks every static and dynamic import of the app's
route files (extension, resolution) and no longer counts imports, so
generated support imports are exempt.
G16: importRoutesUsingAbsolutePaths checks the static route file imports
without a count, and a new pin requires the lazy route file imports to be
absolute too: today they stay relative (red without .fails:
'./routes/posts.lazy' is not absolute).
G17: with disableLogging, every captured console message (any severity)
must be an actionable one naming the route file without a Route export.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1R split S04/S08/S15/S25/S30/S33/S34/S35:
- loadRoute control on real output keeps effects and on-demand evaluation,
not exact evaluated-module inventories (exact bookkeeping stays on fixed
graphs);
- shared state in a .jsx route: once-only creation and one instance across
options; no import-versus-init deadline;
- flat codeSplitGroupings labelled a type-invalid diagnostic control
(TS2322 under the real types, arbiter probe /tmp/v1rs-type-check.ts):
named error, reported working route, or safe interpretation;
- exported loader: the function the route runs is the one an importer gets;
- import attributes: nothing loading with the route requests the macro
module (complete eager requests), attributes on every import of it;
- imported options: real on-disk options/admin-helper source in a real Vite
dev server; an error naming the route file is accepted; deleteNodes pin
also requires the helper not to reach the client graph; the local control
checks the helper does not load eagerly. Pins verified red (no warning).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diagnosticProse drops numbered frame lines (whole, cropped, highlighted,
boxed), caret markers and quoted source lines, so source tokens cannot
impersonate a diagnostic's own words (V1R start N13). Names accept
alternatives (N04) and causes require a semantic reason in prose (S07).
locationMismatch/expectRelevantLocation accept a genuine use, any line of
the original import of the specifier, caller-given other places (marker
origin) and, opt-in only, no coordinates (J6.5, §5.14; V1R ip I01);
expectFrameAt checks the highlighted line and caret, not context.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G09: a template literal id may be replaced or reported (SPEC J1.1); the
upkeep row moves into the repaired-or-reported table and the
file-modification fixture drops its template-literal file (the fixture
cannot accept a failed run).
G10: expectRouteFile no longer requires one local import literally named
createFileRoute; the evaluated Route must be the router package's Route
(LazyRoute for the lazy constructor) and routeCallOf still checks the
callee's provenance, so reusing an alias or namespace binding passes.
G11: the direct-object constructor calls (type-invalid, TS2345 per the
V1R synth tsc probe) are labelled never-fail-silently controls and accept
a repaired curried call keeping the options and registering /new, or a
diagnostic naming the file.
G12: -posts-route / -make-route now exist and supply the Route; the entry
must stay unchanged with /new registered and rendered, or be reported.
G25: the file-modification lazy constructor-switch input is a
component-only createFileRoute route (the full template kept a loader,
TS2353 under createLazyFileRoute); the page must render at /bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lazy probe started each trigger synchronously, rejected the imports it
started and loaded their targets itself. A valid wrapper that first awaits
something (`await Promise.resolve(); return import(chunk)`) was classified
eager, and a dynamic facade's continuation (the facade importing the real
chunk) was never observed (V1R split S01 = gen G08, SPEC J2.6/§8).
The probe now awaits the public trigger to completion in a fresh fork of
the graph (its rejection ignored), lets imports it started without awaiting
them settle, and counts the owned modules that evaluated. Groups observe
each pair in its own fork, so what one name loads never makes another look
available. Controls: delayed trigger, dynamic facade, unawaited import,
pair independence; the first is red on the old probe, the pair control is
red on a shared-fork variant.
`probeDynamicImports` had no other consumer and is removed with its tests.
The deprecated `runtime`/`jsxPragma` JSX stand-in of the linker had no
consumer left either and is removed (V1R gen G22).
One consumer read a stub's access log after `isLazy('loader')`, which now
loads the loader's module in a fork with the same stubs; it reads the log
first (`code-splitter-route-options.test.ts`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1R split S02/S13/S23/S24/S27:
- extra cache-busting parameters: load and render the route with the module
served under the busted id (no emitted-text equality, no required query);
- route reuse across routes and recompiles (PP, CTX): ids, groups, values and
diagnostics instead of raw emitted text;
- directive prologue: directives compared as a set;
- route HMR without splitting: Vue routes created by the real vue-router;
Solid is syntax-only here (real page: route-hmr-browser-frameworks);
- unowned modules: an unregistered genuine createFileRoute module and a
registered route file using a foreign look-alike. A local shadowing
factory in a route file is split today: new pin in known-bugs (verified
red: the look-alike's component becomes lazy).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The determinism observation included the raw route tree text, whose
names, printing and comments are free (SPEC §5.1/§5.5), so a semantically
deterministic tree with a cwd-bearing comment failed (V1R gen G07). Now
the observation is the routes the router builds (lazy files limited to
the app's own) and, across listing orders, the generator's warnings and
errors. Byte identity of the tree stays as an implementation control in
outside-compiler-corpus/tree-bytes.test.ts. The app and listing-order
seam move to determinism-app.ts, shared by both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G05 (V1R gen): the fault of the publication tests matched every write and
rename, so the first (route file) publication failed and the route tree's
failure path was never exercised; now the fault targets one destination
(its writes by content, its rename by target), the test checks the
faulted publication was attempted, the faulted destination keeps its
complete old content and the other one is old or complete new (readers
see only those). The tmpDir-on-another-device pin now makes its baseline
run on the app's filesystem and switches tmpDir for the observed run
(the EXDEV failure was in the baseline, before the reader boundary).
Re-checked red without .fails: EXDEV on the observed rename.
G06 / moot pin: J1.6/J1.16 promise atomic destinations, not a project
free of other files, and no ruling adopts a cleanup contract. The
acceptance test keeps the saved source and the usable tree; the cleanup
pin moves to outside-compiler-corpus/abandoned-staging.test.ts and checks
for a staged copy of the abandoned fix rather than the whole file list.
Re-checked red without .fails (the tmp copy).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1R split S06/S26/S31/S32: the classic-pragma pins render through the real
@emotion/react and React (compared with the untouched file) instead of
string factories labelled Emotion/Preact; the application factory row is an
application module. The D5 Fragment check no longer fixes the chunk's import
inventory. The re-export/default-class pin looks for a marker in the class
body across every module the lazy options load. The Solid deleteNodes row
validates bindings and checks no emitted object literal keeps ssr/server/headers.
All changed pins verified red without .fails for their stated reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A standalone (group).tsx is an undocumented extension (SPEC §2.2): the
test required a diagnostic even on success, so a generator routing the
group's children correctly without a warning failed (V1R gen G01). Now a
failed run naming the file, a reported fallback with a loadable tree, or
no diagnostic with correct routing (no full path names the group, the
group index and /about render at their URLs) all pass. No parent
interpretation of (group).tsx is required. The apps are temporary apps
with real route files (the old fixture files were placeholders); a control
runs the routing check on the documented group directory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixture table compared every file newly evaluated by each route's
loadRouteChunk, in route id order: a generated lazy facade or support
module failed the exact inventory, and a shared dependency was attributed
to the first route loaded (V1R gen G03). Now: ids, full paths, parents and
route files stay exact; each listed lazy file is absent before its route
is loaded, present after, and its lazy Route's options are the route's.
Checked red on a wrong attachment (lazy file listed under /posts/).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The helper masked every router package import, so a separate import's
comment could be dropped and an edited import's bindings could change
package unnoticed (V1R gen G04). Only the imports that bind a route
constructor (plus one other router import when the file lacked the
constructor it now uses) may change; their other bindings keep imported
name, local name, type/value meaning and source package. New controls:
an untouched router import's comment, its package, a merge into the
constructor import, a missing constructor import joining an import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under load (local load 18-35; beetle 17-44), a file deleted right after
the Rsbuild dev server started was never reported and the edit hung:
Rspack attaches its watcher on the tick after the first compile's
`done`, and watchpack then scans the watched directories; a file the
scan's listing had but whose stat then fails (deleted meanwhile) ends
up neither known nor missing, so neither the scan's end nor the watch
event reports it (watchpack 2.5.2 DirectoryWatcher.doScan; traced with
harness instrumentation, reverted: `watch:attach` 0.014 s, `rm` 0.015 s,
no watcher event, 0 compiles in 60 s).
The tracker's `watching(root, timeout)` waits, a turn of the event loop
at a time, until every compiler's watcher is attached and watchpack's
`getTimeInfoEntries()` has an entry (a time, or `null` once the scan
ended) for every app file the last compile read or looked for. The
start, `edit()` and `settle()` wait for it; `timeout` only guards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test-budgets.json now holds local-iteration budgets (DECISIONS 2026-10-19):
per package a [target, hard] for the fast and slow tier at --maxWorkers=4,
15 s for any slow-tier file, 10 s edit to result for a fast-tier slice.
Numbers come from three quiet-machine runs per tier (load < 4) with
headroom. CI / one-worker runs are reported only.
The reporter stays report-only in normal runs. COMPILER_TEST_BUDGETS=strict
fails a run over a hard limit or the per-file limit, or not at 4 workers,
and says it is meant for a quiet machine. Partial runs (file or -t
filters) get no tier verdict; a partial fast-tier run reports the Vitest
part of edit to result.
compiler-test-utils/AGENTS.md documents running one file or -t filter
through Nx, the `|` caveat, the slow-tier load gate and strict mode; the
other compiler packages' AGENTS.md point to it (react-start-rsc gets one).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the user saves a route file with the right id while the generator
is fixing it, safeFileWrite throws `rerun` after writing its temporary
file, the rerun has nothing to write, and the file stays in tmpDir
(default .tanstack/tmp). The save is scheduled through the generator's
`fs` option, like the other race tests in the file; the assertion is that
only the app's files remain under the app. Red without `.fails`
(tmp/<session>-<hash> left); a probe removing the temporary file before
`throw rerun` makes it pass (reverted).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rsbuild row of rsc-start-hmr.test.ts now runs the Vite twin's sequence:
a handler edit reaches the next call with no reload and the client output
never has the handler, then a component edit hot-updates the page keeping
its state. The call button shows the page text with the answer, so the
call after the component edit is told apart from the kept state (both rows
now check that the server fn still answers after the component edit).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W3-harness2 (with W3-ip-v2): Rsbuild dev diagnostics of every compile
(ctu `RsbuildDevServer.diagnostics`), the import-protection v2-* rows,
the V2-14 Rsbuild page row, and one file per Rsbuild delete/recreate edit
(user-authorized workaround of the Rspack/watchpack 2.5.2 lost-removal
bug, FOLLOWUPS "UPSTREAM (W3-harness2)").
The merge drops the temporary eslint ignore of the import-protection test
files (W3-speed-spc): their lint errors are fixed on this branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Traced (harness instrumentation, reverted): Rspack's MultiCompiler starts
the compile of a dependent environment (Start's `ssr` after `client`)
through its queue on the tick after its parent's compile ended
(`Watching.invalidate()` from `processQueueWorker`), which the harness's
`settle()` cannot see yet; the next write landed while that compile
paused the watcher, and a removal is then lost (2 of 20 solo runs after
the previous step). `settledAcrossTurn` (v2-hosts.ts): `settle()`, a
`setImmediate` turn, `settle()` again. Used by the v2-edits Rsbuild
sequence and the Rsbuild page row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 9 errors W3-speed-spc's temporary eslint ignore hides: unused
imports, import order and sorted members (eslint --fix), an unnecessary
`?.`, and the CommonJS `module` object of a VM context renamed to `cjs`
(import/no-commonjs). Lint fixes only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A compile the start or the previous step still has pending (a redundant
compile after an edit, the Start plugin's invalidations) pauses the
watcher while the first removal of the step lands, and the removal is
lost (3 of 20 solo runs of v2-edits). `settle()` first: the harness's
event-based wait for no running or pending compile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restores the two plugin-options "autoCodeSplitting: undefined splits
nothing and still generates the route tree (rspack, webpack)" cells: each
entry (Vite, Rspack, webpack) takes the user's options through its own code
before the default applies, and the harness turns splitting on by default,
so these cells are the only per-entry checks of the default. The other 13
removals stand (see merge-b-c.md "merge W3-speed-rp").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-19 (DECISIONS): the Rsbuild sequences delete and
recreate one file per `edit()`, settled before the next write, with a
comment citing FOLLOWUPS "UPSTREAM (W3-harness2)" (Rspack's vendored
watchpack 2.5.2 loses a removal landing while a compile runs; merge the
steps back once Rspack bundles watchpack >= 2.6): v2-edits.test.ts
(both targets, deleted then recreated separately again, as the rows
describe) and rsbuild/dev-server.test.ts "deleting a module with a
server fn" (the deletion before the entry's edit, each on its own).
V2-14's page half on Rsbuild: v2-edits-page-rsbuild.test.ts, the same
page app and steps as the Vite twin (shared from v2-hosts.ts) on
Start's whole Rsbuild plugin with @rsbuild/plugin-react, as the
hydrate-dev Rsbuild rows; checks the hot update (no page load), no
secret in the client's chunks or hot updates, the live use's safe
mock, and the last compile's reports. Rsbuild reports the violation
the edit adds to the page's component, which the Vite twin pins.
v2-edits Vite rows: the recreated state is loaded in both environments
before the step's edit, so the handling of the recreations ends by
the loads' completion and the logs since the mark are the step's edit
alone. The stale report the step-2 pin targets is logged inside the
edit's settle, from processPendingViolations through resolveId while
the Start compiler resolves the denied import in the SSR transform of
the edited file (traced with a temporary probe, reverted).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit put the generator's tmpDir in the app's root, which
races with the app's removal: Vite runs the plugins' configResolved hooks
concurrently (Promise.all in vite 8.3.4), so a build that fails while the
generator's hook still runs (code-splitter-pragmas' plugin-order rows)
returns before the generator's last write, and that write into the app
during dispose() failed the removal (ENOTEMPTY, once in a 1-worker run).
Those late writes were the two never-renamed files the default tmpDir
(.tanstack/tmp in the package) kept after every run.
A Vitest global setup now creates one directory per run under the
package's ignored .tanstack (same filesystem as the apps: the generator
renames its temporary files into them; os.tmpdir() is another filesystem
here and breaks every generator write) and removes it when the run ends.
The harness builds get it through inject().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The files of one edit are written one by one and Rsbuild
(`aggregateTimeout: 0`) may compile in between; that compile reports
the transient state (targets back, live uses not removed yet) under
`log: 'always'`, which `diagnostics.slice(since)` then showed as a
stale report of step 2 (1 of 6 full-tier runs, 1 of 10 solo runs). The
last compile reports every violation of the step's state.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W3 speed pass for start-plugin-core and react-start-rsc: spc tests linted,
Hydrate rejection checks on the shared diagnostic helpers
(compileErrorMessage deleted), hydrate-dev split per bundler,
known-bugs-start-compiler dev block split out with a shared client-access
build, class build pin on Vite only, rsc V2-13 Rsbuild component edit with
@rsbuild/plugin-react.
Counts: spc unit 1101/191 (1292), spc integration 754/190 (944), rsc unit
49, rsc integration 87/10 (97); integration tiers twice, identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared non-ASCII / .jsx app reads generation, placement of live code
and rendering, none of which webpack's minifier decides (as in
build-frameworks and plugin-options): its webpack build skips terser
(2.25 s -> 0.64 s). The cached-rebuild rows stay minified.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Vite harness's settle-round limit (10) is the `settleRounds`
option. The control test of a plugin that rewrites a file on every
event uses 3 rounds: the loop shows after the first, and 10 rounds cost
~1.4 s of the fast tier's 2.8 s file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing in src or tests imports it. Lockfile regenerated with
`pnpm install --no-frozen-lockfile`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rsbuild dev reads of import-protection reports and compiler
warnings go through the harness's `diagnostics` (every compile since
start) with `findDiagnostics` by severity, instead of the last
compile's `warnings`/`errors`: rsbuild/import-protection.test.ts (the
Start server read right after start, the behavior rows, the reports
across rebuilds, which now compare the set of reports since a mark),
reported-location.test.ts, known-bugs.test.ts, and the
start-build-warnings.test.ts Rsbuild dev pin (re-verified red for its
stated bug: no warning in any compile). The violation-report adapter
accepts anything `diagnosticsOf` reads (`ReportOutput`).
The W3-ip-v2 Rsbuild rows are back on the default `log` (`'once'`);
`rsbuildDevLog` (`'always'` as a harness workaround) is gone. v2-edits
keeps `log: 'always'` explicitly (its rows test stale reports), reads
the reports since its mark, loses the `DEBUGLOGS` print, and names the
upstream cause of its Rsbuild delete flake (FOLLOWUPS: Rspack loses a
file removal that lands while a compile runs; watchpack 2.6.0 fixes it,
Rspack vendors 2.5.2).
router-plugin's route-hmr-page.ts no longer accumulates the Rsbuild
warnings itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`RsbuildDevServer.diagnostics` holds the errors and warnings of every
compile of every environment since the server started, as A9
diagnostics, read at each environment compiler's `done` (where the
compilation is still accessible; `onDevCompileDone` cannot read a
compilation Rspack has dropped). A dev server compiles again on its own
(a file a plugin wrote, a file found outdated when the watcher attaches
after a compile), and Start's import protection reports a violation
once by default, so the last compile's `warnings`/`errors` could lose a
report. Tests mark a point with `server.diagnostics.length` and read
`slice(since)`, as with the Vite harness's `logs`. `errors`/`warnings`
stay the last compile's.
Control test: a plugin reporting in the first compile only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the approved `@rsbuild/plugin-react` devDependency (DECISIONS
2026-10-19; lockfile regenerated with `pnpm install --no-frozen-lockfile`:
one importer entry, same @rsbuild/core 2.2.5 variant as the other
packages, no new vite copy).
rsc-start-hmr.test.ts gets the Rsbuild half next to the Vite one: on
Start's Rsbuild RSC dev server with `pluginReact()`, a real page counts to
2, the route module (which also declares the server fn its loader and page
call) gets a component edit; the page shows the edit with the count kept,
the server fn still answers, no full reload (`loads() === 1`), no error.
The handler half on Rsbuild stays in rsc-start-rsbuild.test.ts. Note: the
row also passes without `pluginReact()` (TanStack's route HMR keeps the
state); the plugin stays because a React app on Rsbuild has it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured first (spc test:integration, idle box): hydrate-dev 11.4 s and
known-bugs-start-compiler 11.4 s at 1 worker, the two slowest files
(13.4-17 s at 4 workers under load, against the 15 s per-file limit).
- hydrate-dev.test.ts split per bundler: the Vite rows stay (React edit,
split route composition, Solid edit), the Rsbuild rows move to
hydrate-dev-rsbuild.test.ts, the shared apps and edit scenario to
hydrate-dev-edits.ts. Every row edits its app, so no server is shared.
No assertion changed.
- known-bugs-start-compiler: the Vite dev server block moves to
known-bugs-start-compiler-dev.test.ts (unchanged, plus two lint fixes:
the settled flag is read through a function, `isRunnableDevEnvironment`
alone guards the SSR environment).
- The control "SSR: a server fn the client references is callable over
HTTP ..." and the D6 pin "... only server code references is not
callable over HTTP" read one build and run per bundler
(`callClientAccess`, memoised): one build less per bundler.
- The build pin "client: the server-only module of a class only server
code uses is not bundled" runs on Vite only. The compiler decides it
(the import it leaves in the client module loads the server-only module
in any bundler); the in-process pin "client: a class used by a server fn
handler does not load its server-only import"
(../known-bugs-start-compiler.test.ts) decides it, and the Vite cell
stays its build canary. Removed: the Rsbuild cell (1 xfail).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`compileErrorMessage` parsed Babel's printed code frame (` 12 | code`,
` | ^^^ message`) to drop the quoted source. Its users now go through the
shared diagnostic helpers, which ignore the frame in any layout:
- known-bugs-hydrate: the `arguments` / `await` rejection branches of two
pins use `expectCompileError` (names in the error's own words, position
free as before); `await` accepts `await` or `async`, as the regex did.
The harness control checks that each rejection fails on an unrelated
error whose frame quotes `arguments`, `Route` and `await`.
- hydrate-boundary-forms: `expectExtractionRejected` matches the pattern
and the documented fix in `withoutQuotedSource(...)`; the `this`/`super`
control uses `expectCompileError` (names the read, at the boundary line).
Also drops the unused `expectDiagnostic` import.
- hydrate-split-modules: the empty-boundary row reads errors through
`withoutQuotedSource` (also an import-order lint fix).
- regression-helpers.ts: `handler.serverFnMeta?.id` (lint).
`compileErrorMessage` and its self-test are deleted. Re-checked red without
`.fails`: arguments pin (renders `<p></p>`), await pin (chunk SyntaxError),
this/super pins (no documented fix in the message).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`test:eslint` now lints `./src ./tests`, as react-start-rsc and
compiler-test-utils do (the test files and harnesses were never linted).
Lint fixes only:
- build-harness.ts: `watching.close()` (unnecessary `?.`).
- known-bugs-start-compiler.test.ts: the CommonJS rows' local `module`
variable renamed `cjs` (import/no-commonjs read it as CommonJS).
- import order / sorted members: createIsomorphicFn, entry-planning,
rsbuild/post-build.
The import-protection test files (tests/**/importProtection/**,
tests/integration/rsbuild/import-protection.test.ts) are being reworked on
the W3-harness2 branch: eslint.config.js ignores them TEMPORARILY; the
coordinator removes that block once W3-harness2 merges (they report 9
errors today, listed in the W3-speed-spc report).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test:eslint now lints ./src ./tests (precedent: compiler-test-utils,
react-start-rsc, router-devtools-core). Per-package ignores for fixtures
outside the TypeScript project, as tsconfig.json excludes them: rp
tests/**/test-files/**; rg the generator's fixture apps
(tests/generator/**, their *.test-d.ts type tests still linted).
Lint fixes only, no assertion changes: unnecessary `!` on Vite's client
environment (dev-server.ts, route-hmr-page.ts) and `as string`
(route-id.ts), import order, a for-of over a growing list, an unused
helper (rp plugin-options.test.ts `read`, shadowed), `async` without
`await` (callbacks that must return a promise now return one; React's
async act() calls keep `async` with a disable comment), a type parameter
name, and type-only router constants in nested/tests.test-d.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The non-ASCII route file and the .jsx route file rows built the same
kind of app per bundler: one app per bundler now holds both route files
(distinct markers), built and run once per route; each test reads its own
route's placement and rendering.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- page-code "a component the route file writes a property of loads with
its chunk and renders the property": one cell (Vite, no sideEffects
hint) of eight. The route module reading the undeclared `Page` is the
transform's output for every bundler and hint (in process: "top-level
writes to the split component (property assignment) stay with the
binding they write"); where a fixed route's component lands is the
bundler's, decided by the controls in every bundler and hint.
- build-harness.test "router plugin with vite/rspack loads a split
component lazily and renders it (ssr/client)": the same harness call
and outcome as build-frameworks' "vite/rspack react ssr/client build the
split component loads lazily and renders". The minified webpack rows
stay (build-frameworks builds webpack unminified).
- plugin-options "autoCodeSplitting: undefined splits nothing … (rspack,
webpack)": the default is resolved by the shared config schema after
the entries, which pass an absent option on as they pass `false`
(decided by the Vite `undefined` cell and the `false` cells per entry).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each pin waits its full settle timeout (6 s) for the outcome of a correct
generator, so the file of both took 13 s at 1 worker. The physical()
mount pin moves to known-bugs-rsbuild-generator-physical.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
integration/known-bugs-route-hmr.test.ts took 13.1 s at 1 worker (over
the 12 s watch line). The pins of component shapes React Refresh does not
register (inline wrapped components, lowercase split components, their
memo/forwardRef controls) move to known-bugs-route-hmr-components.test.ts;
`inPlace` and `editRoute` to tests/route-hmr-edit.ts. Same tests, same
names; references to the moved pins updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build-production.test.ts took 15.4 s at 1 worker (per-file limit 15 s),
two thirds of it webpack. Its checks move to tests/production-bundle.ts;
build-production.test.ts keeps Vite, Rspack and Rsbuild, and
build-production-webpack.test.ts has webpack. Same tests, same names.
known-bugs-route-hmr-production.test.ts "a production client bundle has
no route HMR code when NODE_ENV is unset (rspack/webpack)" built the same
app as build-production's "rspack/webpack a production react client
bundle without code splitting has no dev-only code" pins (React,
autoCodeSplitting off, addHmr default, NODE_ENV unset), whose hot-API
check includes theirs: deleted, cited from the control they pinned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each rp test:integration run left two route trees in
packages/router-plugin/.tanstack/tmp: the generator writes its temporary
files under the working directory unless told otherwise, and a write
that is never renamed stays there. Traced to
integration/code-splitter-pragmas.test.ts ("a framework JSX plugin
registered before the router plugin", React and Solid rows), through
the build harness. Harness builds now give the generator a tmpDir in the
app's own root, which the harness removes with the app.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recreated alone after the compile that failed to resolve them, no compile
included them under load (full tier, 60 s timeout): Rspack's watcher of
missing files, outside import protection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W3-solid-rsbuild: @rsbuild/plugin-solid ^1.2.2 in all 7 manifests
(DECISIONS 2026-10-19, solid-refresh back to 0.6.3), Solid Rsbuild page
app in development mode, V2-20 Solid row on Start's Rsbuild dev server.
No conflicts; the lockfile is the branch's (frozen install passes).
spc unit 1102/191, spc integration 754/191 (753+1),
rp unit 450/180, rp integration 361/184.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W3-compose: cross-feature compositions (FIX-PLAN §G V2-01, V2-03, V2-06,
V2-10, V2-16, V2-27). No conflicts; build-harness.ts gains the `prefix`
option next to W3-start-v2's `symlinks` and W3-hydrate's `framework`.
spc unit 1102/191, spc integration 753/191 (719+34 / 180+11),
rp unit 450/180 (447+3 / 178+2), rp integration 361/184 (357+4).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Allowed -> denied -> allowed edits with targets deleted and recreated, both
directions, Vite and Rsbuild dev, plus a real page on Vite. Pins: Vite
log 'always' logs a removed server violation again on the fixing edit; the
page misses the violation an edit adds (incoming edges dropped).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins: Rsbuild dev gives exempt and allowed importers the mock (self-denial in
the loader); Vite dev Promise<false> twin of the sync pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
import type, inline type, export type, export type * and a mixed import, on
Vite and Rsbuild builds and dev servers; plus a mixed import whose value only
a server fn handler uses under verbatimModuleSyntax (catches V4 red-fable/12).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vite-tsconfig-paths before and after Start, Vite's resolve.tsconfigPaths and
Rsbuild's tsconfig paths: build failure report, dev safe mock, dev error
mode. Pins: with vite-tsconfig-paths the report names the nested
re-resolution's specifier (src/secret.server) instead of ~/secret.server.
vite-tsconfig-paths was already a devDependency of start-plugin-core
(one vite copy in its closure).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TS 5.6 and 5.9 reject the direct conversion of node:stream/web's
ReadableStream to the DOM one (TS2352); test:types passes on 5.6–7.0.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`startRsbuildStartDevServer` takes `framework` (Start's plugin gets it;
`solid` links the built @tanstack/solid-start and @tanstack/solid-router,
like the Vite dev harness). The Solid edit row runs on it with the
user-level Solid Rsbuild config (`solidAppConfig`: plugin-babel +
per-environment plugin-solid) and the same oracle as React/Vite: the
page hydrates, the loaded child shows each edit, the sibling opened
later shows the edited version, one page load, no errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With @rsbuild/plugin-solid ^1.2.2 (solid-refresh 0.6), a development-mode
Rsbuild build of a Solid app hydrates, so the production-only exception
goes: every page app is a development build. Same results as the
production baseline: 17 passed + 2 expected fail; both pins re-checked
red without `.fails` in development mode (namespace Start.Hydrate:
loadedByClick false; page-module context: "no-provider").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rsbuild/plugin-solid 1.1.1 injects solid-refresh 0.7 (granular `jsx`
HMR on by default) into the client only, so hydration keys diverge from
the server's and Solid apps throw "Hydration Mismatch" in `rsbuild dev`
and `rsbuild build --mode development`. 1.2.2 (rsbuild #7832) reverts to
solid-refresh ^0.6.3. Approved by the user (DECISIONS 2026-10-19).
Lockfile regenerated with `pnpm install --no-frozen-lockfile`;
solid-refresh 0.7.8 is gone, one solid-js, vite variants unchanged.
plugin-solid 1.2.2 brings its own @rsbuild/plugin-babel@1.2.1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- tests/code-splitter-imported-options.test.ts (fast tier): a local
options object (control: split, deleteNodes applied, nothing reported)
and an options object imported from another module: the route keeps
working through the real router; two .fails pins (new main bug: the
splitter resolves only local object literals, so the route is neither
split nor reported, and Start's client deleteNodes leave `server` in
place). Stubs are created per load: the real router updates the options
object a route is created with.
- tests/integration/split-mode-parity.test.ts: one app (default
groupings, a `codeSplitGroupings` route, a `splitBehavior` route, a
route with the options Start deletes) observed through the real
router's public lazy contract in a real page, in Vite dev, Vite build,
Rsbuild dev and Rsbuild build: each build matches the configuration and
each dev server matches its build. Dev servers start one at a time and
before the builds (a build sets NODE_ENV=production while it runs, and
a dev server configured meanwhile reads it).
tsc (TS 7, @tanstack/react-router declarations with a generated
routeTree.gen.ts): the fixtures type-check — `ssr: false`, `headers`,
the `codeSplitGroupings` route option, and `createFileRoute('/x')(options)`
with imported and local options. `server` is a Start-only option, so the
plain-router parity app uses `ssr` and `headers`. Exit 0.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
New `tests/integration/start-compose-app.ts`: Start's default page entries
(StartClient hydration, the server entry), a production host serving the
client output and handing other requests to the server entry's `fetch`
in-process (Node's own `import()` through ctu's native-import helper), a
page helper recording server fn and script requests, and a tsc helper.
New files:
- start-compose-server-fn-route.test.ts (V2-01): route file with a server
fn read by the loader and the split component; Vite + Rsbuild served
builds and a Vite dev page. The SSR init-count row is .fails (the
pinned provider double initialisation, known-bugs-start-compiler).
- start-compose-client-only.test.ts (V2-06): <ClientOnly> children
importing chart.client.tsx in a default-config build; passes.
- start-compose-server-only-routes.test.ts (V2-03): server-only
ancestor, server-only subtree, spread route; real client router
navigation, server handlers, generated types (tsc). Rsbuild pruning and
Vite spread rows cite the known-bugs-route-options pins.
- start-compose-project-path.test.ts (V2-27): project path with
`(2)+`, and a `src/routeTree-gen.ts` sibling; pins (new main bug: the
unescaped `new RegExp(<route tree path>)` filter).
- start-compose-imported-options.test.ts (V2-10, build half): pin (new
main bug: imported route options ship `server.handlers` silently).
`build-harness.ts`: `StartBuildOptions.prefix` (passed to createApp), for
the project-path app.
tsc (TS 7, real declarations of @tanstack/react-start and
@tanstack/react-router with a generated routeTree.gen.ts): every fixture
shape type-checks — `createFileRoute('/x')(options)` with options
imported from x.options.tsx (component, loader, server.handlers), the
spread route, server-only routes, the <ClientOnly> route, the posts route
with createServerFn and Route.useLoaderData(). Exit 0.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Start's Vite and Rsbuild builds: server code under sideEffects true/false/
array and PURE hints, dynamic imports in handlers and of server fn
modules, unresolvable platform imports with an external server build,
global createStart middleware, .jsx modules and routes, a builder reused
as middleware, libraries (start-client-core peer, explicitly bundled,
symlinked), build and dev source maps of server fn modules. One build per
bundler is shared where the rows allow. Fixtures type-checked (tsc 6.0.2)
against the built declarations: the V2-05 validator returns a
serializable input and the V2-09 handler casts the global middleware
context (as the e2e apps do); no other change.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Unresolvable server-only imports (cloudflare:workers, node:fs) compile
for the client and are read by the server outputs; a validator schema a
client form also uses keeps its behaviour while a validator-only schema
is not loaded; .jsx modules get the stub and render; a server fn builder
reused as middleware contributes its middleware; options by identifier
and spread keep the method. Every fixture type-checked against the built
@tanstack/react-start declarations (TypeScript 6.0.2): no errors.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A test app of the Start build harness can link a workspace package its
library depends on, or a package directory of the app, into node_modules
(StartBuildOptions.symlinks, merged over Start's runtime links).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Both red for the same reason without `.fails`: the `let` the loader assigns
moves to the shared module and the route module assigns the import
(code-splitter-scope: "Assignment to constant variable" at the loader;
ssr-builds row 1: Vite "[ASSIGN_TO_IMPORT] Cannot assign to import 'count'"
in routes/index.tsx). The real-build pin stays; the scope file cites it.
The in-process linker has live bindings, so the old "snapshots" reason was
stale.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The createServerOnlyFn(...).bind() pin it pointed to was deleted (E1 audit,
a945fe4563) in favour of this one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Route file names hold `()[]{}` (`(group).tsx`, `[id].tsx`, `{-$lang}.tsx`).
Tokens may now hold bracketed groups without separators, commas or colons
(position suffixes and bracket-quoted paths stay out); bracket-free tokens
are still read. New rows fail on the old reader (7), controls pass on both.
router-generator's `(group).tsx` test uses the oracle instead of matching
the path itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`test:unit` was two commands, so `-- --maxWorkers=N` only reached the
second. Vitest runs type tests in a group after the runtime groups, so one
run of both projects keeps the order: 336 passed + 24 expected fail, 24
files, before and after.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Temporary files of atomic saves go to a per-app `<root>.saving` directory
next to the app, removed by the app's dispose, instead of a shared
`.harness-tmp/` left next to the apps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rsbuild harness probed a free port, closed it, and Rsbuild bound it
after the first compile; Vite's `listen(0)` / `port: 0` (8.3.4) probes,
closes and binds too. Under load another process takes the port
(EADDRINUSE / "Port … is already in use").
- Rsbuild (page): Rsbuild's custom server API (`middlewareMode`,
`middlewares`, `connectWebSocket`, `afterListen`) on an HTTP server that
binds port 0; the HMR client connects to the page's port.
- Vite: `listen()` on Vite's default port with `strictPort` off: the real
server binds and moves to the next port while one is in use; `url` reads
the bound port. Same for start-plugin-core's bundled dev styles test and
the react-start-rsc preview server.
Under a port-churn load: route-hmr-browser 2/15 runs failed before, 0/30
after; real Rsbuild starts 40/1000 failed before, 0/1000 after; real Vite
listen(0) 19/5000 vs listen() 0/5000.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mdx-js/rollup always passes source-map's SourceMapGenerator (its options
type omits it: TS2353 under test:types); the rows are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Solid's hot update remounts the edited module's components one after the
other; one validation run read b's section while it was re-rendering.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V4 red-astra/19 (catch parameters no longer shadow the import in the usage
lookup) escaped the acceptance corpus once the internal lookup tests moved
out: the ported rows used a call for the real use, which the lookup
prefers over the shadow's read. The real use is now a read too; the four
catch-clause rows go red under the variant (reported at 3:49, the catch
body), green on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Solid page suite (hydrate-pages-solid.ts) runs per bundler:
hydrate-pages-solid.test.ts (Vite) and the new
hydrate-pages-solid-rsbuild.test.ts (Rsbuild with @rsbuild/plugin-babel
and per-environment @rsbuild/plugin-solid presets, solid condition).
The Solid Rsbuild app is a production build: a development-mode
Rsbuild build of a Solid app mismatches at the root even for a page
without <Hydrate>. Both pins (namespace, page-module context) verified
red on Rsbuild without .fails.
- V2-20 on Start's Rsbuild dev server for React with
@rsbuild/plugin-react (React Refresh). The Solid Rsbuild dev row is not
added: a plain Solid Start page (no <Hydrate>) served by Start's Rsbuild
dev server does not hydrate ('template is not a function'), also with
@tanstack/solid-start's own preset configuration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DECISIONS 2026-10-19 (coordinator): same ranges as router-plugin. Lockfile
+9 lines; frozen install passes; one vite copy, one solid-js@1.9.12.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC J6.10 (V1 F note for W3-ip): a client import of a dependency that
marks itself server-only and is not pre-bundled (optimizeDeps.exclude);
by default the client gets the real module unlogged, with excludeFiles: []
it is logged and mocked. Both are pinned: Vite dev checks the marker
anyway and then fails to load the dependency with an internal error
("The "code" property of ModuleInfo is not supported").
SPEC J6.11 (V1 F note for W3-ip): a module both environments load logs
each environment's violation whichever environment transforms it first
(passes).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IP-S19: the client-entry, server-entry and split-component rows no longer
load Start's generated virtual ids or parse `import("...")`: a real
browser page served by Start's dev middleware runs the app's client entry
(control: its denied import is a safe mock; pin: not logged) and renders a
split route (`ssr: false`) with the mock; the app's server entry runs for
an HTTP request (control + pin). New file dev-page.test.ts.
IP-S09: the tsconfig reload rows no longer require Vite's full-reload
message; the 'always' row is the control that the modules were
transformed again.
IP-S22: the MDX rows run @mdx-js/rollup with its SourceMapGenerator; a
reported location in the page must be the original import or use (main
names the page without a location, which SPEC §5 item 14 allows). The
denied-specifier pin asks for the same.
IP-S23: the `.page` rows are named as the custom module type they are; the
same pins through the real @mdx-js/loader on Rsbuild dev (control passes),
asking for the page located in its MDX source if at all.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IP-S07: a trace is any real import chain from the entry to the importer
(dev and build rows accept both chains of the fixture). IP-S08: a reported
location is the original import (any column of its line) or a genuine
surviving use, in any file spelling that names the file (mentionsFile);
the marker rows also accept the marked module (audit F ASK-1). Wrong
places (db.eq, type positions, removed boundaries, compiled coordinates)
still fail.
IP-S24/S14/S26: the Unicode/CRLF, catch-clause and scope-shadowing shapes
of the internal usage lookup, a wrapped createServerOnlyFn argument, a
dynamic import with attributes and a re-export are ported to real reports
on Vite/Rsbuild dev and build. New pins (Rsbuild): the wrapped boundary use
is reported (5:48), a dynamic import is reported off its line (dev 1:1,
build 1:33). The internal pin they replace and the any-offset/any-caret
rows are deleted; the remaining internal helper tests (usage lookup,
location index/cache/snippet, matcher arrays, utils, dedupe keys, import
sources) move to outside-compiler-corpus/importProtection as internal
controls. The original-usage table and the real source-map rows stay
(compiler-level, V1 ip R01).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DECISIONS 2026-10-18 (server-side *.client.* imports): the hydrated page
renders the children, the default-config build reports no
import-protection violation, and the server bundle has none of the
module's code. Control: the same module used outside ClientOnly fails the
build with 'Import denied in server environment'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New integration/hydrate-dev.test.ts on Start's Vite dev server with SSR
and StartClient hydration in Chromium:
- V2-20: a loaded child hot-updates in place (children JSX, then a
capture) without reload, effects not duplicated, and a sibling whose
code had not loaded shows the edited version once opened; React
(React Refresh) and Solid (vite-plugin-solid). This is also the real
Solid <Hydrate> dev row (DECISIONS 2026-10-19) replacing the stand-in
deleted in wave 2.
- Splitter composition: a split route component's boundaries hydrate
the server HTML; the deferred child's code loads on its interaction.
- dev-server.ts: minimal framework option (Solid core options, linked
solid-start/solid-router, noExternal).
- hydrate-build: HYD-07 file + line of the rejection in real Vite and
Rsbuild builds (function child, hook call).
Rsbuild dev edit rows are not added: a React Start app on Rsbuild needs
@rsbuild/plugin-react for React Refresh, not a start-plugin-core devDep.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rspack prints a loader's error inside a miette box whose lines start with
a vertical bar, so the Babel frame the Start compiler throws (which marks
the boundary's line with >) was not recognised as a position. Control row
added; it is red without the change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IP-S06: the rows denying the rewritten specifier `ui-lib/button` are
deleted (SPEC J6.1: a specifier rule matches what the user wrote); the
`ui-lib` pin stays and now also asks for the importer at the import or the
use. New: the file rule and a server-only marker apply to the module the
rewritten import resolves to (pass), and the location of a file-rule
violation on a rewritten import is pinned (reported at 2:25, neither the
import nor the use; the cause of the deleted 2:16 pin).
IP-S21: a module that fails to compile fails the build naming the broken
file and line through the diagnostic oracle, other diagnostics allowed; a
missing module ends the Rsbuild dev compile with errors that name it (file
or specifier), not one exact transcript.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IP-S11/S12: the license rows are deleted (OQ12, 2026-10-18: comment
placement is free for the import-protection rewrite). The JSX pragma pin
needed a JSX plugin that runs after the rewrite; on real apps Vite (Oxc)
and Rsbuild (SWC) compile JSX first, so the app twins pass: a pragma
leading a denied file, a denied specifier (rewritten in the importer) and
a pragma after a directive (the Yuku regression the control guarded), on
Vite dev and Vite/Rsbuild mock-mode builds. No reachable failing order was
found with the available plugins, so the internal pin is removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trace.test.ts calls exported internals (ImportGraph, buildTrace,
formatViolation): it moves to outside-compiler-corpus/ as an internal
control (SPEC §8, V1 ip S14/S24). Its prose checks (specifier pattern,
file pattern, Suggestions:, the suggestion sentences, the JSX example)
become the rule named through the diagnostic oracle and the direction of
the suggestions; the weak maxDepth/cycle rows are deleted (covered by
build-options maxTraceDepth and reported-location's cycle row), as is the
absolute-vs-relative specifier spelling row (SPEC §5.7 frees it). Dev
reports suggest a server-side fix for a client violation and a client-side
fix for a server one; suggestedDirections has its own adapter rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- HYD-07: unsafe children (function child, hook call) must be rejected by
the client compilation itself, naming the pattern and a documented fix
at a line of the boundary (shared A9 diagnostics); dynamic split={flag}
rows; literal split={false} controls for function/hook/this/super.
New pin: the this/super rejection names no fix (docs: wrap in a
function component or split={false}); React.useId pin now asks for the
rejection (SPEC J5.5). Both verified red without .fails for that reason.
- HYD-09: split="false" row deleted (tsc: TS2322 'string' is not
assignable to 'boolean | undefined'); split={false} rows cover the
supported opt-out.
- HYD-10: shared-object fallback goal deleted (SPEC J5.3 / docs allow
keeping it); the render row stays.
- HYD-11: module-level fallback rows keep validity and child output, no
whole-module marker check.
- HYD-13: children={null}/{null} control (tsc: accepted); the childless
row (tsc: rejected, children required) is labelled a JS mistake.
- HYD-20: directive membership in the prologue, order free.
- HYD-21: source maps checked on parsed string tokens of parent and
child throws through the shared consumer; hand needles removed.
- HYD-22: generated-name fixtures always include fixed names; no
nonempty requirement.
- §D: namespace negatives (another package's namespace, a shadowing
local) are left alone; the in-process namespace goal and the B row
moved to real hydration (integration/hydrate-pages-*).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- hydrate-pages.ts builds React apps with Vite or Rsbuild and Solid apps
with Vite + vite-plugin-solid (Solid's hydrate after its hydration
script); build-harness gets a minimal framework option (core options +
linked @tanstack/solid-start and solid-router).
- The React page suite (hydrate-pages-react.ts) runs per bundler:
hydrate-pages.test.ts (Vite) and hydrate-pages-rsbuild.test.ts.
- New hydrate-pages-solid.test.ts: identity rows, prefetch, fallback of a
boundary appearing after hydration, namespace and destructured Hydrate.
- V2-19: split children follow parent updates, context, callbacks and a
keyed reorder like the split={false} reference (React Vite/Rsbuild,
Solid).
- §D namespace goal moves to real hydration (.fails, React per bundler
and Solid): its children's code must load when it hydrates. Verified
red without .fails: nothing loads on the click.
- New Solid pin: a context declared in the page module is re-created in
the chunk (Solid twin of the known-bugs-hydrate context pin).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Approved in DECISIONS 2026-10-19 (start-plugin-core Solid devDeps). The
integration tier also builds @tanstack/solid-start (task-level dependsOn,
no package dependency, so no Nx cycle). One vite copy: spc and ctu resolve
the same vite@8.3.4 variant; one solid-js@1.9.12 for spc, solid-router and
solid-start.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runtime diagnostic of a used mock (mockAccess) is now identified by
severity and the denied import (as written or its resolved file) through
@tanstack/compiler-test-utils/diagnostics, never by its sentences
(Mocked import used in dev client, Denied import:, Access:). Build reports
name the rule and suggest a fix in the right direction (an API that keeps
code on the server or on the client), whatever the wording; the
both-markers error names the file and both markers.
Mock mode always logs (user ruling 2026-10-19): server rows for mock-mode
builds (report + access pins, Vite and Rsbuild) and Rsbuild dev SSR
mockAccess rows (pass on main). The spc Rsbuild harness gains a start
option for Start's whole plugin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- S47: router.codeSplittingOptions placement and grouping observed at run
time (modules recording when they load; the loader call loading the
component's code), not by chunk file names.
- S48: the bundled-dev client label may be in any number of chunks.
- S35: delete the negative dev generateFunctionId row (dev ids are free,
SPEC J4.4); production customisation and dev agreement stay covered.
- New integration/start-build-user-code.test.ts: S28 __NO_SIDE_EFFECTS__
through real builds (with a no-Start control module); V2-23 decorated
classes and an assert import attribute build and run on Vite and Rsbuild,
plus a pin: the decorated class only a handler uses stays in the client
(class DCE root cause); S18 case 2: an ssr: false route with browser-only
code in its component and a server fn renders and answers by id.
- V2-23 fast rows: assert import attribute in every output; decorated
classes compile to valid modules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
route-hmr.test.ts's 'serving a route prints nothing to the console' moves to
outside-compiler-corpus/route-hmr-debug-output.test.ts (React and Solid
rows). Instead of forbidding any log, the tests compare what serving the
same route prints (captureConsole) with and without TSR_VITE_DEBUG: with
default options nothing of what TSR_VITE_DEBUG=router-plugin adds is
printed, and TSR_VITE_DEBUG=start-plugin-core prints what the default does.
Mutation (debug on by default, reverted): the three tests fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dev controls no longer look for route HMR spellings in served code
(they passed on any bundler HMR). They open the route file on a real page:
Vite dev with Start's whole Vite plugin and @vitejs/plugin-react, and
Rsbuild dev with Start's Rsbuild plugin and HMR; an edit of the loader shows
the new data without a reload, which needs route HMR (otherwise no module
accepts the edit). The Vite row also checks that the server environment's
route module uses no HMR API (J3.7).
The production rows drop the private names (tsr-route-id,
tsr-split-component, $RefreshReg$, TSRFastRefreshAnchor, ...) and check
the bundlers' HMR APIs in every client and server chunk (partial checks:
how route HMR is written is free). Start offers no option to turn route HMR
off, so no paired HMR-off build is possible through its public options.
Mutation checks (src, reverted): Start's client addHmr false fails both dev
controls; the server environment's addHmr true fails the Vite row with
__vite_ssr_import_meta__.hot in the served server route module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The in-process checks of which names React Refresh's transform registers
and which hook signatures it computes are replaced by edits on a real page
(Vite + @vitejs/plugin-react, real browser): the edit shows its new code in
place, without a reload or errors, and the edited component is not mounted
anew (countMounts: a state initializer).
- integration/route-hmr-browser-names.test.ts: lowercase function
components of component/errorComponent/pendingComponent with the default
and per-option groupings (each shown by its own route state); lowercase
function, overloaded, exported, default-exported declarations (split and
unsplit); unsplit const arrow, self-naming function expression, export
list; a reassigned declaration in a .jsx route.
- integration/route-hmr-browser-options.test.ts: inline anonymous function
and parenthesized arrow (split and unsplit); root route components inline,
as lowercase functions and with context type arguments (shell, root,
not-found shown together, root keeps its state); component options added
before a stateful inline component (the app router has default pending
and error components, so the route's boundaries do not change: adding a
boundary makes React mount the component anew, which is the router's
rendering, not the compiler's); a body edit of a custom hook keeps the
component, a change of its hooks shows without errors.
- known-bugs-route-hmr (integration): page pins for split lowercase
variables (red: applied without showing page v2), the lowercase function
that is also the unsplit pendingComponent (red: Export 'SplitComponent'
is not defined) and a split component exported by an export list (red:
Export 'page' is not defined, checked by importing the module in the
page).
- known-bugs-route-hmr (unit): the registration describe is deleted; the
pendingComponent and export-list pins keep their validity and render
checks, the export-list pin reads the export through a real importer
(importFromRoute) instead of the namespace.
- react-refresh-route-components: registration and signature tests
deleted; exported lowercase components are read through a real importer
module in the dev server (importFromRouteModule); the inner-binding and
imported-component rows keep their results.
- regression-helpers: expectRegisteredRouteOption and reactRefresh and
their controls deleted (no consumer left).
- route-hmr-page: countMounts/mountsOf, routerOptions for the app's router.
Mutation checks (product src, reverted): skipping the lowercase rename and
the split-chunk rename fails all 14 names rows; not hoisting inline
components fails 9 options rows; order-dependent hoisted names fail the
option-insertion row (unsplit).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HMR-27: the out-of-order edit tests no longer start a second dev server at
another root and compare export and import inventories with it. After the
edit, the route file's modules are requested in the tested order (Vite
keeps each result until the next edit), then the served route module is
loaded as a page loads it (evaluateServed, client environment: what the
server last compiled for each module, split chunks imported by the real
router's lazy components) and its split components are rendered. CardB
now counts its renders in module state, so the 'adding' pin observes two
module states (B1, B1 instead of B1, B2). Verified red without .fails:
removing -> SyntaxError: Export 'CardB' is not defined in module; adding ->
second render B1. Controls (route module first) and the exported-helper
row pass.
HMR-29: the tsr.config.json tests import the generated route tree into
the real router (SSR environment) and assert what /about matches instead
of searching the tree text for fullPath: '/about'. Pin red without .fails:
expected '/' to be '/about'.
HMR-18: expectExportedRouteOptions and expectSharedOverloads read the
route module's exports through a real second module of the app
(importerSource, imported in the SSR environment) instead of the route
module's namespace; the lazy-option preload probe is gone (renders
compared), the pinned cases render markers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- S01/A11: compiler and build ids are compared at the same root (repeated
and reordered: build-harness StartBuild.rebuild builds the same app dir
again); relocated roots are checked for correctness only.
- S02: a custom generateFunctionId's returned id is what clients and the
provider use; the filename spelling is free.
- S03: colliding custom ids must de-duplicate (same-id, same-id_1) and stay
paired in both discovery orders (passes on Vite and Rsbuild).
- S23/S31: the resolver is evaluated (id -> handler, client/server access,
unknown id), deterministic over discovery orders; no prose, no source text.
- S30: pragma rows assert the runtime Oxc selects, not comment text.
- S32: the error-envelope control resolves the handler by the reported id.
- S26 helper control: map checked through trace-mapping; null convention
labelled internal.
- G.3 :1783: #7213 rows for a middleware .server() caller (passes on both
bundlers) and HTTP calls by id, each with the app files written in both
orders; the server-fn caller stays a Vite pin (red: 'Server function info
not found').
- Library-wrapper pin: a build error must name createServerFn at the
library or the user's call (expectSourceError), no prose regex.
- startRuntimeLinks: the dead 'app brings its own react-start' branch is
gone (call sites in dev-server.ts and rsbuild-dev-server.ts updated).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- S06: client/SSR outputs are checked by what evaluating them loads
(moduleLoads + expectNotLoaded), never by exact import lists; type-only
syntax is no load.
- S08: callerRpcId reads serverFnMeta.id whatever other fields it carries.
- S05/S07/sol-10 (H.2): compile errors through the shared diagnostics oracle
(expectCompileError: API named in the diagnostic's own words, position);
misplacedServerFnRejection and the returned-builder regex are gone.
- S13/S14/S15/S16/S17: declaration-site goals split (nested no-capture =
support goals; other positions = works or rejected at the call);
rejection branches removed from required-support wrappers; capture pin
accepts a clear capture diagnostic or correct per-instance calls.
- New pin: next to another Start factory, a misplaced createServerFn is
rejected without a position (handleCreateServerFn.ts:232, SPEC G5).
- S18 (cases with unconditional window reads), S19, S20, S21 (compile-level
directive pin; real pin in react-start-rsc rsc-start-dev), S26, S29, S33,
S46 deletions; S38 real middleware row; S41/S42 moved to
outside-compiler-corpus/compiler-seams.test.ts as internal controls.
- S04: unchanged-input repeatability and per-version agreement.
- S22: tsc against the real declarations (packages/react-start, tsc 7):
.validator() TS2554, env fns without impl TS2554, destructured server fn
TS2339 -> labelled malformed-input controls; .handler() type-checks ->
G5 diagnostics tests (S23/S24 line endings, position and column).
- H.5: jsxToText deleted; evaluated modules link the real React/router.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HMR-24: the index-route tests no longer read routesByPath or compare it with
buildRouteTree(). They navigate to the paths and route templates
(/livestock/$farmId/medicine, its pathless 'new' child, /path) before and
after the update and assert the deepest match and the routes the router
resolves the destination to (the index route's search middleware runs).
Verified: re-adding main's old bug (routesByPath[oldRoute.fullPath] =
oldRoute after the rebuild, #7422) fails both tests; dropping the
generated id/path preservation fails 11 tests.
HMR-25: every test uses the client router with a real memory history and
the right initial URL; the server router with a hand-written inert history
is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page's edit() waits for the server with the dev-server harnesses'
event-based settle() (Vite: watcher report, handling of each event, plugin
writes; Rsbuild: compiles read the edit, nothing pending) instead of its
own hotUpdate-hook counter, and replaces the 100 ms quiet time with events:
the server received every invalidation the page's HMR client sent (Vite's
vite:invalidate, counted on both sides), the client applied every update
the server sent, and a full reload loaded.
warnings() returns diagnostics: the server process's console is captured
with the shared captureConsole while the page opens, edits or clicks
(filtered by the app root, as concurrent pages share the process), the dev
server's logger and the page's console warnings through diagnosticsOf.
Consumers match the file with findDiagnostics. captureConsole now allows
overlapping captures (concurrent tests), with a control.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
startRscPreviewServer (rsc-app.ts): `createBuilder().buildApp()` of the
client/ssr/rsc environments in a ctu `createApp` directory (built
@tanstack/react-start linked), then `vite preview` (Start's preview
server runs the built server entry), NODE_ENV=production while it serves.
rsc-start-build.test.ts (2.4 s): V2-12 (c) at the build level (SSR's own
code runs `default`, the provider `react-server` once for the SSR and the
browser call, the browser `browser`; no file of dist/client has a server
entry, and the check sees the browser entry), and the three RSC helpers
style their server components in production.
Finding (upstream, not pinned): like dev (W2-j finding 2), the `rsc`
production build leaves a node_modules dependency external, so Node
imports it at run time without the `react-server` condition (the provider
ran `default`); the app bundles it with environments.rsc.resolve.noExternal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- rsc-start-dev.test.ts: the provider test now covers V2-12 (c): with a
package exporting react-server/browser/default entries, the loader's own
code runs `default` during SSR, the provider runs `react-server` for the
SSR-forwarded and the browser call and initialises the package once
(`MARK_REACT_SERVER:1` after both), the browser runs `browser`, and no
script the browser loaded has another environment's entry (the check
covers the package's pre-bundled browser entry).
- The 'use client' pin (S21) waits for the answer or a settled network
instead of a 5 s timeout; re-checked red without .fails ("widget " - no
data). D6 pin unchanged, still red ({ result: 'MARK_INTERNAL' }).
- rsc-start-hmr.test.ts: the J3.6 / V2-13 Vite edit test moved out of
rsc-start-dev.test.ts (per-file time), unchanged.
- rsc-start-rsbuild.test.ts (new): the same V2-12 (c) outcomes on Start's
Rsbuild RSC layer, and V2-13's handler half on Rsbuild (the loader and
the next call run the edited handler, no full reload, the client hot
update has no handler). The component-edit half needs React Refresh
(`@rsbuild/plugin-react`), which react-start-rsc cannot resolve.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIX-PLAN S20 / D "namespace RSC helpers": SPEC J7.2 (V0.3) makes project
re-exports of the RSC helpers not a recognised form; the goal pin required
a configured transform to reach calls imported through a project
re-export. The behaviour that remains required (the call still works) is
covered through the real transport by react-start-rsc
tests/integration/rsc-css.test.ts "renderServerComponent through a
project re-export still renders". Minimal edit in W3-start's file (the
describe held only this pin).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rsc-css.test.ts (40 tests, 42 s at 1 worker: one page per row, every page
loading all 40 route modules) becomes three files on a shared harness
(rsc-css-app.ts):
- rsc-css-matrix.test.ts: helper x import form x module name (18 rows +
per-row client control), 3.7 s at 1 worker.
- rsc-css.test.ts: argument shapes, helper module, undocumented inputs,
look-alikes, unrecognised forms, pins (22 rows + controls), 3.9 s.
- rsc-css-hmr.test.ts: J7.5 CSS edits (unchanged), ~3 s.
Each file serves one page whose loader calls every row's server fn; each
row is its own module with its own CSS module (content differs per row:
Vite's scoped class names hash the stylesheet content, so identical
stylesheets shared class names and styled each other's rows), its own
error boundary, Suspense boundary and settled loader result. Flight rows
fetch once per row (a remount re-ran the effect and exhausted Chromium's
request resources).
Negative style checks no longer wait out a 3 s timeout: settledValue
(rsc-app.ts) returns the expected value as soon as it shows, or the value
once the page has had no request in flight for 500 ms.
New rows (SPEC J7.2, G15; FIX-PLAN D "namespace RSC helpers"): a local
shadowing the namespace import gets exactly its arguments; a project
wrapper and a variable alias of renderServerComponent still render (CSS
not required). The 7 pins were re-checked without .fails: ternary/&& and
chained unstyled (rgba(0, 0, 0, 0)), no warning diagnostic, comments
rendered as text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vitest's workers do not run process 'exit' listeners, so the temporary
projects stayed in the OS temp directory. They are removed in an afterAll
hook registered when the test file imports the host.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The settle() flake of the merged tier ("the file watcher did not report
src/base.css / src/a.ts") is a write the watcher saw half done. fs.writeFile
truncates and then writes. Vite's chokidar can stat the file in between,
report it empty, and drop the final write's event. A probe on Vite 8.3.4
shows this deterministically: chokidar reported size 0, while 19 bytes were
on disk, and nothing followed.
Both harnesses now save as editors that save atomically do (save-file.ts).
The contents go to a temporary file in `.harness-tmp/` next to the app
root, on the same filesystem but outside the app, then a rename replaces
the target in one step. Nothing in that directory is watched by Vite (root
only) or by Rspack, nothing in it is resolved or imported, and no route
generator scans it. Probes showed the effects. Vite reports a rename-over
as one `change` (and a new file as `add`) with the whole contents. Rspack
reports it in `modifiedFiles`. Rolldown's dev engine reports it as a
creation, so the bundledDev contract test now asserts the reported file,
not the event kind. A first try put the temporary directory under the
app's node_modules. Rspack watches that directory for resolution, so each
save started an extra compile that raced the real one, and the location
was rejected.
The Vite harness also fixes a race in what settle() returns. Vite can handle
a write's event (e.g. the synchronous full reload of a tsconfig.json change)
before settle() is called. The returned HMR payloads now count from the
first write since the last settle(), not from the call. This showed up as
"'once' does not log a violation again when the dev server reloads every
module" with an empty reload list.
No retries, waits or chokidar logic are added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vite dev: the served route module and every module derived from it (found
by following its imports) carry an inline map resolving each throw to the
route file's line; Rsbuild dev is pinned (unplugin drops the plugin's map).
webpack, Rspack and Rsbuild persistent caches: cold, cached and
unrelated-edit rebuilds of one app keep one instance of the shared state.
Harness hooks: `configure` (webpack/Rspack options) in compiler-test-utils,
`root`/`rsbuildConfig` in buildWithRsbuild.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
build-production: the public dev APIs are always scanned and React bundles
are compared, identifier by identifier, with a control build with route HMR
off (no private names, no dev-server marker collection, no workspace-path
ban). The console transcript test moves to outside-compiler-corpus.
build-source-maps: columns for unminified rows, a composed-maps row with
Babel before the router plugin, no `names` requirement. Production
warnings: the page's console is the outcome; the build warns only when a
permitted fallback stays eager. `this` in a split loader runs through the
real router and must match the unsplit result. esbuild: a refusal is a
build error naming esbuild and the option.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diagnostics go through the compiler-test-utils oracle: file, option name,
position, count; never prose. J2.8 now requires the option name (binding
allowed in addition): main names the export only, pinned in imports-exports,
known-bugs (errorComponent) and a real dev-server row (once per file, in
the terminal). J2.10/J2.11 keep file-only.
Plugin order: only the supported order in process; the other order is a
real-build row. The syntax-error row accepts structured fields or a frame.
Deleted (one route per file): the code-route rows of imports-exports,
known-bugs groupings and plugin-pipeline. F29: `tsc` against the real route
types rejects `[['loader'], ['component']]` (TS2322, string[][]); the
annotated form passes. F11: the unsplit control is an empty grouping, not a
root component. F17: no position of movable initialisers in effect logs.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The untouched file and the split route render through the project's real
JSX transform and real Emotion, in process (Vite's Oxc, leading pragmas
only) and in real builds (Rspack's SWC reads a pragma above any top-level
statement; Vite does not); the computed colour of the styled element is the
outcome in the browser. No runtime-import or `jsx(` spelling, no comment
position. D-04 is pinned: a non-leading pragma becomes effective in the
split component's module on Vite 8.
License comments above moved or deleted code stay in the route module
(R-14; main passes). Refresh pragmas run in a real Solid page; React's
`/* @refresh reset */` has no observable effect under Vite 8's
`@vitejs/plugin-react`, split or not, so there is no React row.
`loadRoute` takes the project's JSX settings (`jsx`) and
`expectValidModules` passes them to the validator, for classic-runtime
projects.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Closes the astra/24 hole (a free-reference walk that skips object keys): the
split component reads a module-level `let` only through `{ [kind]: true }`
and must see the loader's reassignment, rendered through the real router.
With the astra/24 patch applied the test fails on the module validator.
Pins a bug found on the way: a `let` that only the loader assigns moves to
the shared module, so the route module assigns an import ("Assignment to
constant variable").
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- tests/tsconfig.json (extends the package tsconfig, adds src/*.d.ts):
every test:types:tsXX script also runs `tsc -p tests`; test:eslint
lints ./src ./tests (the typed parser finds tests/tsconfig.json).
- The type tests (*.test-d.tsx) leave the unit runtime run: they assert
nothing at runtime; test:types checks them.
- HYD-33: createServerComponent.test-d.tsx and
renderServerComponent.types.test-d.tsx rewritten on the public entry
(src/index): types inferred from real createCompositeComponent /
renderServerComponent calls as in guide/server-components.md (slots,
render prop args, component props, nested composites, renderables).
Before: renderServerComponent.types.test-d.tsx imported two types that
no longer exist (TS2724) and createServerComponent.test-d.tsx:86 failed
(TS2344) - never noticed because nothing type-checked them; the other
rows compared `null as unknown as JSX.Element` with JSX.Element.
Verified: tsc 5.6-5.9, 6.0 and 7.0 pass; a wrong inference
(`title` as number, ReactNode as number) and three neutralised
@ts-expect-error inputs each make `tsc -p tests` fail.
- HYD-32: the two createRscProxy tests that probed React with a hand-made
Proxy (and pinned the list of props React reads) replaced with real
createRscProxy rendering (inline, nested selection, composite).
- Lint fixes in the runtime tests (imports, for(;;), nullable casts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fixture-types.test.ts took 18.8 s under load (limit 15 s per file): the
checks move to a helper (integration/fixture-types.ts) and run in
fixture-types-physical.test.ts (with the two group-layout pins) and
fixture-types-virtual.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Vitest projects, '--typecheck.only' on the command line did not reach
the unit project, so test:unit ran the runtime tests twice. The fast tier
is now two projects: unit (runtime) and types (the route tree type tests
the unit run generated), run one after the other by test:unit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found by re-applying V4 green-sol/01 (ids printed with double quotes):
generator-dev 'a route file broken by an edit ...' and concurrent-write
'is processed before run() resolves' compared a repaired file's exact
bytes, pinning the quote of the edited id (free, SPEC J1.2). Both now use
expectOnlyOwnedEdits plus the parsed id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The look-alike createFileRoute now comes from an installed package
(node_modules/other-router of the app) instead of a local module, as G15's
'same name exported by an unrelated package' reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- code-splitter-dead-code (integration): one production client app per
bundler holds the unused-functions route and the #__NO_SIDE_EFFECTS__
routes (annotated and plain control), built once, one run per route:
6 builds -> 3. Which code is dropped stays decided per bundler.
- known-bugs client-builds: the exported errorComponent 'as any' pin keeps
its Vite cell; the Rspack and webpack cells are decided by the same router
transform (lazy or reported).
- known-bugs client-output: the ssr property control and the ssr() method
canary keep their Vite cells (the transform decides whether a server-only
option stays referenced); Rspack and webpack cells dropped.
Builds for these tests: 12 at the base, 9 now while covering 6 new rows
(F38 x3, F35 x3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps the fast tier at its baseline time with the GEN-02 real-router checks:
- integration/route-types.test.ts: the J1.13 type checks of the
real-router apps (cases now in real-router-cases.ts), the group layout
types pin, and the FileRoutesByTo/ByFullPath tests of route-paths.test.ts
(moved unchanged). The unit tests check the same apps' runtime.
- route-tree.ts: the generator fixtures (all rooted at this package) share
one Vite server per frameworks set, forgetting the app's modules before
each load (as the Solid server already did): generator.test.ts 1.75-1.95 s
-> 1.19-1.46 s at 1 worker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oneChunk compared the file names of the first lazy chunks holding the loader
and component markers (chunk shape, free per SPEC 5.3). The loader and the
component now each read a module that records when it loads (ctu
importers loadMarker); in each real build (client in Chromium, SSR in Node)
the script checks whether the loader's code is not loaded with the route but
loads once the router preloads the component, i.e. one group. Placement
(where) and the router render checks stay. Minimal edit in W3-start's file
(FIX-PLAN H.5 hands S47 to W3-split-*).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The in-process Solid route of code-splitter-plugin-pipeline is checked at
compile level only (the Solid router cannot run in Node). A Vite client build
in Chromium now covers its runtime outcome: with codeSplitGroupings
[['loader'], ['component']] the loader gives its data without loading the
component's code, and the component renders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New integration test: Vite dev with experimental.bundledDev (Rolldown's dev
engine bundles the client from index.html), the real router plugin and
@vitejs/plugin-react, a headless Chromium page with Vite's HMR client. The
home page renders; the split /about component's chunk is not among the
page's loaded scripts until the router navigates there; an edit of the
split component shows without a page reload and without page errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GEN-03: utils.test.ts (111 tests of internal helpers, incl. the unused
multiSortBy branch and a mandated sibling sort) is deleted (no contract
tests for helpers, ruling 2026-10-17). Its unique scenarios are ported to
full generation + the real router (route-paths.test.ts): [_][_]foo,
un-nested bar_/index, [_]baz[_]/index, [_]a/bar[_]/[_baz_]/index and
[_]auth/_admin/dashboard under pathless layouts; dots and [.] in virtual
route paths. The rest is covered by fixtures (escaped underscores,
pathless-to-index-preference, dot-escaped, custom tokens) and the
FileRoutesByTo/ByFullPath type tests; generated names and import merging
are free (5.1, 5.5).
- determinism.test.ts (J1.5 with ctu expectDeterministic): the filesystem
listing order (readdir permuted at the fs boundary; writing files in
another order changes nothing on tmpfs/ext4) and the working directory
change neither the tree nor the routes. Probe: dropping the routePath
tie-breakers of both sorts (src, reverted) fails the listing test.
- GEN-31: a standalone (group).tsx may fail the run or warn, naming the
file; no channel required (SPEC 2.2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Real Vite client build in Chromium: lazyRouteComponent(() => import('../page'))
as the component; after the router preloaded and loaded '/', the first render
must show the page (no pending fallback) and request nothing (resource
entries). Control with autoCodeSplitting off passes; with splitting on the
splitter wraps the lazy value in its own chunk and the first render suspends
and requests page.mjs: new .fails pin (accepts leaving the value unsplit or
chaining the inner preload).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Next to the object-key scope test: the split component reads a binding the
loader shares only through a computed object key; both see the one value and
its initializer runs once. (A loader-only writer of a shared let hits the
known read-only-import bug pinned in known-bugs-code-splitter-ssr-builds, so
the row uses a stateful initializer instead.)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GEN-33: a running generator's tree must give the real router the same
routes (ids, full paths, parents, files, lazy files) as a fresh run's;
hand-edited, corrupted and deleted trees must regenerate and give the
routes of the original tree. Tree text is free (J1.5, 5.5).
- GEN-15: a route file broken by an edit may fail the run or warn, if the
diagnostic names the file and the line of the problem (G5); main throws
'Error transforming route file <abs>: SyntaxError: Unexpected token
(3:22)'. The repaired-file check stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- regression-helpers.test: the harness labels are checked on a fixed graph;
the compileRouteModules control no longer requires exactly one lazy (or a
shared) module from the real compiler, only that every module it returns
is reached by an import of another (SPEC 5.3).
- Unused inventory helpers deleted: eagerModuleIds, eagerImportSources,
countAcrossModules, routeModuleSources.
- V2-30: createRootRoute() without options, through the host with and
without HMR: valid modules, and the real router renders a child through
the default Outlet (tsc: the fixture type-checks).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The unit test required the annotation comment right before `function
makeLabel(` in every module declaring that name (an emitted-name and
printing requirement). Replaced by Vite and Rspack production client builds
of a route with a pragma and an annotated, effectful helper the split
component calls once unused: the unused call is gone and the used one still
renders; control without the annotation keeps the call. webpack is left
out: its minifier keeps the call even with autoCodeSplitting off, in every
spelling of the annotation (not a router plugin outcome). The deleted unit
test is covered by these builds (comment in code-splitter-dead-code.test.ts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- loadRoute gains importBindings(names) (ctu importers: another module of
the app importing the route file) and eagerModules (code of what loads
with the route). Direct route.exports reads in IE, MS and KB (exported
bindings, shared helpers, split-binding readers) now go through a real
importer and compare with what the route uses (F16).
- KB useTitle pin: the title lives in staticData (tsc: the old top-level
title is TS2353/TS2339 against the real declarations; the new fixture
type-checks with the StaticDataRouteOption augmentation) and the hook's
identity is compared with a real importer (F28). Re-checked red: the
component calls another instance.
- MS .jsx store test: the assertion key renamed to what it checks (route
module loads ./init without using it); real consumers and one init stay
(F19, done by W2-b in substance).
- IE specifier split: absence checked on everything that loads with the
route module, not the route module alone (F30).
- KB server-only options: options wrapped in as never / as any / satisfies
object are statically visible and must be removed (refusal no longer
accepted; tsc: valid under Start's route option types), new strict pin +
a Vite build canary (one bundler: the transform decides) (F35). Opaque
spread/computed/call rows keep their removal-or-refusal outcome.
Re-checked red: serverImports 1 / server code eager.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GEN-41 (J1.6): a reader of the route file and the route tree during
every write and rename of a run (writes made in two halves through the
generator's fs option) sees only the complete old or new contents; after
a write failing half-way (ENOSPC) or a failing rename, both hold their
complete old contents. Probe: publishing by writing over the destination
(src change, reverted) fails the reader test.
- K-19 (J1.16): with tmpDir on another filesystem (real devices when the
host has them: here /dev/shm vs /tmp; otherwise a fault failing renames
across directories with EXDEV) the files are replaced atomically
(new inode, reader sees complete contents). .fails pin, red without
.fails: 'EXDEV: cross-device link not permitted, rename'. Probe: temp
files beside the destination (the ruled fix, src change, reverted) pass.
- GEN-16/GEN-17: mode, owner and chown policy tests move to
outside-compiler-corpus/file-metadata.test.ts (metadata is outside J1.2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GEN-02: the 59 route tree snapshots (and the edited/scaffolded source
snapshots of file-modification and custom-scaffolding) are replaced:
- generator.test.ts: every fixture's tree is loaded by the real router;
its routes (id, full path, parent, route file, files loaded lazily with
the route) must equal generator-fixtures.ts, reviewed against the file
naming and virtual route docs. Edited route files: expectOnlyOwnedEdits +
constructor/id; custom scaffolds: the template's statements, and their
pages render 'Hello <path>!'; header/footer lines of append-and-prepend.
- integration/fixture-types.test.ts (new slow tier, test:integration):
J1.13, each tree types the same ids, full paths and parents. One
TypeScript program per tree (each augments the router types globally;
one shared program mixes them up), 9.9 s at 1 worker, so not in the fast
tier. Two fixtures are .fails pins for the group layout types bug
(inferFullPath, same as the real-router.test.ts pin).
- generator-fixture.ts: the fixtures' configuration and preparation,
shared by both, runnable on a copy.
- Fixture inputs made valid modules: 13 root files called
createFileRoute/createRootRoute without importing it or exported no
Route; 4 virtual roots were createFileRoute('/') (types: a root route
must be createRootRoute, which also made the parity check fail).
- The virtual-physical-empty-path-conflict-root fixture is deleted: its
case is the outside-corpus characterisation
outside-compiler-corpus/virtual-routes.test.ts (GEN-30, W2-e).
- The virtualGetRouteNodes test is deleted (unused exported helper, ruling
2026-10-17; physical mounts are covered through the generator and the
real watcher in router-plugin integration tests).
- GEN-29: conflict errors through the diagnostics oracle.
- CRLF: LF and CRLF sources give the same routes (not tree bytes).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W2-f deleted the harness's file-event replay; createDevServer without
`browser` runs Vite's watcher and settle() waits for its reports. Doc
comment only, no behaviour change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The in-process plugin host replayed hook filters, plugin order, resolveId/load
dispatch and refused asynchronous hooks (sync()). It is replaced by the
router plugin's public Vite adapters (tanStackRouterCodeSplitter with a
@tanstack/router-plugin/context context, or the composed tanstackRouter for
route HMR) in a real Vite dev server: Vite resolves the config, orders the
plugins, applies the hook filters, awaits the hooks and resolves and loads the
emitted modules; a recorder right after the router plugin observes each
module at the router transform boundary. command: 'build' compiles in a real
Vite production build. Compile helpers are async now (call sites awaited).
Deleted with the old host: createCodeSplitterTransforms (private plugin-name
dispatch), the webpack compiler stub and generatedRouteId (no consumers).
code-splitter-plugin-pipeline: query ids, route reuse, splitBehavior errors
(A9 diagnostics), plugin order with real @vitejs/plugin-react and
vite-plugin-solid configs, factory-route reporting all go through the host.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SPEC J1.14 (PIN-A): a pathless layout under a lazy-only route nests under
its virtual anchor. The docs shape (posts.lazy.tsx + posts/_layout.tsx)
passes on main (control); a layout one directory below the lazy-only route
(app/posts.lazy.tsx + app/posts/drafts/_layout.tsx) is attached to /app:
.fails pin, red without .fails (parent '/app' instead of '/app/posts').
- SPEC J1.15: a childless _auth.tsx / _auth.lazy.tsx next to index.tsx is a
valid route: two .fails pins, red without .fails ('Conflicting
configuration paths were found for the following routes: "/", "/"').
- GEN-29: conflict errors are checked with the diagnostics oracle (absolute
or project-relative names, same-named files told apart).
- GEN-11/GEN-12: param name warnings are neither required nor forbidden
(J1.12): the policy test moves to outside-compiler-corpus/
param-name-warnings.test.ts with its own temporary app (the deleted
validate-route-params.test.ts wrote into the shared generator fixture;
its deletion landed in the previous commit), matching names, not prose.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- template.test.ts: the stub router, JSX runtime and Vue h (evaluateScaffold)
are gone. Scaffolded React, Solid and Vue routes load through the real
router and render with the target's own server renderer; the root route
renders its child route's page (it has an Outlet).
- H.2 green-sol/01: the quote of the route id argument is the generator's
edit (SPEC J1.2: free), so the quoteStyle check skips it; every other
literal still follows quoteStyle (file-based-routing.md quoteStyle).
- route-tree.ts: loadedFiles() and observeRouteTree() (routes with full
path, parent, file and the files that load lazily with them).
- route-pieces.test.ts: GEN-19, empty pieces: no inventory of empty
options; the routes load and render. .lazy.vue pin (J1.17): the SFC is
not loaded before the route renders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GEN-05: one helper, expectOnlyOwnedEdits (owned-edits.ts, with controls):
exact bytes outside the route id argument, the constructor callee and the
router package imports; inside those imports the other bindings keep their
imported name, local name and type/value meaning. Replaces withoutImports,
which dropped every import (an unrelated import could vanish unnoticed).
- GEN-06: the second createFileRoute call becomes an ordinary call (one
route per route file).
- GEN-07/GEN-09: no semicolon or quote assertions on edits; the id is
checked on its parsed value.
- GEN-08: the now unused createFileRoute import may stay or go.
- GEN-10/GEN-12: the logging test no longer requires a scaffold message or
param warnings; it requires the helpers.tsx warning naming the file
(diagnostics oracle), plus a real disableLogging check (no info logs).
- GEN-28: BOM rows and the BOM pin move to outside-compiler-corpus/bom.test.ts
(SPEC 2.1 is BOM-free); CRLF and astral rows stay BOM-free.
- GEN-40: the lazy template uses component (tsc: 'staticData' does not
exist in type 'LazyRouteOptions'); checked through the real router page.
- GEN-42: an id from a variable or an interpolated template may be repaired
to the literal or reported naming the file.
- Route tree quote check skips literals holding quote characters.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generator tests use the shared oracles of @tanstack/compiler-test-utils
(diagnostics, determinism). It has no workspace dependencies, so the Nx graph
gets no cycle; the lockfile changes only in the router-generator importer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
react-start-rsc: an Rsbuild dev-server harness (the built
@tanstack/react-start/plugin/rsbuild with RSC enabled, run in the app
directory as rsbuild dev does) and rsc-css-rsbuild.test.ts: the three RSC
helpers style a local server component through the Rsbuild transport, a
CSS edit updates the page without a full reload (J7.5), and a pin: Start's
Rsbuild virtual modules live under the process working directory, so the
app fails to compile when the process runs elsewhere (J4.16). The
fake-stream unit file rscCssTransform.test.tsx is deleted: every row it
had now runs through the real transport (rsc-css.test.ts,
rsc-css-rsbuild.test.ts).
start-plugin-core: start-router-dev-server HMR-33 runs on a real page
served by Start's dev middleware, navigating to the route after each
change (server-only -> page -> page without handlers -> server-only, and
the cold-start case); rsbuild/dev-server S12 opens a real page on Start's
Rsbuild dev server with its HMR client (next call runs the edited handler,
no full reload, the hot update carries no handler); the fake-forwarder
S11 block of start-compiler-dev-server is deleted (covered by
rsc-start-dev.test.ts with the real provider); createServerFn.test.ts
loses the compiler-level D6 pin (S36, now a page pin in
rsc-start-dev.test.ts) and the provider 'no react import' assertion (S40).
rsc-start-dev.test.ts: a handler runs in the provider environment with its
react-server conditions whether SSR or the browser calls it (S11, S18 case
3, S40); a handler edit reaches the next call and a component edit
hot-updates a route module that also declares a server function, with no
full reload (J3.6, S12 on Vite); two pins red through the real page: a
server function only server code calls is callable by id from the browser
(D6, S36), and a server function of a 'use client' module is a client
reference on the server (#7943, S21).
A new integration tier (tests/integration, Vitest project 'integration',
Nx target test:integration depending on @tanstack/react-start:build) runs a
real React Start app with RSC enabled on a Vite dev server, built from the
linked @tanstack/react-start, @vitejs/plugin-rsc and @vitejs/plugin-react,
and reads a real page: the server component's content and the computed
styles of its CSS modules.
rsc-css.test.ts covers every RSC helper through named, renamed and
namespace imports of both module names, fragment roots (V4 red-astra/21),
a helper module with a global stylesheet, parenthesised and asserted
arguments, the options and plain-data model pass-through, look-alikes, a
project re-export, the client never loading a row's stylesheet, and the
J7.5 CSS hot updates (edit, double edit, rule removal, import removal,
no full reload). The pins (conditional arguments, dev warnings, comments,
chained call) keep their outcome through the real transport.
The integration project runs with NODE_ENV=development: the dev server
bakes the test process's NODE_ENV into the served client code, and
Start's RSC HMR client is set up under development only.
hydrate-pages.ts builds one app with Start's Vite plugin (development
build, real @tanstack/react-start), renders each fixture in the SSR build
and hydrates it in Chromium with onRecoverableError and console.error
recorded; scripts click children, observe requested scripts, mount
without SSR, or call a server fn by id through Start's server entry.
hydrate-pages.test.ts: HYD-04 identities (nested + sibling, repeated
instances, conditionals/callbacks, renamed, namespace, split={false},
dynamic split, astra/14 let), S37 branch switching after hydration,
HYD-06 prefetch rows (+ control, function prefetch state, split={false}),
HYD-12 function when (not called on SSR), HYD-14 server fn from split
children (request id executed by the SSR server entry), client-mount
fallback for the 13 fallback forms, onHydrated/prefetch callbacks,
interaction events option, click handler with return.
clientOnlyJSX.test.ts: fallback on SSR, children after hydration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All custom JSX runtimes, recording Hydrate stubs and fake react/router/
createServerFn stubs are gone. Id-agreement fixtures use idle() (load()
and visible() render no id with the real runtime). HYD-05 prefix
assertions removed. HYD-08 goals deleted (SPEC J5.5 requires rejection;
B:577/616/692 cover it). Prefetch rows (HYD-06), server-fn clicks
(HYD-14), client fallback receipt and when-function timing (HYD-12) move
to integration/hydrate-pages.test.ts. `when={() => 'custom'}` (TS2322)
becomes `when={() => idle()}`; tsc against the real types: no error.
Function-as-children with split={false} is TS2322 (children: ReactNode):
kept only as "compiled renders like the source". Every pin re-checked red
for its named bug without .fails. Solid rows: compile-level (solid-router
cannot link in process).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hydrate-captures: client output, server output and uncompiled source render
the same markup. New table row for V4 hole astra/14 (a let reassigned
before the boundary): red with the astra/14 patch applied, green without.
Two fixtures captured a local named `key` (React strips it; pinned in
known-bugs-hydrate): renamed to `field`.
clientOnlyJSX: real ClientOnly of @tanstack/react-router, server output
renders what the source renders while the children's libraries throw.
The Link-as-ClientOnly row uses CatchBoundary (real Link needs a router);
tsc against the real types: no error. Client half moves to
integration/clientOnlyJSX.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
render.ts drops the stand-ins of A3b-1 (FIX-PLAN S09, HYD-01, HYD-04):
the fake Hydrate/hydrateStubs, the recording Hydrate that kept only
props.h (renderBoundaries), the fake lazyRouteComponent (chunkExportName,
renderChunk, loadClientModule) and the copy of the compiler's Hydrate
recognition used to order chunks. Graphs now link the real React,
react-dom/static, @tanstack/react-router and @tanstack/react-start-client
(Hydrate, strategies); test:unit depends on react-start-client:build (no
cycle with this package). New oracles: renderSource / renderServer /
renderClient, expectClientRendersLikeServer (markup incl. hydration ids),
expectRendersLikeSource (ids blanked vs the source, SPEC 5.17).
regression-helpers.ts: graphs that link real packages compile JSX with
React's automatic runtime; the text JSX stand-in stays the default only
for graphs without packages (24 tests in W3-start files).
Helper controls: S37 cross-branch id inequality removed; agreement and
distinct simultaneous ids kept; negative control for a client rendering
other children; fixtures gain the required `when` prop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIX-PLAN A5 rows on rg/generator-dev.test.ts:
- GEN-14: "getRoutesByFileMap maps each route file ... after a rerun"
deleted. It asserted the plugins' internal handshake map; the outcome (a
created or renamed route, and the root route, hot-update on the page) is
tested in router-plugin integration dev-server-new-routes.test.ts and
rsbuild-dev-server-new-routes.test.ts ("an edit of a created/renamed route
the page shows is a hot update", "an edit of the root route after a route
was created is a hot update").
- GEN-13: "a new generator on an up-to-date app does not rewrite the route
tree" (an mtime check of unchanged-write suppression) moved unchanged to
outside-compiler-corpus/write-suppression.test.ts as an implementation
test (package AGENTS.md keeps the suppression; SPEC J1.10 leaves the
mechanism free).
- GEN-04: the injected-event physical() test stays, labelled a supplement
of router-plugin's real-watcher physical() scenario; the file header says
injected events are not watcher coverage.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIX-PLAN A5 (GEN-04, 13, 14, 21-26, 34, 35). The generator dev scenarios run
on a real dev server with the real router and React on a Chromium page, with
the dev servers' own watchers (and the generator's on Rspack), for Vite and
Rsbuild alike (generator-dev-scenarios.ts, harness generator-dev-app.ts):
- routes and parents from the live router (GEN-21), not the route tree text;
- a route's component loads on navigation: no script the page loaded before
contains its marker, one after does (GEN-34; intermediate modules free);
- createFileRoute's path parsed, the rest of the file unchanged (GEN-22);
the empty-file case uses a custom route template with its own marker;
- edits of shown, created, renamed and root routes are hot updates with no
page load (GEN-13, GEN-14, GEN-23); the write-suppression and event-list
checks are gone (implementation coverage);
- the created-route race (DV1/DV17) on the page, without injected events
(GEN-26);
- a physical() mount outside the routes directory: create, edit, delete
(GEN-04).
Rsbuild bundles the real @tanstack/react-router (router stub and alias
deleted, GEN-35) and waits with the harness's event-based settle() instead of
750 ms quiet times (speedup 4).
Moved to the slow tier (page): dev-server-generator, dev-server-new-routes.
New: rsbuild-dev-server-new-routes, known-bugs-rsbuild-generator,
generator-watch-mode (from rsbuild-dev-server-generator).
Watch mode (GEN-24, GEN-25): every build's callback error and
stats.hasErrors() are asserted, the bundle's route tree runs through the real
router in Node and renders the scaffold; closing the session must release
every file watcher it opened (SPEC J1.10), waited on Node's handles, not on
sleeps. Checked: with the generator's watcher left open (temporary src
change, reverted) the test fails ("still holds 3 file watcher(s)"). The old
test ignored the errors of every build: its .js app could not resolve the
generated extensionless imports (ESM package); the app now has its own
package.json.
Pins (Rsbuild, verified red without .fails):
- a created route file the generator cannot parse, fixed later, never joins
("no compile read routes/posts.tsx"); the "no Route export" twin is the
same source line and stays a Vite control only;
- NEW: a route file created under a physical() mount outside the routes
directory never joins ("no compile read features/b.tsx");
router-generator-plugin.ts:93-97 (webpack :121-125).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
write(), rename() and settle() on the Rsbuild harness (FIX-PLAN A5, speedup
4): settle() waits, on the compiles' own hooks only, until no compile runs or
is pending (watchRun/done/failed, Rspack's `invalid`), Rsbuild recorded the
last compile, every app file the last compile read is as it was when that
compile started (before the plugins' own watchRun taps, whose writes the next
compile reads), and every written file is read by a compile or taken by the
caller's accept(). More than 10 compiles in one settle() is a rewrite loop.
This replaces the router-plugin harness's 750 ms quiet time.
Vite harness: `server.forwardConsole: false`. Vite 8 forwards a page's
console to the server log when it detects a coding agent running it, so
`logs` depended on who ran the tests; a page's console stays the page's.
Contract tests: a plugin writing a file in a compile, an unread written file
with and without accept(), a plugin rewriting a file on each compile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIX-PLAN A3b-2 (HYD-02, HYD-04, HYD-05, HYD-15, HYD-24).
- Delete `hydrateRuntimeFiles` (stand-in `@tanstack/react-start`,
`@tanstack/react-router` and React JSX runtime), its names-only contract
test, and `renderThroughChunks` (which preloaded lazy components itself).
Apps link the built `@tanstack/react-start` (startRuntimeLinks) and
resolve the real router and React.
- Hydration oracle: the SSR build renders each page with
`renderToReadableStream` (allReady); a Chromium page of the client build
hydrates that HTML with `hydrateRoot`, records `onRecoverableError` and
`console.error`, and clicks every child until it shows it was clicked.
Identity rows use `interaction()` boundaries, whose runtime finds the gate
by the server-rendered id (probe: an altered id leaves the child
unhydrated). Boundary-id equality and prefix presence are no longer
asserted (J5.4, §5).
- One shared production build per bundler for all pages (plus the
unminified source-map build and the dangling-name pin build).
- Split route options: per-route `codeSplitGroupings` (documented,
docs/router/guide/automatic-code-splitting.md:166), explicit separate
groups, one group, and the default (component split, pendingComponent
eager) as a named mixed row (HYD-15); the three routes hydrate in one page.
- Exported widget initialized by an impure call: the goal "lazy or
reported" becomes the real outcome (initializer runs once, renders,
boundary children lazy, no warning required); red on both bundlers
(count 2), pinned with the same root cause as the known-bugs-hydrate
compiler pin (HYD-24).
- A package without side-effect hints: the chart placement is the
bundler's call (eager with the real React on both bundlers; it was lazy
only with the stand-in React).
- Vite dev: a real page (index.html, @vitejs/plugin-react, Vite's HMR
client) requests the chunk before its parent module, renders it, and
shows the edit.
- Rsbuild dev: the real packages instead of the stand-ins.
- Delete the Solid dev row: it rendered stand-in Solid packages through a
string JSX runtime; real Solid needs solid-js, vite-plugin-solid and a
linked @tanstack/solid-start, none of which resolve from
start-plugin-core (no approved dependency). Solid compile coverage stays
in hydrate-boundary-forms.test.ts (framework: 'solid').
Pins re-checked red without .fails: the head-reads-Page pin
(DanglingNameError `_H2`, both bundlers), the unused exported boundary
(`lazy`, both), the impure exported initializer (count 2, both).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dev-server harness no longer replays file events from a filesystem
diff (FIX-PLAN A5, GEN-26). Vite's own chokidar watcher runs in every
mode; write() writes files and settle() waits, by events only, for:
- the watcher's report of each written file (a test writes like a user,
after chokidar's per-file change throttle passed: it drops a second
change within that moment),
- the end of Vite's handling of each reported event (hotUpdateEnvironments,
or the error Vite logs; AsyncLocalStorage ties both to the event),
- files plugins wrote meanwhile: a barrier file change, then every app file
as the watcher last saw it; until a round sees no new event (a plugin
that keeps writing never settles: error after 10 rounds).
Full-bundle dev (bundledDev) waits for the dev engine's watcher, the
plugins' watchChange hooks of each environment and the dev engine output,
instead of forcing a full rebuild.
Removed with the replay: FileEventOptions (order, batch) and their tests.
The same-contents write test (H.3 load flake) now waits for the watcher's
own change event.
start-plugin-core (W2-j's file, minimal): the bundledDev factory edit test
passed only because the replay forced a full rebuild. Split into a passing
#8062 control (bundles again without errors) and a .fails pin: the
importer of an edited factory is not recompiled in full-bundle dev
(start-compiler-plugin/plugin.ts:412-424). Verified red without .fails:
"expected [ 'assets/a.js' ] to deeply equal []".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build.test.ts (IP-S02, S20): mock-mode rows describe the import (a safe
mock, no initializer run, no real code) with mockAccess 'off' for the
silence; new rows pin mockAccess error/warn/default in a production
mock-mode build (silent self-contained mocks today). The ignored-importer
marker rows read the blamed importer from onViolation (Rsbuild blames the
exempt importer through its BFS chain), split the no-report and
real-module outcomes (the latter pinned on both bundlers), and add a
mixed mock-mode row (exempt real, other mocked, pinned).
dev.test.ts (IP-S03, S17, S18, S27, V4 timing pin): the React stand-in
is gone (real React from the package's dependencies); the MDX stand-in
is the real @mdx-js/rollup; mockAccess error/warn rows for an SSR import
of a .client file (silent server mocks today, pinned); a wiring row
through startDevServer({ start }) for onViolation and mockAccess; the
marker-add pin split into a report pin and a mock pin (FOLLOWUPS H5); the
pre-transform false-warning pin reproduced deterministically with an
ordering plugin that holds the factory's client transform until the
helper's landed.
known-bugs.test.ts (IP-S13, S15, S25): the unused-mock pin compares the
client bundle with the one import protection disabled gives; twins for
eval/arguments export names and ns[key]() of a denied file and specifier
(the latter pinned on Vite). exemptions, build-options, reported-location
(an SSR/provider case, IP-S16), rsbuild (one server for the seven
importer types, compile waits no shorter than the test timeout) follow.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Conflicts resolved:
- hmr-model.ts, vite-hot-update.ts: take W2-g's deletion (W2-b/W2-c only
kept the in-process model alive; nothing to port).
- known-bugs-route-hmr, react-refresh-route-components, router-plugin-context:
take W2-g's deletions (tests moved to the real page or out of scope);
keep W2-b's real rendering in the surviving tests.
- code-splitter-plugin-pipeline: W2-g's `hot: undefined` (no accept count)
with W2-b's `framework` and real render.
- route-hmr: W2-g's version, on the real router package (W2-c): no
routerPackageStub, the SSR graph scan skips the router package as /@fs/.
- regression-helpers.ts: union of the type imports.
Ruling R-09 / D11 (DECISIONS.md 2026-10-17): a route created inside a
function of its file is unsupported but user-fixable; tests accept either a
correct result (here: the edit takes effect, in place or after a reload,
per the function-call ruling) or a warning naming the file in every mode.
Silent wrong output fails.
`openRouteHmrPage` gains `warnings()`: the dev server's logger (Vite
`logs`, Rsbuild compile warnings), what the server's process logged with
`console.warn` about a file of the app (one shared wrapper, listeners per
page, so concurrent pages do not race on restores), and what the page
logged as a warning (the compiler puts its warning into the served
module). A harness control shows the channel on both bundlers with the
compiler's real exported-component warning.
The known-bugs D11 pin ("an edit of a route a helper function creates
shows its new component, or the file is reported") and the loose
route-factory rows of route-hmr-browser-plugin.test.ts pass when the edit
takes effect without errors or a warning names `routes/index.tsx`. Main
does neither on Vite and Rsbuild (stale `helper v1 data v2`, no warning):
the pin stays `.fails`, verified red in a run without it. The Rsbuild
unsplit Solid pin is untouched (no ruling covers it).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The mock oracle (A6, IP-S01/S10/S25): mock-helpers.ts probes what a
consumer does with a mocked binding (member reads, calls and construction
to depth, primitive conversions, no secret) instead of comparing its label;
the same probe is serialised for scripts run in another process. The unit
rows of the mock modules use it; the pins they duplicated on internals
(reserved names, namespace re-exports, enums, a read before the import)
live on as app-level twins (integration/importProtection/known-bugs.test.ts).
The report adapter (IP-S05): violation-report.ts reads reports by their
documented sections (environment type, Importer, Import, Trace, Code with
the >/^ convention), per log entry or paragraph, and fails on a diagnostic
that announces import protection without them; a unit test feeds it other
headers, numbering, quotes, spacing, boxing and plugin tags.
IP-S16: usage-location.ts (a copy of the Vite adapter's location fallback
order) is deleted; analysis.usage.test.ts checks only whether the Start
compiler's output keeps the denied import. IP-S03: the unit row that
expected a server-environment mock to stay silent is gone (SPEC J6.3 has
no server exemption); the real-adapter rows follow in dev.test.ts.
known-bugs-dev-server.test.ts (W3-hmr's file): the oracle import renamed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
route-hmr-browser.test.ts: every edit also requires no unexpected page error
(HMR-14; the deliberate loader error is filtered); the memo/forwardRef split
rows and an inline-arrow row count mounts through a state initializer
(HMR-13); the options the edits add are cumulative, and the removal of a
loaded option (the pinned bug) is the last, loose step; the rows creating
a second route in a route module are gone (one route per file, HMR-12).
route-hmr-browser-frameworks.test.ts (new): Solid and Vue on Vite and
Rsbuild; `{ reloaded: false }` where it holds today, the rest pinned.
route-hmr-browser-plugin.test.ts (new): plugin configurations (hmr.style,
environmentName, function options, tsr.config.json, Rsbuild with
hmr.style vite), root route call shapes, routes created inside a function,
`.ts` routes and an app without @vitejs/plugin-react (loose controls).
known-bugs-route-hmr.test.ts: pins wait on the client's applied signal, not
3 s; new output and `{ reloaded: false, errors: [] }` everywhere (HMR-21);
the memo(Page) control edits the body and keeps state, next to a
forwardRef(Page) control (HMR-20, G.3); per-variant controls of the
removal pin (HMR-15); new pins: alias export (Vite, Rsbuild), unsplit Vue,
`.ts` route, Vite without plugin-react, the hoisted inline component with
the real react-error-boundary (HMR-19), an unsplit Solid route on Rsbuild
and a helper-created route without code splitting (both NEW, FOLLOWUPS).
Every pin verified red for its stated reason in a run without `.fails`.
The production-build pins move to known-bugs-route-hmr-production.test.ts
(per-file budget).
regression-helpers.test.ts: the reload detector control uses the browser's
own reload (HMR-30); a control that an applied-but-not-shown edit fails
without its timeout on both bundlers.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`hotUpdate` (tests/hmr-model.ts) created hot contexts and hot data, ran
disposers, re-executed modules and ordered accept callbacks itself;
`editRouteFile` (tests/vite-hot-update.ts) used Vite's boundary analysis
with a fake router and no browser client. Both copied bundler/HMR dispatch
(ruling 2026-10-18; FIX-PLAN A1). Every consumer is ported to
`openRouteHmrPage` or deleted:
- route-hmr.test.ts: the Solid/Vue, factory and stale-id model tests go
(HMR-01/02/04/05; the page suites cover Solid/Vue on Vite and Rsbuild,
factory options in route-hmr-browser.test.ts; stale-id reachability is
evidence work, SPEC §9). The React-import exclusion stays as a compile
check (HMR-03: no window-key assertion). The no-HMR scan includes
`module.hot` (HMR-08). The dev-server tests that looked for the hot API
in the served code (.ts, environmentName, hmr.style alone, tsr.config.json
target, function options: HMR-10/11) are page rows in
route-hmr-browser-plugin.test.ts; the excluded environment is checked on
its whole served graph.
- known-bugs-route-hmr.test.ts (fast tier): the `hotUpdate` alias pin and
the `editRouteFile` boundary tests (HMR-22/23) are page pins; the fake
`ErrorBoundary` control/pin (HMR-19) is a page control/pin with the real
`react-error-boundary`; the staticData identity control stays.
- regression-helpers.test.ts: the four `hotUpdate` controls go with the helper.
- react-refresh-route-components.test.ts: the root module creating another
route is unsupported (one route per file, HMR-12): deleted; root edits are
covered by route-hmr-browser.test.ts.
- code-splitter-plugin-pipeline.test.ts: the webpack-style Solid update and
the factory-route HMR matrix (F07/F09/F33) are page rows; the accept
count goes (the route evaluates without a hot API).
- code-splitter-route-options.test.ts: root route call shapes are page rows.
- router-plugin-context.test.ts: the internal-plugin HMR test (F08) goes;
every page test's first edit goes through the public plugin setup.
- integration/plugin-options.test.ts: the hot-API scan of the rspack/webpack
entries (F08) becomes a page row on Rsbuild; the `addHmr: false` control stays.
- handle-route-update.test.ts calls the emitted `handleRouteUpdate` with
explicit inputs and a real router, no hot context (AGENTS.md sentence,
P3); the absent-route test navigates the live tree (HMR-26).
AGENTS.md carries the approved sentence (DECISIONS.md, P3).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`openRouteHmrPage` (tests/route-hmr-page.ts) now observes instead of sleeping:
the dev server's own `hotUpdate` plugin hook (Vite) or the compile tracker
(Rsbuild) tells when the server handled the written files; the HMR client's
public API (`vite:afterUpdate`, the webpack-style `addStatusHandler`) counts
the updates the page applied; document loads, HMR messages and the page's
own text decide the outcome. An edit the client applied without showing
fails after a short grace instead of a timeout (the pins of
known-bugs-route-hmr no longer wait 3 s each), and a reload or update that
arrives after the text showed is still attributed (HMR-34). `edit()` also
returns the page's errors since the edit (HMR-14) and the page exposes
`loads()`.
Rsbuild apps now run Solid (`@rsbuild/plugin-solid` + `@rsbuild/plugin-babel`)
and Vue (`@rsbuild/plugin-vue` + `@rsbuild/plugin-vue-jsx`) with their real
HMR support (FIX-PLAN A1 harness work 1). New options: `pluginOptions: null`
(the plugin reads tsr.config.json), `pluginOptionsAsFunction`, `readyTimeout`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
typeErrorsOf passes the previous program as `oldProgram` to
ts.createProgram, so the compiler reuses what it can (the router packages'
type definitions are the same files in every app). Same compiler options,
same diagnostics; real-router.test.ts went from 4.8 s to 3.2 s in a
back-to-back run on the same load.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
route-tree.ts:
- The app's Vite config is read from its sources: @vitejs/plugin-vue for
.vue files, vite-plugin-solid ({ ssr: true }) when modules import Solid;
Solid apps let the plugin bundle the Solid router's sources for the
server (otherwise Node loads the packages).
- Solid apps share one Vite server per worker (compiling the Solid router's
sources takes ~0.7 s); before each load it forgets every module of the
app, so edited or regenerated files are transformed again. React and Vue
apps keep a fresh server per load.
- The router package is the loaded entry module (react/solid/vue-router
dist index) the app's modules use; pages render with react-dom/server,
solid-js/web (as the router package loaded it) or vue/server-renderer.
Tests:
- The Solid rows of generator-options.test.ts and template.test.ts load
their trees again (guards removed).
- real-router.test.ts is split: route shapes and pins stay there; React,
Solid and Vue page apps move to real-router-frameworks.test.ts; shared
helpers to real-router.ts. New React and Solid apps render their pages
(root layout, index, lazy component, lazy-only route, child route,
pathless layout); the Solid app's types are checked too.
- Route group layout (`(marketing)/route.tsx`): the runtime half (ids,
parents, matching, rendering) is a passing test; only the types mismatch
stays pinned. The pin now cites the docs (file-naming-conventions.md:15
`(folder)` route groups, :18 `route.tsx`) and #4629, which made it a
maintained shape.
- Lazy-only pathless layout (`settings/_layout.lazy.tsx`): restored as a
`.fails` pin with matching, rendering and types (types already say
/settings/profile; the router gives /profile). Lazy-only route files are
documented (guide/code-splitting.md:222-224, SPEC J1.8); same bug as the
G1 pin in route-paths.test.ts. Verified red without `.fails`.
All 21 router-generator pins re-run without `.fails`: red for their
stated reasons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coordinator-approved test-only devDependencies (same kind as the approved
P1 ones), so the generator tests can load Solid route trees with the real
Solid router and render React pages:
@tanstack/solid-router (workspace:*), solid-js, vite-plugin-solid,
react-dom (+ @types/react-dom for the type-checked tests), all catalog.
Nx graph: neither @tanstack/solid-router, @tanstack/react-router nor
@tanstack/vue-router reaches @tanstack/router-generator (no cycle).
Lockfile regenerated with `pnpm install --no-frozen-lockfile` (importer
entries only); `CI=1 pnpm install --frozen-lockfile` passes; the set of
vite@8.3.4 variants in the lockfile is unchanged from 5057dad449.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Speedup 5: build-frameworks and plugin-options build webpack cells with
minify: false; their outcomes (placement of live code, rendering, init
counts, framework runtimes present, route tree) do not depend on terser.
Speedup 10: expectHydratesLikeServer and callInBoth run the SSR process
and the client page side by side; the shared-build block of
start-build-env-separation runs its rows concurrently.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A8 / GEN-36: client build output runs in a page of headless Chromium
(browser.ts openPage) served over HTTP from the output directory, instead
of jsdom globals copied onto Node. SSR output stays in a Node child
process. The guarded setImmediate probe now returns 'none'.
A8 / GEN-38: the dangling-name check reads the emitted chunks, never a
separately minified copy. Unminified webpack/Rspack builds are not
checked: their own output keeps dead code with dangling names for the
minifier (Rspack's unminified build of @tanstack/react-router alone reads
useRouter, jsx... without a binding). The control pairs the minified build
(dead code gone, passes) with the unminified one (kept, unchecked).
Removed control "a dangling name in code the minifier keeps fails" for
unminified builds: covered by "a chunk that reads a dangling name fails
the build description" (minified, every bundler).
A8 / GEN-37: every real browser/Node global is allowed; a lost local is
found from binding evidence (getModuleErrors `source` option), adopted by
rp plugin-host expectValidModules and spc render.ts in place of the
source-derived `globals`.
A7 / GEN-27: getModuleErrors/freeIdentifiers take the project's JSX
settings (`jsx`, default React automatic) and pass them to Oxc, which
interprets the pragmas and their position itself; no comment scanning.
Controls: the same non-leading pragma under a classic and an automatic
project.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
serverOnlyError/clientOnlyError are now asymmetric matchers: the call
threw (settle returns Thrown with the real error) a deliberate error
naming the owning environment, whatever its prose (SPEC J4.10, §5.7).
Consumers compare with toEqual instead of toBe; the nested-handler pin
fixture and the client-only-imports build return the error's name and
message instead of a "throws: " string.
source-maps.ts reads maps through the shared trace-mapping consumer
instead of a hand VLQ decoder (HYD-31).
V4 green-sol/10 (reworded error): 48 failures -> 0. A message naming no
environment still fails the same 48 tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIX-PLAN A9-A12 helpers, outcome-only (SPEC §5.7, §5.14, G4, G9):
- diagnostics: read the real channel (thrown errors, aggregated build
errors and warnings, console) and assert severity, the file named
(absolute, relative or trailing segments, unambiguous among others),
the original position (any frame layout, 0- or 1-based column) and
API/option names; never prose. expectEnvRestrictionThrow and
envRestrictionError for J4.10: a deliberate error naming the owning
environment, any wording.
- importers: a real second module importing named/default/odd-name
exports as live bindings; load markers instead of import inventories.
- determinism: reorderings, expectDeterministic (same root) versus
expectRelocatable (per-root checks, portable projections only).
- source-maps: @jridgewell/trace-mapping, parsed token offsets, stack
tracing, CRLF-aware positions.
Integration control (tests/integration/oracles.test.ts): every bundler's
real build error names file, line and column; a throw in a built chunk
resolves through its stack. The build harness now keeps esbuild's
line:column (it dropped the location the real channel carries).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Minimal edits in W2-g's files (FIX-PLAN A1 rewrites them on real pages):
components render with real React (`renderComponent`, `render`), `isLazy`
is awaited, compile-only checks of Solid routes use `compileRouteModules`
(the Solid router cannot be linked in process), and "React Refresh
registers the split component" compares what a registered component
renders with what the route renders (the component a lazy option loads is
not reachable through the router's public API). All 16 pins of
known-bugs-route-hmr were run without `.fails`: each fails for its own bug.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIX-PLAN A3a/A4 consumers (W2-b): F01, F02, F06, F30, F36.
- Components render with real React (`render`, or `renderRoute` through the
real router where they use route hooks); expected HTML is what React
renders. Stubs of the router packages and of React are gone.
- Laziness via `await isLazy`, groupings via `groups()` instead of module or
evaluation counts (F06: route options, plugin pipeline, pragmas; F36:
router-plugin-context checks that the requested group loads and an
independently configured one stays unrequested).
- "Not loaded with the route" via `eager`, the whole eager graph, instead of
the route module's direct imports (F30: dead code, imports/exports, module
state, scope); the compiler-level D5 checks stay on the split modules
(`loadedBy`, one or more modules).
- One-instance checks through real consumers (`importFromRoute`, a
component recording what it sees), never the identity of a lazy wrapper.
- Every `.fails` pin touched was run once without `.fails`: each fails for
its own bug. The `@jsxFrag` pin's fixture now says `@jsxRuntime classic`
(Vite 8's React transform ignores a lone `@jsx`, so the old fixture never
used its factory).
- New pin (code-splitter-pragmas, "in the route module, when the code
calling the factory is split"): the route module emitted for a file with
leading JSX pragmas starts with the splitter's own imports and drops the
classic factory import, so JSX left in the route module compiles with
React's default runtime under Vite 8. Hidden by the old JSX stand-in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIX-PLAN A3a/A4, F01/F02/F06 (W2-b). `loadRoute` links the compiled route
with the real @tanstack/react-router (or vue-router) and React instead of a
router stub whose `lazyRouteComponent`/`lazyFn` were recognised by identity:
- `isLazy`, `loadedBy` (one or more modules: facades allowed) and
`groups()` observe loading through the router's lazy contract
(`preload()`, a loader call) and the modules requested (ctu lazy-probe);
- `render` / `renderRoute` render with react-dom/server, the latter through
a real router (`router.load()`, `RouterProvider`), so route hooks run;
- `eager` lists everything the route module's load requested (F30);
- `loadRouteGraph` loads fixed graphs: the harness controls now run on fixed
graphs of several valid shapes (an equivalent wrapper, an intermediate
module) and one wrong one (a group pulling another), not on the
splitter's output (F06).
`evaluateModule` and `evaluateRouteModule` use the real packages too. The
router stub and the JSX-as-text stand-in that hmr-model.ts (deleted by A1)
still needs moved into that file. Solid's router ships JSX source for
bundlers and cannot be linked in process; Solid runtime stays with the real
builds (integration/build-frameworks).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIX-PLAN A3a/A4 (W2-b). The linker no longer renders JSX with a string
stand-in: JSX compiles with React's automatic runtime (Vite's Oxc
transform, what @vitejs/plugin-react configures) and graphs link real
installed packages (`packages`), so a test renders with the real React the
modules use (`importPackage`). New load observers: `requested` (every
module a graph's modules requested), `fork()` (fresh instances, same
modules and stubs) and `has(id)`.
- `render.ts`: real framework transforms (Vite's React transform,
vite-plugin-solid, @vitejs/plugin-vue-jsx, driven as Vite drives them) and
server renderers (react-dom/server, solid-js/web, vue/server-renderer),
all from the consumer's own packages.
- `lazy-probe.ts`: laziness, loaded modules and groups observed by the
modules a trigger requests, in forks, never by recognising a lazy helper
(SPEC J2.6, §5.3, §5.8).
- The linker control GEN-39 uses a plain exported object instead of JSX.
- react-start-rsc keeps its JSX-as-text through the deprecated `runtime`
option until FIX-PLAN A3c (W2-j) replaces that harness.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Loading generated trees through Vite and the real router packages costs
~150-250 ms of imports per test file under isolation (10 files load trees),
which took the fast tier from 9.9 s to 12.3 s on 1 worker. Test files do
not depend on module state: each test uses its own temporary app, restores
its spies/env stubs, and the tree helpers create a fresh Vite server (fresh
transform and module caches) per load. Runs with --sequence.shuffle (seeds
1 and 7, 1 and 2 workers) pass with identical counts.
1 worker: 9.9 s (baseline) -> 5.2 s; 4 workers: 3.1 s -> 2.5 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"a route file that resolves to an empty path fails the generator" pinned
an error for physical('', 'merged') with merged/route.tsx as if any
empty-prefix mount were a conflict. J1.7 (V0.3): only genuinely conflicting
routes require the error.
- New: the docs' "Merging Physical Routes at Current Level" example, with
physical('features') and physical('', 'features'): /about, / and /contact
through the real router.
- New: a virtual /about next to features/about.tsx merged at the same level
fails the generator with an error naming both files (the docs' note).
- The root-layout case (merged/route.tsx) moves, unchanged, to
outside-compiler-corpus/virtual-routes.test.ts as a characterisation
outside acceptance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared route tree helper evaluated the tree against a stub of the router
packages and re-derived route ids and full paths with copies of router-core's
cleanPath/trimPathLeft and Route.init (route-tree.ts), and described lazy
options by recognising lazyRouteComponent/lazyFn; route-id.ts ran route files
against stub constructors and a stub JSX runtime. Both were copies of our own
runtime (FIX-PLAN A2a, GEN-01).
Now (tests/route-tree.ts):
- withRouteTree() loads the tree and the modules it imports with a real Vite
server (module runner, packages loaded by Node, @vitejs/plugin-vue for apps
with .vue files) and builds the router with the app's own router package
(createRouter + createMemoryHistory). routesOf/urlsOf read routesById and
fullPath; the file of a route is the evaluated module whose Route export is
that route. matchesOf() uses router.matchRoutes. Vue apps render with
vue/server-renderer: render() for a route option (after its preload),
renderAt(url) for a page (router.load + RouterProvider).
- evaluateModule() runs a module in a temporary app with the real packages.
- routeOptionsOf/loadLazyRoute/routePathsOf are gone. Route pieces are
checked by rendering each component option once the router loaded the
route (route-pieces.test.ts, GEN-18/20/32); the pathless-layout check reads
what the router matches at / (route-paths.test.ts; red when the layout gets
path '/', checked by mutating the generated tree).
- route-id.ts: routeCallOf() reads the constructor (bound through the router
package import, aliases and namespaces) and the id literal of the Route
call with Oxc. The id argument of createFileRoute is types-only at runtime
(react/solid/vue fileRoute.ts ignore it), so literal upkeep is checked on
the parsed value; evaluation is real (evaluateModule) where it was checked.
real-router.test.ts now asserts literal ids/full paths/parents, matching of
URLs, Vue pages rendering their single-file components, and that the tree's
types (FileRoutesById ids, fullPath, parentRoute id) equal the router's
(J1.13). New pin: a route group layout ((marketing)/route.tsx) is typed
fullPath '' while the router gives '/' (utils.ts:929-950 inferFullPath).
The settings/_layout.lazy.tsx row became settings/_layout.tsx: the lazy-only
variant is the G1 bug pinned in route-paths.test.ts.
.lazy.vue pin (J1.17, GEN-20): drops the "or the generator warns" branch;
/about must render the SFC through the real router. Empty .lazy.vue pin
(GEN-32): unchanged empty, or an SFC the Vue plugin compiles and Vue renders.
Deleted:
- route-tree.test.ts (10 controls of the stub evaluator); loading is now
Vite + the router, exercised by real-router.test.ts and every consumer.
- route-id.test.ts evaluateRouteFile controls (helper removed); routeCallOf
controls replace them.
- transform.test.ts row "adds the missing constructor next to a default
import": tsc accepts `import Router from '@tanstack/react-router'` only via
allowSyntheticDefaultImports (bundler resolution, no error), but Vite
rejects it ("does not provide an export named 'default'"), so the input
never runs in an app. The aliased and namespace rows still cover the
binding.
Solid: this package has no @tanstack/solid-router (not an approved
devDependency), so Solid route trees are not loaded; the Solid rows keep
their upkeep checks and skip the tree load with a comment
(generator-options.test.ts, template.test.ts).
Every .fails pin of router-generator was re-run without .fails: all 20 red
for their stated reasons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`routerPackageStub` (a fake `@tanstack/{react,solid,vue}-router` with an
invented `.load()`) and `loadRouteOption` are gone (split F03): the
apps resolve the real built router packages, dependencies of this
package. New helpers of tests/dev-server.ts:
- `renderRoutePath(server, pathname)`: the real router over the generated
tree, `router.load()`, `<RouterProvider>` to HTML (SSR environment).
- `renderRouteComponent(component)`: React renders a component option
(after the real `preload()` when split).
- `servedRouterPackageUrl(server, target)`: the URL the client
environment serves the router package at (Vite's own resolver), the key
of its stub for `evaluateServed`.
- `importRouteModule` returns `{ server, routeModule }`.
`expectExportedRouteOptions` asserts outcomes: the export exists and is a
component; a split option is the real router's lazy component of it
(`preload`) rendering the same HTML; the page renders through the real
router. The pins that use it (known-bugs-dev-server: class and aliased
exports lost, shared overloads) fail without `.fails` on the missing
export (checked). `expectSharedOverloads` calls the real options.
Consumers (minimal edits in other owners' files): plugin-options.test.ts
(PO), router-plugin-context.test.ts (CTX), route-hmr.test.ts (W2-g:
Solid cases get `vite-plugin-solid` with `ssr: true`, which a Solid app's
SSR environment needs for the router's Solid build; the client evaluation
stubs the router with the SSR-loaded real package), dev-server-new-routes
(W2-f) and vite-hot-update.ts (W2-g deletes it): the router is served
from `/@fs/`, so the page-load skip patterns include it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`routerRuntimeFiles`, the stand-in `@tanstack/react-router` of apps with
routes (route creation, child linking, lazy loading, `sideEffects: false`),
is gone: the apps resolve the real built `@tanstack/react-router` (a
dependency of this package, built by `^build`) like any dependency, as
the `realRouter` dev servers already did. `realRouter` is gone with it
(always on). `startRuntimeLinks`/`linkStartRuntime` use the
compiler-test-utils workspace-packages helper.
Scripts that called a split component as a function render through the
real router and React instead: every app gets `harness/render.ts`
(`renderPath(routeTree, pathname)`: `createRouter`, `router.load()`,
`<RouterProvider>` to HTML; plus React's `createElement`/`renderToString`
for a loaded component on its own), which a test entry re-exports.
Rows: S10 (build-harness, start-build-options, start-build-route-hmr),
S47's runtime observation half (page HTML, not a component call), the
source-map stack now comes from React rendering the loaded component.
start-build-options: the hand-written router `index.d.ts` is deleted;
the Register checks type-check against the real router declarations
(verified: the test passes with them, and `Equal<any, 'ROUTER'>` would
fail if the import did not resolve).
hydrate-build.test.ts (A3b's file): its stand-in router no longer
derives from the harness's; the route creation moved into its own
stand-in block (W2-h replaces the hydrate stand-ins with the real
packages).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`@tanstack/compiler-test-utils/workspace-packages` generalises the
`startRuntimeLinks()` of the Start build harness: `workspacePackage(name)`
is the root of the built workspace package (packages/*, checked for its
built entry; the error names the Nx build target to depend on),
`workspacePackageLinks(names)` gives `AppOptions.symlinks` entries for an
app's node_modules, and `linkWorkspacePackages(root, names)` creates them
for an app made without the harnesses. A test app under a package's tests
directory resolves that package's own dependencies (e.g. the routers)
without links; the helper is for packages the owner cannot depend on
(`@tanstack/react-start` from start-plugin-core).
Contract test in tests/integration (links `@tanstack/history`, which the
package's `test:integration` target now builds, and imports it through the
link like an installed app).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
known-bugs-code-splitter-client-builds.test.ts took 21 s at one worker,
over the 15 s per-file limit of the slow tier. Its server-code, symlink,
source-map and production describes move unchanged to
known-bugs-code-splitter-client-output.test.ts (now 10 s and 12 s).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Unit tests step now runs the fast tier only (test:unit no longer
includes the Chromium tests, which these runners cannot launch). A new
Integration smoke step runs test:integration:smoke of router-plugin (a Vite
and an Rsbuild production build of a split route) and start-plugin-core (a
Vite and an Rsbuild import-protection build). The browser tests stay in
test:integration on Linux x64 in the main PR workflow. The workflow also
runs on compiler-test-utils changes, which both suites import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under Vitest, the compiler packages set NODE_COMPILE_CACHE for their test
workers and the child Node runs those start (no outcome change).
compiler-test-utils gets a Vitest reporter that compares a tier's run with
its budget (test-budgets.json, the B3 table: target and hard limit per
package and tier, dev at default workers, ci at one worker; at one worker,
each slow-tier file against the 15 s per-file limit). It only reports for
now. router-plugin, start-plugin-core, compiler-test-utils and
react-start-rsc use it; router-generator does not depend on
compiler-test-utils.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mechanical moves, so that the owners of the next harness changes do not
edit one shared file: router-plugin's regression-helpers.ts keeps the
evaluation helpers and buildAndRun and re-exports plugin-host.ts (the
in-process host of the code-splitter, generator and route HMR plugins),
lazy-tracking.ts (loadRoute and its router stubs) and hmr-model.ts
(hotUpdate); start-plugin-core's keeps the compiler and runtime helpers and
re-exports imports.ts, diagnostics.ts, source-maps.ts and render.ts (the
<Hydrate> chunk helpers). Every name the old modules exported is still
exported from them (checked with the TypeScript checker; start-plugin-core
now also exports createTestModuleGraph and moduleId, which render.ts
imports). No code changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each compiler package with real-tool tests (router-plugin,
start-plugin-core, compiler-test-utils) gets two Vitest projects: `unit`
(`test:unit`, in process; a Vite dev server in middleware mode is allowed)
and `integration` (`test:integration`, files under tests/integration/
that start real builds, Rsbuild dev servers, child Node runs or browsers).
Files that only start real tools move to tests/integration/ unchanged
(apart from relative paths). Mixed files are split by test: the in-process
tests stay in place, the real-tool tests move to a file of the same name
under tests/integration/ (known-bugs-code-splitter into three integration
files). No assertion changed; every test keeps its name and outcome
(vitest outcome per test compared with the baseline: 0 differences).
start-plugin-core: the Vite dev-server tests that link the built
@tanstack/react-start package move to the slow tier with the builds, so
test:unit depends on ^build only and the react-start build dependency
moves to test:integration.
Nx: test:integration (and test:integration:smoke) in targetDefaults like
test:unit; test:unit inputs exclude tests/integration; test:integration
joins test:pr, test:ci and vite-ecosystem-ci:test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vite's optional peers `sass` and `sass-embedded` are resolved from whatever
versions exist anywhere in the lockfile graph. Two sass versions were in the
graph: 1.97.2 (the `^1.97.2` devDependency of the three Start css-modules
e2e apps) and 1.105.1 (pulled by `sass-embedded`, which
`@rsbuild/plugin-sass` brings into e2e/react-start/css-modules). Importers
resolved at different times got different vite peer variants: compiler-test-
utils, react-start-rsc and eslint-plugin-start got vite(sass@1.105.1), the
rest vite(sass@1.97.2). Two copies of vite break Start's
`isRunnableDevEnvironment` (instanceof) check, so Start's dev server
middleware never ran in the compiler test dev servers.
The css-modules e2e apps now ask for sass ^1.105.1, the version sass-embedded
already uses; the graph has one sass and one vite@8.3.4 (esbuild 0.28.2)
variant.
With Start's dev middleware working, the client-rendered route HMR test
turns it off explicitly (it serves index.html, not Start's SSR); the Start
dev-server harness accepts the Vite plugin options for that.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`files` of the shared construct build has no index signature (TS7053 under
TypeScript 5.7 to 5.9).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Start's real runtime (real-start-build) the Rsbuild dev tests of
start-plugin-core became flaky (baseline ac3f8d5ac9: 8 of 8 runs of
tests/rsbuild/dev-server.test.ts green; real-start-build 953b24f622: 1
failure in 6; the merge: 1 in 11). Two causes, both in the shared harness:
- "Rsbuild failed to compile the app: Unable to access compilation with
id = CompilationId(5) now": `onDevCompileDone` runs after the compile
ended; when a later compile already started (Start rewrites its server
fn resolver module, which the watcher reports), Rspack has dropped the
compilation and reading `builtModules` throws. The harness now skips
such a report: the running compile's end reports instead.
- "the client's hot update has the edited client code ...": `label` never
showed up within 10 s. `hotUpdates()` read the hot-update chunks from
disk, skipping those a later compile removed. It now keeps their code,
read in each environment compiler's `done` hook while the compilation
is alive.
`hotUpdates()` keeps its contract (the hot-update chunks of the compiles
since the last `edit()` began). 8 of 8 runs green afterwards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-18 (test infrastructure must not re-implement other
tools or packages). The by-id helpers mirrored Start's server-fn HTTP
handler (`handleServerAction`): resolve the id with `getServerFnById`, call
it with `{ data, method }`, unwrap `{ result }` / `{ error }`. They now send
the request a page sends to Start's own server entry:
- builds: the SSR entry exports Start's default server entry
(`@tanstack/react-start/server-entry`) and client RPC
(`@tanstack/react-start/client-rpc`) (`callByIdExports`); `callById` calls
the client RPC with a `fetch` that hands a real `Request` to the server
entry's `fetch` (`callByIdPrelude`). `handleServerAction` is not exported
by `@tanstack/start-server-core`; `createStartHandler` (the default server
entry) is its public way in.
- dev: `callServerFnById(server, id)` (dev-server.ts) does the same with
the dev server's SSR environment (the server entry Start's dev middleware
imports, `virtual:tanstack-start-server-entry`). The dev servers mount
Start's whole Vite plugin (`start`, `realRouter`, `startServerEntryFiles`).
The harness cannot go over HTTP: Start's dev middleware is not installed
because compiler-test-utils and start-plugin-core resolve two copies of
vite 8.3.4 (different sass peers), so `isRunnableDevEnvironment` fails.
Glue only: a page's browser adds `Sec-Fetch-Site: same-origin`, which
Start's CSRF middleware requires (without it every call is "Forbidden"),
and the caller throws `error` / returns `result` like the client's server
fn. The old copy (`callServerFnById(getServerFnById, id)` in
build-harness.ts) is deleted. Contract test build-harness.test.ts "a
server fn is Start's RPC on the client ..." now checks the real round trip
(by id, and an unknown id rejects with "not found").
Changes needed by the real server entry:
- It renders with the real `@tanstack/react-router`, so an app with the
router stand-in cannot load it (Vite SSR: "does not provide an export
named 'RouterProvider'"). start-build-env-separation "each server fn of
the client runs by its id in the SSR build" gets its own build of the
server fn files (no routes) instead of the shared routed build.
- bundledDev tests: Start's plugin needs React Refresh
(`@vitejs/plugin-react`), and its client entry replaces the harness's
bundle entry, so `harness/client-entry.ts` re-exports `src/entry.ts`.
- known-bugs-start-compiler "calls a server fn id on a fresh dev server":
the raw dev servers use Start's whole plugin (`startPlugin`,
`startPluginFiles` now exported). Start logs the failed call's Vite
plugin error with `console.error`; Vitest's console forwarding then ends
the run without a report, so the test silences `console.error` during
the call.
- Not converted: start-compiler-dev-server "a server fn provider
environment other than SSR" (compiler plugin alone with an `rsc`
provider; the server entry for such a setup is the framework's). It
calls the provider's resolved server fn directly and checks
`{ result }`, without claiming to be the HTTP handler.
Pins re-verified red for the same reason (run once without `.fails`):
- D6 "SSR: a server fn only server code references is not callable over
HTTP" (vite, rsbuild): serverOnlyFnOverHttp is 'server-only fn' (now a
real HTTP request), as before.
- known-bugs-dev-server "SSR: a module importing an edited factory module
through a re-export" (2 rows): same diff as before (id 'undefined',
byId "Invalid server function ID: undefined").
- known-bugs-start-compiler "calls a server fn id on a fresh dev server
that has not compiled its module": same message as before ("Invalid
server function ID: eyJ...").
Also drops a stale reason from a start-router-dev-server comment (the
real `@tanstack/react-start` is linked now).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in packages/start-plugin-core/tests/dev-server.ts: keep both
sides. The app links the real @tanstack/react-start (startRuntimeLinks,
real-start-build) and gets the router stand-in only with `start` and
without `realRouter` (baseline).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-18 (test infrastructure must not re-implement other
tools or packages). The build harness no longer writes a hand-written
`@tanstack/react-start` into the app: `node_modules/@tanstack/react-start`
links the built workspace package (`startRuntimeLinks`), and its
dependencies (start-client-core, start-server-core, start-storage-context,
router-core, ...) resolve from its real path. The `test:unit` target now
depends on `@tanstack/react-start:build` (task-level dependsOn, no project
dependency, so no cycle). The Vite and Rsbuild dev harnesses link it too.
Stand-ins kept, only where the test process cannot run the real piece,
each checked against the real runtime:
- request context: SSR scripts and in-process server calls run in a
`StartStorageContext` (typed against the real one) of a request to `/`
(`inRequestContext`, `runInRequestContext`); contract test
build-harness.test.ts "SSR scripts run in a request context that Start's
runtime reads".
- the network: a client call's requests are observed through the call's
public `fetch` option (`requestsOf`); contract test "a server fn is
Start's RPC on the client ...".
- the server-fn HTTP handler: by-id calls resolve, call with
`{ data, method }` and unwrap `{ result }`/`{ error }` like
`handleServerAction` (`callByIdPrelude`, `callServerFnById`).
- Vite dev client evaluation loads start-client-core through Node
(`servedStartRuntime`): the root entry imports React (CommonJS), which only
Vite's dependency optimizer (off in the harness) serves to a browser.
- Rsbuild compiler-only dev server defines `TSS_SERVER_FN_BASE` like
Start's plugin; its VM gets the WinterTC web APIs a browser has.
- hydrate-build keeps its own `@tanstack/react-start` (Hydrate rendered by
a string JSX runtime); new contract test: its names are the real
package's.
Harness realism: Vite builds run in the app's directory, as `vite build`
does (Start's plugin crawls the working directory's package.json for Start
libraries to bundle in SSR); the build harness records Rsbuild's
`output.module` for the dangling-name check.
Status changes, each investigated:
- Tests that relied on the fake (`functionId`, client RPCs throwing
"client RPC <id>", `getServerFnById(id)({})` returning the bare result,
middleware `.server()` stubs, uncompiled `handler(rpc)` returning `rpc`):
rewritten to Start's real API (`serverFnMeta.id`, `url`, requests the call
sends, `{ result }` unwrapping). The library-server-fn tests passed
vacuously on Vite: the library stayed external and uncompiled in SSR,
and the stand-in's uncompiled `handler(fn)` returned `fn`. The apps now
depend on their library, as installed ones.
- Route-tree type test: the `@tanstack/react-start` d.ts stand-in is
replaced by the real package's types.
- Pins re-verified red for the same reason (with `.fails` removed, failure
messages compared to baseline 5d35383f02): 123 pin rows across the build,
dev and import-protection files are unchanged. Import-protection dev pins
load only the app's modules (Start's server package imports Start's
entries, which only Start's whole plugin provides). Library-function
pin (D13): SSR now also shows the uncompiled server fn (`undefined`
instead of the stand-in's handler result).
- NEW pin (Vite): a build run from another directory leaves a Start
library external and uncompiled in SSR (src/vite/plugin.ts:143 crawls
`process.cwd()`, not Vite's root); verified red: the SSR call returns
undefined. Rsbuild row passes.
Cheap stand-ins replaced as well: createMiddleware.test.ts
`middlewareFactoryStub`, known-bugs-start-compiler `middlewareStub` and the
string stubs of its dev servers, start-compiler-factories' middleware stub
now use Start's real builder (keeping a `.server()` trap where the test
needs one).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Additive harness changes for Start builds that bundle Start's real runtime:
- createApp `symlinks` may point to an absolute path (a workspace package
linked into the app's node_modules). Relative targets resolve as before.
- describeBuild `esModules`: the chunks are ES modules (the bundler's
`output.module`), even a chunk without import or export. The dangling-name
check of an unminified Rspack/webpack client build minifies such a chunk
as a module, like the bundler's own minimizer does. Before, a module chunk
without import/export was minified as a script, so its unused top-level
code (here seroval's `const RETURN = () => T`) stayed and was reported.
- known globals: `Temporal` (browsers and Node.js 26 define it; the
`globals` package 16.x does not list it yet). Start's serializer
(seroval) revives Temporal values with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-18: no copies of React HMR logic in tests.
Deleted (copies of React Refresh / plugin-react behaviour):
- regression-helpers `isRefreshable` / `expectRefreshableRouteOption`:
modelled how React Refresh's runtime resolves memo / forwardRef to a
registered family.
- react-refresh-route-components "a React route module compiled for Vite
stays a Fast Refresh boundary" (6 tests): evaluated the module twice
with one hot context and called plugin-react's
validateRefreshBoundaryAndEnqueueUpdate by hand, as its accept glue does.
- react-refresh-route-components "React Refresh registers split route
components" (memo / forwardRef rows) and "hoists the components of the
module's Route when another route is created first".
- known-bugs-route-hmr "React Refresh registration": the memo(Page)
control, the "registers an inline component written as $name" pins and
"registers a method-shorthand component of a split route".
Replacements on the real page harness (route-hmr-page.ts, Vite +
@vitejs/plugin-react, headless Chromium):
- route-hmr-browser: a route without a component and a root route with an
inline stateful component apply their edits in place (state kept, no
reload), autoCodeSplitting on and off; split components written inline
in memo / forwardRef calls, and inline components after another route
the module creates (unsplit component, and the route module's
pendingComponent when split), show their edits without a reload.
`extra` is no longer exported there: an exported route object makes
plugin-react reload the page (React Refresh boundary rule), which was
not what the source test was about.
- known-bugs-route-hmr "route HMR in a real page": control memo(Page)
unsplit; pins (each verified red by one run without .fails: the page
keeps "inline v1" / "root v1", no reload) for `as any`, `satisfies`,
memo(() => ...), forwardRef(function ...), method shorthand (unsplit and
split) and React.memo(forwardRef(...)) on a root route.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-18: tests must not re-implement other tools. The
start-router-dev-server "client route module takes part in HMR" test
(spc:6046) applied the hot update "the way Vite's HMR client does": a
copied createHotContext, accept callbacks called by hand, a stub
`__TSR_ROUTER__`. Deleted.
Replacement: a real Vite dev server with Start's whole Vite plugin and
@vitejs/plugin-react (`browser: true` of the shared harness) serves an
app with the real @tanstack/react-router to headless Chromium
(`@tanstack/compiler-test-utils/browser`). Vite's own watcher reports
the edits; Vite's HMR client, React Refresh and the route HMR code Start
adds apply them. After a loader-only edit and then a component edit of
the split page route, the page shows the new loader data and component,
the split component keeps its click count (no remount), there is one page
load, no full-reload message and no page error.
The page is the app's index.html, rendered on the client: Start's SSR
document needs the real @tanstack/react-start, which depends on
start-plugin-core (a workspace cycle). Start SSR + HMR in a real app stays
in e2e/react-start/hmr.
Scratch control (reverted): with `addHmr: false` in Start's client code
splitter (vite/start-router-plugin/plugin.ts), the test fails: the page
reloads (2 loads) and shows "count 0".
Harness: tests/dev-server.ts `realRouter` (with `start`) leaves out the
stand-in router package. New devDependencies: @tanstack/react-router
(workspace), @vitejs/plugin-react, react, react-dom (catalog); lockfile
regenerated with pnpm install --no-frozen-lockfile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in packages/compiler-test-utils/src/rsbuild-dev-server.ts: kept
both sides. The returned server has hmr-real's `url` (browser mode) and
w2-builddev's `edit()`, which clears the hot-update chunks collected
since the previous edit before writing. `hotUpdates()` keeps w2-builddev's
behaviour (`.js`/`.mjs`/`.cjs` chunks of every compile since the last
edit); browser mode, HMR-on default with `browser`, live reload and the
HTML page come from hmr-real.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-18 ("absolutely insane"): no copies of Vite / webpack /
Rspack / React HMR or update-propagation logic in tests.
Deleted:
- tests/react-refresh-model.ts (port of @pmmmwh/react-refresh-webpack-plugin's
executeRuntime, React's resolveFunctionForHotReloading, plugin-react's
boundary check) and the propagation / refresh parts of `hotUpdate` in
regression-helpers.ts (boundaries, invalidation, refresh families,
render/remounted). `hotUpdate` keeps only our route HMR code running against
the bundler's hot API contract (Vite accept callback gets the new module;
webpack re-runs the module with its dispose data), as before w2-hmr.
- the react-refresh devDependency (lockfile regenerated).
- the w2-hmr pin "vite: applies route options a factory call builds" (ruling
2026-10-18: reloading is fine); the edit now must show in the real page.
- model-only tests: route-hmr hot updates of split / root / unsplit routes and
their React Refresh assertions, regression-helpers "with React Refresh"
controls and "reloads the page exactly when a Vite dev server does",
react-refresh-route-components "route HMR code next to user bindings", the
two editRouteFile tests of route-hmr (covered by the page steps below).
New real harness (tests/route-hmr-page.ts, on compiler-test-utils `browser`):
a Vite dev server with the router plugin and @vitejs/plugin-react /
vite-plugin-solid / @vitejs/plugin-vue-jsx, or an Rsbuild dev server with the
router plugin's Rspack entry and @rsbuild/plugin-react (new devDependency,
^2.0.0 as in the e2e apps), serves a file-based app with the real router
package to headless Chromium; edits go through the dev server's own watcher;
the test reads the DOM, clicks counters (state), and gets `reloaded` (page
loads, plus Vite full-reload messages).
Ported (tests/route-hmr-browser.test.ts, Vite and Rsbuild, autoCodeSplitting
on and off, several edits per server, concurrent):
- edited component body + loader + `Route` read: new text, new loader data,
`useState` count kept, no reload;
- a hook added: remount (count 0), no reload;
- errorComponent added / edited / removed, pendingComponent and
notFoundComponent edited: new text, no reload (removal: text only, see pin);
- arrow component, two split components, quoted keys, loader in its own chunk,
loader in the component chunk (Vite; Rsbuild pinned), a value loader and
component share, user bindings named hotData / handleRouteUpdate: state kept,
new text, no reload;
- root route: body + loader in place with state, shellComponent added /
edited (state kept) / removed, no reload; factory-built options: the edit
shows (reload allowed);
- Solid / Vue in Vite: the edit shows; Solid unsplit without a reload.
regression-helpers.test.ts controls (Vite and Rsbuild): a body edit keeps
state, a renamed child component loses it, an edit of a module no boundary
accepts reloads the page.
Scratch control (not committed): with the route HMR code removed
(codeSplittingOptions.addHmr: false for split routes; the route HMR plugin
patched out of router-composed-plugin.ts for unsplit routes, reverted), a
loader + component edit reloads the page and loses state on both bundlers.
Pins (known-bugs-route-hmr.test.ts "route HMR in a real page", each verified
red for the right reason by one run without .fails):
- moved: D10 Solid / Vue split (red: reloaded true); without React Refresh,
now Rsbuild with pluginReact({ fastRefresh: false }) (red: page stays v1).
- NEW: renaming the route component keeps the old one (Vite, Rsbuild x split,
unsplit; red: page stays "Page v1").
- NEW: Rsbuild: an edit of a split loader never shows (red: "loader v1").
- NEW: Vite: removing a split option the page loaded logs "require is not
defined" / "Failed to reload ...?tsr-split=errorComponent" (red: those two
page errors).
Kept on the slim hotUpdate (our code only): regression-helpers hotUpdate
controls, route-hmr "the route a hot update applies to", Solid / Vue route HMR
code (now also unsplit and the new component), webpack factory options,
known-bugs "route updates", code-splitter-plugin-pipeline (dropped
`refresh: true`), code-splitter-route-options root staticData.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-18: test infrastructure must not re-implement other tools;
route HMR tests drive the real tools. Shared, plugin-agnostic, additive:
- browser.ts (new export `./browser`): `openPage(url)` opens the page in
Playwright's headless Chromium (one browser per test process, one context per
page), counts page loads (a full reload loads it again), records page errors
and console messages, and `waitForText(expected)` waits for the DOM with a
bounded timeout and a diagnostic error. New dependency: @playwright/test
(catalog, already a root devDependency; chromium-1243 is installed);
lockfile regenerated with pnpm install --no-frozen-lockfile.
- dev-server.ts: `browser: true` serves the app as `vite dev` does: listens on
a free port (`url`), Vite's HMR WebSocket on, Vite's own file watcher
reports edits (`write()`; `settle()`/`edit()` throw), dependency optimizer on
with its cache in the app directory, `appType: 'spa'` (index.html). The
defaults are unchanged (no watcher, no WebSocket, no dep discovery).
- rsbuild-dev-server.ts: `browser: true` listens on a free port (`url`), emits
the HTML page, HMR (default on in this mode) and live reload. The harness
default `hmr` stays off without `browser`.
- tests/browser.test.ts: controls for both bundlers: an update a module
accepts applies in place (one page load), an update nothing accepts reloads
the page (two loads).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prerendered-pages helper comment (moved from known-bugs-route-options
by the E1 audit) still said start-build-prerender.test.ts runs the
prerender step. That file was deleted in f3c5ae0575 (prerendering is out
of scope); nothing runs the step now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- start-compiler-runtime-contract.test.ts (audit E1 missing coverage 1):
the stand-ins the harness keeps carry exactly what Start's own
createClientRpc / createSsrRpc create (now built from them), and one
module with a server fn, a function middleware (validator, client,
server) and an isomorphic fn runs on Start's runtime from the client
(callFromClient), the SSR caller and an HTTP call by id; a failing
handler answers { error }, which the caller rethrows.
- The SSR RPC stand-ins reuse the real createSsrRpc metadata.
- factories: the first env-separation test runs in build and dev mode
(missing coverage 4).
- Formatting and type annotations of the new harness module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"the client route tree follows the edits" still failed 4 of 16 repeats
after the bounded wait: at the server-only -> page step no message ever
came and the client route tree stayed without the route. Cause: the
router generator tells route file edits apart by modification time only
(router-generator generator.ts `didFileChangeComparedToCache`), and the
kernel updates mtimes once per clock tick; the harness wrote the second
edit within the tick of the first, so the generator never saw it. A
person's saves are not that close: the test now waits 50 ms before each
save. 40 repeats green. The generator behaviour is recorded in FOLLOWUPS
(NEW, unpinned: reachability needs two saves of one route file within one
tick).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new "Rsbuild dev with HMR" test failed once in two full runs (and 1 of
11 repeats): the client's hot update did not have the edited code when
read. An edit can cause more than one compile (Start rewrites its server
fn resolver module, which the watcher reports), and the client's compile
can end after `edit()` returned.
- Shared harness (packages/compiler-test-utils/src/rsbuild-dev-server.ts):
`hotUpdates()` returns the hot-update chunks of every compile since the
last `edit()` began, not only the last compile's (a chunk a later compile
removed is skipped). compiler-test-utils suite unchanged.
- The test waits (bounded, 10 s) for the client hot update with the edited
client code, then checks that no hot update since the edit has the
edited handler. 44 repeats green after the harness change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-18: the second `options` argument and a plain-data
model are outside React Start's public type (`renderToReadableStream(node:
React.ReactNode)`, src/flight.stub.ts) and must not break: the compiled
call still runs, the options / model reach the runtime unchanged and a
stream is produced. CSS for them and a dev warning are not required either
way.
- The D8(a) goal pin for `renderToReadableStream(<Card />, options)` becomes
a passing test, neutral on CSS (stream with or without it).
- rsc:450 plain-data model: checks the call and its model in dev and build,
neutral on CSS and warnings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-18 (E1 ASK-1): a default-config Start build (Vite and
Rsbuild) of a module whose `*.client.*` and client-only-marked imports are
used only by createClientOnlyFn / an isomorphic .client() reports no
import-protection violation, the server bundle holds none of their code,
and each environment runs its implementation. Negative control checked by
hand: adding a top-level use of the .client import fails the build with an
import-protection error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- createIsomorphicFn: named exports read explicitly (P1), the client has
no server implementation (SERVER_IMPL marker), declaredNames assertion on
the neutral name dropped (ruling 2026-10-17); SSR keeps asserting it drops
`./x.client` (ruling 2026-10-18: import-protection-denied names must go),
client asserts it drops `./x.server`. Real runtime instead of a stub.
- clientOnlyJSX: SSR import-absence loop on neutral names dropped; the
libraries the children use throw when called during SSR, so the test
proves the server never evaluates the children (missing coverage 2).
- compiler.test: empty-module test in dev ("a file the user just
emptied"); the client-only result is read inside a function;
invalidateModule tests in dev mode; `var a = b; var b = a` row deleted
(cycle rows at "re-export chain resolution" cover it).
- caller-dead-code: own-name local pin uses `function session() { const
session = ... }`; label and for-init rows dropped.
- known-bugs-start-compiler: computed-member chain pins, top-level-block
alias row, `.bind(null)` pin (rsc renderServerComponent().then() pin
covers the root cause), parameter-shadowing pins (dup of the
every-factory shadowing pin), `fn_createServerFn_handler` row (generated
name), redeclared-var row and computed-member transform pin deleted;
re-export alias pin imports from @tanstack/react-start; Vue pin uses a
plain `<script lang="ts">` block, id `Page.vue?vue&type=script&lang.ts`
(checked in @vitejs/plugin-vue 6.0.5 genScriptCode/attrsToQuery: lang is
in the ignore list and appended as `&lang.ts`).
- preserves-user-code: empty destructuring pin and N3 parenthesized-JSX
pins (incl. the Hydrate fallback one) deleted; the parenthesized-JSX
control stays.
- factories: wrapped-chain table rewritten to valid chains (tsc:
`.server().client()` is TS2339) with parentheses / as any / as unknown as
T / satisfies (16 rows -> 13 passing + wrapped validator rows moved into
the validator pin, same bug, verified red: ./check.server kept); builder
variable control uses `.client()` then `.server()`; isomorphic
wrapped-link pin checks client and SSR only (no provider for a module
without a server fn); callee pin keeps `as any` only; aliased re-export
of createClientOnlyFn checked by behaviour on the server; string export
name row deleted. Links read from Start's real createMiddleware options.
- known-bugs-route-options: prerender pins and their controls moved to
tests/outside-compiler-corpus/prerender-route-options.test.ts (ruling
E1 ASK-2).
ASK-1 (ruling 2026-10-18): SSR import assertions on `.client` names kept
(factories, import-forms, KB ssr declaration control and typeof pin).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build harness builds for `esnext`; apps use Vite's default client
target (`baseline-widely-available`), which lowers syntax after Start's
compilers ran. With that target (through `viteConfig`):
- start-build-env-separation: a server fn handler (and its dependency) is
only in the SSR build, which runs it; the client keeps its other code and
calls the server (client RPC).
- start-build-source-maps: a throw in a split route component maps to its
line in the route file (minified).
Both pass on main.
Audit: E2 missing coverage #5 (brief item 3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New rsbuild/dev-server test "Rsbuild dev with HMR: editing a server fn
module" on Start's whole Rsbuild plugin with `hmr: true`: after an edit of
a module with a server fn and a client function, the client's hot-update
chunk has the edited client code (MARK_LABEL_V2) and not the edited
handler (MARK_HANDLER_V2), which the SSR output has. Passes on main.
Shared harness (packages/compiler-test-utils/src/rsbuild-dev-server.ts):
`hotUpdates()` only kept `*.hot-update.js`; Start's client environment
emits ES module output (`*.hot-update.mjs`), so it returned nothing. It
now keeps `*.hot-update.{js,mjs,cjs}` chunks (manifests still excluded).
compiler-test-utils suite unchanged (167 pass).
Audit: E2 missing coverage #4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Start forces `addHmr: true` in its client code splitting
(vite/start-router-plugin/plugin.ts, rsbuild/start-router-plugin.ts), but
only router-plugin's build-production.test.ts checked that production
client output has no route HMR code. New start-build-route-hmr.test.ts:
- controls: the Vite dev client route module and the Rsbuild dev client
output (Start's whole plugin) contain route HMR names (HMR APIs, route
HMR data keys, React Refresh support);
- Vite and Rsbuild production builds through Start's plugins: no client
chunk contains any of them, and the page's loader and component run.
Passes on main. Mutation check (router-plugin
router-code-splitter-plugin.ts, `addHmr` ignoring production, reverted):
the Rsbuild row fails with import.meta.webpackHot / tsr-route-id /
tsr-split-component in the client output; Vite deletes that code itself
(dead `import.meta.hot` branches), so its row passes, which is the right
outcome for users.
Audit: E2 missing coverage #1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-compiler-dev-server "the client never gets the edited .server(), and
SSR runs the new one" now mounts Start's whole Vite plugin
(`startDevServer({ start: {} })`: Start's environments, import protection,
router plugins) instead of the compiler plugin alone, as an env-separation
dev row with the real wiring. Passes on main.
Audit: E2 harness ("most dev tests do not use the full Start plugin").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The planned D8 warning (React's RSC CSS transform) is dev-only, but only
builds tested the warning channel. With Start's whole plugin and the
`warnMe` test transform (server environment):
- Vite dev (`startDevServer({ start, compilerTransforms })`): loading
`src/entry.ts` in the client and the server logs exactly one warning,
naming src/warned.ts; the server runs the module. Passes on main.
- Rsbuild dev (`startRsbuildStartDevServer({ compilerTransforms })`):
`.fails` pin, same bug as the Rsbuild build pin in this file. Verified
red for the right reason with a temporary probe in
rsbuild/start-compiler-host.ts `warnTransformContext` (reverted): the
transform warns on src/warned.ts, `ctx.emitWarning` is undefined, so the
warning is dropped and `server.warnings` has none.
The build tests stay (secondary).
Harness (additive): `compilerTransforms` option on `startDevServer` (with
`start`) and `startRsbuildStartDevServer`.
Audit: E2 start-build-warnings:140 (FIX), missing coverage #2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness (E1 H1-H3, H7; 2026-10-18 ruling "test infrastructure must not
re-implement other tools"): evaluated modules now link
`@tanstack/<framework>-start` to the real `@tanstack/start-client-core`
(createServerFn, createMiddleware, createStart, env-only and isomorphic
factories) and `/server-rpc` to the real `createServerRpc`
(tests/start-runtime.ts). The hand-written runtime stub is gone: handlers
now run as Start runs them (`options.serverFn(ctx)`, ctx with data,
context, method and serverFnMeta, async middleware `next` passing context
on, middleware and server fn validators), provider handlers answer
`{ result }` / `{ error }` (helpers unwrap with `serverFnResult`), and
`serverFnMeta` replaces the stub's `meta`.
Stand-ins kept (Start cannot run them in-process): the request context
(storage falls back to an empty request), the client RPC (Start's own
metadata, no fetch), the SSR RPC's server-fn resolver (createServerGraph).
`callerRpcId` reads a caller's RPC id; `callFromClient` runs a client
caller through the real client middleware into the provider handler.
Hand-built builder stubs in tests are replaced by the real builder.
E1 findings applied here (tsc checks against start-client-core types):
- createMiddleware:53/185/202/243/255/288: rewritten to valid chains.
tsc: createMiddleware().client / .validator -> TS2339; .server().client
-> TS2339 (FunctionMiddlewareAfterServer); createMiddleware({ id }) ->
TS2353; createStart(() => {}) -> TS2345.
- exports-and-directives:42 per-name checks, `named` instead of a string
export name; :139 export-list line deleted (:158 covers); :276/:283/:305
redeclared-var tests deleted (D13 goal pin added in declaration-sites);
:398/:418 directive tests deleted (compiler.test.ts module-directive test
covers the configured directive).
- handler-scope:83 `typeof this` dropped (Start calls the handler as a
method of its options; tsc accepts `this: unknown`); :107 object method
through a named object; :150 `as unknown as` cast (tsc ok).
- declaration-sites:36 clear-rejection regex; :134 top-level switch/block
placements deleted (+ their KB pins); :169 result toMatch
function|object; :203 SERVER_SECRET marker; :227 optional-chain pin
accepts a clear error or the RPC path; new D13 goal pin: two functions
each declaring `const fn`.
- createServerFn:172 finds the provider handler by id and runs it.
- caller-dead-code: client middleware observed by calling from the client.
- Missing coverage 3: a valid full middleware chain on client and SSR.
hydrate-split-modules.test.ts: its click stub reads the RPC id from
Start's caller metadata (one line; the client RPC is now Start's own).
Pins: every remaining .fails pin re-run as a normal test before/after;
failure reasons unchanged except the RPC-shape wording (same root cause)
and KB "ssr: a createServerOnlyFn handler still produces an RPC caller"
(now the real runtime rejects the id string the SSR output passes, was
"ssr.fn is not a function"; same compiler bug). New pins verified red:
optional chain (client left untransformed), two `const fn` functions
(client gets no RPC / provider export missing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- rsbuild/dev-server "every module importing a factory from %s that
stops being one keeps its handler" (2 rows): instead of counting
`db.x()` in printed output, the client calls both fns (entry
`globalThis.run`) and gets ['MARK_DB_SECRET', 'MARK_DB_SECRET'].
- "... that becomes one loads no server code" (2 rows): also checks that
calling the fns in the client goes to the server (client RPC).
- Both now run on Start's whole Rsbuild plugin
(`startRsbuildStartDevServer`: client and SSR environments, import
protection) instead of the compiler transforms on the client alone. The
dependency is `src/db.ts`, not `src/db.server.ts`: import protection
mocks a `.server` file in the client (and awaiting the mock, a thenable
that resolves to itself, blocks the process).
- "the server fn ids do not come from generateFunctionId": drops the
`generated` calls check (whether the dev server calls the generator is a
mechanism); keeps "no id is custom-".
- New helper `runInClient(server, script)` in rsbuild-dev-server.ts
(additive).
Audit: E2 rsbuild/dev-server:66 (FIX), :151 (FIX), harness note
(startRsbuildDevServer is not Start's plugin).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Missing coverage 1 (audit F): each pin that only existed on an internal
function (rewriteDeniedImports, mock-module generators) gets a real-app
twin on a Vite dev server (mock mode) and in Vite and Rsbuild mock-mode
builds. Outcome: what `entry.read()` returns, and no real code in the
client bundle. Pins verified red by one run without .fails:
- `export * as secrets from './secret.server'` in an importer: Vite dev
(SyntaxError: no export 'secrets'); builds pass.
- a denied file with `export * as helpers`: Vite and Rsbuild builds
(MISSING_EXPORT / ESModulesLinkingError); Vite dev passes.
- a denied file exporting `delete` used as `api.delete()`: all three
(parse errors on `export const delete`).
- a namespace member read in a function declared before the import (denied
specifier): Vite dev and build (`db.query is not a function`); Rsbuild
passes.
- enum + namespace exports of a denied file: NEW Rsbuild bug, the real enum
value ships in a mock-mode production build (Rsbuild's
collectTypeScriptInfo.exportedEnum inlines `Color.Red`; verified by a
scratch build with exportedEnum: false, which mocks it). Vite passes.
- a JSX pragma leading a denied import passes everywhere (default JSX is
compiled before the rewrite); kept as passing coverage.
`delete` stands for the reserved-name bug (eval/arguments are not
realistic export names).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- analysis.exports:50 empty export name "" pin: deleted (fuzzer-only input;
tsc accepts `export { x as "" }`, but no realistic module exports it).
- analysis.exports:320 `import(('denied'))`: deleted (the literal dynamic
import is covered by utils.test.ts getImportSources "import('./lazy')").
- analysis.exports:139 re-exports: no Object.keys equality (P1); the
per-name mock check proves presence. :175: `'value' in module`.
- rewrite:132 weak `export * as ns` pin (toBeDefined): deleted, covered by
known-bugs.test.ts "a denied namespace re-export keeps its exported name".
- rewrite:281 `__tss_deny_0` declared by the module: deleted (generated
name, not user input).
- rewrite:90/:145/:216: toMatchObject on the module; loaded/mocksLoaded
stay exact.
- sourceLocation:426 `createServerFn()[handler]` row: deleted (valid TS,
unrealistic).
- virtualModules:245 Rsbuild mock-runtime payload: deleted, covered by
rsbuild/import-protection.test.ts "Rsbuild dev: mockAccess" (real dev
server, error/warn/off).
- rsbuild/import-protection:16/:30/:48 getRsbuildResolvedImportProtectionCheck
unit tests: deleted, covered by the build-options excludeFiles table and
the build marker rows on Rsbuild (and the new default-markers row).
- rsbuild/import-protection:122: drop the undocumented info.behavior; the
warnings-vs-errors channel is the outcome.
- F-H4: Rsbuild dev with Start's whole plugin reports and mocks a server
import of a .client file (passes on main).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- known-bugs-dev-server "a server fn module calling a function of a denied
file/specifier at the top level": instead of "transform resolves to a
string", the client loads `src/a.ts` as the browser does: no served
module has the denied file's code (MARK_REQUEST_SECRET), and the client's
server fn has a string `functionId`. The control passes; the pin stays
red for #8554 (run without `.fails`: "[vite] The "code" property of
ModuleInfo is not supported.").
- "names imported from a denied specifier are mocks": the import
`"get-headers" as getHeaders` names no export of the real
`@tanstack/react-start/server` (verified in the source:
start-server-core/src/request-response.ts exports getRequest,
getRequestHeader, setCookie; no "get-headers" anywhere); it is now
`getRequestHeader as getHeader`, with `server.setCookie` kept. Its
`export *` pin row is unchanged and still red.
Audit: E2 known-bugs-dev-server:251/:274 (FIX), :384 (FIX).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- F-H3: the realistic analysis.usage rows run in the reported-location
four-channel harness (Vite dev, Rsbuild dev, Vite and Rsbuild builds):
a middleware variable's .server and a builder variable's .handler are
not reported; a look-alike `myServerFn.handler` and
createIsomorphicFn().client on the client are reported at the use.
Deleted from analysis.usage (covered by those rows): "the handler of a
server fn builder variable", "the server of a middleware variable",
"createIsomorphicFn().client" (client), and the look-alike test.
The harness now returns [] for a build without violations and fails on
unrelated build/compile errors.
- NEW Rsbuild pin: a look-alike `*ServerFn.handler` callback is skipped by
name (/ServerFn$/ in isCompilerSafeBoundaryCall), reported at compiled
coordinates (red: dev 'webpack:/src/a.tsx:3:1', build 'src/a.tsx:5:42').
- analysis.usage:263/:282: any real use is a correct location ([2, 3]).
- analysis.usage:301: realistic forms instead of an IIFE argument (tsc:
TS2345, a string is not a server fn) and parenthesized callees (valid TS,
unrealistic): handler(withAuth(async () => ...)), handler((...) as any),
createClientOnlyFn((...) satisfies () => unknown) (all type-check).
- reported-location:274: middle trace steps on their line, any column.
- reported-location:407: the module imports the app's own client entry
src/client.tsx back (not the harness file); Rsbuild pin still red
(one-step trace ['src/b.ts']).
- exemptions: the "gets the mock" controls require the mock's text, not
any non-real string (a 'throws: ...' passed).
- known-bugs:394: same-config control for the Rsbuild dev .page pins.
- build-options perf-report test moved to
tests/outside-compiler-corpus/import-protection-perf.test.ts (debug
output, per the coordinator ruling on debug tests).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- "the client route tree follows the edits": each change of the client
route tree may reach the client as a full reload or as a hot update the
route tree (`/src/routeTree.gen.ts`) takes part in (user ruling
2026-10-18: never require a full reload). The router generator handles
the edit in the background, so its message can arrive after `edit()`
returned (the wave-2 flake "expects a full reload that did not arrive"
at the server-only -> page step): the test now waits, bounded at 10 s,
for the change among all client messages since the edit. The route tree
contents and "server-only edit sends nothing to the client" checks stay.
- "the client route module of a split page route takes part in HMR":
instead of matching `import.meta.hot` in printed code, the test applies
the hot update of an edited page route the way Vite's HMR client does
(new module evaluated with the old hot data, old accept callback called)
and checks that the live route runs the new loader and keeps its split
component. The audit's proposal (a client `update` with
/src/routes/page.tsx and no full reload) is not reachable in this
harness: without a framework refresh plugin Vite does not see the
route's `hot.accept` alias and full-reloads (audit claim "expected to
pass on main" not reproduced; React apps get the boundary from
@vitejs/plugin-react, which start-plugin-core does not depend on).
Kills: client `addHmr: false` in vite/start-router-plugin/plugin.ts
(verified, reverted).
Audit: E2 start-router-dev-server:31 (FIX + robustness), :121 (FIX).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build:108 both markers: assert the error names src/both.ts, server-only
and client-only (not the undocumented phrase).
- build:174/:195 (ASK-1 (a)): the one report names the marked module and
its importer (src/entry.ts / src/server.ts), located at the marker line
(Vite 1:8, Rsbuild 1:9) or at the importer's use.
- build:556: the Vite marked-module row is a passing "client gets the real
module" row; the build-succeeds control covers the pinned rows only.
- build-options:229: assert the printed "Denied by" line names /^db-lib$/
(not the undocumented info.pattern).
- build-options:329: runs on both bundlers, ASK-1 location; Rsbuild pin
(red: the build succeeds, "expected the promise to reject").
- build-options: replacement of rsbuild/import-protection.test.ts:16, "by
default, the server-only marker of a dependency is not checked" (docs:
node_modules skip file-pattern + marker checks). Passes on Rsbuild; NEW
Vite pin (red: reports 'client node_modules/db-lib/index.js').
- build-options:353 marker row: marker line or importer use (ASK-1), report
names both modules.
- build-options:565: drop not.toContain('src/entry.ts') (cut unspecified).
- build-options:610 TSR_IMPORT_PROTECTION_PERF: deleted (perf plumbing,
INTERNALS-only, nothing a user sees in the compiler corpus).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- "client: a module importing a factory that stops being one keeps its
handler": instead of looking for `db.x()` in printed code, the client
first loads no server code (MARK_DB_SECRET in no served module) and its
`fn` is a client RPC (throws "client RPC"); after `src/b.ts` becomes a
plain object, the client's `fn` runs and resolves 'MARK_DB_SECRET'.
- "SSR: an edit of a module only the handler reads": keeps the no
full-reload assertion and the new handler result; drops the requirement
of an `ssr: update` payload (user ruling 2026-10-18: no full reload where
feasible, no server-state requirement; how Vite avoids the reload is its
business).
Audit: E2 start-compiler-dev-server:23 (FIX), :203 (ASK, ruled).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-build-prerender "prerender.enabled prerenders every static page":
prerendering is out of scope for the compiler corpus (user ruling
2026-10-18) and the test mocks `../src/prerender` internals, so it guards
nothing through a public entry. Remnant for a possible router-generator
test: route props detection (`createFileRouteProps.has('component')`).
Audit: E2 start-build-prerender:82 (DELETE).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- start-build-manifest: the two start manifest tests (component chunk
preloads, page stylesheet links) move to
tests/outside-compiler-corpus/start-build-manifest.test.ts with the same
app; the client route tree tests (route-tree pruning) stay.
- start-build-options: serverFns.base + router.basepath (2 rows) and both
server.build.staticNodeEnv tests (with the Rsbuild `.fails` pin, bug
recorded in FOLLOWUPS "Product issues") move to
tests/outside-compiler-corpus/start-build-options.test.ts. They guard
build-time defines (TSS_SERVER_FN_BASE, NODE_ENV), no compiler job.
- start-build-options router.codeSplittingOptions (2 rows): besides the
placement, the client and SSR builds run the route's loader
('MARK_LOADER') and preloaded component ('MARK_COMPONENT').
Audit: E2 start-build-manifest:215/:231, start-build-options:121/:220/:236
(MOVE-OUT), start-build-options:268 (FIX).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-build-determinism "with colliding custom ids": a `generateFunctionId`
that gives two server fns the same id may fail the build with an error
naming the id, or keep today's behaviour (distinct ids, each client id runs
its own handler in the SSR build, SSR ids equal client ids). Silently
running the wrong handler still fails. Passes on main (Vite and Rsbuild).
Audit: E2 start-build-determinism:91 (coordinator ruling 2026-10-18).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- start-apps (F-H1): pass the provider environment to the Start compiler
(environments/providerEnvName), so rsc modules are Start-compiled. Adds
violationTexts/expectMarkerViolation (ASK-1 ruling: either location,
report names both modules).
- dev:754 onViolation false: drop the mock assertion (locked in the bug);
NEW dev pin "returning false allows the import: the client gets the real
module" (red: expected [] to equal ['/src/secret.server.ts']).
- dev:776: behavior "error" + onViolation false stays a control; NEW pin
for the denied file getting the real module (same red reason).
- dev:990: ASK-1 (a): require 'server src/a.ts:2:27'; any other report at
the marker.
- dev:1510/:1577: same-path controls (Start's dev client entry reaches
src/client.tsx; a request runs the app's server entry).
- dev:1823: no timer; the router entry is released when the bundle loads
the denied file. Still kills spc:4670 (verified).
- dev:1966 marker row: a report in src/a.tsx must be at the marker; a
report at the importer is accepted (ASK-1).
- dev:2150 maxTraceDepth pin: drop not.toContain('src/entry.ts') (cut
strategy unspecified); still red (expected 3 to be <= 2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop `inputValidator` from the stand-in `createServerFn` builder: the
runtime has no such method (grep of start-client-core/src: only
`validator`), so a test calling it would pass against a removed API.
- The client (`browser` export condition) gets a `createMiddleware` whose
`.server()` throws, so a client build that keeps a middleware's server
side fails at runtime instead of recording it. Verified with a scratch
build (Vite and Rsbuild): client throws, SSR records. Full package suite
unchanged (1537 pass / 368 xfail).
Audit: E2 harness, E1-H4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit C, handle-route-update:349: the edited route file called
`.lazy(newImporter)` itself, which a route file never does (the generated
route tree applies `.lazy(() => import('./x.lazy'))`). Now the route tree
gives the route its lazy options, the route's file is edited (new loader),
and once the lazy chunk loads the live route has both the new loader and
the lazy component. Each edited route file now creates its route with the
route's own id instead of always `createFileRoute('/hot')`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit C, react-refresh-route-components and router-plugin-context findings.
- "declared lowercase as ..." rows: the reassigned function declaration is
compiled as a .jsx route file (tsc: TS2630 "Cannot assign to 'page'
because it is a function", audit claim reproduced); the overloaded
declaration uses React.JSX.Element (tsc: TS2503 "Cannot find namespace
'JSX'", reproduced) and an optional prop (the required `title` overload
was not assignable to a route component either, TS2322).
- deleted the `$page` test (the lowercase renaming rows cover it).
- A3: deleted the TSRComponent / TSRPendingComponent collision tests (they
fed today's generated names as user code); added "route HMR code next to
user bindings with common names": a route file's hotData and
handleRouteUpdate keep their values and the route hot-updates (code
splitting on/off x vite/webpack). A user `hot` stays pinned in
known-bugs-route-hmr.test.ts.
- deleted "declares hoisted components before the route that uses them"
(`export const page = ..., Route = createRootRoute(...)`; covered by "for
every inline component option of a root route" (hoisting) and the
lowercase renaming rows).
- router-plugin-context: deleted "splits parenthesized route factories,
option values, and grouping arrays" (tsc accepts it, but nobody writes
`(createFileRoute('/x'))({ component: (C) ... })`; separate groupings are
covered by code-splitter-route-options.test.ts, a parenthesized option
value by react-refresh-route-components "a parenthesized arrow function").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit C, harness H1 (Proposal A + B), and the route-hmr / known-bugs-route-hmr
findings.
Harness (H1, H2, H3, H5):
- hotUpdate runs the real react-refresh/runtime (fresh per update, new
router-plugin devDependency react-refresh ^0.18.0, already in the lockfile
through @rspack/plugin-react-refresh; lockfile regenerated with pnpm install
--no-frozen-lockfile). Each module registers its components under its id
($RefreshReg$ / $RefreshSig$ per module), Vite boundaries follow Vite (a
literal import.meta.hot.accept( or @vitejs/plugin-react's accept on modules
that register components; plugin-react's real
validateRefreshBoundaryAndEnqueueUpdate check), webpack/Rspack boundaries
follow the refresh plugins' executeRuntime, a self-invalidating module
passes the update to its importers, then performReactRefresh.
update.render(option) renders as React does after the refresh
(resolveForRender), update.remounted(option) reports remounts (replaced
component or stale hook signature). The page loads the route's lazy
component before the edit; a lazy module first loaded after the edit is
the edited one. refresh defaults to true for React routes (explicit
refresh: false for the webpack-without-React-Refresh pin). Vite + Solid/Vue
throws (their refresh plugins only run in a real dev server). Router is a
client router (H3).
- Controls (regression-helpers.test.ts): an edited component renders its
new body without a remount (vite/webpack x split/unsplit), adding a hook
remounts, a renamed component is not a new version (negative control),
webpack without React Refresh renders the first body, and the Vite model
agrees with a real Vite dev server + @vitejs/plugin-react on hot update vs
reload (split, unsplit, .ts, factory-built options).
- Proposal B: vite-hot-update.ts editRouteFile (real dev server with the
framework plugin; messages, update boundaries, reimports). New dev deps:
@vitejs/plugin-vue-jsx (catalog).
route-hmr.test.ts:
- split routes: bodies per version; live === previous, new body renders, no
remount; new row with loader and component in one chunk; add/remove a split
option; component reading Route renders "/posts new".
- Solid/Vue split + unsplit rows: webpack style, new text renders.
- D10 pins: real Vite with vite-plugin-solid / @vitejs/plugin-vue-jsx (no
full reload, the update re-imports the split chunk) + identity kept.
Verified red without .fails: "client: full-reload *" (both).
- root route: renders new body without remount; shellComponent removed from
the file-route list (tsc: TS2353 'shellComponent' does not exist on
createFileRoute options, audit claim reproduced); the file-route "adds a
shell component" test is replaced by root-route rows that add / edit /
remove shellComponent (decision rp:1304).
- unsplit routes: every component option renders its new body in place.
- factory-built options: webpack row passes; vite row is a NEW pin (route
module without registered components is no Vite boundary, same root cause
as the .ts pin; real Vite agrees, see control). Verified red: invalidated.
- real Vite (missing coverage 2): a split component edit is a hot update
that re-imports ?tsr-split=component; editing a value the loader and the
component share is a hot update.
- tsr.config.json (P1): evaluated in the page; Solid installs no React
Refresh hooks on window, React does (control row).
- A1: one "no debug output by default" dev test kept; the Solid row and the
TSR_VITE_DEBUG=start-plugin-core test moved to
tests/outside-compiler-corpus/route-hmr-debug-output.test.ts.
known-bugs-route-hmr.test.ts:
- deleted the `(() => <p>hi</p>)!` row (tsc accepts it: valid TS; deleted as
fuzzer-shaped per coordinator decision, as any / satisfies rows cover it).
- hot pin: loadRoute + render; rows for a constant and an exported constant
(importFromRoute gets 'hot'). Verified red: Duplicate declaration "hot".
- lowercase shared component: component + notFoundComponent (two chunks)
share page. Verified the function pin still red: Export 'SplitComponent'
is not defined.
- hoisting pin and controls: lowercase errorFallback passed to
ErrorBoundary FallbackComponent and errorComponent; staticData control.
Verified red: ReferenceError: errorFallback is not defined.
- A2: deleted the getter component option pin.
- webpack without React Refresh pin: refresh: false, render. Verified red.
- Vite HMR boundaries: editRouteFile with framework plugins. Solid unsplit
now passes with vite-plugin-solid -> control; Solid split, Vue split and
unsplit stay pins (verified red: no hot update).
utils.test.ts: deleted (normalizePath, an internal helper; covered by
code-splitter-determinism.test.ts "a route compiled under %s splits the same
way into the same modules": Windows and backslash module ids).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Missing coverage from audit B (ranked 1 and 2):
- build-frameworks: React joins Solid and Vue on Vite, Rspack and webpack
(SSR and client): the split component loads lazily and renders, the
bundle holds only React, and module state is initialised once. The
route now also declares state of its own that its options and the
split component read (created once, one value), next to the imported
module's state.
- robustness: a .jsx route file is generated, split and rendered in Vite,
Rspack and webpack client builds, with a binding the loader and the
split component share.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
H10: the "rspack" rows build with raw Rspack, not Rsbuild. buildWithRsbuild
(router-plugin tests/build-harness.ts) builds a React client app for
production with createRsbuild() and its defaults, the router plugin of
Rspack added through tools.rspack.plugins as an Rsbuild app does. Only
differences: React's automatic JSX runtime is set as pluginReact() sets it
(@rsbuild/plugin-react is not installed), no HTML page, and ES module
output so run() can load the app in Node (an entry assigns the test
entry's exports to a global, like Start's harness).
Rows added:
- build-harness.test: control, a split component loads lazily and renders.
- build-production: no dev-only code and no absolute path, with and
without code splitting, NODE_ENV unset (both pass: Rsbuild is not hit by
the Rspack/webpack NODE_ENV pin).
- known-bugs "page code in client builds": Rsbuild next to Vite, Rspack and
webpack, both side-effect hints. Controls pass (placement lazy, page
renders); every pin run once without .fails is red for its bug on
Rsbuild too (placement eager / eager+lazy with the page rendering,
DanglingNameError for the displayName case, root error/notFound eager,
unread export in the chunk, destructured options neither lazy nor
reported).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit D missing coverage 3 (generated types never type-checked): the two
real-router apps also type-check as a whole with the real TypeScript
compiler and @tanstack/react-router types (route files' ids against the
tree's FileRoutesByPath augmentation), and the keys of the tree's
FileRoutesById are the ids of router.routesById.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pin was run once without .fails: red with "';' expected" in the
generated route tree (unescaped import specifier and route id).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit B (audit-final/B.md), B-H4/B-H5 and the coordinator decisions.
Deleted (checked):
- code-splitter-idempotence.test.ts (:98, :111, router plugin registered
twice): Wave B ruling, compiling Start/router output again is
unsupported (coordinator decision). The harness `instances` option it
alone used is removed.
- dead-code:173 (ReferenceError of a let read before its declaration):
tsc TS2448/TS2454 reproduced; dead-code:120 covers initializers running.
- route-options:67 (repeated split key): tsc TS1117 reproduced.
- route-options:125 (var Route in a block), scope:448 (a < b > (c)),
scope:492 (printer edge cases), robustness:9 (hashbang route file):
valid syntax but fuzzer-shaped, no route file is written so. scope:448
is replaced by "splits a route file with JSX" for .js/.jsx/.mjs.
Fixed:
- dead-code:267: no longer requires the route module to keep importing
`bar` (Babel DCE rule); still requires `used` to leave it.
- imports-exports:172: D9 comment (assert support can be dropped).
- imports-exports:234/:252: a real importer gets the re-exported import /
destructured export (P1); getStuff is a declared import. Run-once of the
destructuring is the existing kb pin ("a destructuring with one exported
binding"), which this test found red again, so it is not repeated here.
- imports-exports:317: getParentRoute returns an imported root route.
- imports-exports:944: legacy decorators from tsyringe/mobx field
decorators; every emitted module must parse with Babel
decorators-legacy (instead of a regex on the printed code).
- module-state:78: both chunks see one A and one B; :358: realistic
self-replacing lazy getter, created once, one identity (the old input
assigned to a function declaration, TS2630); :994: no initialiser timing
(atLoad dropped); the route module imports ./init only if it creates the
store; :1023: loading the notFoundComponent chunk creates nothing (D5),
whatever the route module does.
- plugin-pipeline:156: the error names splitBehavior and the route id.
- plugin-pipeline:185/:199 (B-H4): real @vitejs/plugin-react 6 instances
before the router plugin are refused naming the package, after it are
accepted; the unreachable "router plugin not in config" half is gone.
swc/oxc rows stay name-only (packages not installed).
- plugin-pipeline:264: Vue's Route.useLoaderData returns a Ref (checked in
vue-router/src/useLoaderData.tsx), so the Vue row reads `.value`.
- plugin-pipeline:311: non-route modules: one module, same imports, valid,
same evaluated exports, instead of identical text.
- plugin-pipeline:388: no stray trailing 'use server'; :428: only the loc.
- route-options:79/:101: pendingComponent: null is a type error (TS2322
reproduced) -> undefined; errorComponent: null (accepted by the types)
added. :508: methods only (no getter/setter). :954: registerRoute(Route)
from a module of the app. :985: 'use no memo' on a component.
- scope:231: valid intrinsic attributes; <A /> reaches a component prop,
so the test sees it rendered.
- build-harness.test:107 (esbuild, D3 (c)): split and rendered, or a
build error / warning naming esbuild and autoCodeSplitting. Run without
.fails: red for placement (component eager).
- build-source-maps:214: the rspack/webpack rows fail with line 3 instead
of 5 (unplugin drops the map); with a loader passing an identity map in
front of unplugin's (what an upstream fix gives), all four pass. Kept as
pins, comment updated.
- B-H5/A-H6: router-plugin tests/build-harness.ts header no longer claims
apps inherit "sideEffects": false.
Kept: build-production:233 is the one "default build prints no debug
output" test. pragmas:50 untouched (D-04).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit D missing coverage 1: two generated apps (file-based: flat,
directory, layout, pathless, group, lazy, lazy-only, optional param, splat,
escaped and non-nested routes; and a virtual route config with layouts, an
index and a physical mount) are loaded with the real @tanstack/react-router
(createRouter): the ids, full paths and `path` options of
router.routesById equal what the shared route tree helpers read from the
tree with their router stub (urlsOf, routePathsOf). This validates the
helpers (H1-H3) the other tests rely on. Vue's router is not a dependency
of the package, so only React is checked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit D missing coverage 2: a rename or move reaches a running generator
as a delete and a create event, in either order, queued before the first
run completes (Generator.run events). Three renames (top-level file,
child route to another param name, file moved into a directory under its
layout), each with the delete or the create event first: the route tree
is the one a fresh run writes, its routes are the expected ones, and the
moved file gets the id of its new path. All pass on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit D H6: transform.test.ts drives the internal ../src/transform module
with hand-built RouteNodes, so a rewrite with no user-visible difference
fails it. It moves to tests/outside-compiler-corpus/transform.test.ts (header
"Not part of the compiler test corpus"), and the route file upkeep it
covers is re-expressed in tests/route-file-upkeep.test.ts through full
generator runs, reading the file back and evaluating it: id fixed through
cast options, double-quoted and template-literal ids, aliased Route export,
export lists, a second non-exported route call, .ts angle-bracket
assertions (#7341); root route files (createRootRoute,
createRootRouteWithContext, export list) left byte for byte; constructor
switches both ways (semicolon import, type specifier, multi-line import);
the right constructor when the id is already right (5 rows); missing
constructor import added on its own line (LF, CRLF, single line, next to
another package's import, next to an aliased or a namespace import,
semicolon style); type imports stay type-only; stale imports of the other
constructor (CRLF, BOM + astral characters, trailing whitespace, same-line
import, semicolons, untouched declaration, aliased constructor); Route
re-exports / app route factories left as they are; ids the generator
cannot rewrite and malformed route calls reported by file name (failed run,
or a warning with the file untouched).
Coordinator ruling on D ASK-1 (removing an unused import of the other
route constructor is allowed, not required): every stale-import test, in
the corpus file and in the moved unit suite (transform:203 CRLF, :625 BOM,
:772 rows 2-4, :916, :932, :946, :984, :997), accepts the import kept or
dropped, and always checks that the file evaluates, has the right id,
binds the right constructor once and keeps its non-import code.
Audit D rows applied to the moved unit suite:
- transform:50 through parentheses: deleted (0 of ~50k corpus files wrap
the constructor or the id in parentheses).
- transform:511 redeclared `var Route` twice: deleted (0 corpus files with
two `var Route = create...Route(` declarations).
- transform:823 export-list helper `no-route-export`: deleted (internal
result code); known-bugs "a route file without a Route export is left
out with a warning" row 2 covers it through a run.
- transform:829 `export let Route` without initializer: row dropped (0
corpus files); the Route-from-another-binding row stays.
Not re-expressed in the corpus (kept in the unit suite only): the
parenthesized call `((createFileRoute('/old'))({}))` and the
multi-declarator export (0 corpus files each), the default import of the
router package (the package has no default export), and two exported
Route bindings (not a valid module).
Also: literal BOM characters typed into generator-options.test.ts and the
new file are written as escapes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply audit G (RSC CSS slice).
- rsc:322 rows `<Card />!` and `(<><Card /></>) satisfies unknown` dropped.
tsc: `renderToReadableStream(<Card />!)` is a TSX parse error (TS1005);
the satisfies row type-checks but is a fuzzer shape (coordinator decision
N3). `(<Card />)` and `<Card /> as any` stay.
- rsc:343 the `renderServerComponent(<Card />, { alreadyConfigured: true })`
part removed: the second argument is internal (tsc: TS2554 "Expected 1
arguments, but got 2" against @tanstack/react-start/rsc). Identifier,
conditional and spread arguments stay.
- rsc:450 plain-data model made neutral (user ruling 2026-10-18: TO BE
DECIDED): keeps the `{ card: 'card' }` payload assertion, drops the
no-warning requirement.
- rsc:508 Rsbuild dev: the card is a .tsx module rendering
`renderServerComponent(<p>OLD_CARD</p>)` (React JSX runtime stand-in added),
not a string.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply audit G (Hydrate slice).
Systemic `when` fix: every Start `<Hydrate>` in the five Hydrate files now
passes the required `when` (`when={load()}`, `load` imported from
`@tanstack/react-start/hydration` in the shared heads; Solid pages from
`@tanstack/solid-start/hydration`; the hydrate-build stand-ins export `load`).
tsc (react-start dist, strict): `<Hydrate><p/></Hydrate>` -> TS2322 "Property
'when' is missing ... required in type 'HydrateCommonOptions'"; docs say
"Required". Not touched: spreads that already carry `when`, globals, the
local/foreign `Hydrate` controls.
Harness:
- G-H1: getChunkComponent (chunk must export exactly one function) is
removed. renderChunk(parent, chunkId, chunk) renders the export the parent
names in lazyRouteComponent(load, name) (new chunkExportName);
loadClientModule's `preloaded` entries carry that `component`; the Vite dev
tests render through the served page module and the stand-in
lazyRouteComponent (which records `exportName`).
- G-H2: the default jsxToText runtime renders intrinsic props (not
children/key) as JSON with sorted keys, functions as "<function>". Whole
package still green; two expectations now show the attributes (input
value/onChange, use xlink:href).
- G-H3: compileHydrate also returns `chunkIds`; sm "directive prologue" and
"chunk does not import what only a server fn handler uses" assert on the
chunk as the bundler compiles it (compileFirstChunk).
- G-H4: the generated-names probes (hydrate-captures, known-bugs-hydrate)
read a captured local, so capture names are collision-tested too.
Findings:
- sm:99 stale `h` deleted (tsc: TS2322 'h' does not exist on HydrateProps);
covered by sm conditionals/callbacks, bf nested boundaries, sm split={false}
nested ids.
- sm:110 split="true" row dropped (tsc: TS2322 string not assignable to
boolean); the `split` shorthand row stays.
- sm:179 computed key from a binding named fallback deleted (mutant shape);
covered by sm computed-key prefetch row and bf "a computed fallback key".
- sm:273 reassigned spread: `let opts: HydrateOptions = { when: idle() }`,
reassigned under `props.eager` (tsc: accepted).
- sm:641+651 merged: children are required (tsc: TS2322 on the empty forms),
so the boundaries render nothing and keep `when`, or a compile error names
Hydrate.
- bf forms: when="visible" / when: 'visible' -> visible() (tsc: TS2322
string not assignable to HydrateWhen).
- bf split="false": kept in place or rejected clearly (tsc: TS2322).
- bf `false satisfies/as boolean` pins deleted (fuzzer shapes).
- bf Solid function child goal deleted (solid-js 1.9 JSX.Element has no
function member; shared docs list function-as-children as rejected).
- bf useId?.() row dropped; React.useId() pin kept.
- bf `Link as Hydrate` row dropped (react-start/start-client-core export no
Link).
- bf "chunk loaded after its source module was invalidated" deleted; covered
by hydrate-build "Vite dev server: a chunk requested before its parent
module renders the children, and an edit reaches it".
- cap/kb bare `<Hydrate prefetch>` -> prefetch={idle()} (tsc: TS2322 true not
assignable).
- kb `<Hydrate {...props}></Hydrate>` -> self-closing; the comment-only body
next to a children prop row deleted (tsc accepts it, contrived; the
children-prop rows cover the bug).
- kb own `this` of a function expression typed `this: { prefix: string }`
(tsc: TS2683 implicit any this).
- kb Route exported as default / under a string name rows and the unexported
Route pin deleted (a route module exports Route by name); the "unexported
component named Route" pin covers the removal.
- kb nested var: `try { var label = JSON.parse('"nested"') } catch {}`.
- kb let only assigned: `renders = 1` (tsc: TS2322 string to number).
- kb JSX pragma: `/** @jsx jsx */` from an @emotion/react stub.
- kb rejection-matcher and await fixtures import `loadData` (no clash with
the `load` strategy).
Pins: every pin of the five files was run without .fails before and after
this change; all 66 remaining still fail, with the same first error (code
frame line numbers shift by one). The spread-children row now shows the
unused chunk (html renders), its Impact comment says so.
Missing coverage 1 (compiled Hydrate through real React): already covered by
e2e/react-start/deferred-hydration (real Vite/Rsbuild builds, real Hydrate
and react-dom, dev and prod, console errors fail the test); no unit test
added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit D, template.test.ts:
- :86 / :103 route files whose paths contain `"`: deleted (the React/Solid
test and the Vue pin). `"` is not allowed in Windows file names, so a
cross-platform app cannot have such a route file.
- :184 scaffolded routes render: no greeting text; asserts each scaffolded
file evaluates to a Route with the right id, created with the right
constructor (createLazyFileRoute for .lazy files), whose component
renders something, and the root route renders an Outlet. H8: the
evaluation doc says Solid JSX is compiled with a React-like runtime, so
only the structure is meaningful.
- Missing coverage 5: scaffolded root, route and lazy route files follow
quoteStyle and semicolons for each target (docs file-based-routing.md:
"when you first create a new route, those files will be formatted with
the quote style you specify" / "with semicolons"). String literals that
contain a quote character may use either quote (prettier picks the one
that avoids escapes).
NEW main bug, pinned in route-paths.test.ts (found writing the optional
`what's-new.tsx` replacement): a route file name with an apostrophe makes
the generated route tree unparseable (utils.ts:1196 buildImportString
writes `from '${source}'` unescaped), so the run fails with "';'
expected". Verified red for that reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit D, known-bugs.test.ts:
- :71 route option keys (read the internal createFileRouteProps): deleted
here. The identifier-keys row is covered by start-plugin-core
known-bugs-route-options.test.ts (page.tsx stays, api.tsx is pruned);
the string-keys and aliased-Route-export rows move there as build rows
(a route with server handlers and a component stays in the client route
tree; one with only server handlers is pruned on Vite, Rsbuild parity
pin as for api.tsx). The parentheses row is deleted (0 corpus files of
~50k wrap the constructor or the id in parentheses).
- :120 TypeScript wrappers (3 pins): deleted. The id rows (`as const`,
`satisfies`) have 0 corpus files and the id wrapper already fails with a
clear error. The cast-constructor row: audit claim "unrealistic" not
reproduced (2 user route files call `(createFileRoute as any)(...)`), but
the id string only feeds the route types, which the cast turns off
(react-router fileRoute.ts createFileRoute ignores its path at runtime),
so a stale id there has no user-visible effect: deleted.
- :161 type-only Route exports (3 pins): deleted (0 corpus files with
`export type { X as Route }`, `export { type X as Route }` or
`export declare const Route`); the control stays and now reads the route
tree (routesOf) instead of the plugin route nodes.
- :192 constructor import pin: the type-only import row is invalid TS
(tsc: TS1361 "'createFileRoute' cannot be used as a value because it was
imported using 'import type'"), deleted; the aliased-import row stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit A (audit-final/A.md) and the coordinator decisions (SUMMARY.md).
Harness (A-H1): eagerModuleIds/eagerImportSources in regression-helpers.ts
give the static closure of the route module (what loads with the entry,
whichever emitted module imports it). importKinds 'static' also counts
imports from lazy chunks, so it is no eager signal. Used by the "page code
left in the route module" pins, the object-form loader pins (handler
placement, the ./api row), the class static-field pin and the classic JSX
factory pin.
Weak tests (check 4):
- export * pin: a real importer gets the re-exported name (P1) instead of
requiring the route module to keep `export *`.
- classic factory pin: the library does not load with the entry (rows 1-2,
Emotion as real apps write it), the chunk imports only `h` (row 3), and the
component renders.
- client-build placement suite: controls, exported/unsplit pins and the
two-option case also mount each route in the built app and require the
marker in the rendered HTML (one jsdom run per app).
- `this` pin, server-only refusal, symlink refusal: a report or refusal must
name the route file (server-only stub renamed ./secret-db so `server`
in the module name cannot match).
- two-file-routes and options-by-call pins: reports must name what they
report (reportsNotSplit / createFileRoute|Legacy).
- production warning tests: only "no app path in the bundle" is required;
"the build warns" is a labelled precondition of the control.
Unrealistic inputs (check 2), verified with tsc (strict, react-jsx,
@tanstack/react-router types):
- function reassignment rows: TS2630 reproduced -> route.jsx.
- object-form loader spread: TS2322 reproduced (staleReloadMode: string)
-> 'blocking' as const typechecks.
- groupings constant: TS2322 reproduced -> typed constant typechecks.
- Pages.Missing || / ?? fallback: TS2339 reproduced -> typed overrides
object typechecks.
- class expression / class Page as component: TS2322 reproduced -> route.jsx
with `class extends Component` (real class components); the unexported
class must be split (D11), the exported one split or reported.
- memo(<p>page</p>): TS2769 reproduced -> withFallback(Page, <p>loading</p>)
typechecks.
- Bar(props): TS7006 reproduced -> typed props.
- `export @observable class` (mobx decorates fields only): TS1238 with
mobx 6's field-decorator signature (mobx not installed; signature
declared locally) -> `export @injectable() class` (tsyringe signature)
typechecks.
- deleted as fuzzer-shaped (valid TS, no user writes them; root causes kept
by other rows): var in a for head (if/try rows), Object.assign onto
enum/namespace and the dotted namespace (displayName, push, lets rows),
computed-key row (duplicate of the computed-key pin), empty destructuring
(type-alias row), non-null assertions on the factory call/component
(as any / satisfies rows), IIFE and memo(Page!) rows (JSX/TS rows),
literal-array destructurings (createPair() rows), getter option (method
row), exported pragma factory (kb "factory the route module creates").
- generated-name collisions: $$split*Importer rows deleted; local
lazyRouteComponent/lazyFn rows replaced by a passing test where the route
imports them from the router package next to split options.
- destructuring next to a Route reader: realistic
createRouteHelpers(() => Route) shape; helpers created once.
- tsr-split pin: the app directory is named tsr-split-* (prefix), no
synthetic module name.
- N3 rows `(<p/>)!`, `(<><i/></>)!`, `.valueOf()`, `?.valueOf()` deleted
(coordinator); update-operand pin keeps only `(count as number)++`.
Every changed pin was run once without .fails: each fails for its bug
(placement eager / eager+lazy with rendersPage true, "Unexpected splitNode
type", "Duplicate declaration", "array of arrays", Babel JSX parse error,
PARSE_ERROR, assignment to an import, "split value ... not found" for
entry.ts, chunk requests ./lib, library loads eagerly, chunk imports
Fragment, server option kept, symlink placement eager, app path eager).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- generator-options:182 lazy file gets createLazyFileRoute: no exact
text; the BOM is kept, non-import code changes only in the constructor
call, Link and createLazyFileRoute are each imported once, and the file
evaluates to /posts created with createLazyFileRoute.
- generator-options:331 hashbang route file: deleted, and the hashbang row
of the :362 pin dropped (BOM row kept). tsc accepts a hashbang, but no
route file has one: the 11 corpus files (of ~50k) with a hashbang and a
Route export line are scaffolding scripts holding route templates in
strings. The BOM rows of :91 cover prefix handling.
- generator-options:723 token acceptance (getConfig only), :889-929
temporary directory, :938/:987 invalid configuration, the :852
disableLogging true row, and route-paths:491 (token regex that does not
compile): moved to tests/outside-compiler-corpus/config-options.test.ts.
The two "differing only in flags" token rows are deleted.
- generator-options:796: the routeToken example of the docs
(file-based-routing.md:120,124: /[a-z]+-layout/, main-layout.tsx)
instead of /.*layout.*/ with mylayouts.tsx.
- generator-options:821 disableTypes extension under gen.tsr/: deleted
(getConfig only, unrealistic directory name); :572 covers disableTypes by
evaluating the JavaScript route tree.
- generator.test:406 routeTree directory creation: deleted with its
snapshot; generator-options "the directories of a nested route tree
path are created" covers it by evaluating the tree.
- route-paths:342/:356, deny-route-group-config:58 and generator.test
shouldThrow: the run rejects and the error names the file(s); no
wording.
- route-paths:375: @me.tsx / me.tsx instead of @B.tsx / B.tsx.
- route-paths:434: the /layout/gy row becomes /layout/g (no sticky flag).
- H7: the FileRoutesByTo / FileRoutesByFullPath tests run the real
TypeScript compiler on the app (real @tanstack/react-router types), with
a type-level assertion on the route's id, instead of reading `typeof`
members of the parsed tree (new helper tests/type-check.ts). The app
must type-check as a whole.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit D:
- H5 / concurrent-write:85: the "temporary file stat" row completed the
racing save only when the generator stat'ed a file under its tmpDir (an
internal step of safeFileWrite). The save now completes before the
generator's next file operation of any kind after the racing read (row
renamed "generator's next file operation"), and only the final file
content is asserted.
- generator-dev:419 getRoutesByFileMap: no longer pins the root route's id
('/__root', an internal handshake with router-plugin's HMR adapter);
asserts the mapped files and the /posts route id, before and after a
rerun.
- generator-dev:377 afterTransform prevNode: deleted (internal plugin
hook); covered by start-plugin-core
tests/start-router-dev-server.test.ts:28 (the client route tree follows
page <-> server-only edits in Vite dev).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit D harness items H1-H4:
- H1: ids and URL paths derive from each route's getParentRoute() the way
router-core's Route.init does; the evaluation fails when getParentRoute
is missing or disagrees with the _addFileChildren nesting, and on two
routes with the same id (router-core's duplicate-id invariant).
- H2: lazyRouteComponent / lazyFn without an export name take `default`
(router-core / react|solid|vue-router lazyRouteComponent default).
- H3: the router stub also provides createLazyFileRoute, createLazyRoute
(a lazy route is { options: { id, ...options } } like LazyRoute) and
createRoute.
- H4: the file a lazy importer loads is found by running the importer
through the instrumented import(), not by a regex on its source.
route-id.ts: the evaluated Route records the constructor that created it
(createdWith), for constructor assertions.
Controls added in route-tree.test.ts and route-id.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
H7: `createRsbuildDevServer({ hmr })` sets Rsbuild's `dev.hmr`;
`hotUpdates()` returns the hot-update chunks of the last compile, and
`outputs()` leaves hot-update files out. The default stays off (Rsbuild's
is on): with it on, 15 tests of router-plugin and start-plugin-core fail,
because the emitted chunks carry Rsbuild's HMR client, which throws when a
test evaluates the output outside a browser, and tests that look for a
module's chunk miss it. Control: with `hmr: true` an edit emits a
hot-update chunk with the new marker; with `hmr: false` none.
No status change in the five packages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Webpack harness loader (build-harness-oxc-loader.mjs): takes the incoming
map, transforms with `sourcemap: true` composing it, and passes the map
on, like a real loader. The control in tests/build-harness.test.ts now has
TypeScript-only lines before the throw: red on webpack with the old loader
(line 3 instead of 8), green with the new one. router-plugin
build-source-maps webpack pins stay red for the unplugin reason
(line 3 instead of 5); comment updated.
H9: Vite SSR production builds are no longer minified by default, like
`vite build --ssr`. Control: Vite SSR keeps a local name, the client
build does not.
H10: the raw Rspack row parses `.ts` without JSX and `.tsx` with it.
Rspack's SWC already picks JSX from the file extension, so the old
`tsx: true` had no effect (audit claim not reproduced); the config is now
explicit, with a control that builds `<T>(x: T) => x` and `<number>x` in a
`.ts` module on every bundler.
No status change in the five packages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
H5: `settle()` compares modification times as well as contents, so a
write that leaves a file as it was is reported as a `change`, as chokidar
reports it. Controls: an identical rewrite is reported; a plugin that
rewrites a file on every event never settles (reload loop detected).
H6: `fileEvents` (createDevServer) and `settle(options)` / `edit(files,
options)`: `order: 'creations-first'` reports a rename as add then unlink;
`batch: true` emits all events of a round before the server handled the
first. Defaults unchanged. Controls for both orders and for batch mode.
Status change: start-plugin-core importProtection/dev.test.ts pin "is
mocked after an edit adds the marker, and the violation is logged" passed:
the test rewrote the whole app (identical importers included), which a
real watcher reports as edits of the importers. The test now edits only
the marked module; red again for its baseline reason (no violation
logged).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
H3: the linker's default transform (and router-plugin's React Refresh
transform) now erase TypeScript with `onlyRemoveTypeImports`, as Vite does
in a project with `verbatimModuleSyntax`: an unused value import still
loads its module, `import { type X }` loads it as `import './x'`, only
`import type` goes. New option `verbatimModuleSyntax: false` (linker and
router-plugin `loadRoute`) erases like a project without it. Controls in
module-linker.test.ts.
Status changes:
- router-plugin code-splitter-imports-exports "reads an ambient var merged
with an interface ...": NEW main bug, exposed. The split chunk and the
route module import the ambient var from the shared module, which has no
runtime binding; real Vite + verbatimModuleSyntax fails the build with
MISSING_EXPORT. Split into a passing row without verbatimModuleSyntax
and a `.fails` pin with it (red: "does not provide an export named
'readVersion'").
- router-plugin known-bugs-code-splitter overload pin (#8505) flipped: the
bug only shows without verbatimModuleSyntax. The pin now runs that way
(red: "Export 'helper' is not defined"); a passing control runs with it.
- start-plugin-core start-compiler-factories "isomorphic, server-only and
middleware implementations in one module ...": the test's package stub
lacked factories the real package exports and `head` imports; add them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
H4: a fallback stub is now one instance per specifier (like one module of
a bundle), not one per importer: later importers get the same values, and
`fallbackStub` is called again only for names earlier importers did not
import. Control: two importers of a stubbed package get the same object.
H11: delete the dead `lenient` and `idOf` options of the linker.
Add the linker controls the file header claims: a cycle links with live
bindings and hoisted functions, and a read in the TDZ throws a
ReferenceError.
No status change in the five packages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
H1: `unboundNames` (validator and production dangling-name check) no
longer exempts every read of a name the module checks with `typeof`
anywhere. A read counts as guarded only in the code the check selects:
the right side of `&&`/`||`, the branch of `?:`/`if`, the statements
after an early return, and functions only guarded code reads. Minified
forms (`typeof x<`u``, swapped operands, comma sequences) are understood.
H2: production client chunks may only read browser globals
(`clientGlobals`): Node-only globals (process, Buffer, global,
setImmediate, clearImmediate) pass only when a typeof check guards them.
Vue's feature flags join the framework globals (Vue assigns them to
globalThis itself).
Controls: guarded reads accepted, unguarded reads next to a guard (other
function, wrong branch, before the check) rejected; client builds reading
Buffer/global/setImmediate raise DanglingNameError on Vite, Rspack and
webpack; guarded Node globals and process.env.NODE_ENV pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vite's background pre-transforms can serve src/s.ts before src/c.ts, so
the module graph lacked one chain when the violation was reported and
spc:4072 survived about one run in four. Opt out for this test (comment
says why); 9 of 9 mutant runs now fail it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rsbuild dev harness turned source maps off, unlike an app in
development (`cheap-module-source-map` for JS), which can hide how
diagnostics are located. No status change in the five suites.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
N9: with default options, a Vite build (split, unsplit and shared-binding
routes) and serving a React or Solid route with route HMR print nothing
to the console. Borderline rp:1938: TSR_VITE_DEBUG=start-plugin-core
(Start's own debug scope) prints nothing of the router plugin.
N12: the generator's unplugin factory from the package root generates
the route tree (rp:1935). The code frame of a denied import in a route
module shows the route file's source in Start dev (rp:532-534, the route
module's sourcesContent; verified on router-plugin dist: rp:533, 534
fail it; rp:532 does not type-check for a dist build and is the same
runtime change as rp:533).
Borderline spc:4025/7038: with TSR_IMPORT_PROTECTION_PERF=1 and no report
file, Vite and Rsbuild builds succeed and log the perf report
(INTERNALS.md).
Kills: rp:1420, 1442, 1455, 1543, 1592, 1597, 1605, 1619, 1738, 1743,
1936, 1938, 1935, 533, 534 (532 by equivalence); spc:4025, 7038
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
N4: a route with a `.lazy` file next to a route with a component piece
both get their lazy parts (the lazy route the router loads is the file's
Route). N5: a pathless layout with only a Vue piece in a route group has
no path option (router-core would match it as a page). N11: a routeToken
regex matching names that contain a word makes such a file a layout.
Helpers (route-tree.ts, additive): `routePathsOf` and `loadLazyRoute`
(runs a route's `lazy()` with the dynamic imports stubbed).
Pins (red for the right reason):
- G1: a pathless layout with only a lazy file or a Vue piece under a path
drops the path from its children's URLs (`/bar` instead of
`/foo/bar`; the types say `/foo/bar`). Not PIN-A: different shape
and cause (the virtual node is typed `static`). Control: a route file.
- G2: `posts/route.component.vue` becomes a route `/posts/route`.
- G3: a `.lazy.vue` file is wired as a lazy route that cannot load (the
SFC has no lazy route options); an empty `.lazy.vue` is scaffolded with
TypeScript route code.
Kills: rg:414, 455 (also flips G1), 2723
Not killed: rg:2725, 2729 (need a file name with a single bracket).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
N8: a `vite build` with `experimental.bundledDev` in the Vite config (as
apps that enable full-bundle dev keep it) traces a violation under a
route module from the entry through it. The Vite build harness takes a
`viteConfig` (additive).
N13: in Rsbuild dev, server fn ids do not come from
`serverFns.generateFunctionId`, which the docs scope to production
builds. The Rsbuild compiler harness passes the option through.
N10: the trace starts at the entry when a module imports the entry back.
Vite passes; Rsbuild is pinned (NEW, low): production builds
concatenate the entry module, which has no resourceResolveData, so the
adapter registers the first loader's path as the entry and the trace
collapses to the importer. spc:7260/7261 only remove that wrong
registration and stay equivalent until it is fixed (a scratch fix with
the concatenated module's rootModule flips the pin).
Kills: spc:4988, 4989, 6812
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
N1: an edit of a module, then of its importer, updates without an error.
N2: an edit of a CSS file another CSS module @imports updates without an
error. N3: a denied import of a module a server fn factory re-exports is
logged, with a trace to the use. N6: full-bundle dev logs a violation of a
module the bundle input reaches before the router entry does. N7: a
factory calling a denied file at the top level is logged at that use only;
a module without exports is located on its source line; full-bundle dev
mocks a server fn built with a factory of a denied file. N8: dev traces
start at the router entry when something imports it, are the shortest
chain, keep the importer while it is still transforming, and full-bundle
client and SSR traces lead from the router entry.
Pins (red for the right reason):
- M2: full-bundle dev with mockAccess 'off' fails the client bundle
(UNLOADABLE_DEPENDENCY ...mock?server-fn-module-lookup).
- M3: a client-only import reached only from a custom src/server.ts is
mocked on the server without a warning (control: via the router entry).
- M4: the full-bundle client trace under a route module stops at the route.
- NEW: the Importer of a module a factory re-exports is `other.ts:2:24`
(source map source taken as is, sourceLocation.ts).
Kills: spc:1680, 4916, 5428, 4641, 4144, 2154, 4060, 4062, 4072, 4073,
4216, 4218, 4219, 4664, 4669, 4670, 4672, 4674, 4675, 4676, 4697, 4698,
4991, 4992, 4997, 4998, 5511, 5516, 4984, 4990, 4993, 4995, 4996, 4999,
5000, 5001
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Vite's default pre-transform requests, the Start compiler's lookup
of a server fn factory module pre-transforms a helper the factory uses
only inside `.server()`, and dev import protection logs the helper's
denied import as a client violation (the 'unknown' reachability
fallback). The client never loads the helper.
Pin (red for the right reason: `client src/helper.ts:3:34` logged, 10 of
10 runs with `idle()`), plus a passing control with pre-transform
requests off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Vite dev-server harness turned `server.preTransformRequests` off for
every test, unlike a real app, where the client environment transforms
the static imports of each served module in the background. That hid
r5 M1 (a false import-protection warning). The harness now keeps Vite's
default; a test can still turn it off through `config`.
Adds `idle()`, which waits until no environment has a transform in
flight (background pre-transforms included), so tests can read what
those transforms log deterministically.
No status change in router-plugin, start-plugin-core, react-start-rsc,
router-generator or compiler-test-utils with the default on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F3 (MED): an isomorphic fn whose `.server()` or `.client()` link is stored
in a variable loses that implementation. Compiler level (both directions,
evaluated with the Start runtime of each environment) next to the N4
builder-variable pins, control: the inline chain. Build rows on Vite and
Rsbuild in the shared env-separation build (new module
src/iso-builders.ts), control: the existing inline isomorphic fn. Red:
SSR or client returns undefined.
Variants (all `.fails`, red on main):
- `applyStep(createServerFn().validator(schema)).handler(...)`: module left
untransformed, client imports the schema;
- `withBuilder(createIsomorphicFn().server(f)).client(g)`: module throws
"withBuilder(...).client is not a function";
- V1 mirror: SSR keeps a client-only declaration a `typeof` type alias
reads, with its import (control without the alias);
- a class with a call in its extends clause used by a handler keeps its
server-only import in the client (dce-keeps-class row; the server-only
stub now also exports TaggedError);
- `((flag) as any) ? -x : y` loses its parentheses in the client output
(upstream @babel/generator 7.29.8, no workaround);
- N3 row `(<p>page</p>)?.valueOf()`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F4 (HIGH): split route options with boundaries that another option reads
(`head` reads `Page.name`) go to a shared module without the lazy
component of the boundary. Vite and Rsbuild Start builds, `.fails`;
control: the existing default-groupings route test (same route, now
built from a shared fixture helper). Red: the build harness rejects the
client output (dangling generated name in the entry chunk).
F2 (LOW): an unused exported component's boundary still ships (its
module-level lazyRouteComponent call is kept). One shared build per
bundler; control without a boundary passes. Red: marker `lazy`, not
`nowhere`.
Variant: a boundary nested in a `children` prop hydrates without the id
the server renders (hydrate-children-prop family). Red: client id
undefined.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F1 (MED): an exported component named by a split option written as
`X as any`, `X as typeof X`, `withAuth(X)` or `memo(X)` is copied into the
option's chunk, so the route renders another instance than its importers
get. Compiler-level `.fails.each` over the four shapes (through a real
importer, ruling P1) with the bare identifier as passing control; build
pin per client bundler (Vite, Rspack, webpack): the component is in the
client once, split or reported (decision D11). Red: other instance;
`eager+lazy` on all three bundlers.
Variants (all `.fails`, red on main):
- an unsplit option that reads a Route-reading split component with
`typeof` sees 'undefined' (split-binding-declaration-deleted-while-read);
- `((flag) as any) ? -x : y` loses its parentheses in a split chunk
(upstream @babel/generator 7.29.8, no workaround): PARSE_ERROR;
- N3 row `(<p>page</p>)?.valueOf()`: PARSE_ERROR.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rsbuild dev-server harness read its compile counter after writing the
edited files. When the watcher started the compile of the edit before the
writes were seen as done (a loaded machine), the harness waited for a later
compile that never came: "Rsbuild did not compile src/page.tsx within
20000 ms" (start-plugin-core hydrate-build, rsbuild/dev-server,
compiler-test-utils rsbuild-dev-server).
- trackCompiles() (rsbuild-dev-server.ts) listens before writing and ends
the wait at the end of the compile whose changed files
(compiler.modifiedFiles / removedFiles) include the edit: every compiler
that read an edited file reported it, and new files were read (or are
looked for by no compile). A compile Rspack gives up on fails the wait
with its error. The timeout is only a hang guard, with a message naming
what no compile included.
- Start's Rsbuild watch build (tests/build-harness.ts watchEdits) uses it
too, instead of 'the next onAfterBuild after the writes'.
- known-bugs onViolation test: compile guard 3 s -> 10 s (the failed
compile ends the wait; a slow first compile must not fail it).
- Control: an edit whose compile starts while a large unrelated file is
still being written (fails on the old harness with the flake's message).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One allowlist (src/known-globals.ts) for the module validator and the
production client chunk check: language globals, Node.js ES module
globals, a curated list of browser APIs plus the element and event
constructors, and Solid's _$HY. Generic window properties (name, status,
event, top, parent...) no longer count as globals; the validator no
longer accepts whatever the test process put on globalThis.
- Unminified (source map) production client builds of Rspack and webpack
are checked on a copy of each chunk minified as the bundler's production
minifier does (SWC minify / webpack's terser, compress passes 2, mangle,
module output as a module).
- Controls: name/status read by a chunk is rejected (Vite, Rspack,
webpack) and by the validator; unminified Rspack and webpack builds reject
a dangling name in kept code and pass one in code the minifier deletes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
describeBuild now checks every production client build of Vite, Rspack and
webpack (webpack/Rspack when minified; esbuild is not checked): a chunk name
that is neither declared, imported nor a global throws DanglingNameError.
Globals: the `globals` package (builtin + browser + nodeBuiltin), new
dependency of compiler-test-utils (already in the lockfile, 16.4.0), plus
Solid's hydration global `_$HY`. Applies to the router build harness and
Start's buildStart.
KB "page code in client builds": the display-name route (known bug, the
route module keeps `Page.displayName = ...` without `Page`) now builds alone
for its .fails pin, red on all bundlers with `entry.mjs: Page`; its
placement-only control rows (6) are removed. The Vite "unused object names
the split component" pin now fails at the harness check, same bug.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling 2026-10-17 (dead-code references, widened): code the bundlers
delete from a production build may read undeclared names. getModuleErrors
now replaces the hand-rolled "unreferenced non-exported function" rule with
real tree-shaking: when the plain check finds a free name, the compiled
module is bundled alone with Vite's own Rolldown (treeshake on, exports as
roots, imports external and side-effectful, platform neutral) and only the
free names of what survives are errors. No test changed status.
Controls: an unused function, an unused variable with a pure initializer,
dead `if (false)` branches, an unused class pass; exported code, code
reachable from an export, module-level calls and writes fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers the excludeFiles part of the 2026-10-17 import-protection exemption
ruling, in mock mode:
- Vite and Rsbuild builds: `client.excludeFiles` (client) and
`server.excludeFiles` (SSR) matching `src/vendor/**`: the importer gets the
real module, the denied file runs, nothing is reported.
- Controls, same builds with the default patterns: the same files are mocked
and their importers reported.
- Default patterns: a `*.server.*` entry of a local `node_modules`
dependency is real and not reported.
- Vite dev: the client rows (custom, control, dependency).
All pass on main (no pin). A scratch mutation that ignores excludeFiles
(import-protection/utils.ts `isFileExcluded`) fails the 9 "real module" rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module validator compiled JSX with React's automatic runtime unless the
module set `@jsxRuntime`. Oxc then ignores a lone `@jsx`/`@jsxFrag` pragma,
so a module that names a factory it never declares passed validation.
Under the automatic runtime such a pragma is ignored (Oxc, TypeScript,
esbuild with a warning) or rejected (SWC, Babel), so the module only works as
written in a classic-runtime project. The validator now uses the classic
runtime for a module with `@jsx`/`@jsxFrag` and no `@jsxRuntime`/
`@jsxImportSource` pragma; Oxc still reads the module's own leading pragmas.
Controls: classic pragma with the factory declared or imported (accepted),
factory or fragment missing (rejected), a pragma below an import (default
factory, rejected), automatic runtime unchanged (no pragma, explicit
`@jsxRuntime automatic`, `@jsxImportSource`).
No test changed status in router-plugin, start-plugin-core,
react-start-rsc or router-generator. One pin now fails earlier for the same
bug: known-bugs-hydrate "client: a module with a classic JSX pragma renders
through its factory" (the validator reports `React`; comment updated).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
renderThingTransform (regression-helpers.ts) and the warning transform
(start-build-warnings.test.ts) move to tests/compiler-transforms-seam.ts,
the only test file that binds to the AST shape of the `compilerTransforms`
hook. Behaviour unchanged; regression-helpers re-exports renderThingTransform.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Y-names: a minified Vite client chunk's map names a renamed split
component parameter at its original position (namedSegments helper in
compiler-test-utils, with a control).
- Dev race (known-bugs-dev-server): rows split; the hybrid shape (removing
a helper of an exported component) is a plain test, main passes it; the
removing/adding rows stay `.fails`.
- Cached rebuild: webpack/Rspack watch builds (new `rebuildAfter` harness
option, memory cache, with a control) keep an exported component that a
split component renders lazy after an edit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dev server tests (tests/importProtection/dev.test.ts):
- onViolation that returns nothing keeps the warning; with behavior
"error", an onViolation that does not return false does not allow the
import (denied file and specifier).
- A denied import reached only from the start entry (src/start.ts) is
mocked and logged.
- A split route component using a denied file, directly or through a module
only the split module imports, is mocked and logged at each use (Start's
whole plugin).
- An .mdx module (stand-in compiler plugin) importing a denied file, directly
or through a module, is mocked and logged at each importer.
- A denied specifier added to an importer by an edit is a mock the edited
module can import.
- An edit of a CSS module and a JSON module updates without an HMR error.
- A use of a specifier denied by a custom pattern rule in a JSX module is
located on its source line.
- Full-bundle dev (bundledDev): denied imports are mocked in the client
bundle and logged (no import-protection test covered bundledDev).
- With maxTraceDepth, the trace ends at the importer, each step naming the
import of the next.
- Control: a module the client loads after the server rendered is logged.
start-apps.ts: startProtectedDevServer gains an additive `bundledDev` option.
Pins (test.fails, NEW main bugs):
- Dev ignores maxTraceDepth: the module graph trace replaces the cut trace
(vite/import-protection-plugin/plugin.ts rebuildAndAnnotateTrace).
- Dev: an .mdx (non-JS) module importing a denied specifier fails to load
with "[vite] The "code" property of ModuleInfo is not supported."
(resolveExportsForDeniedSpecifier falls back to getModuleInfo().code).
- With server.perEnvironmentStartEndDuringDev, the first request of another
environment clears every environment's state (buildStart clearEnvState),
so violations of modules the client loads afterwards are discarded.
Kills: spc:4741, 4763, 4524, 4639, 4579, 4609, 4611, 4174, 4182, 4529,
4530, 4536, 4542, 4510, 4551, 4552, 4553, 4556, 4497, 4494, 4474, 4484,
4037, 4043, 4045, 4047, 4049, 4052, 4054, 4056, 4059, 4070, 4071, 4076,
4077, 4078, 4081, 4085, 4086, 4088, 4089, 4090, 4094, 4098, 4099, 4103,
4107, 4110, 4114, 4115, 4213, 4035, 4036, 4039, 4040, 4042, 4048, 4061,
4063, 4065, 4074, 4075, 4092, 4096, 4100, 4111, 4212, 4214, 4215, 4217,
4221, 4222 (module graph trace and clearEnvState keys by pin flip).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- R-11: findPostCompileUsagePos reports the same line and column for LF,
CRLF and lone CR; the reported importer location for a lone-CR file on
Vite/Rsbuild dev and build (main passes both).
- R-13: `@jsx` only row on the KB "factory the route module creates ...
created once" pin (main: "jsx is not defined").
- Import-protection exemptions (ruling 2026-10-17), new exemptions.test.ts:
exempt importers (ignoreImporters, exclude, outside include) get the real
module and are not reported; non-exempt importers get the mock and are
reported. Vite and Rsbuild builds, Vite dev.
Pins: exempt importers get the mock (ignoreImporters, exclude).
NEW pin: with `include`, a denied file outside the patterns is never
mocked (build ships the real module; Vite dev page fails to load).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin (test.fails, NEW): when the Start compiler's lookup of a server fn
factory module resolves its imports, Vite import protection records each
imported module as a lookup module by its path ("Propagate pre-transform
status transitively" in resolveId), so the client's own transform of that
module is silenced in dev with behavior "error": a module the factory
imports that calls getRequest() at the top level loads the real
@tanstack/react-start/server without any error. Same root cause as the B3
pin above, wider trigger. Red reason: "expected 'loaded' to deeply equal
[ 'client src/other.ts' ]"; the test passes with propagation removed.
Kills: spc:5168, spc:5169
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A server-only-marked module re-exported by a mixed barrel whose other
exports the client uses is tree-shaken: the build succeeds without a
report (guide "False Positives: Dev vs Build"). Rsbuild is pinned
test.fails: same root cause as the IP6b pins in known-bugs.test.ts (its
report step walks every module of the graph).
- Mock mode: a denied import of a route used by its loader and its split
component (two bundle modules, one source import) is warned once.
- onViolation gets type 'specifier' for an import of a denied specifier.
Kills: spc:5266, spc:5268, spc:5275, spc:5296, spc:5299, spc:5137
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Behaviours of the Vite import-protection plugin hooks in dev:
- mockAccess 'warn' / 'off' change how the dev client mocks report their use
(console.warn / nothing instead of console.error).
- The importers of each of several server-only-marked modules are logged when
the client loads the importers first (retroactive marker check per module).
- A warning's trace leads from the router entry through a module of
src/routes (route modules are not entries in unbundled dev).
- With behavior "error", the trace of an import added by an edit still leads
from the router entry (the dev server's module graph).
- Full-bundle dev (experimental.bundledDev): a denied file is mocked in the
client bundle and logged at the use (coverage of the bundledDev path; the
harness gains an additive `bundledDev` option).
Pin (test.fails, NEW): in a JSX module, a denied file imported through an
alias (package.json `imports`) is reported at a location read from the
compiled code (4:77 of a two-line module): resolveId reports the violation
before the transform-cache loop captures the module's source map
('devViolation'); a scratch run that always captures the map passes it.
Kills: spc:4859, spc:5089, spc:4986, spc:4987, spc:4899
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- validate-module: free names inside module-level functions that are not
exported and that nothing reads (transitively) are no module error;
everything else stays strict. Controls for both sides.
- dead-code:196 and the KB `as any` controls: the dead code (marker) is
absent from production client builds on Vite, Rspack and webpack, and the
page renders.
- KB:2197 comment states the one-instance requirement.
- R-09 route factories: split (and hot-updated keeping identity), or
unsplit with a warning naming the file in every mode; the five factory
pins accept the same two outcomes. hotUpdate returns the file id.
- L3: a module imported only for a type specifier with
verbatimModuleSyntax does not load in a Vite client build (with a
control proving the tsconfig is in effect).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds startRsbuildStartDevServer (additive): an Rsbuild dev server with
Start's whole Rsbuild plugin (client and SSR, the generated server fn
resolver). Deleting a module that defines a server fn must drop it from the
resolver; otherwise the next compile never completes.
Kills: spc:6802
Survive (no observable difference found): spc:6980-6983 (invalidating
deleted files in the compiler cache; a re-created file is reported as
modified and invalidated then).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rspack may compile the client more than once for the edit under load
(seen once in a full-suite run); assert each distinct violation.
Kills: spc:7680, spc:7685 (re-verified)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Behaviours pinned through the evaluated route tree and the generator's
errors and warnings:
- virtual route paths and physical() prefixes without a leading slash
(`docs/intro`, `api/v1`) get the same URLs as with one;
- virtual route files written with Windows separators (`docs\\intro.tsx`,
as `path.join` gives on Windows) are imported;
- the "Conflicting configuration paths" and 'Invalid route path ""' errors
name the offending route files;
- a route file name with a space gets a route (with a valid route tree);
- an indexToken regex with the `i` flag (JSON or RegExp) matches index
files whatever their case;
- a token regex that does not compile fails the generator with an error
naming the pattern (instead of a TypeError later);
- no param warning for a route without `$` or with a `$` inside a static
segment (`usd-$`);
- `FileRoutesByFullPath['/']` is the index route, not a pathless layout
defined only by a `.lazy.tsx` file.
Kills: rg:2236, rg:2501, rg:3002, rg:3022, rg:2528, rg:2658, rg:2712,
rg:3200, rg:3168, rg:2886, rg:2888, rg:2895, rg:2932, rg:2934, rg:2937,
rg:2938
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A `posts.component.vue` piece next to `posts.ts` must not take over the
children of `/posts`: `/posts/$postId` and `/posts/$postId/edit` stay in the
route tree under `/posts`, and the piece becomes the lazy `component` of
`/posts`. The existing Vue piece test had a component piece only on routes
without children.
Kills: rg:2113, rg:2115
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A denied import that Rsbuild's source.transformImport rewrote
(ui-lib -> ui-lib/button) is reported on the line of its use: the
location is only found in the rewritten code, through the mock
module's path.
- Pin (NEW, low): the report points at src/entry.ts:2:16 instead of the
use at 2:27.
- Pin (NEW): a specifier denied as written ('ui-lib') is not denied once
transformImport rewrote it; the build succeeds without any report
(the loader matches the post-SWC specifiers).
Kills: spc:7425, spc:7426, spc:7432, spc:7817
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In watch mode, a rebuild for an unrelated edit still fails on a
violation the first build reported (the 'once' dedupe state of a build
does not carry over to the next build). buildStart gains an additive
Rsbuild-only watchEdits option: build in watch mode, apply edits after
the first build, describe the rebuild (bounded waits).
Kills: spc:7680, spc:7685
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A virtual module of a user plugin placed after the Start compiler loads in
dev (the server-fn id validator must only claim its own virtual id).
- A route that becomes a page before the browser loaded the client route
tree shows up in the client route tree (the invalidation must cope with a
route tree not in the client module graph yet).
- The client route module of a split page route takes part in HMR (Start
forces route HMR on in its client code splitter).
Kills: spc:5579, spc:5972, spc:6046
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A dev compile in which the entry module (or an imported module) is
missing reports the missing module, and import protection does not fail
the compile on the entry without a module.
Kills: spc:7250
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A callback that returns nothing does not allow a denied specifier: the
build fails and the callback gets a 'specifier' violation (the existing
table had file and marker rows only).
- A RegExp client.specifiers pattern is reported as the rule that matched.
Both bundlers.
Kills: spc:7818, spc:7056, spc:7057, spc:7059
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A client .mts or .cts module importing a .server file is reported and
mocked in Rsbuild dev (the host skipped importers by extension).
- Rsbuild dev honours behavior: { dev: 'error' } (compile error) and the
dev default (warning); onViolation gets the effective behavior.
- Rsbuild dev honours mockAccess: the mock reports a use with
console.error by default, console.warn for 'warn', nothing for 'off'.
runRsbuildClient gains an additive levels option.
Kills: spc:7154, spc:7155, spc:7630, spc:7632, spc:7639
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds three constructs to the shared "server code of each construct" build
of start-build-env-separation.test.ts (one build per bundler, no new
build): a server fn validator on a builder variable, a middleware
validator on a builder variable (N4), and a validator schema that a type
alias reads with `typeof` (V1, upstream root cause in
babel-dead-code-elimination). Each pin asserts that the validator module's
marker is `nowhere` in the client and that the SSR build still applies the
validator. Red on both bundlers: the marker is `eager`; the SSR half
passes. Control row: a middleware `.server()` on a builder variable is
stripped and runs in the SSR build.
The middleware builders live in a module without a server fn factory:
with one, the Rsbuild SSR build fails to resolve `createMiddleware`
(already pinned as "a module with a middleware and an isomorphic fn
builds ...", BS-6/K-13; a server fn triggers it too).
The harness's stand-in `createServerFn` gains `.validator()`, which the
real runtime has: the server runs the validator (a function) on the input
before the handler. Additive; no existing build used it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each pin was run once as a normal test and failed for the bug.
- N3 (upstream root cause): parenthesized JSX under `!` or a member call
loses its parentheses in the client output, and in a Hydrate `fallback`
(start-compiler-preserves-user-code.test.ts). Red: the module does not
parse. Root cause in @babel/generator 7.29.8; no workaround. Control:
parenthesized JSX alone.
- N4 (new main bug): a `.validator()` on a builder stored in a variable
is not stripped from the client. Server fn rows in
createServerFn/caller-dead-code.test.ts (one and two handlers; red: the
client imports ./schema; the provider still applies the validator) and a
middleware row in start-compiler-factories.test.ts (red: the client
imports ./check.server). Control: the `.server()` link of a middleware
builder variable is stripped.
- N5 (new main bug): a component bound inside the `<Hydrate>` children
(`const Icon = icons[id]` in a map callback) is passed as a capture
(known-bugs-hydrate.test.ts). Red: the client parent references an
undeclared `Icon`. Control: `Icon` bound outside the boundary renders
the same on client and server.
- V1 (upstream root cause): a validator schema that a type alias reads
with `typeof` stays in the client (known-bugs-start-compiler.test.ts).
Red: the client still imports zod. Root cause in
babel-dead-code-elimination 1.0.12; no workaround. Control: the schema
without the type alias leaves.
- Classic JSX runtime: under `/** @jsxRuntime classic */`, the SSR output
drops `import * as React` once the `<ClientOnly>` children are removed.
Red: "`React` is referenced but never declared or imported". Control:
the import stays when other kept code reads React.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A route file that imports createFileRoute from a module of the app
(`@/lib/router`) gets a second createFileRoute import from the router
package, so the written file no longer parses. The pin runs the real
generator on a moved route and asserts that the written file is a valid
module (known-bugs.test.ts, "route constructor imports"). Red: "Identifier
`createFileRoute` has already been declared".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turns the oracle-mode fuzzing findings for the code splitter into tests
(known-bugs-code-splitter.test.ts). Each pin was run once as a normal
test and failed for the bug.
- N1 (new main bug): an imported split component that other code still
reads loses its import. Pins: head() reads PostsPage.title (loadRoute),
an exported component renders the imported errorComponent, read through
a real importer (adapted from examples/solid/start-supabase-basic
posts.$postId.tsx), a pendingComponent split by custom groupings that an
unsplit errorComponent renders, and real SSR builds on Vite and Rspack.
Red: "PostsPage/ErrorComponent/Spinner is not defined". Control: the same
head() route with the component declared in the route file passes.
- N2 (new main bug): a top-level call reading a module-level binding runs
again in every split chunk. Two rows in the "unreferenced top-level side
effect" table (red: 3 calls instead of 1); the table's Bug comment now
covers these calls. Control: calls reading only imports or literals run
once. The harness body moved into expectEffectRunsOnce.
- N3 (new main bug, upstream root cause): parenthesized JSX under `!` or a
member call is printed without parentheses. Red: the split chunk does
not parse. Root cause in @babel/generator 7.29.8; no workaround.
Control: parenthesized JSX alone.
- V3 (variant): rows for the split-option re-parse pin: an immediately
invoked function, a typed arrow, `as any`, `!` and a type argument
(the last one parses as comparisons and yields `false`). Red: Babel
"Unexpected token" / "component is not a function".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
startProtectedDevServer's new `config` option used the package's own Vite
`InlineConfig` and `mergeConfig`; the dev harness types its config with
compiler-test-utils' Vite copy, so test:types failed. It now takes
`StartDevServerOptions['config']` and adds the provider environment by
spreading.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pin "an onViolation that throws ends the compile with its error"
(c079f2e351, REPORT §6 #23) said the Rsbuild dev compile never finishes and
the error is never reported. With the Rsbuild dev harness now failing its
compile wait on `compiler.hooks.failed` (835b7b72a3), the test passes on
main: Rspack fails the compile with the thrown error, and Rsbuild's dev
watcher marks the build failed and logs the error (@rsbuild/core 2.2.5
dist/626.js, `compiler.watch` callback: `logger.error(error)`). The harness
only waited for `done` and runs with `logLevel: 'silent'`, so the error
looked lost. The pin becomes a normal test; no claimed kills depended on it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mutation run r3b gaps (ip-analysis, location only, low impact).
Rows of `findOriginalUsageLocation`: an immediately invoked function, a
computed `[handler]` member of a server fn builder, a private method's
callback, `.handler`/`.server` of callees whose names only contain
ServerFn/Middleware, a look-alike `.client` method on the server, loops
inside createServerOnlyFn, and a type-only import specifier.
Pin (ip-analysis P2, main bug, location only): the client compile replaces a
whole `createServerOnlyFn(...)` call whatever its argument is, but the
lookup only skips functions passed to it directly, so
`createServerOnlyFn(wrap(() => getSecret()))` is reported instead of the
real leak after it. Fix-agnostic: asserts the leak's line. Red: reports
line 3 (the wrapped use) instead of 4.
Kills: spc:503, 520, 521, 523, 529, 546, 565, 574, 877, 901, 326, 328;
pin flips: spc:798, 799
Equivalent (the cluster range was over-included): spc:527, 528 (a
non-computed member always has an Identifier or PrivateName property, and
a PrivateName has no `name`), 543, 545 (`/ServerFn$/` matches
createServerFn), 559, 561 (`/Middleware$/` matches createMiddleware),
548, 567 (the `?? ''` fallback never matches either regex).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mutation run r3b: the Vite dev 'unknown'-reachability fallback
(vite/import-protection-plugin/plugin.ts, `processPendingViolations`) lost
all coverage once the dev harness registered Start's entries (20c891a337).
Reachability: real dev reaches it. Some edge to the module then lacks
transform data: the module is served while its only importer is still being
transformed (overlapping requests: Vite's `server.warmup`, parallel
requests, a slow resolver). The new test holds the importer's resolution of
another import with a resolver plugin, serves the module, then lets the
importer finish; a probe confirmed six passes through the branch with the
router entry registered. Outcome: the module's denied imports are mocked
and logged at their uses.
Also: V7 (spc:5415), a server fn factory module (whose violations wait for
its compiled imports) calling a denied file and then a denied specifier at
the top level is logged at both uses.
Pins (NEW main bugs, each verified red for the right reason):
- a module transformed before any importer of it is known (`server.warmup`,
or any request that comes first) has its violations discarded as
unreachable, and its transform is cached: never logged, even once the app
loads it (red: mocked, nothing logged).
- a denied import reached from the app's client entry (`src/client.tsx`) is
not logged: the client entry is not a registered entry and the browser
loads it from Start's dev client entry, a virtual module whose imports are
not recorded (red: loaded through the dev client entry and mocked, nothing
logged). Control: the same leak through the router entry is logged.
- with log 'always', one import of a denied file is logged three times per
load: twice as written (resolveId and the transform-cache check both find
it) and once as the resolved path (red: 3 reports instead of 1).
Kills: spc:4727, spc:5415
Survive (outcome-equivalent): spc:4704, 4706, 4723 (only when the warning
appears: as the module is served, or when its importer finishes; same
logs); spc:4725, 4747 (only add more copies of one 'always' report before
the importer finishes; main already logs one import three times, pinned).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regressions of mutation run r3b: the only test that told `log: 'always'`
from `'once'` became a `.fails` pin in 20c891a337 (an edit drops the import
graph edges, a main bug). The new tests reach the same violation again
without an edit: Vite reloads every module when `tsconfig.json` changes
(as when it re-optimizes dependencies), without changing any module, and
the client loads the app again. With 'once' nothing is logged again; with
'always' the violation is logged again, at its use. The edit pin stays.
`startProtectedDevServer` takes extra plugins and Vite config (additive).
Kills: spc:4462, spc:4463, spc:4464, spc:4465, spc:4469, spc:4856
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The watch-mode test (d9dad4804b) waited for the created route file to be
scaffolded and for the route tree to list it with a helper that throws
"timed out waiting for ..." after 15 s, so a missing scaffold only showed as
a time limit. It now polls for at most 10 s and then asserts the file
contents, so the test fails with what was read. Same assertions.
Kills (now on an AssertionError, about 10 s): rp:1912, rp:1913, rp:1918,
rp:1919, rp:1920.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness hygiene (mutation run r3b follow-up 1): a built entry run by the
build harness (`run()`, e.g. the server of an Rsbuild Start build) ran in a
`node --eval` child with no time limit and nothing tying it to the test
worker. When a vitest worker was killed on a timeout, a child stuck in a
loop was reparented to init and spun at 100% CPU for hours.
- New `run-node.ts` (`runNodeProgram`): runs the program with a time limit
(default 30 s, SIGKILL, clear error) and a watchdog thread (`--import`)
that SIGKILLs the child once its parent process is gone, which works even
while the program's thread spins in a synchronous loop. Used by the build
harness's `run()` and router-plugin's code-splitter runtime test.
- `withBuildEnvironment`: an error no one handles while a build runs fails
the build (a throw in a sync Rspack `compile` hook leaves `rsbuild.build()`
pending forever).
- Rsbuild dev harness: a compile Rspack gives up on (`compiler.hooks.failed`,
e.g. a throw in `processAssets`) rejects the compile wait with its error at
once instead of after `compileTimeout`.
Verified: SIGKILLing the vitest worker while an Rsbuild Start build's
server spins leaves no process (with the watchdog disabled, the child is
reparented to systemd and keeps spinning). Control tests in run-node.test.ts
and rsbuild-dev-server.test.ts.
Fail fast instead of a time limit: spc:6793 (Rsbuild builds failed after the
60 s test timeout, now at once on an assertion), spc:7471 (Rsbuild dev
compile wait of 20 s, now the real TypeError at once).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The webpack branch of the route generator host had no coverage, and nothing
checked that closing the compiler's watcher stops the generator's own
chokidar watcher (route-tree hosts, round-3 mutation testing item G).
In `compiler.watch` mode, per bundler: a created empty route file is
scaffolded and added to the route tree; after `watching.close()`, a route
file created later is left alone. The negative check needs a fixed wait
(the generator's watcher closes asynchronously and nothing signals it);
the test waits for the compiles to settle before closing, and cleans up
only after the watcher closed. Passed on base in every run (5 runs).
Mutants verified killed (through Nx): rp:1903 rp:1905 rp:1906 rp:1912
rp:1913 rp:1914 rp:1918 rp:1920 rp:1923 rp:1925 rp:1926; rp:1919 killed in
1 of 2 runs (webpack sometimes reports the created file through its own
watcher too).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-3 mutation testing (FIX-PLAN R3-router: ranked items 22-24, medium
and low-tier Route HMR proposals).
- route-hmr: every kept split component still renders its own component
after an update (not only `component`); unsplit routes drop a removed
component option and render an added one (Vite, webpack); Solid/Vue
unsplit routes render the new component; options built by a factory call
are hot-updated; root route tests take the generator's root route id.
New dev-server section (autoCodeSplitting off): `.ts` route files get
route HMR, `plugin.vite.environmentName` limits it to that environment,
`plugin.hmr.style` alone works, `tsr.config.json` in the Vite root sets
the target, function plugin options work, and served React/Solid/Vue
route modules map throws to their route-file line.
- known-bugs-route-hmr: controls for an inline-components React route edit
being a hot update with @vitejs/plugin-react, a lowercase function loader
shared with the split component, and an inline loader reading a renamed
lowercase component. New pin (verified red: the edit sends
`full-reload`): an edit of a React `.ts` route module with
autoCodeSplitting off is not a hot update (same root cause as the pinned
Vite HMR boundaries bug).
- handle-route-update: an update of a route the live router does not have
leaves the router as is (no throw); root route test takes the generated
root route id.
- react-refresh-route-components: a `$`-prefixed lowercase function
component is renamed and registered.
Mutants verified killed (through Nx): rp:1299 rp:1428 rp:1408 rp:1346
rp:1348 rp:1287 rp:1413 rp:1453 rp:1454 rp:1403 rp:1405 rp:1425 rp:1467
rp:1325 rp:1326 rp:1439 rp:1466 rp:1469 rp:1470 rp:1471 rp:1472 rp:1462
rp:1463 rp:1199 rp:1203 rp:1206 rp:1212 rp:1214.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix-agnostic .fails pins (REPORT section 6, bugs 6-9, plus low-tier pin
rows), each verified red on main for the stated reason by a scratch run
without .fails:
- exported option component reading Route rendered by a split component
(export function / export const): ReferenceError "NotFound is not defined".
- split option values outside the virtual compiler's allowlist (namespace
member, local member loader, `||`, `??`, tagged template, class
expression): "Unexpected splitNode type ☝️: MemberExpression /
LogicalExpression / TaggedTemplateExpression / ClassExpression".
- `export default function` called by the loader and a split component:
TypeError "Duplicate declaration \"bump\"".
- `createFileRoute<'/'>('/')` is never split (code filter misses type
arguments): component not lazy.
- a module whose path contains `tsr-split`: build fails with "The split
value for the virtual route ... was not found".
- split loader also exported through `export { load }`: "Export 'load' is
not defined".
- binding read by a computed-key option and a split option: created twice.
- `export @dec class` (TS 5 decorators): "Decorators must be placed
*before* the 'export' keyword".
Controls (passing): `{...} as any`, `(createFileRoute('/') as any)(...)` and
`createFileRoute('/')(makeOptions())` routes still render.
Mutants verified: control rows kill rp:80 rp:83; pins flip (killed) under
rp:1068 rp:1069 rp:1071 rp:1073 rp:1074 rp:1076 rp:1077 rp:1079 rp:1080
rp:1081 rp:1082 rp:426 rp:427 rp:428 rp:137 rp:1636 ru:13. rp:1613 and
rp:1614 do not flip the tsr-split pin: they only change how the bug fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-3 mutation testing (FIX-PLAN R3-router: ranked items 15-18, medium and
cheap low-tier Splitting proposals). Outcome assertions only: rendered
output, loader values, init counts, identity, real-build stack frames.
- plugin-options: two code splitters scoped to the client and SSR
environments of one dev server (Start's wiring, shared router plugin
context) split a route whose loader and component share a binding;
a non-function splitBehavior is refused.
- module-state: shared binding stays one instance when the component calls
a hook with an options object; exported classes keep identity next to
shared state; class dependency, array destructurings, JSX member object
and partly shadowed module names reach the shared code; a local named
like a Route-reading helper (21 forms) or component (3 forms) does not
tie the shared binding to Route; destructured sibling of a split
component; exported object destructuring created once; .jsx route files:
state only split options read is created lazily, once, and the shared
module does not pull in component-only imports.
- imports-exports: the route module keeps the other specifiers of a split
component's import; `export default Page` row in the exported-options
table; a default export of another binding or an exported destructuring
does not stop splitting; exported helpers next to an exported option
component; an exported option component is not copied into another
option's chunk; auto-accessor fields compile.
- route-options: literal/method options grouped with a split option stay
as written; a split loader's module loads with the loader only; a local
function loader is split without a warning; root route id from the
generator.
- plugin-pipeline: an edited route recompiled by the same instance works
after a version whose loader and component shared a binding; plugin
order errors for SWC, OXC, vite:react-refresh and vite-plugin-solid.
- build-source-maps: throws in the route module and in shared code map to
their route-file line (Vite).
Mutants verified killed (applied to src, test run through Nx; router-utils
mutants through the source-aliased vitest config because their dist build
fails type-checking):
rp:79 rp:187 rp:189 rp:190 rp:191 rp:192 rp:222 rp:963 rp:965 rp:967
rp:973 rp:975 rp:976 rp:977 rp:980 rp:984 rp:985 rp:986 rp:989 rp:990
rp:992 rp:751 rp:752 rp:753 rp:492 rp:493 rp:495 rp:498 rp:499 rp:500
rp:501 rp:787 rp:788 rp:790 rp:793 rp:794 rp:795 rp:796 rp:851
rp:473 rp:1041-1047 rp:1024 rp:1078 rp:1099
rp:584 rp:585 rp:591 rp:1059 rp:1094 rp:1100 rp:1110 rp:1122 (sample of 34)
rp:566 rp:576 rp:580 rp:581 rp:714 rp:715 rp:717 rp:718
rp:417 rp:418 rp:419 rp:420
rp:1709 rp:1712 rp:1715 rp:1716 rp:1758 rp:1759 rp:1826
rp:1580 rp:1581 rp:1481 rp:1485 rp:1486 rp:1487 rp:1491 rp:1492 rp:1493
rp:1496 rp:1498 rp:1499
rp:529 rp:530 rp:857 rp:858
ru:585 ru:587 ru:588 ru:641 ru:434 ru:435
ru:208 ru:210 ru:328 ru:329 ru:398 ru:402 ru:403 ru:404 ru:194 ru:196
ru:352 ru:300 ru:303
ru:178 ru:180 ru:315 ru:336 ru:359 ru:361 ru:364 ru:367 ru:389 (sample of
the 78-key shadow table) ru:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The root route HMR tests registered the root route file under '/__root' by
hand, and hotUpdate decided root-ness from that literal, so a generator that
registered the root file under another id (or none) went unnoticed by the
route HMR suites (round-3 mutation testing harness gap).
- regression-helpers: `generatedRouteId(file, files)` runs the router
plugin's own route generator plugin (configResolved, as the Vite plugin
does) on a temporary routes directory and returns the id it registered
the file under; hotUpdate treats a route created by `createRootRoute` as
the tree's root and reads the live route by the id the route tree gave it.
- regression-helpers.test.ts uses the generated id for its root route row.
Mutants verified killed through the converted root tests (route-hmr,
handle-route-update; source-aliased vitest because generator dist builds
fail type-checking under these mutants): rg:941, rg:942, rg:954.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test:types rejected the inferred union of the row objects (optional
undefined file keys) as Record<string, string>.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 3 mutation gap ip-misc P11 (start-build-source-maps.test.ts, both
bundlers): in a mock-mode build, a throw in a module whose denied import
import protection rewrote maps to its line in the source file.
Kills: spc:7985, 8002, 8004
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins (known-bugs.test.ts, appended):
- REPORT #1 / ip-misc P1 (Rsbuild): a client dynamic import('db-lib') of a
denied specifier builds without a report (red: the build succeeds).
Vite row is a normal test (the build fails with one client violation).
- REPORT #3 / ip-vite B1 (both bundlers): in mock mode a denied
.server.json ships its real content (red: hasRealCode true, read
MARK_SECRET, warned); a denied .server.cjs fails the build (red: Vite
PARSE_ERROR on the ESM mock, Rspack ESModulesLinkingError for the named
import). Intended: build succeeds, client gets the mock, warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 3 mutation gaps (reported-location.test.ts, Vite and Rsbuild builds):
- ip-location P2 + ip-rsbuild R9: the trace lists each import from the
entry (only the first step tagged entry), located at its specifier.
- ip-location P3: the code frame shows the import and the use, its caret
under the reported column, and the location under it.
- ip-location P6: the trace is the shortest import chain (diamond).
- ip-rsbuild R8: with source maps, Rsbuild locates a trace import on its
line after compiling moved it (comment, blank line, type-only import).
Pins (#21, build part):
- ip-location B1: without a captured source map, trace steps use
compiled-code lines (Vite: every row; Rsbuild without source maps:
blank line and type-only import rows). Red: line 2 reported for an
import on line 3.
- ip-location B2 (Vite): the trace stops at modules outside src. Red: the
trace is only the importer.
Kills: spc:1317, 1319, 1321, 1323, 1328, 1331, 1334, 1752, 1754, 1755,
1815, 1816, 1821, 1822, 1826, 1649, 1650, 1653, 7236, 7237, 7405, 7435,
7436, 7441, 7444, 7447, 7462, 7465, 7473, 7474, 7490, 7491, 1723, 7216
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 3 mutation gaps (build-options.test.ts, both bundlers unless noted):
- ip-rsbuild R1: an onViolation that returns nothing does not allow the
import (denied file and marker rows).
- ip-rsbuild R5: the marker violation is typed marker and located at the
marker import (line; the two bundlers differ by one column).
- ip-misc P4: in mock mode, onViolation gets info.resolved for each
import of several denied specifiers (resolve cache hit), and the
production mocks are silent.
- ip-rsbuild R6: log 'always' reports each violation of a build once.
- ip-misc P5: excludeFiles with several patterns (table row).
- ip-vite V6: client.excludeFiles [] with a server-only-marked dependency
fails the Vite build (Vite row only: Rsbuild awaits a ruling).
- ip-location P5 + ip-rsbuild R10: maxTraceDepth cuts a deeper trace and
keeps one within the limit complete.
Adds violation-report.ts, a reader of the trace and code frame of the
reports a build prints.
Kills: spc:7564, 7825, 7418, 7278, 7280, 7353, 1886, 5260, 7838, 7845,
7846, 7849, 7851, 7857, 7863, 7864, 7865, 7874, 7878, 7972, 7963, 7964,
7965, 1685, 1686, 1709, 1710, 1712, 1725, 1737, 7642
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 3 mutation gaps (both bundlers, build.test.ts):
- ip-location P1: re-exports from a denied specifier are mocked in mock
mode; other re-exports keep their values.
- ip-vite V1: a denied .server.mts/.server.mjs file is mocked.
- ip-vite V10: mock mode with a CSS import builds and mocks.
- ip-vite V11: the mocks of a build are silent when used.
- ip-misc P2: a server import of a client-only-marked module fails the
build; in mock mode it is mocked (Vite: new row of the existing
markerMockTest pin, same bug).
- ip-misc P3 + ip-vite V5: the client (server) build may import a
client-only (server-only) marked module from several modules; replaces
the single-importer server test.
- ip-vite V16 + ip-rsbuild R11: such a clean build prints no
import-protection output (no perf report by default).
- ip-location P4: a .server file in a dot directory is denied.
Kills: spc:1254, 1282, 1292, 5319, 5243, 5349, 7910, 7911, 7927, 7929,
7930, 7931, 7935, 1173, 1174, 4299, 4307, 5466, 3990, 7002
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`onViolation` receives `unknown` in Start's options type: cast it to
`ViolationInfo` like the neighbouring tests; type the Rsbuild config and
the rows of the module-type pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins (each verified red for the bug as a plain test):
- REPORT §6 #4 (ip-vite B3): in Vite dev with behavior "error", a server fn
factory module calling a denied import at the top level loads silently
(`serverFnLookupModules` keys by path without the lookup query). Red:
the load resolves ('loaded'). Control: the same call in another module
fails to load. The mock-mode counterpart passes (dev.test.ts V4(b)).
- #2 (ip-rsbuild R2): Rsbuild dev never checks importers of non-JS module
types (`.mdx`-like): a denied file is mocked but not reported, a denied
specifier's real code runs. Red: reported [] (and ranRealCode true).
Flipped by spc:7307 and 7168 (denied-file row).
- #23: an `onViolation` that throws hangs the Rsbuild dev compile. Bounded
wait (compileTimeout 3 s); red: "Rsbuild did not compile the app within
3000 ms"; the harness closes the server afterwards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness gap H1: `startProtectedDevServer` and the known-bugs dev config now
register Start's router entry (and `src/start.ts` when present) the way
`tanStackStart()` does, so the dev reachability check runs. Apps in
dev.test.ts are loaded from their router entry `src/entry.ts`, like a
browser loads a Start app. The provider environment can be `rsc`.
Re-running the suite with the entries registered turned two passing tests
red; investigated, a real main bug (not a harness artefact), now pinned:
- Bug (new): an edit drops the import graph edges to the edited module
(`ImportGraph.invalidate` removes the edges where the file is the
target), so a violation found when it is transformed again is discarded
as unreachable: a denied import added by an edit is mocked without a
warning, and `log: 'always'` does not log again after an edit. Pins:
"added by an edit of the importer is logged at the use, with a trace from
the entry", "'always' logs a violation again after an edit" (both flip
with a scratch fix keeping incoming edges). The mocking half stays a
passing test.
Items:
- ip-vite V2: the logging half of the "importer first" pin is a normal test.
- V3: SSR import of a client-only-marked module (already transformed, and
through its importer) is mocked and logged.
- V4 (a) only the leak is logged, not a server fn factory's .server()
imports; (b) a factory module calling a denied import at the top level
is logged (the H1 control: fails without the entry).
- V7 denied specifier logged at its use; V8 dev onViolation; V9 rsc
provider env; V12 runtime mock reports; V14 JSX locations; V15 'always'
does not re-log on other loads.
Kills: spc:5091, 5094, 5103, 5106, 5109, 5113, 4305, 4312, 5070, 5077,
4547, 4560, 4561, 4584, 4586, 4588 (hang), 4594, 4597, 4604, 4607, 4613,
4626, 4631, 4642, 4643, 4644, 4656, 4657, 4662, 5011, 5141, 5143, 5146,
4533, 4581, 4520, 4900, 4902, 4678, 4685, 4687, 5014, 5017, 5021, 5446,
4744, 4761, 4764, 4326, 4794, 5351, 4169, 4170, 4173, 4187, 4189, 4731
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness gap H2: the Rsbuild dev-server harness now exposes the warnings of
each compile (compiler-test-utils, additive) and closes the dev server when
its first compile fails (e.g. times out), so a hung compile does not leak a
watcher into later tests. `runRsbuildClient()` runs the emitted client code
and returns what it logged.
Items:
- ip-rsbuild R3 (H2 control): `log: 'once'` reports a violation once across
rebuilds, `'always'` again.
- ip-rsbuild R4: after an edit, `info.resolved` names the new target.
- ip-rsbuild R7 + ip-misc P10: each client mock (two denied files, one
denied specifier) reports its own import at runtime.
Kills: spc:7076, 7548, 7553, 7692, 7698, 7131, 7944, 7962, 7966
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-router H: the router.codeSplittingOptions rows also assert the SSR
build places the loader and component like the client build, on Vite
and Rsbuild.
Kills: spc:6051, 8034, 8035.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-hosts 9: buildStart gets two additive options, builds (rebuild the
same app directory with a new plugin instance, describe the last build)
and rsbuildConfig (merged over the harness's). A second Rsbuild build
with performance.buildCache restores the modules from the cache, and
each client RPC id still runs its handler through the SSR resolver.
Kills: spc:6799, 6956, 6960, 6968. Survives: spc:6959 (restore tap at
stage +20 instead of -20, after the SSR resolver rebuild at -10): the
client environment's restore already filled the shared registry, so the
order within the SSR compiler is not observable here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness gap H1: dev-server.ts can mount Start's whole Vite plugin
(tanStackStartVite with the options @tanstack/react-start passes) through
the new opt-in start option, with stand-in entries, router and root route;
existing callers are unchanged. Control: the new test fails with the old
harness (no route tree is generated).
start-router D: new start-router-dev-server.test.ts edits a route from
server-only to page, to page without handlers, back to server-only; the
client route tree follows, page/server-only switches send a full reload,
and a handler edit of a server-only route sends nothing to the client.
Kills: spc:5953, 5955, 5960-5964, 5967, 5969, 5973-5975, 5977-5979,
5983-5988, 6002.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-hosts 5: dev-server.ts takes the compiler's environments and
providerEnvName (optional, defaults unchanged; extra environments are
created as server environments). With an rsc provider, SSR resolves the
client's id through its configured getServerFnById module, and rsc runs
the handler.
Kills: spc:5677, 5679, 5681, 5932, 5934, 5936, 5937, 5938, 5939, 5941,
5942. Survive: spc:5935, 5940 (every environment the resolver applies
to is in the list, so the lookup always finds one).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-hosts 4: a Vite builder builds the SSR environment twice (like the
@vitejs/plugin-rsc scan build) through the Start compiler plugin; the
second build's server fn, whose builder the compiler loads from another
module, is compiled and runs.
Kills: spc:5762, 5763, 5764.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-hosts 8: on Vite and Rsbuild, the build fails naming the missing
module; the wait is bounded (20 s) so a hanging build fails the test
fast.
Kills: spc:6906 (the mutant hangs the Rsbuild build; the bounded wait
reports it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-hosts 6: on Vite and Rsbuild, the client RPC calls the id
serverFns.generateFunctionId returns, and the SSR resolver runs the
handler under it.
Kills: spc:5799, 5801.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-router F: Vite and Rsbuild builds with and without src/start.ts;
the SSR route tree keeps the user's router.routeTreeFileFooter, and
ts.createProgram on routeTree.gen.ts plus a check file proves the
Register interface carries ssr, the app's router and (with src/start.ts
only) the app's Start config, with @ts-expect-error negatives.
Kills: spc:3941, 3942, 3944, 3946-3952, 3955, 3957, 3958, 3961, 3962,
3965, 3967, 3968, 3970, 3976-3978, 3980, 3984-3986, 3988, 5993.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-router E: the prerendered-pages control runs Start's prerender
plugin on a whole app (index, nested, layout, group, lazy-only, dynamic,
server-only and cast routes) and gets exactly the static pages.
New pin (known bug class): a page whose options are wrapped in a cast
(as never, as any, satisfies) is not prerendered; the route generator
records no option keys for them. Verified red: the page is missing from
the prerendered paths.
Kills: spc:3882, 3887.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-router C: a Vite and an Rsbuild build with
prerender: { enabled: true, crawlLinks: false } request exactly the
static pages (/, /about), not the dynamic page or the server-only
route, from a stand-in request handler (Start's own prerender step runs).
Kills: spc:6032, 6033, 6035, 6036, 6037, 8020, 8022, 8023, 8025, 8026,
3882.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start-router A: a Vite and an Rsbuild build whose SSR entry exports
tanstack-start-manifest:v; the manifest preloads each page's component
chunk and links the stylesheet its component imports.
start-router B: the client route tree keeps a server-only route with a
page under it, the root stays a root, and (Vite) the server-only subtree
is pruned. Rsbuild row is a .fails pin of the known parity bug (only the
Vite plugin prunes; same bug as known-bugs-route-options.test.ts).
Kills: spc:3893, 3895, 3896, 3897, 3900, 3901, 3903, 3912, 3926.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-hosts 3: SSR calls a server fn by id, then imports another module and
calls its server fn by id through the same resolver.
Kills: spc:5946, 5949.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-hosts 2: two modules export a server fn of the same name; the client
bundle of an Rsbuild dev server, run in a bare context, gets two
different RPC ids.
Kills: spc:6764.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-hosts 1: the shared env-separation build gets a server fn built with
a builder imported from src/base.ts (its handler code stays out of the
client and runs in SSR), and every client RPC id runs through the SSR
server fn resolver (origin client), on Vite and Rsbuild.
Kills: spc:6933.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness gap H3: tests/rsbuild-test-loaders.ts ran a hand-written copy of
src/rsbuild/start-compiler-metadata-loader.ts; the app loader now
delegates to the TypeScript source through a global, like the
import-protection test loader.
Kills: spc:8047, 8049, 8050 (existing Rsbuild builds of
start-build-options.test.ts). spc:8048 survives (the compiler host always
sets the build-info callback before the loader runs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-core P14: two rows on the pin "client: a createServerOnlyFn called
through $name is compiled": a local alias in a function-local const and
in a top-level block (both flip under the mutants, which fix main).
Pins (REPORT section 6), each verified red for the right reason:
- #15: the provider keeps `export * from './browser'` (the browser-only
module is evaluated by a server fn call) and `export default Page` with
the browser-only state it reads (`window is not defined`).
- #17: an external transform does not reach a call imported through a
project re-export when the call is nested, or when the module has no
built-in factory (the transform's argument is missing).
Kills: spc:2368, spc:2372 (pin rows flip)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-handlers 4: the server-fn resolver module is the same whatever order
the server fns were discovered in.
sc-core P10: the SSR output's source map carries the original source
(the client is left out: D1, client maps and stripped server code, is
out of scope).
sc-core P13: a renamed `<ClientOnly>` imported next to other specifiers,
or written without spaces, still drops its children on the server.
Kills: spc:3811, spc:3817, spc:2983, spc:2984, spc:2985, spc:2236,
spc:2238
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-handlers 2: an object-literal (or other expression) default export
next to a server fn keeps every output a valid module, the client its
value and the provider its handler.
sc-handlers 7: three redeclared `var` server fns, named with `_`, `$` and
non-ASCII characters too, get distinct ids, each served by the provider.
spc:3677 (and 3676/3678 by analysis) turns the fresh-name loop into a
synchronous infinite loop: the run hangs (no in-process bound can fire),
so it is not counted as killed.
Kills: spc:3690, spc:3672
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-handlers 5: compile the narrow re-export shape with the compiler the
hosts create (`createStartCompiler` of host.ts), which forwards
`compilerTransforms` to the lookup configurations, so dropping them there
fails the test too (a compile-level stand-in for the Vite build case).
Kills: spc:3765 (and still spc:3417, 3418, 3419, 3421)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-core P6: IIFEs and curried calls compile in a module calling a
configured external transform.
sc-core P7: unrelated virtual runtime imports next to a server fn (top
level) or a server-only fn (nested) are left alone and the module still
compiles, with a host that cannot load them.
sc-core P8: a provider with external transforms configured compiles
aliased env-only calls of a server fn module.
sc-core P11: compiling a self-referencing binding settles (bounded race).
Under 3029/3030/3032 the recursion never yields to the event loop, so
the race cannot fire: the worker runs out of memory (~35 s) and the file
fails; killed, but not within the race.
sc-handlers 3: the provider drops export lists (`export { Page }`,
`export { Page as component }`) and named re-exports of a browser-only
module (the latter a separate test: the shared rows' unused top-level
`window` read is user code the provider rightly keeps).
sc-handlers 5: an external transform reaches a top-level call imported
through a project re-export next to a built-in factory (the narrow shape
main supports; the others are pinned).
Kills: spc:2413, spc:2737, spc:2389, spc:2390, spc:2392, spc:2393,
spc:2327, spc:2271, spc:3029, spc:3030, spc:3032 (worker OOM),
spc:3705, spc:3707, spc:3417, spc:3418, spc:3419, spc:3421
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-core P3: a top-level server fn wrapped in two calls never ships its
handler to the client, with createServerFn alone or next to another
factory (a standalone test: as a `placements` row it would also feed the
createServerFn-alone placement pins, which it passes); a createServerOnlyFn
wrapped in two calls runs only on the server.
sc-core P12: in dev, a server fn imported through `export *` of the Start
package still compiles after an unrelated module is invalidated.
Kills: spc:2792, spc:2820, spc:2649
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-core P2: a top-level call of an isomorphic fn next to a server fn
returns each environment's value.
sc-core P4: a createIsomorphicFn() builder kept in a variable keeps the
server implementation and its import off the client.
sc-core P9: a `.client()` call on a global object next to an isomorphic
fn compiles and keeps its meaning.
Kills: spc:2374, spc:3198, spc:3332, spc:3333
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-handlers 1 (High): a server fn the client and a server caller both
report, merged in either order the way the hosts merge reports, stays
callable from the client through the resolver's client-origin check.
spc:3769 (merge drops the existing entry) survives: every caller report
is client-referenced today (D6), so overwriting changes nothing; the
test kills it once server callers report server-only fns (D6 fix).
sc-handlers 6: a diagnostic on line 12 names that line and does not
quote the whole module.
Kills: spc:3773, spc:3844
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sc-core P1 (High): a module with several server fns, compiled for the
client then the provider through the hosts' shared registry, calls each
handler by the id its client RPC carries, with default ids and with one
custom id for all (deduplicated ids stay distinct).
sc-core P5: a unique custom generateFunctionId id is the id clients call.
Kills: spc:2473, spc:2486, spc:2497
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ip-analysis P8-P11 (low, location only): shadowing and loop/catch rows
for the post-compile usage lookup, the preferred use (call/new/member
read over a read, object keys vs values, re-exports), compiler-safe
boundaries vs look-alikes in the original-source lookup, and the lookups
of two denied sources of one module.
Kills (sampled): spc:829, spc:965, spc:970, spc:974, spc:976, spc:978,
spc:982, spc:923, spc:935, spc:952, spc:866, spc:880, spc:883, spc:888,
spc:904, spc:905, spc:511, spc:515, spc:540, spc:549, spc:555, spc:562,
spc:570, spc:586, spc:810
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ip-misc P6-P9: `new` on a member of the silent and build mocks returns a
mock; the dev mock reports a string conversion, toString(), `new` and a
property write; the dev mock edge of a denied import reports through the
violation's runtime; the Rsbuild mock runtime (payload encoded as
ensureRuntimeMockModule does) is silent for mockAccess 'off' and reports
for 'error'.
Kills: spc:2078, spc:2071, spc:2073, spc:2077, spc:2079, spc:2141,
spc:2144, spc:2145, spc:2148, spc:2161, spc:2162, spc:2163
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ip-location P7 (REPORT 6 #21): `rewriteDeniedImports` drops
`export * as ns from '<denied>'` without exporting a mock as `ns`
(rewrite.ts:140-195 only rewrites ExportSpecifiers), so an importer of
`ns` gets a missing export / undefined in a mock-mode build. Pinned
`.fails` (fix-agnostic: `ns` defined, denied module not loaded), plus a
passing companion: the module evaluates without loading the denied module.
Kills: spc:1262 (companion)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ip-analysis P5-P7: a denied file exporting an enum still mocks its other
exports; mock modules expose non-identifier names ('~lead', 'a~b', 'a:b',
'|x', 'a^b'); an array-rest export of a denied file is mocked.
ip-analysis pin P3: split the combined "namespace re-export, enum and
namespace" pin so `export * as ns from` in a denied file is pinned on its
own (bug: the self-contained/dev mock of the file has no `ns`;
analysis.ts:270-275 only collects ExportSpecifier names). The enum and
namespace part stays a separate pin.
Kills: spc:377, spc:191, spc:193, spc:199, spc:229, spc:231, spc:237,
spc:245, spc:247, spc:158, spc:163, spc:164, spc:165, spc:385 (pin flips)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ip-analysis P1-P4: import discovery survives array holes; a string
argument of an ordinary call and a computed `import(name)` are not import
sources; `export {} from '...'` still imports its source.
Kills: spc:445, spc:447, spc:448, spc:449, spc:409, spc:411, spc:120, spc:124
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- P1 (REPORT 6 #20): spaces around a single child on one line render on
the server but are dropped by the client chunk (hydration mismatch).
Pin: both environments render the JSX text.
- P2: the member-expression tag pin is split into <ui.Home /> and
<Model.Item /> rows.
Pins flipped by: spc:6410, spc:6414, spc:6418, spc:6419 (P1); spc:6372
(capitalized row only)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Item 4: the server keeps the bindings the children read when stripping
the fallback (sibling declarator, module-level destructuring).
- Item 6: the server module does not import a client-only module the
fallback reaches through components, classes, spreads or a namespace.
- Item 8: a hook call in the boundary's own props runs in the parent
render and the children still split.
- Items 10, 11: forms rows for quoted spread keys and split={false} with a
single-use spread.
- Item 12: after the source module is invalidated, a chunk loaded the way
the Vite host loads it renders the edited children.
Kills: spc:6191, spc:6213, spc:6215, spc:6216, spc:6217, spc:6220, spc:6233, spc:6198, spc:6199, spc:6201, spc:6203, spc:6205, spc:6206, spc:6207, spc:6209, spc:6140, spc:6141, spc:6277, spc:6190, spc:6299, spc:6300, spc:6302, spc:6304, spc:6305, spc:6135, spc:6136, spc:6480, spc:6481, spc:6711, spc:6760, spc:6761
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Item 2: the children read locals through a non-shorthand property value
and a computed member.
- Item 9: member names and object keys are no reads of a local declared
after the boundary.
- Item 13: a boundary spreading a global splits children rendering a
global component.
Kills: spc:6351, spc:6357, spc:6341, spc:6342, spc:6343, spc:6344, spc:6347, spc:6353, spc:6354, spc:6358, spc:6382, spc:6240
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Item 1: a single {expression} child (captured prop, forwarded children)
renders through the chunk.
- Item 3: neither the client parent nor the chunk imports a module only a
server fn handler uses.
- Item 5: boundaries spreading the props param, a props member or a
reassigned object get the preload of their own chunk.
- Item 7: the chunksFromSource test runs for React and Solid.
Kills: spc:6648, spc:6649, spc:6686, spc:6239, spc:6533, spc:6534, spc:6747, spc:6749
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Verified red for the same reason as the other pairs ("Identifier
`AbRouteImport` has already been declared" when the tree is parsed).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-3 mutation gaps (gen-transform.md items 1-11):
- transform.test.ts: the constructor import is fixed when the route id is
already right (no import, stale other constructor, only the other one,
lazy route called as createFileRoute); a module exporting only
`export { helper }` is not a route; `export let Route` and
`export const Route = postsRoute` are left as they are; an interpolated
template-literal id is an error; type imports stay type-only; a prepended
import keeps the file's line ending and its own line (LF, CRLF, single
line); removing a stale import leaves clean, valid code (trailing
whitespace, two imports on one line); semicolons kept; an unrelated or
multi-line import declaration stays byte for byte; a stale import next to
an aliased constructor import.
- known-bugs.test.ts: the "no Route export" control also covers
`export { helper }` at the generator level.
Mutants verified killed (rg set): 1261, 1271, 1469, 1549, 1551, 1566,
1303, 1304, 1306, 1309, 1351, 1355, 1370, 1371, 1373, 1433, 1435, 1451,
1666, 1668, 1669, 1685-1689, 1695, 1697, 1700, 1702, 1706, 1708, 1709,
1711, 1712, 1714, 1716, 1719, 1720, 1729, 1736, 1440, 1452, 1682, 1531,
1559, 1564, 1541, 1542, 1625, 1627, 1632, 1634, 1639, 1641, 1643, 1476,
1477, 1486, 1487, 1631, 1633, 1388. 1715 hangs (synchronous loop) on the
trailing-whitespace case: detected as a timeout, not a test failure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-3 mutation gaps (medium/low generator tiers), read from the evaluated
route tree through a new `urlsOf` helper (route-tree.ts: the URL each route
matches, joining `path` options like router-core):
- route-paths.test.ts (new): escaped `[_]` segments of flat files; literal
`_` after the first segment of virtual routes and physical() mounts;
escaped underscores in a physical mount under a virtual `/_foo` route;
virtual layouts and index under it; a pathless layout under `[_]api`;
`(group)` layouts at the root and nested add no segment; a childless
pathless layout does not crash; an unformatted tree with grandchildren;
`@B` next to `B`; `g`/`y` token flags behave like unflagged ones; only
invalid brace params warn; FileRoutesByTo picks the navigable route.
Pin (main bug, REPORT section 6 #14), verified red for the stated reason
("Identifier ... has already been declared" when the tree is parsed):
route variable-name collisions (about-us/aboutUs, _layout/layout, $id/id).
Mutants verified killed (rg set): 16, 20, 2469, 2470, 2479, 2484, 2487,
2488, 2499, 72, 1009, 3039, 2660, 3166, 3181, 3182, 3184, 3186, 3188, 3189,
3191, 2896, 2911, 2913, 2916, 2517, 2519.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-3 mutation gaps (ranked 28 and the dev-related medium/low tiers):
- generator-dev.test.ts (new): a long-lived generator fed watcher events.
Adding/deleting a nested route gives a fresh run's tree; a route deleted
after a no-op edit leaves the tree; a broken edit fails the run and the fix
is processed; a hand-edited or corrupted routeTree.gen.ts is regenerated
on its update event; a new generator on an up-to-date app does not
rewrite the tree; a missing root route fails naming __root.tsx; route
files in physical() mounts and virtual routes outside the routes directory
are watched; afterTransform receives the previous node (Start's
server-only toggle detection); getRoutesByFileMap maps the root file to
/__root, also after a rerun.
- concurrent-write.test.ts: a save while the generator fixes the file is
processed before run() resolves; an in-place save on a filesystem with
1 s timestamps is not overwritten; rewritten route files keep their mode
and owner (EPERM warns, other chown errors fail the run and leave the
file).
Pins (main bugs, REPORT section 6), each verified red for the stated reason:
- deleting a layout route drops its child routes in a running generator
(tree has only __root__);
- a deleted routeTree.gen.ts is not written again on its delete event (file
missing), and the next route change fails with ENOENT;
- editing the virtualRouteConfig file has no effect in a running generator
(tree keeps the old route).
Mutants verified killed (rg set): 280, 337, 298, 299, 301-305, 307-310, 312,
313, 315, 316, 771, 784, 1170-1173, 756, 758, 876, 884, 918, 925, 941, 942,
954, 343, 1190-1192, 1198-1203, 192, 194, 196, 198-200, 205, 167, 182, 838,
45, 795-797, 799-810, 812, 814, 816, 817, 819-825, 827. Pin flips checked:
639 (layout pin), 354 (deleted tree pin).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-3 mutation gaps (ranked 25-27, 29; medium generator tiers):
- route-pieces.test.ts: Vue SFC piece files of routes and of the root route
become lazy components of their default export, left untouched; a child
route under a route with pieces stays in the tree; disableTypes variant;
empty piece files stay empty and unused; an empty `_auth.tsx` is
scaffolded. Pin: root-only Vue pieces crash (lazyRouteComponent is not
defined), verified red for that reason.
- generator-options.test.ts: default `-` routeFileIgnorePrefix; the Solid/Vue
tree imports only its own router package; customScaffolding from
tsr.config.json (route and lazy templates); valid token combinations;
same flagless JSON regex tokens and `'_ '` prefix rejected; disableTypes
changes only the trailing extension; nested route tree directories.
- template.test.ts: empty root/route/lazy files (and ones under `{-$locale}`)
scaffold into routes that evaluate and render, for react/solid/vue, with
only the target's router package and framework importable.
- Shared helpers: tests/app.ts (temporary apps, save with later mtimes);
route-tree.ts gains routeOptionsOf (lazy options by file and export).
Mutants verified killed (rg set, applied in the worktree, then reverted):
pieces: 236-240, 397, 399, 400, 402-409, 418-422, 424, 425, 427, 428, 435,
466-476, 478-480, 491, 498-505, 507-517, 519-521, 523, 591, 592, 715, 718,
1060-1063, 1072, 1081, 1083, 2116, 2118, 2119, 2124, 686, 688, 694,
696-707, 714 (473/514 fail to load).
options: 1748, 1983, 2033, 2034, 1792, 1884, 1886, 1887, 1889, 1891, 1893,
1894, 1897, 1898, 1902, 1912, 1916-1918, 1813, 1861, 103, 104.
scaffolds: 2007, 2022, 2052-2055, 2058-2061, 2064-2071, 2074-2077,
2080-2083, 1985-1987, 1989, 1991-2000, 2036-2040, 2042-2051, 684, 685, 712,
713.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Rsbuild keeping server-only routes in the client route tree is a parity
bug (.fails), no longer a skipped row.
- Compiling Start output a second time is unsupported: its test is deleted.
- enableRouteGeneration is experimental: the pin on code splitting with
generation off is deleted; the passing test that it leaves the user's
files untouched stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
originalFrameOf (compiler-test-utils) maps the first stack frame in a chunk
through the chunk's emitted source map; buildStart gets a sourcemap option.
A throw in a split route component, a server fn handler (SSR) and Hydrate
children map to their line in the user's file. Split route components on
Rspack, webpack and Rsbuild are pinned: unplugin's transform loaders drop
the code splitter's source map when no earlier loader passed one in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A client that never splits no longer satisfies the pins, except where
leaving the children in place is accepted (runtime children, plain text),
which the comments now say. The string attributes test renders through the
page instead of rendering the chunk alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tanstack/solid-router is now installed for the real-build tests, so the
dev-server control's stub must run before Vite resolves the package.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A route file starting with a hashbang splits into valid modules that
behave like the source; a route file named with non-ASCII characters is
generated, split and rendered on Vite, Rspack and webpack. The module
linker keeps a module's hashbang first when it adds its prologue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the plugin registered twice (each instance transforming every module
in turn), a production compile gives the route a single instance gives:
same lazy options and modules, same rendering, module state created once.
In dev, the second instance's HMR code collides with the first
("Duplicate declaration hot", reproduced on a Vite dev server with
tanstackRouter registered twice): pinned, fix-agnostic (same route or an
error saying the plugin is registered twice). The compile helpers take an
instances option.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Vite client build with @vitejs/plugin-react and the React Compiler preset
after the router plugin compiles the split component with the compiler
(control: not without it), keeps it lazy and renders it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The same route compiles to the same modules (route file id aside) and
behaves the same under other project roots and with Windows module ids in
Vite's and webpack/Rspack's spelling (Node's file URL helpers behave as on
Windows for drive-letter paths). Building the same app twice, in two
directories with files written in another order, emits identical files on
Vite, Rspack and webpack. The compile helpers accept a raw moduleId.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
enableRouteGeneration false leaves the user's tree and route files alone
(and the silent loss of code splitting is pinned, fix-agnostic: split or
tell the user); autoCodeSplitting false/undefined split nothing;
plugin.vite.environmentName limits splitting to that environment;
repeated options in defaultBehavior or a route's codeSplitGroupings are
refused naming the option; the Rspack/webpack entries wire route HMR
through the bundler's hot API even with plugin.hmr.style 'vite'; the
separate generator/code-splitter entries of each bundler and the deprecated
TanStackRouterVite behave like the combined plugin. The router build
harness can now take other router entry points and several plugins for
webpack/Rspack.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A virtual route config object in tsr.config.json, quoteStyle and
semicolons in the route tree, addExtensions (true, "js", ".js"),
disableTypes with the .js route tree rename, importRoutesUsingAbsolutePaths,
routeTreeFileFooter as a function or an array, disableLogging, the
temporary directory (TSR_TMP_DIR, tmpDir, default) and rejected
configurations, asserted through generated files and evaluated route trees.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Route files whose id is fixed keep every other byte (CRLF, BOM, quotes,
semicolons, solid and vue targets, .js and .jsx files, lazy constructor
renames, added constructor imports), empty route files are scaffolded,
and non-ASCII and hashbang route files generate. Pins: an added import goes
before a hashbang or BOM, and an empty .ts route file breaks generation
(#8480).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Links compiled JSX to a stub JSX runtime, so the route id of route files
with components can be read by evaluation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Evaluates a generated route tree with stub route modules and returns its
route ids and the route files they come from; fails on imports that do not
resolve to a file, like a bundler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DV4 on Vite: a route file the generator cannot handle is reported and
the route comes back once fixed (control of the Rsbuild pins). DV17: an
edit of a route created while the server runs, once a page loaded it,
is a hot update with @vitejs/plugin-react.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the Vite dev-server generator cases (create, wrong path, rename,
move into folder/index, delete, unchanged edit) to a real Rsbuild dev
server running the Rspack entry, asserting compile errors, route files,
the route tree and the emitted chunks. Add DV4 recovery cases and pin
the Rspack generator missing edits of created route files it left out
of the route tree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per bundler (Vite, Rspack, webpack) and framework (React, Solid, Vue), a
production client build with NODE_ENV unset and the default addHmr has none
of the HMR and React Refresh names the dev server's output of the same
route contains, and no absolute path of the project. Without code
splitting, the NODE_ENV-at-creation bug is pinned for Rspack/webpack (all
frameworks) and, through Vite's JavaScript API, for React on Vite (the
refresh anchor export stays).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The router build harness gets a framework option (Solid: vite-plugin-solid
or babel-preset-solid with the solid condition; Vue: the vue automatic JSX
runtime). The shared build harness gains additive jsxImportSource,
sourceRules and conditions options. New builds per bundler (Vite, Rspack,
webpack), framework (Solid, Vue) and environment check that the split
component loads lazily and renders, shared module state is initialised
once, and no other framework ends up in the bundle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rubric-start item 7: the pin builds the resolver itself with the
client-reference check on, so it only flips for a fix in what the compiler
reports. No build harness has an RSC provider environment yet; the
SSR-provider build pin is the host-level oracle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oracle-gaps M4 at compiler-unit level: compiling the client and SSR output
of a module with a middleware, an isomorphic fn, server-only and
client-only fns and a <ClientOnly> boundary again gives a valid module that
evaluates the same (checked against literal expectations, not printed
code). Passes on main.
Server fns are not idempotent on main (recompiling any output of a server
fn module throws "Duplicate declaration" / cannot load server-rpc); no path
from real user code to the compiler seeing its own output was found, so
that case is reported, not pinned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oracle-gaps H3 at compiler-unit level, through the hosts' shared
createStartCompiler factory and a registry shared like the Vite and Rsbuild
plugins share it:
- the same module under `/a/app`, `/x/y/app`, `C:\app` with backslash ids
(Rsbuild) and `C:/app` with slash ids (Vite) gets the same client RPC id,
its provider handler answers to it, and calling it by the reported id runs
the handler;
- a custom generateFunctionId gets the root-relative filename with `/`
separators under every layout (the generated function name is not
asserted);
- a generateFunctionId returning undefined falls back to a working id;
- two server fns given the same custom id, compiled client A,B then server
B,A, each keep the id the client gave them (provider handler and SSR
caller of each module run that module's handler).
All pass on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the fourth shape of the wrapped middleware matrix (lost-cases-campaign
W-2, fuzz M4 link:2): `(createMiddleware({ type: 'function' })
.middleware([]).validator(v).client(c) <wrapper>).server(s)`, crossed with
the 8 wrappers (parentheses included). The client keeps
[middleware, client], SSR the full chain. Passes on main; it crashed the
Yuku migration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rubric-start tier 2 (items 9, 10, 12-22; item 11 is the lead's):
- compiler.test.ts: provider route exports (:490) run the handler without
evaluating browser-only code; parenthesized namespace server fn (:1012)
is an RPC by the reported id; #6643 (:566, :590) calls the provider /
evaluates the client with a stubbed window; same kind twice (:153),
deeper re-export chain (:782), parenthesized chains (:993) and namespace
builtins (:1038) evaluate through createStartCompiler/compileFor instead
of hand-built configurations; shadowed external transform (:261) and
unrelated SSR middleware (:964) evaluate `result ?? code` instead of the
null-return protocol; circular re-export chains (:828) only need to
settle. Dead `createCompilerWithVirtualModules` and `createFullCompiler`
removed.
- createServerFn.test.ts: line-ending diagnostics (:78) via compileFor;
query-bearing virtual ids (:160) and the start-client-core root binding
(:255) check the client RPC by the reported id (and the provider by id).
- createMiddleware.test.ts: start-client-core CSRF middleware (:48) and the
namespace import (:106, now createStartCompiler) evaluate the client.
- factories: untouched modules (:543) evaluate client/SSR (no provider:
never requested without server fns); missing implementations (:575) get
the client rows; project-module factories (:609) and export * chains
(:720) call the server fn through the callers and evaluate serverOnly;
dev invalidation (:819) evaluates both compiles.
- declaration-sites .ts in a # directory (:228) calls the server fn through
the callers; the @jsxImportSource count (jsx:121) is dropped.
- known-bugs: capturing placement pin (:722) requires the callers to reject
(provider unreachable once they do); CommonJS pin (:1309) asserts
compile + same evaluation instead of `toBe(code)`. Both re-verified red
for the original reason (no rejection; strict-mode parse errors).
Deleted, with covering tests:
- createServerFn.test.ts "should compile server functions wrapped in
TypeScript as expressions" / "... satisfies expressions": covered by
start-compiler-import-forms.test.ts "{react,solid,vue} > createServerFn >
through a call result wrapped in as / satisfies" (client keeps no server
import, RPC, provider runs the handler).
- envOnly/envOnly.test.ts "should error if implementation not provided":
covered by start-compiler-factories.test.ts "a missing implementation is
rejected where it runs: export const none = createClientOnlyFn()" (new
client row) and "... createServerOnlyFn()".
- createIsomorphicFn.test.ts "should error if implementation not
provided": covered by the same table's rows "createIsomorphicFn()
.client()" (new client row) and "createIsomorphicFn().server()
.client(() => 1)".
Helpers: evaluateModule links project modules (`files`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User ruling P2: only the client must be free of server-fn handler code; the
SSR caller may keep the handler in place or call it through the provider.
The SSR side of the server-fn suites now asserts behaviour instead of the
absence of the handler body or of handler-only imports:
- regression-helpers: the server runtime stub calls a server fn given a
function alone (an SSR RPC by id, or a handler kept in place) and runs a
handler after its middleware `.server()` and its validator;
createServerGraph serves `createSsrRpc(id)` like the server-fn resolver
(reported server fns -> provider module export) and links project
modules (`files`); callServerFnThroughCallers checks the client RPC id,
the provider handler of that id, and that calling the server fn from the
SSR caller returns the handler's result; expectOutputsFreeOfHandler only
requires the client to be free of the handler; compileAll takes an id.
- SSR-side loosening: handler-scope callHandler and the .ts row,
caller-dead-code mixed imports / Report / cycles / repeated elimination /
nested vars, exports-and-directives export forms and import attributes,
factories env-specific functions (SSR keeps no client-only import),
import-forms createServerFn, declaration-sites nested goal pin, the
createServerOnlyFn-handler pin, dedupe of custom ids, harness controls.
Provider content no longer pinned (rubric-start tier 1, blocks the SF17
fix): the provider rows of preserves-user-code (empty destructuring
initializers, typeof type query) call the handler by id in the server
graph and count initializer runs; caller-dead-code drops the provider
import lists (:24, :390, :417) and provider text checks (:353, :640,
:661) for handler results, recorded validator/middleware runs and two
calls on one instance; factories :525 drops the exact provider import
list (keeps: no client-only import).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
virtualModules.test.ts kept "supports primitive conversion for called
mocks" and "... for named export calls" (the latter now evaluates the build
mock with nothing to link to: it imports nothing), and asserts the
dev-vs-build distinction by evaluation: the dev mock of a client violation
reports each use through console.error / console.warn (mockAccess), naming
the import, the importer and the trace; with mockAccess off or in a server
environment it reports nothing. The purity-annotation text check of the
silent mock is now: it links on its own, and evaluating and using it
changes no globals and logs nothing (the build-level effect is pinned in
known-bugs.test.ts).
Deleted printed-text tests, covered by analysis.exports.test.ts
"$kind exposes \"$name\"" (:27) and "%s exposes several names at once"
(:36), which evaluate each kind of mock (self-contained, mock edge, dev
self-denial) for valid, string-keyed and `default` names:
- loadMockEdgeModule: generates named exports from payload, handles empty
exports array, handles string-keyed export names; handles malformed
base64 and falls back to MOCK_MODULE_ID when runtimeId missing (ids the
plugin never generates)
- makeMockEdgeModuleId: encodes exports into module ID payload, handles
empty exports (payload encoding)
- generateSelfContainedMockModule: generates module with named exports,
handles empty exports, filters out default export, handles string-keyed
export names; is self-contained -> "supports primitive conversion for
named export calls" (standalone evaluation)
- generateDevSelfDenialModule: generates module with named exports and
mock-runtime import, handles empty exports, filters out default export;
imports mock-runtime -> "the dev mock of a denied file" rows
- loadMockRuntimeModule (error mode, warn mode, malformed payload) and
mockRuntimeModuleIdFromViolation (mode off, non-client env, client error
mode, relative trace paths, line numbers in trace) -> "the dev mock of a
denied file" rows
- loadMarkerModule returns empty module -> build.test.ts "the server build
may import a server-only-marked module" (evaluates the marker import)
- loadSilentMockModule returns mock code -> "links on its own, and
evaluating and using it has no side effects"
rewrite.test.ts: the four `toBeUndefined()` "no rewrite" tests (type-only
import, no denied imports, type-only export, type-only export *) now
evaluate the module after the rewrite step and assert it evaluates
unchanged: same values, neither the denied module nor a mock loaded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pin returned early (passed) on any build failure other than the
import-protection error, so once the bug is fixed and `.fails` removed, an
unrelated failure would pass silently. It now asserts the outcome directly
(the build succeeds without the module's code), and a new control builds
the same files with import protection on in mock mode, proving the harness
builds them.
The bug comment now names the Vite root cause found with a scratch change:
the mock that replaces the module is never tree-shaken (its exports read
members of the mock); with side-effect-free exports the Vite pin passes.
New pin for the same root cause in mock mode: an unused denied module
leaves a mock in the client bundle and a warning (the behaviour the
virtualModules purity-annotation text checks stood for).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Passing rows: a denied client import is mocked and the dev server logs a
warning naming the importer at the use (warning channel); an edit adding a
denied import to the importer is mocked and logged without a restart;
behavior 'error' / { dev: 'error' } fails the load naming the importer;
{ build: 'error' } keeps the dev default (mock); log 'once' does not log
again after an edit, 'always' does.
New pins: one import of a denied file is logged twice in dev (log 'once');
a server-only-marked module whose importer the client loads first is
served for real; an edit adding a server-only marker to a loaded module
keeps the real module in the client (DV37, adding direction).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
reported-location.test.ts reads the importer location import protection
reports (Importer: file:line:column) from a Vite dev server's warnings and
from the errors of an Rsbuild dev server and of Vite and Rsbuild builds, so
both adapters' lookup orders (Vite: compiled code first; Rsbuild: original
source first) are covered.
Moved the analysis.usage `.fails` pins on the internal
findPostCompileUsagePos to these rows, asserting the reported location:
- "ignores a member property named like the import" -> "a use after a
member property named like the import" (red on all four)
- "ignores type positions" -> "a use after a type position" (red on
Rsbuild dev and build; Vite erases types before its lookup, and a
type-only use leaves no import to report)
- "finds $name usage" (JSX element, JSX member element) -> "a JSX element"
(red on Rsbuild dev and build, which report compiled-code coordinates)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds real Start apps (Vite and Rsbuild) with Start's default import
protection: a client import of a *.server.* file, of
@tanstack/react-start/server or of a server-only-marked module fails the
build naming the importer; enabled: false checks nothing; mock mode keeps
the real code out of the client. New pins: a Vite mock-mode build ships the
real code of a server-only-marked module; onViolation returning false does
not allow the import (the client still gets a mock); on Vite,
ignoreImporters does not exempt importers of a marked module.
build-options.test.ts exercises behavior { dev, build }, include/exclude,
ignoreImporters, client.specifiers (additive) and server.specifiers, and
excludeFiles (replaces the node_modules default) by their build outcome.
Deleted the Rsbuild "registerImportProtection marker scope" tests, which
ran on a hand-built fake of the Rspack compilation; covered by
build.test.ts "server-only marker" rows on both bundlers:
- skips marker violations imported only by an ignored importer ->
"imported only by an ignored importer does not fail the build"
- reports a marker shared with a non-ignored importer -> "imported by an
ignored importer and another importer fails the build"
- reports a marker imported by a resource-query module -> "imported by a
split route component fails the build"
- skips marker violations from an errored importer module -> "imported by
a module that fails to compile: the build reports the compile error only"
- reports a marker violation when the marked module is an entry ->
"marking the client entry fails the build"
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The real runtime (start-client-core createServerFn) copies the extracted
fn's properties (url, serverFnMeta) onto the server fn, and
createServerRpc gives the provider's extracted fn its id. The stand-in now
does the same (functionId), so a compiler that keeps an SSR caller's
handler in place, passing an extracted fn with an id like the provider
does (allowed by user ruling P2), gets a server fn with an id there too.
Only adds properties; every test passes as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Start's Vite and Rsbuild plugins:
- serverFns.base and router.basepath: the client calls <base><id> (a
stand-in client RPC building the URL like start-client-core's) and the
SSR build routes the same base.
- serverFns.generateFunctionId returning undefined: the default id, which
the SSR resolver runs.
- server.build.staticNodeEnv: the server build has the build-time
NODE_ENV by default, and reads it at runtime with false.
- router.codeSplittingOptions reaches the code splitter: by default the
loader stays with the route and the component is lazy; a defaultBehavior
grouping both puts them in one lazy chunk.
Pin (Rsbuild): staticNodeEnv: false has no effect (red: 'production'
instead of the runtime 'staging'); only the Vite plugin reads the option,
the docs promise it for both.
Source: oracle-gaps "Start options never exercised".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
buildStart() takes the framework's compilerTransforms (as
@tanstack/react-start passes React's RSC CSS transform). With a transform
that warns about one call: on Vite the warning is a warning of the SSR
build only, naming the module, once.
Pin (Rsbuild): the compiler host warns through the transform context's
emitWarning, which Rsbuild's api.transform context does not have, so
every Start compiler warning is dropped (red: nothing reported in any
channel). Fix-agnostic: bundler warnings or the console.
Source: oracle-gaps M2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Start's Vite and Rsbuild plugins: the same app (server fns, a split
route, a lazy module) built in two directories with its files written in
the opposite order gives byte-identical client and SSR chunks and the
same server fn ids; with a generateFunctionId that collides and the SSR
build compiling the modules in the opposite order, each client id runs
its own handler through the SSR resolver. Both pass on main.
Source: oracle-gaps H3 (no two-roots / build-twice / collision-order
comparison at build level).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Passing, both bundlers: a library exporting a top-level server fn gives
the client an RPC without the handler, and the SSR build runs it, called
directly and by that id through the resolver.
Pin, both bundlers (red: marker eager in the client bundle): a library
function that creates a server fn for its users
(createLoggedServerFn(handler)) leaves the user's handler and its imports
in the client bundle, silently. Fix-agnostic: the handler is not in the
client bundle (and SSR runs it), or the build fails with a createServerFn
error (D13).
Source: lost-cases-campaign item 13 (a) and (b).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the Rsbuild provider-only test kept only its provider half; the caller
half asserted bug C9 (no CSS for a render call in a helper module) and
is now a .fails goal with React Start's Rsbuild options (ssr env)
- streams may carry the CSS before or after the node (no order pinned)
- dropped a duplicate of the import-forms table and a redundant null check
- new: an Rsbuild dev server with React Start's Rsbuild RSC options: the
client environment never loads CSS, the provider module in the ssr
environment does, also after an edit (gaps C7/C14, M7)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vite dev (unbundled): editing a middleware's .server() never reaches the
client and SSR runs the new one (DV31); editing an isomorphic fn runs the
new branch in each environment, the client never getting the server one
(DV32).
Vite full-bundle dev (bundledDev, new harness option): the client bundle
has client code and no handler while SSR runs it by id; a server fn
module calling a dependency at the top level bundles (#8407); SSR runs an
edited handler directly and by id (#7535); a factory edit drops the
handler from the client bundle without errors (#8062). All pass on main,
so they are regression tests.
Source: oracle-gaps H4 (DV29, DV31, DV32).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the check that the chunk's map names the source file with
positions: a child element in the chunk and an element outside the
boundary in the parent map back to their original line and column
(gap M1 for Hydrate chunks).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Vite and Rsbuild builds now render the client through its lazy chunks
(every lazy component loads, then the page renders again) and compare
HTML and boundary ids with the SSR build
- the parent's module-level initializer may run eagerly or lazily (not
both); only the children's imports must be lazy
- the N20 goal accepts lazy or eager (eager only when reported), so the
pin stays red on the duplicate only
- new: module-level code only the children use is not duplicated
- new: boundaries in two split route options (component, pendingComponent)
hydrate with the ids the server renders (gap H10)
- new: Vite dev server serving a Solid boundary with the Solid packages
only; its chunk renders through the nested chunk and an edit reaches it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`createDevServer({ bundledDev: { entry } })` turns on Vite's
experimental.bundledDev for the client (Rolldown's dev engine, eager
chunks) from that entry; `clientBundle()` returns the latest client
bundle (rejecting with the bundling error), and `settle()` has the dev
engine rebuild from the edited files. In this mode Vite sends no hot
updates, so an event counts as handled once every environment's
watchChange hooks have run. Controls: the bundle follows an edit and
keeps unimported modules out; a failing bundle rejects.
Source: oracle-gaps H4 / DV29 (no harness support for bundledDev).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The global, user-binding and collision fixtures first compile the page to
collect the binding names the compiler introduces (generatedNames in the
new tests/hydrate-helpers.ts), then declare exactly those names as globals,
module-level or local user bindings. The collision pin now also covers a
module-level binding the children shadow with a local of the same name
(also red on main: the chunk keeps it by name and its export collides).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client route tree pins read the route generator's crawl through
Start internals (pruneServerOnlySubtrees). They now build an app with
Start's Vite and Rsbuild plugins (one build per bundler, a route file per
row) and read the client build's route tree, so a fix anywhere in Start's
wiring flips them (rubric-start item 8). Rsbuild does not prune the client
route tree at all, so the pruning control is Vite-only and the page rows
pass on Rsbuild.
New pins (lost-cases-campaign item 1): route options wrapped in
`as never`, `as any` or `satisfies` keep their server handler code
in the client bundle with both bundlers (red: marker eager).
The prerender rows stay at generator level: the build harness has no
preview server, which Start's prerender step needs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- pipeline's out-of-order .fails pin: same root cause and stronger dev
server pin in known-bugs-dev-server.test.ts (DV8, 'compiles the shared
module and chunks requested before the route module'); its precondition
also required a shared module, so it was not fix-agnostic.
- route-hmr 'leave a module that creates no route as it is': merged into
pipeline 'modules that are not route files' (now with and without HMR).
- router-plugin-context 'does not add HMR code in $mode': merged into
route-hmr 'route modules compiled without HMR' (both modes, every route).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- a module-level element passed as fallback (with and without
split={false}) is stripped on the server and reaches the client boundary
- the when prop (strategy calls with options, a prop, a local, a
conditional, a custom function) reaches the boundary in both
environments, children rendered through their chunk
- a dynamic split={flag} still splits and hydrates like the server renders
- the this/super rejection only has to name what the children read
- the vacuous invalidation test is replaced by the reachable edge: Rsbuild
loading a chunk with the edited source before the parent recompiles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Error-fixture tests now fail when the generator does not throw
(rejects.toThrow); the route-tree directory test runs once instead of once
per fixture folder; option keys are asserted through what generator
plugins receive after a full run instead of transform() internals; the
template tests scaffold empty route files with quotes in their paths (pins
the Vue template breaking on them); adds a CRLF generator run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- handle-route-update runs each update through a route file compiled by
the route HMR plugin instead of the internal getHandleRouteUpdateCode([])
(AGENTS.md line updated).
- Parenthesized route factories and two router plugins in one dev server
are asserted through loading the routes, not plugin internals.
- The shared JSX component test checks identity and covers non-ASCII
names; pins _Widget/$Widget/éWidget being duplicated per chunk (main bug).
- Drops the vacuous esbuild row of the HMR production check; low-severity
rewrites (run counts instead of text search).
- Lost cases from the #8504 campaign: enum/namespace direct reads, merged
namespace, type-only readers and reassigned lets copied into chunks, F-06
in the route HMR plugin, aliased createFileRoute, options from a call, two
file routes in one module, classic factory imports, two-space @jsx,
'export { Page as default }', exported const component, component shared
by two split options (hint-dependent), exported component another route
renders, cast route options with server handlers, parameter decorators
(pins); type arguments, side-effect initializer shapes, duplicate Route
refusal, exported component next to a shared helper (passing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The known-bug pins on captured values and module-level code (and the
hooks goal) now also require every lazy chunk to render, so a fix that
silently leaves the boundary unsplit cannot flip them. Re-verified the
id-shift pins (each row red on a shifted id or the removed boundary's
children) and added the row the gap analysis found missing: a component
with a boundary that only a removed server fn handler renders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SSR factory-edit control and pins asserted "calls the handler through
its RPC" as the absence of db.x() in the SSR transform. User ruling P2
allows SSR to keep the handler in place, so they now assert what SSR code
and HTTP calls observe: after the edit, the SSR export is a server fn with
an id, calling it runs the handler, and the server fn resolver runs it for
that id. The pins stay red for the stale transform (no id; the resolver
rejects "Invalid server function ID: undefined") (rubric-start item 11).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pin and its control waited a fixed 15 s for the client transform. The
harness now reports a hang once the transform has made no progress for
1.5 s (no plugin hook ran and the main thread stayed idle; a dependency
optimizer bundling keeps it busy), capped at 15 s. Checked both ways: red
with 'hang' on main, and green with a scratch fix that skips loading
pre-bundled dependencies.
Both tests now assert the outcome instead of the printed createClientRpc:
no handler body in the client transform, and the served module evaluates
with fn as an RPC carrying its id (rubric-start item 6).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hydrate split-module tests now load the page with its chunks
(loadClientModule) and require the children to render through them,
instead of rendering a chunk alone or reading strings of the output.
Initialiser timing is no longer pinned (only that the chunk's imports are
not linked before the chunks load, and the initialiser runs once). The
server fn chunk test calls the RPC from the rendered chunk and runs it on
the server by that id. Removes helpers no test needs anymore
(getBoundaryIds, evaluateHydrateParent, parentImportSources) and harness
controls for an unreachable config and a deleted optimisation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness: loadRoute labels each lazy module by the route options whose
loader imports it (found by probing the import, not by export names) and
gives chunkOf(option) and importFromRoute(source); compileRouteModules no
longer guesses roles; tests use declaredNames instead of the declarationOf
regex; buildAndRun apps no longer inherit this package's
"sideEffects": false (a sideEffects option sets the hint).
Tests: placement and exact-import assertions of the dead-code, scope,
imports-exports, module-state and route-options suites become rendered
outputs, loader values and init counts, keeping only negative 'module does
not import/declare X' checks; split chunks are no longer evaluated alone;
route module exports are checked through an importing module (P1 ruling);
the D5 and NODE_ENV pins no longer depend on export lists or warning text;
the build-harness warning control no longer relies on an unsplittable
export; same-file route factories and IIFEs are asserted split and
hot-updated (main does), with fix-agnostic pins for factory routes main
breaks; the stale hot-data test runs the real flow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
probeDynamicImports names the module each dynamic import a function starts
targets without loading it, so a harness can tell which module a lazy value
loads. declaredNames lists runtime declarations from the syntax tree (every
declarator, destructured bindings, enums, namespaces), where the
declarationOf regex misses later declarators and destructuring.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the SSR build, the Start compiler resolves the module's createMiddleware
import through the Rsbuild loader context, which does not match the
import-only exports of @tanstack/react-start: PackagePathNotExported.
.fails on Rsbuild, passing on Vite (lost-cases item 3, BS-6 / K-13).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One app per bundler (Vite and Rsbuild, through Start's plugins), built once
for all rows: a server fn handler, a function middleware's .server() and
validator, an isomorphic fn's .server(), a server-only fn, route
server.handlers / headers / ssr (Start's own router plugin wiring), a
server fn of a split route file, a server route, and a request middleware
of src/start.ts each import a module carrying a marker. The marker is
nowhere in the client output and the SSR build runs the code. All rows
pass on main for both bundlers (holes C1, C2, C3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Start build harness now builds through Start's own plugin of each
bundler (tanStackStartVite / tanStackStartRsbuild with React Start's
options) instead of the Vite compiler plugin alone: Start's environments,
compiler, import protection, router generator and code splitter, and
generated server fn resolver. buildStart({ bundler: 'vite' | 'rsbuild' })
describes each environment (where(), run(), warnings) like before; the
stand-in react-start package uses the real package's import-only exports.
Rsbuild's loader paths for the TypeScript sources are shared with the
Rsbuild dev-server harness.
build-harness.test.ts now holds control tests of the harness (where/run,
server fn RPC ids and the generated resolver, route generation and
splitting, warnings, build errors) for both bundlers; its two absence
checks move to start-build-env-separation.test.ts.
Existing build tests get an Rsbuild row: known-bugs-start-compiler (D2, D4,
SF17, D6, #7213), hydrate-build (N19, N20), import protection (#8101 and
its controls, IP5, IP6b). Pins red on Rsbuild for the same reason stay
.fails (D2, SF17, D6, N20, #8101); D4 and #7213 pass on Rsbuild. Import
protection fixtures move under src/ (protection only checks the source
directory), and the N20 fixture's initializer gets a real side effect
(Start's Vite client build inlines and drops an identity call).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Export describeBuild (and the helpers reading Vite bundles and Rspack
stats) so a framework's multi-environment build can be described and run
per environment, with run() reading the entry's exports from a global
for application entries that export nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The `onViolation` option receives `unknown` under the older TypeScript
versions the package is checked with.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds `split={false as boolean}` without parentheses to the split-cast
pin; like the parenthesized casts, main splits the boundary and rejects
its function child ("Hydrate cannot code-split function-as-children").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The invalidation test (compiler) and the Vite dev-server edit test
required the chunk id / URL to stay the same after the children
changed. Content-addressed ids are as valid, so both now take the chunk
the recompiled (or re-served) parent imports and require it to render
the new children.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`/\bthis\b/` also matched the function-as-children advice ("Use
split={false} for this boundary"), so an unrelated rejection satisfied
the `this` row. Both rows now require the message to say the children
capture `this` / `super`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the N19 row the memo asked for: the chart comes from a barrel
package without "sideEffects": false, which the page imports eagerly.
The bundler finds no side effect in the chart module, so the chart
code is still only in the lazy chunk; the server drops the fallback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Vite build of a page with two boundaries, each rendering a component
of its own module: neither component is in the eager code, each is in
one lazy chunk, the two chunks differ, and the SSR build renders both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`<Hydrate children={<Chart />} />` was only exercised by the goal pins
that require its children to be deferred. A passing test now checks
both environments render it the same (`<section>[chart]</section>`,
same boundary ids).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
renderPage (hydrate-captures) and the split-chunk render tests only
compared the rendered HTML, which an unsplit boundary renders the same.
They now also require at least one lazy chunk, every one rendered
(new helper expectRenderedThroughChunks). With splitting disabled in
loadClientModule (scratch, removed), 40 of these tests fail instead of
15.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every row of the server and client fallback tables now passes `when`,
and both environments must hand it to <Hydrate> unchanged. A new
direct-attribute row also passes `prefetch` and `onHydrated`, which must
reach the boundary in both environments.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing in the package references prettier since the snapshot formatter
that used it was deleted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rsbuild dev-server harness can now run Start's import protection on
the client environment (its loader runs through a JavaScript stand-in
that delegates to the TypeScript loader). A client module of each
JavaScript extension (and a .ts control) that imports a .server file is
reported as a file violation, and the server value stays out of the
client output. This replaces the coverage of the deleted loader-rule
test (`test: /\.[cm]?[tj]sx?$/`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
evaluateCompiled gave the compiled module both `import.meta.viteRsc` and
`import.meta.rspackRsc`, so a transform that ignored `loadCssExpression`
still passed the Rsbuild provider-only test. Only the provider the
configured expression names is defined now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The usage-location harness now follows the Vite plugin's lookup
(resolveImporterLocation): no violation when the compiled module no
longer imports the denied source, else the use found in the compiled
code through its source map, then the unsafe use in the original code,
then the import statement. It used to call only the original-code
fallback, so the compiled output was never consulted.
Through it, the namespace-import (`Start.createServerFn().handler`,
`Start.createServerOnlyFn`) and immediately-invoked-handler cases report
no violation, so they become rows of the safe-boundary table and their
pins, the loosened test and the namespace control are deleted. The
`myServerFn` object case is reported at the real use and becomes a
passing test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rsbuild half of N18: Rsbuild serves bundles, so a chunk is only built
through its parent's import; an edit of the file reaches the chunk.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It read the names of the props a chunk component reads. Its only users,
the captures tests, now render the parent with its chunks
(hydrate-captures.test.ts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
known-bugs-hydrate.test.ts 'a hook called through a namespace in the
children is rejected' accepted only a rejection. It is now a row of
hydrate-boundary-forms.test.ts 'hooks called by the children' ('a hook
called through a namespace in the children runs in the parent render, or
is rejected clearly'), which also accepts the hook running in the
parent's render.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 'a self-closing Hydrate with a children prop renders nothing next to
its boundary': its regex accepted main's bug; covered strictly by
known-bugs-hydrate.test.ts 'children passed through a children prop of a
self-closing element render without unused chunks'
- 'split="false" keeps function-as-children in place': moved into
hydrate-boundary-forms.test.ts 'split={false}' (row 'the string
"false"', both environments)
- 'invalidating a module in an environment without Hydrate sources is a
no-op': an internal return value, no behaviour
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its last users, the hydrateWhen snapshots, are gone (the other snapshot
suites were deleted with the Start compiler tests).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It ran the Hydrate transform directly with Babel types and snapshotted the
printed output. What each fixture and test is for is covered by an outcome
test:
- Basic -> hydrate-split-modules.test.ts 'modules and bindings only the
split children use are not needed before the chunk loads', 'server:
bindings only the stripped fallback uses are removed', 'a boundary with
a direct prefetch prop preloads its own chunk'
- Multiple -> hydrate-split-modules.test.ts 'boundaries in conditionals and
callbacks hydrate like the server renders them', regression-helpers.test.ts
'compileHydrate orders chunks like their boundaries in the source'
- Nested (and its virtual-module snapshots), 'should extract virtual
modules and keep nested ids stable' -> hydrate-boundary-forms.test.ts 'a
nested boundary and a later sibling hydrate with the ids the server
renders'
- Never -> hydrate-split-modules.test.ts 'split / split="true" splits the
children' (the transform ignores when)
- NoImport, NotFromTanstack, WrongImportName -> hydrate-boundary-forms.test.ts
'elements that are not the Start Hydrate'
- ObjectFallback -> hydrate-boundary-forms.test.ts 'the server strips the
client-only fallback'
- PrefetchState -> hydrate-split-modules.test.ts 'a prefetch callback
updates the state of the parent component'
- Renamed -> hydrate-boundary-forms.test.ts 'a renamed import of Hydrate is
a boundary'
- SplitFalse -> hydrate-split-modules.test.ts 'a split={false} boundary
loses a fallback passed through a spread too', hydrate-boundary-forms.test.ts
fallback row 'a direct fallback with split={false}' and 'split={false}'
- SplitFalseFunctionChild -> hydrate-boundary-forms.test.ts 'split={false}'
- generated lazy names next to globals -> hydrate-captures.test.ts 'a
global named like a generated binding keeps its value'
- captured local components and values -> hydrate-captures.test.ts 'the
children render a local component and read a local value'
- client extraction errors -> hydrate-boundary-forms.test.ts 'children that
cannot be split', 'hooks called by the children', 'this and super in the
children' (the super fixture read a class field; the new one reads a
getter)
- server extraction errors -> deleted: which environment reports is
mechanism; the tests above compile both and accept a rejection from
either
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It ran the Hydrate transform directly with Babel types, bypassing the
Start compiler, and asserted printed output. Each test is covered by an
outcome test:
- spread declared after its function -> hydrate-boundary-forms.test.ts
'the server strips the client-only fallback' (row 'declared after the
component', server and client)
- parenthesized split={(false)} -> hydrate-boundary-forms.test.ts
'split={false}' row 'a parenthesized false'
- parenthesized spreads, computed ['fallback'], server strips fallback ->
hydrate-boundary-forms.test.ts 'the server strips the client-only
fallback'
- no preload callback for known props -> deleted (optimisation); preload
wiring is hydrate-split-modules.test.ts 'a boundary with … preloads its
own chunk'
- parenthesized function child / hook call, function-as-children, hook
calls -> hydrate-boundary-forms.test.ts 'children that cannot be split'
and 'hooks called by the children'
- splits behind a lazy import -> hydrate-split-modules.test.ts 'modules
and bindings only the split children use are not needed before the
chunk loads', 'boundaries in conditionals and callbacks hydrate like the
server renders them', known-bugs-hydrate.test.ts harness controls
- Solid import source -> hydrate-boundary-forms.test.ts 'Solid: a Hydrate
of @tanstack/solid-start splits with the Solid packages'
- nested boundaries, sibling ids after nested -> hydrate-boundary-forms.test.ts
'a nested boundary and a later sibling hydrate with the ids the server
renders'
- supplied bundler code -> hydrate-split-modules.test.ts 'a Solid chunk
loads from the code the bundler supplies'
- shorthand and computed captures -> hydrate-captures.test.ts 'the
children read locals through a shorthand property and a computed member'
- exported declarations -> hydrate-split-modules.test.ts 'exported
declarations of every form used by the children render', 'an exported
component of a route file renders in the chunk, and the route is created
once'; goals in known-bugs-hydrate.test.ts and hydrate-build.test.ts
- invalidated source -> hydrate-boundary-forms.test.ts 'after the module is
invalidated and compiled again, its chunk ids render the new children',
hydrate-build.test.ts 'a chunk requested before its parent module…'
- mismatched source hash -> hydrate-split-modules.test.ts 'the chunks of a
module stay loadable after another module is compiled'
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build: the children's modules load lazily and the server build drops the
fallback, with the chart in a project module or a sideEffects-free
package (N19)
- build: an export only the children use loads lazily when its
initializer can be dropped; goal pin that a side-effectful one is
reported (N20)
- dev: a chunk requested before its parent renders, and an edit of the
file reaches it (N18)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Server fallback removal in every form (N2), split={false} forms (N3),
function children rejection (N4, optional Solid goal), hooks / this /
super loosened tests with goal pins (N5, N6), nested boundary parity with
a later sibling (N7), renamed import (N9), elements that are not the
Start Hydrate (N10), Solid (N11) and recompiling after invalidation
(N17). They replace hydrate-when-transform.test.ts and
hydrateWhen.test.ts, which call the transform directly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- recursive boundaries: client ids and output equal the server's
(renderBoundaries with concrete data) instead of counting printed ids
- match by binding: the local-Hydrate bug pin stays, the namespace row
becomes a goal pin next to a passing regression test
- await: valid output that renders the awaited value is accepted too
- Route: table of the #8504 rows (one route created), the unexported
Route pin (clear error or one route)
- boundary-id shift: isomorphic .client() and createClientOnlyFn rows (N16)
- exported declaration initialized once (goal of the copied exports)
- the rejection-matcher control uses a function child
- new pins for #8504 ports red on main: local component names, member
tags, property-name TDZ, local enum, multi-line JSX text, string
children prop, default export, module enums/namespaces, written-only let
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- children-only modules are not linked before the chunk loads (instead of
declaration placement and import lists)
- conditionals and callbacks: client ids and output equal the server's
- preload wiring by calling the preload a boundary receives (N8, with the
hydrateWhen Basic and PrefetchState fixtures)
- server fn called from the chunk: run through the reported server fns
instead of the generated handler name
- shared and call-returned spreads loosened to render checks, with the
shared-spread fallback goal (N14)
- recompiled chunk ids render instead of matching id formats
- ports of #8504: directive prologue, exact JSX text, return statements in
handlers and IIFEs, self-closing rows, children prop goal, chunk source
map, exported declarations, the loosened route-file export test (N13)
Rows red on main are pinned in known-bugs-hydrate.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every captures test renders the parent once its chunks have loaded and
compares with the original output, instead of reading the chunk props by
name. Adds the rows of hydrate-when-transform.test.ts (shorthand and
computed members), hydrateWhen.test.ts (local component, generated names
next to globals) and the #8504 label row. The #8504 rows red on main are
pinned in known-bugs-hydrate.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
loadClientModule validates the parent and the chunks against the globals
the source itself reads, and no longer asks the Hydrate plugin for the
extension-probe ids of the module linker. The hydration stubs export every
strategy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"registers a post loader instead of an Rsbuild transform" pinned the Rspack
rule shape. The behaviour it serves (on Rsbuild, only imports that survive the
Start compiler are flagged) is covered by
e2e/react-start/import-protection/tests/import-protection.spec.ts "compiler
leak violation includes line/col in importer", "no false positive for
boundary-safe pattern" and "no false positive for factory-safe middleware
pattern", run in the rsbuild-ssr mode (11 passed locally).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deleted, with the tests covering their results:
- reuses cached per-result index without changing results: the cache field
is internal; sourceLocation.test.ts "finds first matching import location
across static and dynamic forms".
- reuses a lazily created original transform result: identity caching;
sourceLocation.test.ts "prefers original usage site over import site when
original code is available".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deleted (they matched generated names such as __tss_deny_0 and
__tss_reexport_foo): named, default, namespace, aliased and mixed imports,
type-only specifiers next to value specifiers, `export { x } from`, aliased
re-export, string-literal import and re-export names. All are covered by
rewrite.test.ts "rewritten modules evaluate with mock values for every
specifier form", which evaluates value, def, ns, `value as renamed`,
`type T, value`, reexported, `reexported as aliased`,
`reexported as "string export"`, `"kebab-name" as kebab` and
`"a-b" as ab` in one module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deleted, with the tests covering their behaviour:
- prefers call usage over earlier non-preferred identifier usage: any real
use is a correct location; analysis.usage.test.ts "finds preferred call
usage for named import" and "falls back to non-binding identifier usage
if no preferred usage exists".
- repeated lookups on one transform result return the cached position:
caching is not behaviour; results are covered by the findPostCompileUsagePos
rows and sourceLocation.test.ts "prefers original usage site over import
site when original code is available".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deleted, with the tests covering their behaviour:
- ignores type-only imports: a type-only import is not an import edge,
importProtection/utils.test.ts "skips type-only static import sources".
- ignores type-only re-exports: utils.test.ts "skips type-only re-export
sources".
- sorts output alphabetically: no user-visible behaviour (mock-edge ids are
internal); validity of the mocks: analysis.exports.test.ts "an importer
evaluates with mocks for what it uses".
- returns empty map for code with no relevant imports: utils.test.ts
"returns empty array for code with no imports".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A route's server fn calls a helper module (not the server fn file) that
renders a server component with a CSS module through renderServerComponent
(R-E1, C9). Its styles apply on Vite. On Rsbuild the CSS transform only
rewrites server fn provider modules, so the card renders unstyled: pinned with
test.fail for the rsbuild toolchain. routeTree.gen.ts regenerated by the build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
evaluateCompiled now links compiled modules with the module linker
(@tanstack/compiler-test-utils, new devDependency; lockfile regenerated) in
place of a regex specifier swap, and every test asserts evaluated values: the
CSS envelope the runtime receives, the streamed payload, recorded render
calls. Inline snapshots and kind labels are gone.
- Import forms (named, renamed, namespace) x both specifiers x the three APIs
(R-N1); the client compile loads no CSS; provider-only Rsbuild transforms
evaluated; wrapped JSX streams the CSS.
- Dev server (R-N2): with the Start compiler plugin set up like the RSC
integration, only the rsc environment loads CSS.
- Loosened: calls outside the transform constraints keep their arguments.
- D8 goal pins (.fails): renderToReadableStream(<JSX/>, options) streams the
CSS and keeps the options; all-JSX conditional and logical arguments stream
the CSS; in dev, an identifier or spread argument warns naming
renderToReadableStream. Passing: no warning in a build, and none for a
plain-data model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New importProtection/build.test.ts (Vite Start build): the #8102 re-export
barrel test moves here from known-bugs.test.ts (it passes: no false negative
on Rolldown), and a file with both a server-only and a client-only marker
fails the build (gap IP5, N11).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a Vite dev server with import protection, a client module evaluated as the
browser loads it gets mocks for the names it imports from a denied file or
specifier (control, N7). Goal pin (IP12, N6): a name another module
re-exports with `export *` from a denied module is a mock too, or the server
warns about the `export *`; today the importer fails to link, for denied
files and specifiers alike.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- export * as ns: the pin now requires ns.secret to be the mock, not only a
defined ns.
- Start namespace boundaries: moved onto real Start compiler output and the
plugins' usage lookup (with a control), so any fix is accepted.
- delete: evaluated through the mock helpers; asserts the name is exported,
not mock identity; the prescribed fix is dropped.
- #8101: control that the client bundle drops the module without import
protection (N8), and a build failure other than the import-protection
error no longer satisfies the pin.
- New passing rows: a JSX pragma or legal comment after a directive stays in
effect (ported from #8504).
- New build test (N9, #8102): a denied re-export barrel the client uses fails
the build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rewrite.test.ts evaluates rewritten modules with the module linker, so
project imports resolve: a non-denied import keeps its real value, each denied
source gets its own mock, and code after a rewritten import maps back through
the source map. The every-form evaluation test gains an identifier-alias import
and re-export.
Loosened: `export * from` a denied module only has to evaluate without
loading it (goal pin: dev server). New .fails pin, ported from #8504: a module
declaring the name of the mock import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The safe-boundary rows of analysis.usage now compile the module with the
real Start compiler for the environment and look the use up the way the
plugins do (findOriginalUsageLocation), so a compiled-output implementation
passes as well as today's name heuristic (N4). Real server fn and middleware
values replace the name-only rows.
Loosened: the immediately invoked handler argument (reported at most at a
denied reference), with a .fails goal (no use reported). New .fails pins: an
object named like a server fn, a member property named like the import, type
positions, JSX element uses (the last three ported from #8504).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the name-list assertions of analysis.exports with evaluated mocks:
every importable name is exposed by each generated mock module (N1, replaces
the isValidExportName tests), an importer of a denied module links and gets
mocks for what it uses (N2), and the self mock of a denied file exposes the
exports of the evaluated file (N3).
New .fails pins: the empty export name, reserved names (delete/eval/
arguments), a namespace member read before its import, and namespace
re-exports, enums and namespaces in the self mock (ported from #8504).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Callers get an RPC of the outer server fn and the provider runs its
handler; red on main (the provider exports an undeclared handler).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin a createMiddleware alias declared in another module (red on main).
The export * cache, namespace import and re-exported Start namespace pins
now also require the client to call an RPC and the provider to run the
handler; the builder-in-another-module rows check what the evaluated
client does. Each tightened pin has a passing control in the same harness.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run the client and SSR transitive-importer pins through a module that
re-exports the factory with an import and an export, next to export *.
Both rows are red on main for the same bug.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The existing handler-edit test passes without the provider's HMR accept
code (the caller module reloads the server either way). Editing a module
only the handler reads must hot-update the provider without a full reload
and the handler must run the new code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The factory and inline isomorphic fn tests now read ./x.server in server
implementations and ./x.client in client ones; each output imports only
its own. Add an isomorphic fn called at the module top level.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A createClientOnlyFn returned by a function or an arrow function runs on
the client and throws on the server, whose output does not import the
client-only module. Replace the vacuous toHaveProperty('server') check of
the default-exported middleware with its recorded options.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The createServerFn construct of the import-forms table now passes
{ method: 'GET' }: the evaluated client and SSR server fns keep it as their
options. Add a 'call result wrapped in satisfies' form.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
router-plugin no longer uses prettier. router-utils has no tests: remove
its test:unit script, the vitest test config and devDependency, the tests
entries of its tsconfig, and its row in the compiler platforms unit test
run. Lockfile regenerated with pnpm install.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With verbatimModuleSyntax, 'import { type Db } from ./db.server' is kept as a
side-effect import; the client output of a file the compiler transforms
must not load the server-only module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add 'import type * as' and 'export type * as' to the TypeScript-only rows
of the code splitter and the Start compiler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Delete the Vite rows of the production 'no route HMR code' tests (Vite
replaces import.meta.hot in builds and drops the guarded code) and the
window assertion of the router plugin context no-HMR test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add hotUpdate rows for an unsplit route with all five component options
(each keeps its identity) and for an update that adds a shellComponent
(the live component is the new module's). Drop the root route's
isLazy('component') assertion, which pinned the root-never-split
limitation, the unused ./posts stub and the vacuous window assertion of
the no-HMR rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Load the compiled route module twice with a Vite hot context and run
plugin-react's validateRefreshBoundaryAndEnqueueUpdate on the two export
sets, for a route, an undefined component and a root route, with the code
splitter and the route HMR plugin. Every export the runtime does not ignore
must be a registered component.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- start-compiler-factories.test.ts "dev: modules reaching a factory through
imports and export * are its transitive importers" (REPLACE, internal
getTransitiveImporters and `?v=1` handling): the user-visible outcome is
known-bugs-dev-server.test.ts "SSR: a module importing an edited factory
module through a re-export calls the handler through its RPC" (N15, red
on main: pinned) with its direct-importer control, and the client pin
"client: a module importing an edited factory module through a
re-export loads no server code" (kbd:102)
- server-fn-resolver-module.test.ts "imports on every call by default" and
"keeps the imported module when memoizeModules is set" (REPLACE,
generated source text): start-compiler-dev-server.test.ts "SSR: the
server fn resolver runs the edited handler under the same id, without a
restart" (N16); memoization in builds is a performance detail
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Snapshot fixtures -> covering tests:
createMiddleware (client):
- create-function-middleware: "a function middleware keeps .client() and
drops .server() and its imports" (N3)
- createMiddlewareDestructured: N3 ".server() given a function expression,
an arrow, an identifier or a wrapper call ..."
- createMiddlewareDestructuredRename / createMiddlewareStarImport:
start-compiler-import-forms.test.ts (N1) "createMiddleware through a
renamed import / a namespace member"
- createMiddlewareValidator: N3 "the validator and its module leave the
client"
- createStart: N3 "middleware of a createStart instance ..."
- middleware-factory: N3 "a middleware built inside a function ..."
createIsomorphicFn (client, server):
- call-at-module-level: start-compiler-factories.test.ts "a
default-exported function" iso row (fac:60) and "isomorphic, server-only
and middleware implementations in one module" (fac:143)
- createIsomorphicFnDestructured: N2 "one implementation, both orders and
function references"
- createIsomorphicFnDestructuredRename / StarImport: N1
- createIsomorphicFnFactory: N2 "isomorphic fns returned by factories"
- createIsomorphicFnInline: N2 "isomorphic fns created and called inside
functions"
envOnly (client, server):
- envOnlyDestructured: fac:28 "each output keeps the implementation of its
environment"
- envOnlyDestructuredRename: fac:28 (`createClientOnlyFn as clientOnly`) and
kb "expectServerOnlyRead accepts a top-level renamed createServerOnlyFn"
(kb:244 control row 2)
- envOnlyStarImport / envOnlyExportedAlias: N1 (namespace member; renamed
import with the call result wrapped in `as`)
- envOnlyFactory: fac:123 (in a class method) and kb:244 control row 1 (in
a function body)
clientOnlyJSX (server): the five TanStack fixtures -> N4 "a boundary with
$name renders its fallback on the server and its children on the client";
clientOnlyNotFromTanstack / clientOnlyWrongImportName -> N4 "the server
renders the children of $name"
Deleted tests:
- createMiddleware "should compile validator method" (inline snapshot,
REPLACE): N3 validator test
- createMiddleware fast path / slow path (resolveId calls): performance
mechanism; a middleware builder finished in another module is pinned at
kb:338, the module-level case is fac:253 row 1
- ClientOnlyJSX "should not be detected on client" (REPLACE) / "should be
detected on server": N4 client and server renders
Kept: createMiddleware "requires an argument for validator()" (now compiled
with the production configuration), the start-client-core middleware
resolution tests, the "implementation not provided" errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Snapshot fixtures (client, server-caller, server-provider) -> covering tests:
- createServerFnDestructured: handler-scope.test.ts "the handler can be
$name" (named function expression, wrapper call, function declared after
the server fn), caller-dead-code.test.ts "when the handler only reads it
through a validator or a middleware" (cdc:334), exports-and-directives
"callers keep every export form ..." (id parity, ead:27)
- createServerFnDestructuredRename: start-compiler-import-forms.test.ts
(N1) "createServerFn through a renamed import"
- createServerFnStarImport: N1 "createServerFn through a namespace member";
its 'use server' handler directive: "handler directives stay in the
provider" (ead:206)
- createServerFnValidator: cdc:334 (client drops the validator module, the
provider keeps it)
- factory: "a server fn builder with middleware is callable as a factory"
(N5)
- isomorphic-fns: "a route file: the provider runs the server fns, each
output runs its isomorphic branch" (N6)
Deleted tests -> covering tests:
- "should compile validator method" (inline snapshot): cdc:334
- "should work with identifiers of functions": hs:41 row "a function
declared after the server fn" (identifier handler run by the provider,
callers evaluate to RPCs); id parity ead:27
- "should remove imports used only as caller handler identifiers"
(REPLACE): hs:41 row "an imported function" (N10)
- "should use dce by default": cdc:498 "callers drop handler-only cycles",
cdc:540, hs:41 (provider runs each fn); whether an unused unexported
server fn is extracted is left open
- "fast path / slow path (resolveId calls)": performance mechanism; the
factory alias behaviour is start-compiler-factories.test.ts row "a server
fn factory const-aliased in another module" (N9)
- "should resolve local named re-exports": fac:253 row "renamed re-exports
next to a type-only re-export"
- "should resolve export-star re-export chains": fac:347 "an export * chain
with $name" and fac:253
- exports-and-directives "dev ids encode the provider module and the
handler export" (internal id format): known-bugs-start-compiler.test.ts
"calls a server fn id on the dev server that compiled its module" (kb:1417
control, id -> getServerFnById -> handler) and
start-compiler-dev-server.test.ts "the server fn resolver runs the edited
handler under the same id" (N16)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deleted, each with its covering test (memo start-compiler, compiler.test.ts):
- detectKindsInCode unit tests (12 DELETE): per-kind detection and multiple
kinds are covered by start-compiler-factories.test.ts "each output keeps
the implementation of its environment" (fac:28), "isomorphic, server-only
and middleware implementations in one module" (fac:143), "compiles a
server function through a parenthesized namespace receiver" (cmp:1430),
"removes server-only code through a parenthesized namespace" (cmp:1441),
"a module that $name is left untouched" (fac:197 rows) and the builder
module rows of fac:253 / kb:284; the text pre-filter they pinned is the
root cause of the kb:338 pin
- "resets external transform regex state between detections" (REPLACE):
"a transform whose detect pattern has the g flag runs for every module it
detects" (N8)
- ".handler whitespace variations" / "whitespace between . and handler"
(REPLACE): createServerFn.test.ts "a handler called with $name is
extracted" (N7)
- "server environment excludes Middleware from detected kinds": fac:143
(SSR keeps the middleware and evaluates it)
- "edge cases for detectedKinds" (3): internal host parameter, no
user-visible behaviour
- "compile caches modules without detected candidates for transitive
importer traversal" (getTransitiveImporters return value): the
user-visible outcome is known-bugs-dev-server.test.ts "SSR: a module
importing an edited factory module through a re-export ..." (N15 pin,
with its direct-importer control) and the client pin kbd:102
- "ingestModule populates module metadata": "re-exported
createServerOnlyFn still resolves correctly" (same start-client-core ->
start-fn-stubs chain, evaluated) and the fac:253 rows
- "invalidateModule preserves root lookup metadata": merged into
"invalidateModule clears cached module resolution state" (production
lookup configuration)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- N16 (start-compiler-dev-server.test.ts): an edited server fn handler runs
through the dev resolver under the same id without a restart (replaces
the resolver module source checks and the HMR half of ead:291; gap DV24)
- N17: a module importing a factory that stops being one keeps its handler
in the client (mirrors rsbuild/dev-server.test.ts)
- N15 (known-bugs-dev-server.test.ts): the SSR variant of DV26 is red on
main (transitive importers through export * keep their old transform);
pinned next to the client pin, with an SSR direct-importer control
- bh:11 REWRITE: the handler is nowhere in the client build and somewhere
in the SSR build; whether it loads eagerly or on demand is left open (the
SF17 fix may make it eager)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- kb:414 FIX PIN: the support branch also requires the evaluated client
`fn` to be an RPC and the provider (through the reported server fn) to run
the handler; the rejection branch stays
- kb:454 FIX PIN: a clear compile error naming the computed call is a valid
outcome; otherwise each construct follows its contract (server fn RPC,
middleware evaluates without .server(), isomorphic fn returns 'client'),
not only "no server import"
- #8504 cmp:1605 (shadowed parenthesized namespace receiver, server fn
variant): passes on main with the kind detection the bundler plugins run,
so it is a passing test in compiler.test.ts, not a pin
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- N1 (start-compiler-import-forms.test.ts): createServerFn,
createMiddleware, createIsomorphicFn, createServerOnlyFn,
createClientOnlyFn through a renamed import, a namespace member and an
`as`-wrapped call result, and <ClientOnly> through a renamed import and a
namespace member, for React, Solid and Vue: the client keeps no server
import and each output follows its runtime contract (RPC + provider,
branch, throwing stub, fallback). Pinned (red on main): <Router.ClientOnly>
through a namespace import is never compiled (SSR runs the children).
- N5: a callable builder chain with middleware (factory fixture): client
RPCs keep their middleware chain, the provider runs both handlers, a
look-alike `.handler` is untouched
- N6: a route file (isomorphic-fns fixture): the provider runs both server
fns (validator chain included) without React, each output's loader runs
its isomorphic branch
- N7: `.handler(` spacing/newline/tab/comment variants, with the builder in
the module and in another module (#7280 class). Pinned (red on main): a
comment after the dot hides an imported builder's server fn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- N3 (createMiddleware.test.ts): the client keeps .client() (recorded by
the runtime stub) and drops .server() / .validator() and what only they
read: function middleware, the four .server() argument forms, validator
module (MW2), middleware built in functions, createStart().createMiddleware
(MW5); mw:116 rewritten to evaluate the recorded .client()
- N2 (createIsomorphicFn.test.ts): one implementation / both orders /
function references / noImpl, factories, created and called inside
functions; client and SSR evaluated, the other environment's referenced
function absent
- N4 (clientOnlyJSX.test.ts): SSR renders the fallback and drops the
modules only the children import, the client renders the children;
ClientOnly of another package and another router component imported as
ClientOnly keep their children
Runtime stub: a server runtime (createServerGraph, evaluateModule
`env: 'server'`) records middleware .server(); createStart(...).
createMiddleware is stubbed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createServerFn.test.ts:
- cfn:129: diagnostic location matched frame-agnostically (line 2 and the
quoted source on one line)
- cfn:266: the client keeps a handler identifier it still reads (evaluated
`ref`), the provider runs the handler
- cfn:539: query-bearing virtual module ids resolve the factory (client has
no handler body, one server fn reported); loadedIds no longer pinned
- cfn:711: a constant generateFunctionId (ignores functionName) still gives
distinct ids, the same ones in a second compiler instance, and client RPC,
SSR RPC and provider meta.id agree
- cfn:879 -> N14: compile, generate the production resolver from what the
callers reported (client-referenced check on), link it to the provider:
a client-compiled server fn is callable from the client. The former
server-environment row asserted that every server-env caller reports its
server fns as client-referenced, the D6 bug; it becomes the RSC-provider
goal pin below.
D6 (user ruling: only server fns client code references are HTTP-callable):
- build pin (kb, Vite build, SSR provider): a server fn only server code
references resolves with origin 'client' (red: "server-only fn" instead of
rejected); control: the client fn is HTTP-callable and the server-only fn
callable from SSR code
- RSC-provider pin (createServerFn.test.ts): a server fn only a server
environment compiles passes the resolver's client-origin check
Harness: buildStart takes per-build entries; the stand-in createSsrRpc
exposes functionId; createServerGraph().add().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Server fns are found by runtime metadata (meta.name / meta.id) and reported
ids, never by generated export names:
- ead:27: callers' exports evaluate to RPCs carrying the id of the provider
handler whose meta.name is the local; one handler export per reported
server fn; callReportedServerFns runs a..f
- ead:190: redeclared var server fns get distinct ids (passing) and each
run their own handler (red on main: both run the last handler; pinned)
- ead:291: dev provider runs the handler (HMR strings dropped; dev HMR is
covered by N16, its absence in builds by N12)
- N12: build providers have no import.meta.hot / webpackHot code
- ead:314: id sets compared (old ids still reported, 3 in total)
- ead:346 / ead:363: handlers looked up by meta.name; 6 server fns reported
ead:180 LOOSEN: callers keep the side-effect import and statement (both run
on evaluation); the provider, linked with the SSR caller, runs the handler
and the polyfill was loaded. Whether the provider repeats the top-level
code is left to the SF17 goal pin (kb "initialised once").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
handler-scope.test.ts:
- hs:41: callers evaluate to an RPC (#8504 shared assertion); new row N10
"an imported function" (replaces createServerFn.test.ts "should remove
imports used only as caller handler identifiers")
- hs:384 renamed: exported helpers are callable from the handler (the
provider may import them from the SSR caller)
- pin (#8504 hs:124, #8446): a createIsomorphicFn chain as the handler
never becomes an RPC
caller-dead-code.test.ts:
- cdc:498 REWRITE: the provider runs the handler-only cycles
(callProvider returns [0, 0, 'id']) instead of declarationOf checks;
keeping unused code is no longer required
- #8504 ports pinned (red on main): enum member / overload parameter /
parameter property named like the import keep the server import; a
validator link wrapped in satisfies / as stays in the callers; a
handler-only function declaring a local of its own name keeps its server
import
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared table createServerFn/placements.ts: 16 placements (the 10 of the
review plus the #8504 ds:34 extra placements: return value, call argument,
JSX attribute, conditional initializer, object/array destructuring, nested
in another handler) and the capturing placement.
declaration-sites.test.ts:
- ds:30 REWRITE: no-crash guard (valid module or clear rejection), checks
the top-level server fn through callProvider instead of the generated
handler name; the top-level switch row moved to the placement pins
- ds:94 LOOSEN: next to another factory, every non-declarator placement
never ships the handler (expectNoClientHandler; rejection or extraction)
- ds:115: the validator row is its own test (user error, exact message)
- N13 + D13 goal pins (.fails, both import heads): a server fn in each
placement the callers can reach is supported: client and SSR RPCs share
the id the provider handler carries, and the handler runs
- ports: optional call chain (red on main: pinned), .ts module in a #
directory
known-bugs-start-compiler.test.ts (kb:538 FIX PIN): describe.each over both
import heads (kb:602 folded in: declarator placements next to another
factory), the placement rows of the shared table, and the D13 rejection pin
(a nested handler reading a local of its function must be rejected in every
output).
Helpers: expectNoClientHandler moved to regression-helpers.ts;
callServerFnThroughCallers (with self-tests); compileErrorMessage self-test
ported from #8504 ds:168.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrites (memo: puc:14, puc:50): side effects checked by evaluating the
client/provider with recording stubs (each initializer runs once on import),
instead of text and declarationOf checks; adds the three #8504 puc:18 rows.
Ports (pass on main): leading legal comment kept (client, Hydrate chunk),
__NO_SIDE_EFFECTS__ annotation (loosened: it leads makeLabel in every output
that declares it), JSX attribute source map column (client, SSR), the
pragma comment of a Hydrate parent in both import orders.
Pinned main bugs (red #8504 ports):
- server fn runtime imports inserted above a leading @jsxImportSource pragma
(client, SSR, provider) and Hydrate chunk loaders above it (Vite 8 picks
the default JSX runtime)
- empty destructuring initializers dropped (client, provider)
- asserted update operands printed without parentheses (parse error)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- missing implementation (fac:225, LOOSEN): SSR and provider reject it; the
client may reject it too or compile to a module that never runs it
- dev invalidation (fac:464, REWRITE): no longer pins the internal
invalidateModules return list
- N9: a server fn factory const-aliased in another module (replaces
createServerFn.test.ts "slow path for factory pattern")
- #8504 port (B): vars nested in top-level and function blocks (extends
fac:177, now evaluated), middleware chains with a wrapped link (3 x 8)
Pinned main bugs (red #8504 ports):
- a validator link wrapped in satisfies / as stays in the client
- an isomorphic chain link wrapped in satisfies / as loses its
implementation
- a factory callee wrapped in `as any` / `!` is left uncompiled (server
implementation ships to the client)
- env-specific fns inside a server fn handler are not compiled in the
provider (client-only fn runs on the server, client module imported)
- parameters and locals shadowing every factory, all outputs (kb, next to
the kb:620 parameter pins)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrites (memo start-compiler, compiler.test.ts table):
- multiple kinds in one compiler: each output evaluated (RPC, iso branch,
serverOnlyError, middleware .server() gone)
- external transforms (:462, :482, :518): compiled through the shared
harness with host-like kind detection, the injected argument checked by
evaluating the call
- provider directives (:638, :650): directivePrologue
- ingestModule on empty code (:727): a module importing an empty module
- re-exported / aliased createServerOnlyFn (:848, :886), re-export chain
table (:1004): client and server outputs evaluated
- invalidateModule (:1176) and the aliased provider recompile (:1307):
production lookup configuration, evaluated before and after the edit
- transform phase order (:1459): idle transform may run with no candidates
New: N8 (a g-flag detect transform runs for two modules in a row).
Section-4 ports (#8504): direct calls only (.bind/.call/parameter rows),
unrelated virtual runtime imports (loosened: a throwing host loadModule does
not fail the compile), configured aliases next to an unrelated call.
Pinned main bugs (red ports, known-bugs-start-compiler.test.ts):
- a computed namespace call named by a local variable is transformed
- distinct re-export aliases of two factories conflated (server-only code
runs on the client)
- kb text-detection row: a renamed createServerOnlyFn re-export is never
compiled
Helpers: createStartCompiler accepts compilerTransforms and host overrides;
renderThingTransform and settleAsync.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`test:types` rejected the inferred union of the case tables passed to
`expectExportedRouteOptions`; `ExportedRouteOptionsCase` types them.
`loadRouteOption` returns its promise without `async`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package's tests exercised internal Babel helpers and parse checks that
compiler-level tests cover (memo hmr-generator, section 2):
- compiler-helpers.test.ts `collectIdentifiersFromNode` / shadowing:
router-plugin code-splitter-scope.test.ts (free identifiers and catch /
var / parameter / import shadowing rows) and start-plugin-core
hydrate-captures.test.ts; `collectLocalBindingsFromStatement` /
`buildDeclarationMap` (named default function / class):
code-splitter-runtime.test.ts "preserves executable route contracts with
shared named-default declarations" and start-plugin-core
createServerFn/handler-scope.test.ts; `extractModuleInfoFromAst`
snapshot: start-plugin-core start-compiler-factories.test.ts (builders
across modules, renamed re-exports, `export *`).
- stripTypeExports.test.ts: `with` attributes: start-plugin-core
exports-and-directives "import attributes are kept on the imports and
re-exports each output keeps"; deprecated `assert` attributes (D9):
router-plugin code-splitter-imports-exports "compiles an import assertion
of a route file into an import attribute"; `.ts` angle-bracket casts:
router-generator transform "parses a .ts route file with angle-bracket
type assertions", router-plugin code-splitter-scope "keeps angle-bracket
type assertions in every module", start-plugin-core importProtection
rewrite "rewrites a .ts module with angle-bracket type assertions"; type
alias / interface removal (no behaviour after type erasure); type-only
imports, exports and mixed specifiers: router-plugin
code-splitter-imports-exports "erases type-only imports and exports from
the split modules", start-plugin-core exports-and-directives
"TypeScript-only exports and an enum next to a server fn" and the
type-only re-export pins of both packages; the #6480 scenario:
code-splitter-imports-exports "drops an import that only an exported type
and a split component read from the route module" and exports-and-directives
"an exported type reading a schema the handler uses keeps its imports out
of the client".
`test:unit` passes with no test files so that tests added later run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The control "the route node of ... is server-only" and the pin "a route with
server handlers and a spread / computed key / method is not server-only"
copied Start's server-only rule onto the generator's option keys, so a fix
reporting unknown keys another way would still fail them. Replaced by
start-plugin-core known-bugs-route-options.test.ts, which runs the generator
with Start's prerender plugin and `pruneServerOnlySubtrees`: "a route with
{ server: { handlers: {} }, component: Page } / { server: { handlers: {} } }
is in the client route tree and prerendered: ..." (controls) and "a route
with server handlers and a spread / a computed key / a method / an async
method / an accessor is in the client route tree" (pins), plus the
prerender pins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- handle-route-update "clears lazy ownership and delegates rematerialization
to the router" (internal `_lazy` / `_refreshRoute`): covered by "uses a
fresh source lazy importer without erasing an omitted one" (the lazy
options load from the fresh importer after each update) and, for the
refresh, "removes stale loader data when a hot route removes its loader",
"observes hot parser and route-context changes on the active route" and
"rematerializes descendants when a parent route definition changes".
- react-refresh-route-components "does not keep a split loader in the HMR
data" (hot-data key strings): replaced by route-hmr.test.ts "a hot update
of a split route > vite|webpack > keeps the split components and applies
the new options (a split loader in its own chunk)", where the live loader
returns the new module's data.
- router-plugin-context "does not install the standalone route HMR plugin in
production" (by plugin name): replaced by known-bugs-route-hmr "a
production client bundle has no route HMR code (vite)".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`tests/format-snapshot.ts` (and its two controls in
regression-helpers.test.ts) and `tests/constants.ts` were only used by the
add-hmr snapshot suite, deleted in the previous commit; no test compares
output with a snapshot anymore.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every point of the suite has an outcome test (route-hmr.test.ts unless
noted):
- `@true` fixtures arrow-function, function-declaration, multi-component,
string-literal-keys and the `@webpack-hot` snapshot: "a hot update of a
split route > vite|webpack > keeps the split components and applies the
new options" (+ "split options under quoted keys like the others");
- solid/arrow-function: "solid|vue: applies the new options with the router
package of the framework" (identity: the D10 pins next to it);
- createRootRoute: "a hot update of a root route > vite|webpack: reaches the
root route, keeps its component and applies the new loader";
- createRootRoute-inline-component: react-refresh-route-components "for
every inline component option of a root route, under distinct names";
- createRootRoute-lowercase-components: react-refresh-route-components "for
every lowercase function component of a root route, under distinct names";
- createFileRoute-lowercase-components: known-bugs-route-hmr "registers
lowercase function components, split and unsplit, with the default
groupings";
- createRootRouteWithContext-type-args: react-refresh-route-components "of a
root route created with context type arguments";
- destructuring: "leave a module that creates no route as it is";
- explicit-undefined-component: "keep an explicitly undefined component
undefined";
- the `@false` snapshots: "route modules compiled without HMR > have no HMR
code and leave window untouched";
- webpackHot / Vite unsplittable AST checks: known-bugs-route-hmr
"vite|webpack: a hot update gives the live route the new options" (and
the Solid/Vue boundary pin);
- lazy reset / `_refreshRoute` strings: handle-route-update "uses a fresh
source lazy importer without erasing an omitted one", "removes stale
loader data ...", "... rematerializes ...";
- generated route id fallback: known-bugs-route-hmr "a hot update gives the
live route the new options" (the new module's `Route.id` is never set);
- "prefers the current generated route id over stale Vite hot data": "is
the route the file is registered under now, not the one in stale hot
data";
- "normalizes the generated root route id": the root route update above
(`routeId: '/__root'`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- known-bugs-route-options.test.ts runs the route generator with Start's
prerender plugin and `pruneServerOnlySubtrees`: controls for a route with
server handlers and a component (kept, prerendered) and one with only
server handlers (pruned); pins for a spread, a computed key, a method, an
async method and an accessor (pruned from the client tree) and for pages
whose component comes from a spread, computed key or method (not
prerendered). Replaces router-generator known-bugs "route options", which
copied Start's rule onto the generator's key set (gap G11; #8504 method
and accessor rows).
- #6480: an exported type reading a schema built from an imported enum
keeps the enum's module out of the client output of a server-fn file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `evaluateRouteFile` (route-id.ts) evaluates a route file with other router
exports; `routeIdOf` uses it.
- Rewrites: the added constructor import keeps the file's line endings, the
other bindings and the rest of the file, and the route evaluates with its
new id (no exact import merge); multiple Route exports only assert the
error result; a prepended import binds `createFileRoute` once.
- Loosened: option keys are recorded for identifier and string keys
(`arrayContaining`); computed / spread keys are best effort.
- Ports from #8504: options wrapped in `satisfies` / `as` (B), a redeclared
`var Route` with two route calls is an error (B).
- Pins: a moved route whose constructor or id is wrapped in a TypeScript
cast keeps its old id or fails to generate; a type-only `Route` export is
taken for a route instead of being left out with a warning (gap G8).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the directive prologue stays first and whole, and a later string
statement stays out of it, with and without HMR (#8504 router-utils
prepend-statements);
- a syntax error in a route file is reported at its line and column for
every line terminator and Unicode source (#8504 router-utils
diagnostics; bundlers name the file);
- `.jsx` and `.mjs` route files read `a < b > (c)` as JavaScript (#8504
router-utils source-language);
- an import that only an exported type and a split component read leaves the
route module (#6480; replaces router-utils stripTypeExports "#6480
scenario").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New (route-hmr.test.ts), replacing what the add-hmr snapshots proved:
- a hot update of a split route keeps every split component (arrow,
function declaration, two components, quoted keys, a split loader in its
own chunk) and applies the new loader, with Vite and webpack;
- Solid and Vue: the new options apply with the framework's router package,
no React code; D10 goal pins (.fails): the split component keeps its
identity, as with React;
- a root route (`/__root`) is updated in place, keeping its component;
- an update follows the route the file is registered under, not stale hot
data;
- route modules evaluate without `hot.data` or `import.meta.hot` (#7074);
- quoted split keys, a non-route module left as is, an explicitly undefined
component, and no HMR code / untouched `window` without HMR.
Rewrites and loosening:
- handle-route-update: the hot `Route` sees the live route's parent and
options; lazy options load through `router.loadRouteChunk` from the fresh
importer, an update without one keeps it.
- react-refresh-route-components: hoisting tests evaluate what the component
renders instead of checking generated names and placement; the
method-shorthand test is loosened (it keeps working); new root rows
(lowercase function components, `createRootRouteWithContext<Ctx>()`).
- router-plugin-context: chunk ownership after edits is checked by
evaluation with one plugin instance; production / `addHmr: false` by
evaluation and the absence of a bundler HMR API; the duplicated
transform by module validity; option normalisation by the module
accepting its updates and registering its component.
Pins:
- webpack without React Refresh: the harness now also configures the plugin
with a webpack compiler without a refresh plugin, the oracle renders the
live component (new code or `invalidate()`), with a code-splitting row.
- Solid/Vue route modules are HMR boundaries: rewritten on `routerDevServer`
(an edit is a client `update`, not a `full-reload`), with a
`@vitejs/plugin-react` control for React.
- production builds: a Vite row and automatic-code-splitting rows per
bundler (esbuild holds trivially, the esbuild plugin splits nothing).
- goal: a method-shorthand component of a split route is refreshable.
#8504-only ports: inline components wrapped in `as` / `satisfies` / `!`
(red on main, pinned), split `memo`/`forwardRef` components (B, JSX-free
bodies; the JSX form is the splitter's pin), a lowercase component shared
with the unsplit pendingComponent and a component exported by an export
list (red on main, pinned with the root causes they share), the module's
Route hoisted when another route comes first, and route module exports on a
dev server (class, alias and overload-alias cases red with automatic code
splitting, pinned in known-bugs-dev-server).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `hotUpdate` returns the `window` the modules ran with, and with webpack
configures the plugins through their `webpack(compiler)` hook with a
compiler that has the React Refresh plugin or none (`webpackCompiler`), so
a fix that detects React Refresh from the bundler configuration is seen.
- `createRouteLoader` compiles successive versions of a route file with one
code-splitter plugin instance, as a dev server does; `loadRoute` and
`compileRouteModules` take the Vite `command`.
- `isRefreshable` (registered, or a memo/forwardRef of a registered
component) and `evaluateRouteModule` (exports, Route, registrations) are
exported.
- dev-server.ts: `routerPackageStub(target)` serves a router package whose
lazy options can be loaded, `importRouteModule` serves and imports a route
module, plus the route-module-export assertions shared by the dev-server
tests.
- `@vitejs/plugin-react` becomes a devDependency (catalog) for the
plugin-react HMR boundary control; lockfile regenerated with
`pnpm install --no-frozen-lockfile`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Outcome tests for shapes the deleted snapshot fixtures covered: exported
destructurings read by split options, options given by reference to
imports and local functions, the documented default groupings, a
top-level Route.addChildren call, a 'use server' directive in a moved
function, Solid and Vue routes (split loader included, lazy helpers from
their own router package), and a combined loader/component grouping in
the module-state matrix. Also assert that the non-ASCII route is split and
update comments that named deleted fixtures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the splitter tests that only exist on #8504, rewritten to assert
outcomes (loadRoute, compileRouteModules, real builds). Rows that pass on
main become regular tests; rows that fail on main are pinned in
known-bugs-code-splitter.test.ts (or as .fails next to their controls)
after checking the failure is a main bug. Also pin the D11 goal that the
handler of an object-form loader ends up split, and check that an import
assertion compiles to an import attribute.
The regression helpers now accept JSON source stubs, give plugin hooks a
warn-capable context, and expose a route HMR transform per plugin
instance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- plugin pipeline: deleteNodes plumbing is covered by the server-only option
tests (known-bugs-code-splitter.test.ts); split/shared module ids without a
split value or shared bindings are an internal protocol no user path
reaches.
- utils: getUniqueProgramIdentifier is replaced by the generated-names tests
(a route file binding or global keeps its value), routeFactoryCallCodeFilter
by the route factory tests (whitespace before the call, type arguments: a
root route hot-updates for every spelling), getObjectPropertyKeyName by the
string, spread and computed option key tests.
- known bugs: the evaluateModule linking control is covered by
compiler-test-utils' module-linker tests; the ambient declare const used as
the split component duplicated the environment-component pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- delete-nodes snapshots: server-only options removed with their imports on
file routes (React, Solid) and root routes (createRootRoute,
createRootRouteWithContext), and kept without deleteNodes, are asserted in
known-bugs-code-splitter.test.ts (server-only route options on the client).
- shared-bindings-helpers: internal Babel helpers and computeSharedBindings
results; the outcomes (init once, one identity, absences, Route-reading
helpers) are in the module-level bindings matrix and the route-options
tests.
- detect-route-codesplit-groupings: route-level groupings and precedence,
refused non-nested and variable groupings are in
code-splitter-route-options.test.ts (code-split groupings); code-route
groupings and constants are goal pins; the verbose:false form is no longer
generated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every fixture and test it held is covered by a behaviour test or a goal pin:
- snapshot fixtures: falsy option values, option value shapes (memo,
React.memo, lowercase functions, conditionals, destructuring with defaults),
Solid lazy helpers, untouched non-route modules, directive prologues,
import attributes, self-referencing components, non-ASCII text, Route-reading
helpers, transitive and shared state (code-splitter-route-options,
-plugin-pipeline, -imports-exports, -scope, -module-state tests); exported
components and page code (exported-bindings pins, page code in client
builds); unused copies in chunks (what split chunks hold); imported
error/not-found/pending components (code-splitter-router.test.ts);
- lowercase split components with HMR: known-bugs-route-hmr control rows;
- computeSharedBindings invariants and the small-scope matrix: the
module-level bindings matrix (values, init counts, identity, absences) and
the Route-reading helper tests; loader objects: object-form loader pins;
root routes: the root route test and its build-level goal pin;
- fast paths and graph helper units: internal, their outcomes covered by the
dead-code and module-state tests.
shared-runtime.tsx moves next to the runtime contract test that reads it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix pins: the exported-only-candidate pin accepts any warning naming the file
and the binding (rows for default exports, export lists, exported
destructurings); the property-assignment row no longer asserts placement; the
exported-const placement pin moves into a client build per bundler and
side-effect hint, next to the other page code exported from route files.
New goal pins: chunks hold only what their option needs (D5, compiler and
build level), root route error/not-found components split (D12), method
shorthand components split, options destructured from a call split or
reported (D11), object-form loaders with method or spread handlers, generated
names never shadow user bindings, groupings from a constant honoured, code
route groupings not leaking into the file route, one cache next to a
Route-reading destructuring, one identity for an exported Route-reading
helper, array-destructured components that crash the compiler, state shared
with method options.
Also: Solid and root-route rows for removed server-only options, server-only
options kept without deleteNodes, and split error/not-found/pending
components rendered by a real router in Vite client and SSR builds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrite the splitter tests that pinned which bindings land in the shared
module, the printed form, or internal ids, as evaluations of the emitted
modules (values, init counts, identity), loosen the runtime contract on
initialiser timing and the exported-component report (any wording, file
named once), and add behaviour tests that replace the snapshot fixtures and
helper units: falsy option values, option value shapes, Route-reading
helpers, a module-state matrix across kinds/groupings/readers, groupings
precedence, root routes, Solid helpers, untouched non-route modules,
directive prologues, import attributes, real-app file names.
New pins found on the way: a class with a side-effectful static initializer
read by one split option is created twice; a chunk that imports shared
bindings loses the file's leading JSX pragma under Oxc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Route files of real apps live at paths like routes/{-$locale}/index.tsx; the
linker refused any specifier containing $, so their split chunks could not be
loaded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`routeIdOf` (evaluates a route file and returns the id its Route is created
with) moves from known-bugs.test.ts to tests/route-id.ts and accepts the
React, Solid and Vue router packages, with control tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `compileRouteModules` / `loadRoute` take `targetFramework: 'vue'` (Vue
router package stubbed too), plugin options (`pluginOptions`, e.g.
`codeSplittingOptions.defaultBehavior` / `splitBehavior`, `plugin.hmr.style`)
and the `routeId` the file is registered under.
- `hotUpdate` moves from known-bugs-route-hmr.test.ts to regression-helpers.ts,
with options for code splitting (modules linked like `loadRoute`), the
target framework, the route id (`/__root` mounts a root route), the edited
code, initial hot data and a React Refresh runtime. It returns the live
options before and after the update, the created route options,
`invalidated`, React Refresh registrations/refreshes and lazy loading. Hot
contexts are per module. Routes are router-core routes for every
framework. The route update pins keep their assertion through a local
`updatesOption` wrapper and still fail for the reasons they document.
- handle-route-update.test.ts calls the emitted `handleRouteUpdate` only
through `runHandleRouteUpdate`.
- The out-of-order dev-server pin and its control derive the module URLs
from the imports of the served route module, transitively (the shared
module is imported by the chunks, not by the route module), instead of
hard-coding `?tsr-shared=1` / `?tsr-split=...`.
- `routerDevServer` takes extra Vite plugins, and its default root route
follows the `target` plugin option.
- `importRequests` (static and dynamic imports of a module) is exported.
Control tests in regression-helpers.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`compileWithRscCssTransform` takes `env` (default `server`, the rsc
environment), `warn` (passed to the compiler) and extra
`compilerTransforms`, with control tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `callProvider` / `callReportedServerFns` take the SSR bundle's modules
(`ServerOutputs`: SSR caller + provider, e.g. a `compileAll` or the new
`compileServer` result) and link them into one module graph
(`createServerGraph`), the SSR caller under `/test/src/module.tsx`, so a
provider may import shared state or helpers from the SSR caller instead of
copying them. `evaluateProvider` returns the provider of that graph. The
provider-calling tests now pass their compiled outputs instead of the
provider alone (no assertion changes).
- The Start runtime stub records `createServerFn(options)`, `.middleware()`
and `.validator()`, makes builders callable (server fn factories), and
records `createMiddleware().client()` / `.validator()` / `.middleware()`;
`.server()` still throws uncompiled.
- `expectOutputsFreeOfHandler`, `misplacedServerFnRejection` and
`OutputResult` move from the known-bugs suite to regression-helpers.ts.
- `createStartCompiler`, `compileFor`/`compileAll`/`compileServer`,
`evaluateModule`, `compileHydrate`, `loadClientModule` and
`renderBoundaries` take a `framework` option (react | solid | vue, default
react); the runtime and Hydrate stubs follow it. `evaluateModule` takes its
JSX runtime as `{ runtime }`.
- `compileFor` (and `createStartCompiler().transform`) return the source map.
- `loadClientModule`'s lazy components get `preload()`, which records the
chunk it loaded (`preloaded`), and it returns the parent's `chunkIds`.
- New `importProtection/mock-helpers.ts`: `evaluateWithMock`, `selfMock` and
`isMock` evaluate import-protection mocks through the module linker.
Each helper change has control tests in regression-helpers.test.ts or
mock-helpers.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Move router-plugin's module validator (the stronger one: it also rejects
references to undeclared names) to `@tanstack/compiler-test-utils/validate-module`
and use it from router-plugin and start-plugin-core instead of two copies.
Its controls move with it.
- The harnesses no longer call `onTestFinished` from their own Vitest copy:
`createApp`, `bundleApp`, `createDevServer` and `createRsbuildDevServer` take
a `registerCleanup` option, which the package wrappers set to their
`onTestFinished`.
- `evaluateServed(server, url)` links what a Vite dev server serves for a
module and its static imports as real ES modules and evaluates it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- client modules two imports away from an edited server fn factory keep
stale compiled output (DV26)
- import protection reads ModuleInfo.code in dev and fails the client
transform (#8554, DV38)
- importers keep an import protection mock after the server-only marker is
removed (DV37)
- split/shared modules requested before the route module after an edit use
the previous shared bindings (DV8)
- a tsr.config.json edit re-creates the generator without running it (DV3)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Vite harness starts a real dev server on a temporary app, replays file
events deterministically (creations, edits, renames, deletions and the files
plugins write meanwhile) and waits until the server has handled them, then
requests modules per environment and reports HMR payloads. The Rsbuild
harness waits for the rebuild an edit causes and reads the emitted output.
Wired into router-plugin (route generator in dev: scaffolding, renames,
moves, deletions, first load of a new route) and start-plugin-core
(Rsbuild dev rebuilds every importer of an edited server fn factory).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins, each asserting the correct behaviour and marked .fails:
- code that reads a split binding (export lists/aliases, exported objects,
functions, default exports) loses it (#8505, gap O7)
- class components cannot be split (#8505)
- overloaded functions shared with a split loader break the route (#8505)
- the user's bare `import './Page'` is dropped when `Page` is split (gap O2)
- a split loader's `this` is its chunk namespace (#8688)
- `'` in the app path breaks every split route (#7754)
- Start's `deleteNodes` keeps `ssr()`/`headers()` methods and options given
through spreads, computed keys or calls, with their server imports
(gap D11), plus a client-build canary on Vite, Rspack and webpack
- symlinked route files ship `server.handlers` to the client (#8514)
- Vite source maps of split chunks name the `?tsr-split`/`?tsr-shared` ids
(gap CC-S2)
- webpack/Rspack production builds without NODE_ENV ship the "will not be
code-split" warning and, with code splitting off, route HMR code
(gaps CC-P1, CC-P2)
The build harness gains `nodeEnv` (unset NODE_ENV during a build),
`sourcemap` (`Chunk.map`) and `symlinks`; `loadRoute` returns the route
module's exports and `compileRouteModules` takes `deleteNodes`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins (.fails, with passing controls) for: declarations dead-code
elimination keeps (class, enum, namespace, overload, redeclared var) with
their server-only imports, at compiler level and in a Vite client build;
a typeof type query keeping a server-only import (verbatimModuleSyntax);
comments around a server fn handler reaching the client; Hydrate boundary
ids shifted by environment-specific removals; a server fn module
initialised twice in one SSR process; a server fn only another server fn
calls missing from the production resolver (#7213); dev id recovery on a
fresh dev server (#8447); import protection failing on a tree-shaken
denied module (#8101).
buildStart accepts extra Start Vite plugins (import protection).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The router-plugin and start-plugin-core regression helpers each had their
own Node `registerHooks` ES module linker, and the Start build harness
imported the router-plugin harness by relative path, building its temporary
apps inside router-plugin/tests.
`@tanstack/compiler-test-utils` is a private workspace package (source
exports, no build) with:
- `module-linker`: one `createModuleGraph` linking in-memory modules as real
ES modules. It keeps what both suites use: object and source stubs (JSON
modules), lazy module discovery through `load` and path resolution or a
custom `resolve`, `fallbackStub`/`lenient` for unresolved imports, custom
`transform`, `runtime`, `scope` and `import.meta`, `evaluated` order,
dynamic imports that resolve (or fail) when they run, `add`/`idOf`, and
Node's native `import()` outside Vitest's module runner.
- `build-harness`: the plugin-agnostic real-build core (`createApp`,
`bundleApp`, chunk placement, `run`). Callers pass the directory their
temporary apps live in, so each package builds apps in its own tests
directory and resolves its own dependencies.
The router plugin (`build`, `routeApp`) and Start (`buildStart`) wiring stay
in their packages. The linker and harness-core controls move to the new
package; two duplicates are dropped (fresh instances per graph, unknown
import).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in packages/router-plugin/tests/regression-helpers.ts: keep the
module-runtime helpers and drop the imports only the old buildAndRun used,
which is now the thin build-harness wrapper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Goal tests whose outcome the bundler decides (chunk placement, what
tree-shaking drops, what side-effect hints change) need a real build per
bundler. `build-harness.ts` writes an app to disk, builds it with Vite
(rolldown), Rspack, webpack or esbuild for the client or SSR, reports the
entry, eager and lazy chunks and where a marker lands, surfaces bundler
warnings/errors and console output, and runs the output in a child Node
process (jsdom globals for client builds). Side-effect hints are set per
fixture through the app's package.json.
`buildAndRun` becomes a thin wrapper over it (same Vite SSR build, now with
NODE_ENV=production during the build and run).
The Start counterpart builds client then SSR with the Start compiler's Vite
plugin and a stand-in `@tanstack/react-start` package.
Control tests cover placement and `run()` per bundler and env, build errors,
the package.json `sideEffects` hint, `@__PURE__`/`#__NO_SIDE_EFFECTS__`,
and pin that the esbuild adapter never splits routes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Behavioural tests no longer depend on the code splitter's module layout or
generated names through the helpers:
- compileRouteModules drives the real code-splitter plugin hooks (filters,
configResolved, resolveId/load/transform) under an absolute module id and
discovers the emitted modules by following the static and dynamic imports
the output contains. Labels (reference / virtual <exports> / shared), ids
and sharedBindings are derived from that graph for the tests that still
inspect a module by role.
- module-runtime.ts links modules with Node's ES module linker through
in-thread module hooks: every import/export form, live bindings, lazy
dynamic imports, fresh instances per session, import.meta injection.
- loadRoute evaluates the route module first and a split option only when
its lazy loader runs; options are read from the evaluated Route
(load/isLazy), not from chunk export names. It replaces the local
loadRouteModules/linkable copy in known-bugs-code-splitter and the manual
linking in known-bugs-route-hmr and code-splitter-dead-code.
- getRouteOption, expectRegisteredRouteOption and
expectRefreshableRouteOption evaluate the module with the React Refresh
transform and check the registration of the value the route holds.
- The route HMR harness runs the hot API through import.meta and a real
RouterCore with a real file route instead of a regex and a stub router.
- getModuleErrors also rejects references to names that are neither
declared, imported, probed with typeof nor known globals (JSX compiled the
way a bundler compiles it); expectValidModules allows the globals the
route file itself reads.
- formatSnapshot fails on output that does not parse.
Adds regression-helpers.test.ts with controls for each of these.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Evaluate test modules with a real ES module linker (module-linker.ts:
in-memory graph served through node:module hooks) instead of regex
import rewriting and `new Function`: every import/export form, live
bindings, cycles and dynamic imports.
- callProvider finds a handler by its runtime `meta.name`; callServerFns
imports the reported `extractedFilename` and calls the reported
`functionName`, like the server-fn router.
- expectNoClientHandler checks each output on its own: one rejecting output
no longer excuses another.
- Hydrate helpers: chunks found through the plugin's virtual-module pattern
and ordered through their source maps, chunk components and their props
found by evaluation, loadClientModule links the parent and its compiled
chunks in one graph through `lazyRouteComponent`'s load, and boundary-id
parity compares the ids the server and the client actually render.
- Harness controls for each changed helper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Route HMR keeps the previous component options for React Refresh to patch,
also when no React Refresh runtime is installed, so webpack apps without a
refresh plugin (like the webpack quickstart example) never show an edited
route component until a reload.
In a Vite dev server with an empty dependency cache, a client module with a
server fn and a top-level call of a pre-bundled dependency (a `z.object()`
schema) never finishes transforming: the compiler's module lookup waits for
the dependency optimizer, which waits for the transform. Hit by
`server.warmup`, a middleware-mode server's first request and direct
`transformRequest()` calls.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The route HMR code accepts through `const hot = import.meta.hot`, so Vite
never marks a route module self-accepting. Solid routes with automatic code
splitting and every Vue route reload the page on each edit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- a server fn handler that calls other `.handler()` methods keeps them
(TanStack/router#3698)
- `<T>value` assertions and `<T>(value: T) => value` arrows in `.ts` route
files, server-fn modules, import-protection rewrites and generator
transforms are parsed as TypeScript, not JSX (TanStack/router#7341)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each pin fails on main and on #8504's head for the stated reason:
- a type-only import re-exported without `type` (`import type { Settings }`
or `import { type Settings }`, then `export { Settings }`) loses its import
but keeps the export, so the module fails to load with "Export 'Settings'
is not defined": route module and split chunks (code splitter), client and
SSR outputs (Start compiler)
- rewriting a denied import to the import-protection mock drops the comments
that lead it (a JSX pragma, a legal comment)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found by mutation testing #8504 and by checking exported bindings used by
split options. Each pin fails on main and on #8504's head:
- a classic JSX factory the route module creates and the loader reads is
dropped from the split chunk (created again in the chunk on #8504)
- an unused reference cycle is copied into every split chunk (a row of the
unreferenced side effects table)
- the "will not be code-split" warning is missing when an exported
component is the route's only split candidate
- an exported const only a split component renders stays in the entry
chunk (with a control for the build placement harness)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Several `createFileRoute` calls in one route file were dropped from these
pins in an earlier consolidation; they are on the compiler-diagnostics
follow-up list, to be reported as an unsupported pattern rather than
pinned as a bug.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds engine-agnostic tests found by mutation testing and by porting external
fixture suites while reviewing #8504. Each passes with the current compiler
and with the one in #8504.
- code splitting: const enums, abstract classes with parameter properties,
`using` declarations, non-ASCII text, reference cycles of four
declarations, #__NO_SIDE_EFFECTS__ annotations in files with a pragma,
side effects kept out of the shared module, the classic React import of a
chunk, and shared bindings of loaders in object form or reaching Route
through a later-declared helper
- route HMR and React Refresh: overloaded lowercase components,
method-shorthand component options, split loaders not kept in HMR data
- server functions: handlers with type arguments, client references in
caller modules, and the missing-handler error
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New pins, each failing on main for its stated reason:
- Code splitter: an unused class with a static field and an unused enum
with a member initializer copied into split chunks, and a binding read by
a computed-key route option and the split component not shared (rows of
existing pins); every route a module creates loads the split component of
the last one.
- Hydrate: a module-level `var` declared in a nested block dropped from
the chunk (same root cause as the code-splitter nested `var` pins, now
cross-referenced), and an unexported component named `Route` removed
from the chunk as if it were the route.
- Start compiler: chain methods called through a computed member
(`createServerFn()['handler'](...)`, `['server']` of middleware and
isomorphic fns) leave the module untransformed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
React HMR holds hoisted inline component options aside until it has visited
every option, so renaming a lowercase component passed to a later option
leaves the hoisted component reading the old name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mock declares each name as `export const <name>`, so a denied module
exporting `delete`, or used as `api.delete()`, yields a SyntaxError.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generator renames its temp files into the app, which fails across
filesystems (EXDEV) when the app lives in a separate /tmp, as in the musl
container job.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A split component that is an undeclared global or a `declare const` is
exported from its chunk under a name the chunk never declares, or the
export is erased with the declaration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New pins, each failing on main for its stated reason:
- Start compiler: builders returned by a function, env-only factories
nested under a renamed import or local alias, a call whose result is
member-called (`.bind()`), the classic JSX pragma factory import, and
Vue `<script setup lang="ts">` blocks parsed as TSX.
- react-start-rsc: `renderServerComponent(...).then()` skipped by the CSS
transform (same root cause as `.bind()`).
- Hydrate: a component with its own boundary inside another boundary and a
children prop next to a comment-only body (rows of existing pins), and the
classic JSX pragma factory import.
- Code splitter: an exported `let` the split component reassigns and a
`declare const` used as the split component (rows of existing pins), the
classic JSX pragma factory import, and apps in a directory with `#`.
- Route HMR: a route exported under another local name, and a getter
component option.
- Router generator (new file): spread/computed/method route options missed
in `createFileRouteProps`, and the route constructor recognized by name
apart from its import (aliased and type-only imports).
`buildAndRun` takes a directory prefix for the `#` pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With React HMR, a lowercase `function` component that the loader also
reads is renamed in its split chunk although the code splitter moved it
to the shared module, so the chunk exports an undeclared `SplitComponent`
and fails to load in development. An arrow-declared component, the same
harness's control, renders with the module state it shares.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`Card` now renders text, so a transform that drops the JSX argument no
longer passes the control or the pins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- evaluateModule links side-effect and namespace imports, so a fix that
imports the shared module that way is not rejected by the harness.
- React Refresh pins accept a memo/forwardRef call of a registered binding.
- Module state: merge the exported-function rows and read the state
directly; the registry row counts store initializations; name the
`computeSharedBindings` mechanism.
- Unreferenced top-level statements: add an errorComponent chunk, require
the effect to run with the route module, and group the `export *` pin
under the same root cause.
- Controls for the options-in-a-variable harness and the memo assertion.
- Point the "known limitation" tests at their pins; fix the `hot` comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Match rejection errors on the message without its code frame
(`compileErrorMessage`), which quotes the source and let any error
satisfy `/Hydrate.*arguments/`, `/Hydrate.*Route/` or `/createServerFn/`;
require wording specific to each rejection, with a control proving an
unrelated error does not match.
- expectNoClientHandler: the client must not import the server-only module,
neither the client nor the SSR caller may contain the handler body, and
the provider must export and run every server fn the client reports.
- 'use client' provider pin: assert on the parsed directive prologue.
- Own-`this` pins: the server compile must succeed too.
- Recursive boundary ids: assert the boundary counts so a computed `h` id
cannot make the check vacuous.
- `await` in split children: require the clear rejection.
- Split the `Route` row and the `opts` row into their own root causes.
- compileHydrate treats an untransformed module as its own parent, so the
`<Start.Hydrate>` pin fails on its chunk count.
- Controls for callServerFns, expectNoClientHandler, evaluateRewritten and
loadClientModule's stub merge and beforeChunksLoad.
- Fix or drop citations that do not hold upstream.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the cases with unique coverage (the @tanstack/react-start-rsc import
source, transparent JSX wrappers, non-JSX arguments) next to the existing
tests and drop the separate helper, which imported start-plugin-core tests.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merge the five parenthesized-call cases into one test next to the existing
outer-parens test and fold the remaining preservation cases into
transform.test.ts, reusing its makeNode helper.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Dissolve the ported-* and start-compiler edge-case files into behaviour
files (server fn caller dead code, declaration sites, exports and
directives, handler scope, Hydrate captures, factories, user code kept),
drop duplicate cases and vacuous assertions, and compile through a single
harness. The RSC external-transform scope cases move into compiler.test.ts,
replacing react-start-rsc's ported-vite-plugin-rsc.test.tsx.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Dissolve the ported-* and code-splitter edge-case files into behaviour
files (dead code, imports/exports, module state, pragmas, route options,
scope), drop duplicate cases and vacuous assertions, and replace the five
real Vite builds with one.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Before the code-splitter transforms were shared, the real-world file-name
test resolved a Vite config that did not list the router plugin, which
covers the early return of the plugin-order check. Let the shared helper
take the config's plugins and keep that case.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
transform-parenthesized.test.ts duplicated the `transform` harness of
transform-preservation.test.ts; move its tests there.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- The SolidStart "local types used by split children are not passed as
props" Hydrate test duplicates the Qwik "local types used by the children
are not captured as values" test; the Qwik test now also covers JSX type
arguments and asserts that no type is passed as a prop.
- start-compiler-edge-cases "does not duplicate a directive the module
already has" becomes a case of the plugin-rsc "provider module directives"
table, which also checks the prologue and module validity.
- The single test of aliased-env-only-fns.test.ts moves to the
"cross-module factory resolution" tests of start-compiler-edge-cases, where
its output is also validated.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Remove tests whose input shape and assertions another suite already covers,
folding any unique assertion into the surviving test:
- code-splitter-real-world: the two "split chunks share exported route-file
bindings" compile checks duplicate code-splitter-exported-bindings (the
built-app check stays); "file-level JSX pragmas" duplicates the
@jsxImportSource cases of code-splitter-jsx-pragmas, which now also check
that Oxc selects the pragma's JSX runtime for every split chunk.
- ported-react-compiler-fixtures: "a catch parameter shadowing a module
binding" duplicates the plugin-rsc "next to a catch parameter of the same
name" case, which now names both sources.
- ported-nextjs-ssg: "moves one declarator of a multi-declarator statement
into the split chunk" duplicates the React Router "plain declarators" case,
which now also asserts where each declarator is declared.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Both RSC CSS transform regression suites defined the same compile helper
and a copy of the module validator; move the helper into
`tests/regression-helpers.ts` and reuse start-plugin-core's validator.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The regression suites each built their own `StartCompiler`, output compiler,
Start runtime stubs and `<Hydrate>` chunk loader. Move them into
`tests/regression-helpers.ts`:
- `createStartCompiler`, `compileFor`, `compileCode` and `compileAll` (client,
SSR caller and provider outputs, validated), previously built in 10 files
- `importModule`, `callProvider`, `importSources` and `settle`, with one
minimal Start runtime instead of four variants
- `compileHydrate`, `getChunkParams`, `getChunkIds`, `loadChunk`,
`evaluateModule` and `renderChunk`, previously copied into 6 files
No test is added, removed or renamed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The regression suites each re-implemented the same plumbing. Move it into
`tests/regression-helpers.ts`:
- `compileRouteModules` (reference, virtual chunks and shared module, with
optional route HMR, Solid target or file name) and `expectValidModules`,
previously copied into 12 files
- `buildAndRun`, the Vite build-and-run harness copied into 5 files
- `createCodeSplitterTransforms` and `transformWithRouteHmrPlugin`, which
drive the bundler plugins the way a bundler does
- `evaluateModule`, the JSX-to-text module evaluator copied into 3 files
No test is added, removed or renamed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Move the Start compiler bugs pinned by the Next.js server actions,
babel-dead-code-elimination and @vitejs/plugin-rsc ports into
`known-bugs-start-compiler.test.ts`, and build their compilers with the
shared `createStartModuleCompiler` helper instead of two more copies of
the `StartCompiler` setup.
The export * diamond and cycle pins share a root cause and become one
table. The `opts` handler pin sits next to the other generated-name
collision pins.
Add passing controls showing that a server fn's server-only import is
removed from the client (directly and through an imported builder) and
that the provider stub harness runs a handler.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Move the Hydrate bugs pinned by the Qwik, SolidStart and React Compiler
ports into `known-bugs-hydrate.test.ts`, grouped by area (boundaries and
ids, captured values, module-level code used by the children), and replace
the four copies of the compile, chunk-loading and chunk-rendering helpers
with `known-bugs-helpers.ts`.
Merge the Qwik and SolidStart pins of "`this` owned by code inside the
children is rejected": their function-expression inputs were the same
shape, so one row keeps the Qwik input (which also captures a prop) with
the SolidStart assertions. The Qwik context and reassigned-`let` pins,
which share a root cause, become one table.
Add passing controls for boundary ids, captured props and module-level
helpers, which every Hydrate pin relies on.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Move the code-splitter bugs pinned by the original list and the Next.js,
React Router, Qwik, React Compiler and Turbopack ports into
`known-bugs-code-splitter.test.ts`, and the route HMR, React Refresh and
router-core CommonJS bugs into `known-bugs-route-hmr.test.ts`, so each
file has one build-and-run harness and one set of HMR compile helpers.
Pins that share a root cause become rows of one table:
- a shared binding reassigned outside the shared module (the original
`let` pin and the React Compiler module-level reassignment, now built
and run like the other rows);
- module state the reference module keeps for a reason outside the route
options (the original partial-export pin, the Qwik context pin, now
built and run, and the Next.js and React Router ports).
Add passing controls for the build-and-run harness and the React Refresh
registration checks. Every pin keeps its source attribution.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A top-level binding that reads a `var` declared inside an `if`, `try` or
`for` head is moved to the shared module when the loader and a split
component both use it, but the nested `var` is not, so calling it throws
`ReferenceError: flag is not defined`. Broken on main and on #8504.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- code splitter: a declaration moved to the shared module evaluates before
the top-level writes that precede it in the route file (Turbopack
write-order / shared-2 fixtures)
- Start compiler: dropping an environment-specific implementation inside a
hook also deletes hook calls only that implementation read (useId shifts
between server and client)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Files whose text matches a detection pattern (such as `.handler(`) are
parsed as strict ES modules, so CommonJS dependencies with sloppy-mode
syntax (legacy octal escapes, `with`, top-level `return`) fail the build
although they have nothing to compile. Scenario from @vitejs/plugin-rsc's
CommonJS transform tests (vitejs/vite-plugin-react, MIT).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Port dead-code-elimination scenarios (pcattori/babel-dead-code-elimination)
and Turbopack tree-shaker analyzer fixtures (vercel/next.js) to the code
splitter and the Start compiler: import specifier pruning, initially unused
declarations and cycles, SCC removal, write-only bindings, nested patterns
with rests and defaults, empty parameter patterns, var declarations nested
in top-level statements, import attributes, typeof references, enum IIFEs,
shared mutable state and statement order in the provider.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Port scope, hoisting, export-shape, export * and directive scenarios from
@vitejs/plugin-rsc's transform tests (vitejs/vite-plugin-react, MIT) to the
Start compiler (server fn providers and callers, env-only functions, Hydrate
chunks), the route code splitter and the RSC CSS transforms.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Route HMR keeps the previous component options so React Refresh can patch
them, but inline memo/forwardRef/method-shorthand components (unsplit
routes) and lowercase variable components in split chunks are never
registered, so edits to them are silently dropped. Ported from React
Refresh's Babel plugin tests; checked with Vite's Oxc React Refresh
transform.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Translate SolidStart's "use server" directive compiler tests and helpers
(type-only import specifiers, rejected server fn positions, captured
this/arguments/super/private members, id stability and opacity, Hydrate
closure captures) and Waku's allowServer transform tests (dependency
pruning, aliasing, default exports, untouched look-alikes, zero-argument
factories, trailing comments) into Start compiler coverage for React and
Solid.
The import-alias namespace test passes on main and fails on the Yuku
compiler (#8504), which deletes the aliased namespace.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Port SolidStart's hoisting validation (`this`, `arguments`) to <Hydrate>
split children: a component's `arguments` silently changes meaning in the
chunk, and a `this` owned by a function, class or object method inside the
children is wrongly rejected. Both fail on main and on #8504.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Split chunks import exported route-file variables (contexts, stores and
caches built from private bindings) from the route module instead of
redeclaring them.
- The Start compiler keeps JSX pragmas in the Hydrate chunk, line-comment and
license-header forms, classic `@jsx` with `@jsxFrag`, and after a
`'use client'` directive.
Both pass on main and on #8504 after its fixes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Expected failures for inputs adapted from the React Compiler fixture corpus,
broken on main and on the Yuku migration:
- a top-level function reassigned at module level and shared by the loader
and the split component makes the reference module assign to an import,
so the route module throws when it is evaluated
- a TypeScript import alias used only by Hydrate split children is not
declared in the client chunk
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Wrap component bodies adapted from the React Compiler fixture corpus into
route files and Start modules:
- split route components and Hydrate chunks render like the original for
labeled breaks, shadowing catch params and function names, destructuring
defaults, getters/computed keys, hoisted functions, optional call chains,
tagged templates and classes with static blocks/private fields
- server function handlers that read a server-only import through unusual
syntax positions keep it off the client
- unused locals with side-effectful initializers (hook calls) in shared route
modules and Hydrate chunks still run; these fail on the Yuku migration,
which removes them
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Adds regression coverage derived from a differential audit of in-repo
examples/e2e apps and open-source TanStack Router/Start apps:
- split chunks import exported route-file bindings instead of copying them
- declarations and imports only referenced from TypeScript types survive
(classic JSX runtime React imports, side-effecting initializers)
- TypeScript type and value exports sharing a name compile
- file-level JSX pragmas stay in split chunks and Start compiler output
- ambient declarations are not imported from the shared module
- chained comparisons in plain JavaScript route files keep their operands
- real-world route file names go through the code-splitter plugin pipeline
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Pin, as expected failures, bugs found by porting capture and extraction
scenarios from the Qwik optimizer test suite (QwikDev/qwik,
packages/optimizer/core/src/test.rs). They fail with both the Babel and
the Yuku compiler:
- Hydrate copies module-level declarations into the split chunk, so a
module-level context is re-created and a parent-reassigned let is stale
- Hydrate drops top-level statements the children rely on (compound
component member assignments, Object.assign, registry calls)
- recursive components inside their own boundary get client boundary ids
the server never rendered and lazy imports of missing chunks
- `this` of a nested function in the children is rejected as a capture
- `React.useId()` in the children bypasses the hook check
- route code splitting re-creates a private context used by both the
reference module and the split component
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Port capture and extraction scenarios from the Qwik optimizer test suite
(QwikDev/qwik, packages/optimizer/core/src/test.rs) to the Hydrate split
transform, server function extraction and route code splitting. All of
them pass with both the Babel and the Yuku compiler.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Port scenarios from Next.js's SSG transform fixtures and React Router's
route-chunks / remove-exports tests that the code splitter still gets wrong,
as expected failures:
- a destructuring with an unreferenced sibling binding is kept in the
reference module and copied into the split chunk, so its initializer runs
twice
- a top-level statement that initializes or mutates a binding only the split
component reads runs in the reference module and again in the chunk
- property assignments to a split component (displayName etc.) stay in the
reference module (ReferenceError on main, unsplit duplicate on the Yuku PR)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Translate edge cases from Next.js's SSG transform fixtures and React Router's
route-chunks / remove-exports tests into code-splitter coverage: imports used
in JSX positions, shadowed names, transitive pruning of every declaration
kind, destructurings and multi-declarator statements split across groups,
mutually recursive shared helpers, nested-scope dependency analysis, helpers
shared with the loader, top-level calls on imports and split chunk source
maps. All scenarios already behave correctly; these tests pin them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ported from the module-level directive scenarios of Next.js's
server-actions transform fixtures. The server-function provider module
keeps its source module's 'use client' directive, so an RSC provider
environment would turn its handlers into client references.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Translate the scenarios of Next.js's server-actions transform fixtures
(crates/next-custom-transforms/tests/fixture/server-actions) to the
createServerFn client, SSR caller and provider outputs: captured module
bindings, shadowing, destructuring, handler forms, directives, export
forms, non-ASCII names and client/server-only code side by side.
The destructuring default and computed-key cases pass on main and fail
with the Yuku compiler (#8504), which keeps every sibling of a live
destructuring and with it a server-only import in the client output.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reproduce 24 compiler/runtime bugs found while validating the Babel to Yuku
migration (#8504) that also break on main. Each test asserts the correct,
user-visible behaviour through public compiler entry points and is marked
`.fails`, so CI stays green and the test flips once a fix lands.
- start compiler: export * cache poisoning, server fn named `opts`,
createServerOnlyFn handlers, unresolved builder chains, generated-name
collisions, nested createServerFn
- code splitter / HMR: shared reassigned let, several createFileRoute calls,
object-form loader, duplicated destructuring initializer, duplicated side
effects, options-variable TDZ, user `hot` binding, CommonJS route HMR
- Hydrate: fallback boundary indices, key/ref captures, await, Route, namespace
import, shadowing, comment-only children with spread, H0 helper collision
- RSC CSS: comments before JSX, options after spread
- import protection: `export * as ns` from a denied module
`validate-module.ts` and `compile-start-module.ts` are copied verbatim from
#8629 (test/compiler-regression-coverage).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Engine-agnostic tests through public compiler entry points, passing on
main. They cover:
- code-splitter module state shared with exported functions, `var`
declared inside top-level statements, long method chains, duplicate
split keys, split options that read `Route`, route options declared
in a variable, re-exports, type-only syntax, private class members,
and namespace JSX tags
- the code-splitter plugin pipeline: analysis cache keys and eviction,
plugin-level `splitBehavior`, config `deleteNodes`, and the
non-split HMR plugin for Solid and Vue
- the route generator transform with parenthesized call parts, and
byte-exact edits after a BOM or astral characters
- the Start compiler: dev-mode server function ids, provider
directives, handler name versioning, provider export removal,
cross-module factory resolution, invalidation, and diagnostic
locations
- Hydrate children with block-bodied callbacks, self-closing
boundaries, captures, split attributes, and the virtual module cache
- import-protection exports, member-chain boundaries, source-mapped
locations, and executed denied-import rewrites
- RSC CSS transform import shapes and argument unwrapping
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- The React Refresh ordering test now requires the inline pendingComponent
to be hoisted instead of passing when it stays inline, since main hoists it
and React Refresh needs a top-level binding.
- The self-referencing side-effect tests also assert that each binding the
callbacks use is still declared. The module validator does not report
references to undeclared names. The Start variant now validates the module.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add engine-agnostic regression tests for compiler output found while
reviewing the compiler migration (#8504). They only use the public
compiler entry points and validate emitted code with Vite's Oxc
transform/parser (TypeScript erased, parsed as a JS module with semantic
checks), so they run unchanged against any compiler implementation.
router-plugin:
- every emitted code-splitter module stays valid for re-exported imports,
partially exported destructuring and anonymous default exports
- self-/mutually-referencing side effects stay in the reference module
- namespace imports used by `import X = ns.X` and decorator placement
before `export` are preserved
- React Refresh hoisting keeps closures in scope, hoists the root route
component, and declares hoisted components before use
start-plugin-core:
- self-referencing user code survives client and server compilation
- nested and switch-case createServerFn keep provider modules valid
- aliased createClientOnlyFn re-exports are transformed in SSR
- Hydrate split modules: parent/fallback-only bindings are removed, text
children render decoded entities, `'use client'` stays first
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 19:41:42 +02:00
2123 changed files with 160206 additions and 78779 deletions