diff --git a/packages/compiler-test-utils/src/browser.ts b/packages/compiler-test-utils/src/browser.ts index 64c58c3f04..5162f4b5fa 100644 --- a/packages/compiler-test-utils/src/browser.ts +++ b/packages/compiler-test-utils/src/browser.ts @@ -7,7 +7,7 @@ * * One browser per test process, launched on first use, and kept for the * process (also across test files when the project does not isolate them). - * What one process opens in it is bounded (FINAL-PASS #40: under heavy load, + * What one process opens in it is bounded (under heavy load, * an unbounded number of pages and in-flight module requests made Chromium * fail requests with `ERR_INSUFFICIENT_RESOURCES`): * - `runInPage` runs on a pool of at most `runPageLimit` pages, which runs @@ -113,8 +113,8 @@ async function takeRunPage(): Promise { * reloads the page when the server sends a full reload (e.g. after the * edit a test makes right after the run). A reload starting while the page * leaves the document outlives the navigation to `about:blank`, and then - * interrupts the next run's navigation (FINAL-PASS #40 follow-up: seen - * under load when this happened after the run returned). A page that + * interrupts the next run's navigation (seen under load when this happened + * after the run returned). A page that * cannot leave its document (a script holds it, the renderer crashed) is * closed instead. */ @@ -139,7 +139,7 @@ export interface PageRun { /** * Runs client code in a real browser, fast: a page of the process's run - * pages (N24; RULES-AUDIT R24), held by this run alone. The page loads + * pages, held by this run alone. The page loads * `pageUrl` fresh (a new document: no module or global state of an earlier * run survives), then, when `moduleUrl` is given, imports that module as * the browser imports a module of the page (real ES module linking: a @@ -257,7 +257,7 @@ export async function openPage( * The document of `url`, instead of what its server answers (e.g. a page * of a dev server that serves no HTML, which loads the client code the * dev server serves); the page's other requests reach the server. Not - * for a check that involves HMR (final pass #16): the given document is + * for a check that involves HMR: the given document is * none the dev server transformed (no HMR client or refresh preamble it * injects), and a dev server's HMR client may not connect from it. Open * a document the dev server serves instead (`index.html` of a `browser` diff --git a/packages/compiler-test-utils/src/budget-reporter.ts b/packages/compiler-test-utils/src/budget-reporter.ts index d6d4868d4b..83495bfb33 100644 --- a/packages/compiler-test-utils/src/budget-reporter.ts +++ b/packages/compiler-test-utils/src/budget-reporter.ts @@ -11,7 +11,7 @@ * * The tier is the Vitest project: `integration` (and `integration-*`, e.g. * `integration-pages`) is the slow tier, the noncompiler project (outside - * the corpus) has no budget, any other project is the fast tier. Runs at another worker count (CI, one worker) are + * the compiler tests) has no budget, any other project is the fast tier. Runs at another worker count (CI, one worker) are * reported only. * * By default the reporter never fails a run: wall-clock times move with the diff --git a/packages/compiler-test-utils/src/build-harness.ts b/packages/compiler-test-utils/src/build-harness.ts index ec526a723f..2930376604 100644 --- a/packages/compiler-test-utils/src/build-harness.ts +++ b/packages/compiler-test-utils/src/build-harness.ts @@ -1222,20 +1222,19 @@ export async function describeBuild( * Throws a `DanglingNameError` when production client chunks read a name * that is neither declared, imported nor a global of the browser * (`clientGlobals` of `known-globals.ts`: no Node-only global such as - * `process` or `Buffer`) (user ruling "Dead-code references, widened", - * 2026-10-17: a dangling name that survives into a production client bundle - * is a bug; one in code the bundler deletes is fine). Free names are Yuku's + * `process` or `Buffer`) (SPEC G8: a dangling name that survives into a + * production client bundle is a bug; one in code the bundler deletes is + * fine). Free names are Yuku's * unresolved references (`free-names.ts`): a name a module probes with * `typeof` is not free in that module, which each module decides (below), * not the chunk. A chunk Yuku cannot read (a parse error) fails the check. - * esbuild is not checked: it is no supported production bundler of the - * ruling. + * esbuild is not checked: it is no supported production bundler (SPEC + * §1.3). * * Every chunk is checked as the build emitted it, minified or not: that is * the artifact the configuration ships (SPEC G8). * - * Which modules are checked (ruling "dangling-name attribution", amended - * 2026-10-20; coupling N19, RULES-AUDIT R11): the ones the compilers under + * Which modules are checked (SPEC G8): the ones the compilers under * test produced or changed in that build, attributed from the build's own * public evidence (`ParsedModules`: every module's code after the build's * transforms, recorded through the bundler's hooks), never from the diff --git a/packages/compiler-test-utils/src/determinism.ts b/packages/compiler-test-utils/src/determinism.ts index 75c78b0089..a72539793b 100644 --- a/packages/compiler-test-utils/src/determinism.ts +++ b/packages/compiler-test-utils/src/determinism.ts @@ -1,6 +1,5 @@ /** - * Determinism versus relocation (FIX-PLAN A11; SPEC G4, J1.5, J4.4, J5.4, - * §9). + * Determinism versus relocation (SPEC G4, J1.5, J4.4, J5.4, §9). * * What is compared is a semantic projection of what the test observes, * never emitted bytes (SPEC §5.1, §5.5, G4): the values the compiled code @@ -11,7 +10,7 @@ * private and generated names (bindings, generated type names, chunk * names), nor complete inventories of the modules a load evaluates (a * generated facade or support module is free). Byte equality is at most an - * optional implementation control, outside the corpus. + * optional implementation control, outside the compiler tests. * * - Determinism: with the same effective root and configuration, repeated * runs and runs that differ only in incidental order (file discovery, diff --git a/packages/compiler-test-utils/src/dev-server.ts b/packages/compiler-test-utils/src/dev-server.ts index 97ea1f5607..859936a572 100644 --- a/packages/compiler-test-utils/src/dev-server.ts +++ b/packages/compiler-test-utils/src/dev-server.ts @@ -26,7 +26,7 @@ * events brings no new one, and fails when the app's files still change at * `settleTimeout` (a plugin that keeps writing files on each event never * settles). How many events, rounds or hot updates an edit causes is the - * plugins' business (coupling N21). + * plugins' business. * * Diagnostics: one channel (`./diagnostic-channel`) records, from the start * until `stop()`, what Vite's logger, `console.*` and direct writes to @@ -684,7 +684,7 @@ async function startServer( // first address 500 ms on the event loop's clock: a loop blocked // past that (other tests' synchronous work under load) abandons // the connection the kernel made, and the other address refuses - // it (FINAL-PASS #56; FOLLOWUPS "UPSTREAM (final pass F-E-a)"). + // it. So every harness server listens on `127.0.0.1`. ...(listen && { host: '127.0.0.1' }), // Vite's default `preTransformRequests` stays on, as in an app: // the client environment transforms the static imports of each @@ -731,9 +731,9 @@ async function startServer( } /** - * Workaround (FOLLOWUPS "UPSTREAM (W5-ip)"): in full-bundle dev, Vite - * ends its initial build with a `getBundleState()` call that nothing - * awaits (`waitForInitialBuildFinish()`). Closing the server while it is in + * Workaround (oracle/KNOWN-BUGS.md, "Upstream issues"): in full-bundle + * dev, Vite ends its initial build with a `getBundleState()` call that + * nothing awaits (`waitForInitialBuildFinish()`). Closing the server while it is in * flight makes Rolldown reject it, and Vite leaves the rejection unhandled * ("Failed to get bundle state"). So `close()` first waits, one turn at a * time, for the flag Vite sets once that call chain has ended. The flag is @@ -1288,16 +1288,15 @@ export function describeHmr(messages: Array): Array { /** * Closes a Vite dev server once its dependency optimizer has nothing in * flight, so that nothing writes into the app after `close()` resolved - * (authorized wait, FINAL-PASS #34; RULINGS "Vite's dependency optimizer: - * close wait"). + * (authorized wait: oracle/KNOWN-BUGS.md, "Upstream issues"). * * Vite 8.3.4's optimizer does not await all of its own work on close: a * cancelled run's Rolldown build keeps writing its `deps_temp_*` directory * (`runOptimizeDeps().cancel()` only sets a flag the build reads before it * writes), the run a scan starts as `close()` awaits that scan is never * cancelled, and a commit removes the previous cache directory (renamed - * `deps_temp_*`) without awaiting it. Removing the app then fails (`ENOTEMPTY`), or the build fails - * to write into the removed app (an unhandled "Error during dependency + * `deps_temp_*`) without awaiting it. Removing the app then fails + * (`ENOTEMPTY`), or the build fails to write into the removed app (an unhandled "Error during dependency * optimization"). So before `close()` this waits, per environment, for the * optimizer's initialization and scan (`depsOptimizer.initState`, * `scanProcessing`: Vite's own state, public in its types) and until no @@ -1306,7 +1305,7 @@ export function describeHmr(messages: Array): Array { * committed or cancelled, and the previous cache directory it removes after * a commit carries that name too. A run Vite has not started by then never * starts: `close()` clears its timer. Remove the wait once Vite awaits its - * optimizer's work on close (draft: validation/UPSTREAM/vite-optimizer-after-close.md). + * optimizer's work on close. */ export async function closeViteServer( server: ViteDevServer, diff --git a/packages/compiler-test-utils/src/diagnostic-channel.ts b/packages/compiler-test-utils/src/diagnostic-channel.ts index 0e92e12a9e..eafc474e33 100644 --- a/packages/compiler-test-utils/src/diagnostic-channel.ts +++ b/packages/compiler-test-utils/src/diagnostic-channel.ts @@ -1,5 +1,5 @@ /** - * One diagnostic channel (SPEC §5.7, G5; RULES-AUDIT R18; coupling N15–N17): + * One diagnostic channel (SPEC §5.7, G5): * everything a user would see reported while a piece of work runs, merged, * in order, whatever way a compiler or a tool reports it: * - `console.*` (`error`, `warn`; `log`, `info`, `debug` as `info`); @@ -17,7 +17,7 @@ * Vite's logger or the bundler's compilation. So an assertion that something * is reported reads every channel, and so does one that nothing is: "nothing * reported" is `expectNoProblems(channel.diagnostics)` (no `warning` and no - * `error`; `info` is not a problem, N15). + * `error`; `info` is not a problem). * * Scoping: a channel records its `run()` work and async descendants until * `close()`, and what is printed outside any async scope (from a bundler's @@ -340,7 +340,7 @@ export function problems(diagnostics: Array) { /** * Asserts that no channel reported a problem (a `warning` or an `error`): - * the "nothing reported" check. `info` output is allowed (N15). The failure + * the "nothing reported" check. `info` output is allowed. The failure * lists every problem with its source. */ export function expectNoProblems( diff --git a/packages/compiler-test-utils/src/diagnostics.ts b/packages/compiler-test-utils/src/diagnostics.ts index 42c1359203..b4415f3e35 100644 --- a/packages/compiler-test-utils/src/diagnostics.ts +++ b/packages/compiler-test-utils/src/diagnostics.ts @@ -1,6 +1,6 @@ /** - * What a user is told about a problem (SPEC G5, J2.8, §5.7; ruling - * 2026-10-22: diagnostics are checked by file and position only). + * What a user is told about a problem (SPEC G5, J2.8, §5.7: diagnostics are + * checked by file and position only). * * Tests capture what the user sees (a thrown or rejected error, a bundler's * errors and warnings, console output; every channel at once: @@ -21,7 +21,7 @@ * `expectDiagnostic(diagnostics, expectation)`: the diagnostics meeting * an expectation; the latter fails unless one (or exactly `times`) does. * Unless an expectation asks for `info`, only a `warning` or an `error` - * meets it (DECISIONS 2026-10-21). + * meets it (SPEC G5, §5.7). * - `mentionsFile(text, file, { root })`: the text holds the file's absolute * path, or its project-relative path as a whole path. * - `diagnosticPosition(source, needle)`: the 1-based line and column of @@ -70,7 +70,7 @@ export interface Diagnostic { export interface DiagnosticExpectation { /** * Accepted severities. Default: `warning` or `error` (an `info` line - * reports nothing, N15). + * reports nothing). */ severity?: Severity | Array /** The file the diagnostic must name: absolute, or relative to `root`. */ diff --git a/packages/compiler-test-utils/src/outcome.ts b/packages/compiler-test-utils/src/outcome.ts index 61936177e8..b66b89c70d 100644 --- a/packages/compiler-test-utils/src/outcome.ts +++ b/packages/compiler-test-utils/src/outcome.ts @@ -1,5 +1,5 @@ /** - * The completion of an edit, by its outcome (SPEC G10, J3.6; coupling N21): + * The completion of an edit, by its outcome (SPEC G10, J3.6): * the edit is applied (what a user sees: the page shows it, the output holds * it), the hosts have nothing of it in flight, no problem ends it early, and * one overall timeout bounds the wait. Never by how a compiler gets there: diff --git a/packages/compiler-test-utils/src/plugin-host.ts b/packages/compiler-test-utils/src/plugin-host.ts index ddaf7506a1..32cb9cb7b4 100644 --- a/packages/compiler-test-utils/src/plugin-host.ts +++ b/packages/compiler-test-utils/src/plugin-host.ts @@ -1,8 +1,7 @@ /** - * The public in-process plugin host (SYNTHESIS recipes P1/P2/P3; RULES-AUDIT - * R3, R23–R25): the plugins a user configures, given as they are (the - * public plugin array of a `vite.config.ts`), on an app written to disk, - * driven through real Vite. Nothing of a compiler is assumed: no hook + * The public in-process plugin host: the plugins a user configures, given + * as they are (the public plugin array of a `vite.config.ts`), on an app + * written to disk, driven through real Vite. Nothing of a compiler is assumed: no hook * placement (no recorder before or after a plugin), no module id or query, * no route or module registration. What a test reads is what the host * hands a user: diff --git a/packages/compiler-test-utils/src/rsbuild-dev-server.ts b/packages/compiler-test-utils/src/rsbuild-dev-server.ts index 81dd768531..796547d69e 100644 --- a/packages/compiler-test-utils/src/rsbuild-dev-server.ts +++ b/packages/compiler-test-utils/src/rsbuild-dev-server.ts @@ -9,9 +9,8 @@ * files and waits for the bounded outcome of the edit (`trackCompiles`): a * compile that started after the last write ended, and nothing compiles or * is pending, within an overall timeout. Which files a compile reads, and - * how many compiles an edit takes, are the plugins' business (coupling - * N21): a plugin may watch an original source itself and hand Rspack a - * virtual module. When plugins write files too (a generated route tree), + * how many compiles an edit takes, are the plugins' business: a plugin may + * watch an original source itself and hand Rspack a virtual module. When plugins write files too (a generated route tree), * `write()` and `settle()` wait the same way. Both also wait until Rspack's * watcher is attached and has scanned the app's directories, as the start * does (`CompileTracker.watching`: the authorised initial-scan adapter): a @@ -703,7 +702,7 @@ export interface CompileTracker { * directories: a file removed while that scan runs is never reported * (watchpack 2.5.2 `DirectoryWatcher.doScan`: a file the listing had but * the stat no longer finds is neither known nor missing afterwards; - * FOLLOWUPS "UPSTREAM (W3-harness2)"). Ready when every compiler's + * oracle/KNOWN-BUGS.md, "Upstream issues"). Ready when every compiler's * watcher is attached and, together, their watchpack * `getTimeInfoEntries()` have an entry (a time, or `null` once the scan * ended) for each of those paths: a compiler may watch for another @@ -727,7 +726,7 @@ export interface CompileTracker { /** * Follows the compiles of a watch mode Rspack build, to wait for the - * outcome of an edit, bounded by a timeout (coupling N21): the edit is + * outcome of an edit, bounded by a timeout: the edit is * applied once a compile that started after the last write ended and every * compile that started meanwhile ended (`done()`). Which compiler reads the * edited files, what a compile reports changed, and how many compiles an @@ -1075,9 +1074,8 @@ export const initialFilesAge = 10_000 * dev server on files that are already on disk. Files written a moment * before the first compile fall within the accuracy watchpack allows for * their modification times, so its first scan reports them changed, and - * Rspack starts a second compile by itself right after the first one - * (DECISIONS 2026-10-20 "Rsbuild first-edit harness fixes"): a test's - * first edit would then land during that compile. + * Rspack starts a second compile by itself right after the first one: a + * test's first edit would then land during that compile. */ async function predateAppFiles(root: string) { const past = new Date(Date.now() - initialFilesAge) diff --git a/packages/compiler-test-utils/src/rsbuild-plugin-host.ts b/packages/compiler-test-utils/src/rsbuild-plugin-host.ts index c3d0d73366..b8ca27abbd 100644 --- a/packages/compiler-test-utils/src/rsbuild-plugin-host.ts +++ b/packages/compiler-test-utils/src/rsbuild-plugin-host.ts @@ -1,5 +1,5 @@ /** - * The Rsbuild counterpart of `./plugin-host` (recipes P1/P2/P3): the + * The Rsbuild counterpart of `./plugin-host`: the * Rsbuild plugins a user configures, given as they are, on an app written * to disk, driven through Rsbuild's public JavaScript API in process: * - a dev server (`createRsbuild` + `createDevServer`, Rspack in watch diff --git a/packages/compiler-test-utils/src/run-directory.ts b/packages/compiler-test-utils/src/run-directory.ts index 5724cd6b9b..a19acc9bcb 100644 --- a/packages/compiler-test-utils/src/run-directory.ts +++ b/packages/compiler-test-utils/src/run-directory.ts @@ -7,8 +7,8 @@ * - the route generator's temporary files (`TSR_TMP_DIR`, the generator's * documented environment variable; a test that gives the generator a * `tmpDir` of its own keeps it). On the apps' filesystem: the generator - * renames them into the app, which fails across filesystems (SPEC J1.16, - * RULINGS K-19: a pinned bug). Not the generator's default + * renames them into the app, which fails across filesystems (SPEC J1.16: + * a pinned bug). Not the generator's default * (`.tanstack/tmp` in the working directory: the package's own directory). * * The test processes inherit the directories through their environment diff --git a/packages/compiler-test-utils/src/source-maps.ts b/packages/compiler-test-utils/src/source-maps.ts index f899b82c72..bde3f1f68b 100644 --- a/packages/compiler-test-utils/src/source-maps.ts +++ b/packages/compiler-test-utils/src/source-maps.ts @@ -1,8 +1,8 @@ /** - * Source-map assertions through a standard consumer (FIX-PLAN A12; SPEC G6, - * §5.14): maps are read with `@jridgewell/trace-mapping`, never a hand - * decoder, and tests locate code by parsed tokens or executed throws, never - * by printed syntax. Only "this generated position resolves to the user's + * Source-map assertions through a standard consumer (SPEC G6, §5.14): maps + * are read with `@jridgewell/trace-mapping`, never a hand decoder, and + * tests locate code by parsed tokens or executed throws, never by printed + * syntax. Only "this generated position resolves to the user's * file, line (and column)" is asserted: map layout, `names`, * `sourcesContent`, granularity and mappings of generated support code are * free. diff --git a/packages/compiler-test-utils/src/strict-runner.ts b/packages/compiler-test-utils/src/strict-runner.ts index c2c1571c23..1a95fc4ab4 100644 --- a/packages/compiler-test-utils/src/strict-runner.ts +++ b/packages/compiler-test-utils/src/strict-runner.ts @@ -1,9 +1,9 @@ /** * Vite's module runner (server code in a dev server's environment) with ES - * module linking semantics for named imports (coupling N9; RULES-AUDIT §2.D - * #4): a static import of a name the imported module does not export throws - * a `SyntaxError`, as in Node.js, a browser and a production build - * (Rolldown's `MISSING_EXPORT`), instead of reading `undefined`. + * module linking semantics for named imports: a static import of a name + * the imported module does not export throws a `SyntaxError`, as in + * Node.js, a browser and a production build (Rolldown's `MISSING_EXPORT`), + * instead of reading `undefined`. * * Vite's runner checks that only for externalized modules (Node.js * packages): an inlined module (any module of the app, or a virtual diff --git a/packages/compiler-test-utils/test-budgets.json b/packages/compiler-test-utils/test-budgets.json index f5f597bfe8..e58996e60e 100644 --- a/packages/compiler-test-utils/test-budgets.json +++ b/packages/compiler-test-utils/test-budgets.json @@ -1,5 +1,5 @@ { - "$comment": "Local iteration budgets of the compiler test tiers (DECISIONS 2026-10-19), in seconds of Vitest duration at `workers` (--maxWorkers): per package, `unit` (fast tier) and `integration` (slow tier) as [target, hard]; `slowFileHard`: any slow-tier file; `editToResultHard`: edit to result of one fast-tier file, Nx included. Set from quiet-machine runs on 2026-10-19 (W3-budgets) with headroom. Runs at other worker counts (CI, one worker) are reported, never enforced. Read by src/budget-reporter.ts: report-only, except with COMPILER_TEST_BUDGETS=strict on a quiet machine.", + "$comment": "Local iteration budgets of the compiler test tiers, in seconds of Vitest duration at `workers` (--maxWorkers): per package, `unit` (fast tier) and `integration` (slow tier) as [target, hard]; `slowFileHard`: any slow-tier file; `editToResultHard`: edit to result of one fast-tier file, Nx included. Set from quiet-machine runs with headroom. Runs at other worker counts (CI, one worker) are reported, never enforced. Read by src/budget-reporter.ts: report-only, except with COMPILER_TEST_BUDGETS=strict on a quiet machine.", "workers": 4, "slowFileHard": 15, "editToResultHard": 10, diff --git a/packages/compiler-test-utils/tests/describe-build.test.ts b/packages/compiler-test-utils/tests/describe-build.test.ts index 84869e8681..5d8dbe6f3a 100644 --- a/packages/compiler-test-utils/tests/describe-build.test.ts +++ b/packages/compiler-test-utils/tests/describe-build.test.ts @@ -1,6 +1,6 @@ /** * Controls of `describeBuild` (build-harness.ts) on an output written to - * disk (final pass #21, seen under R9): a bundler may emit a chunk without + * disk: a bundler may emit a chunk without * a source map file next to chunks that have one. The description reads the * maps that exist and leaves the others unset, so that whether a map is * required stays the test's question; a map file that is not a map still diff --git a/packages/compiler-test-utils/tests/diagnostic-channel.test.ts b/packages/compiler-test-utils/tests/diagnostic-channel.test.ts index 56881a7bba..2e18fb6aa5 100644 --- a/packages/compiler-test-utils/tests/diagnostic-channel.test.ts +++ b/packages/compiler-test-utils/tests/diagnostic-channel.test.ts @@ -1,6 +1,6 @@ /** * Controls of the one diagnostic channel (diagnostic-channel.ts; SPEC §5.7, - * N15–N17): it merges every channel a compiler or a tool may report on + * G5): it merges every channel a compiler or a tool may report on * (console, the process streams, Vite's logger, a bundler compilation), in * order and scoped, and "nothing reported" reads them all: a warning on any * one channel fails it, while info output does not. @@ -118,7 +118,7 @@ describe('diagnostic channel', () => { ]) }) - // N15: "nothing reported" reads every channel. A check that read only + // "Nothing reported" reads every channel. A check that read only // Vite's logger (the old dev harness `logs`) or only the compilation // (the old Rsbuild `diagnostics`) misses a compiler warning through // the console or the streams. @@ -149,7 +149,7 @@ describe('diagnostic channel', () => { }, ) - test('expectNoProblems passes on info output only (N15: no warning is not no output)', async () => { + test('expectNoProblems passes on info output only (no warning is not no output)', async () => { const { diagnostics } = await captureDiagnostics((channel) => { console.log('generated the route tree') console.info('built in 12 ms') @@ -160,7 +160,7 @@ describe('diagnostic channel', () => { expectNoProblems(diagnostics) }) - // DECISIONS 2026-10-21 "diagnostic severity": where SPEC says "warn", an + // Diagnostic severity (SPEC G5, §5.7): where SPEC says "warn", an // info or log line on any channel is no warning. The merged matchers keep // the floor by default; an expectation asks for `info` to read one. test('an info line does not meet an expectation that does not ask for info (severity floor)', async () => { diff --git a/packages/compiler-test-utils/tests/integration/browser.test.ts b/packages/compiler-test-utils/tests/integration/browser.test.ts index 9946f382b2..ad6a007b04 100644 --- a/packages/compiler-test-utils/tests/integration/browser.test.ts +++ b/packages/compiler-test-utils/tests/integration/browser.test.ts @@ -180,7 +180,7 @@ document.getElementById('app').textContent = 'MARK_DOCUMENT ' + location.href ]) }) -// Final pass #21: the run pages serve every run of a test process, so a +// The run pages serve every run of a test process, so a // script that never settles must fail its run within the bound and leave // its page (or a new one) to the next run. test('a run whose script never settles fails within its bound, and the next run gets a page', async () => { @@ -199,8 +199,9 @@ test('a run whose script never settles fails within its bound, and the next run ).toBe(2) }) -// FINAL-PASS #40: what a test process opens in its browser is bounded, and -// runs of concurrent tests do not share a document. +// What a test process opens in its browser is bounded (Chromium fails +// requests under too many pages), and runs of concurrent tests do not share +// a document. test('concurrent runs each hold a page of their own, at most runPageLimit at once, each on a fresh document', async () => { let active = 0 let most = 0 diff --git a/packages/compiler-test-utils/tests/integration/global-trap.test.ts b/packages/compiler-test-utils/tests/integration/global-trap.test.ts index dfa5443664..096aae17a5 100644 --- a/packages/compiler-test-utils/tests/integration/global-trap.test.ts +++ b/packages/compiler-test-utils/tests/integration/global-trap.test.ts @@ -1,7 +1,7 @@ /** * Control tests of the global trap (global-trap.ts) in a real Chromium page: - * every way page code touches a trapped global is recorded. FINAL-PASS #48: - * the former traps (accessors alone) did not record own-property probes + * every way page code touches a trapped global is recorded. The former + * traps (accessors alone) did not record own-property probes * (`hasOwnProperty`, `Object.hasOwn`, ...); an `in` probe cannot be * recorded in a browser, so the code it guards is (it runs, as the * accessor makes the probe true). diff --git a/packages/compiler-test-utils/tests/integration/plugin-host.test.ts b/packages/compiler-test-utils/tests/integration/plugin-host.test.ts index 6e8070340f..e6a60f26aa 100644 --- a/packages/compiler-test-utils/tests/integration/plugin-host.test.ts +++ b/packages/compiler-test-utils/tests/integration/plugin-host.test.ts @@ -91,7 +91,7 @@ test( timeout, ) -// Final pass #21: Vite keeps a full reload sent while no client is +// Vite keeps a full reload sent while no client is // connected and hands it to the next client that connects. Between two // `runClient` runs no page is connected, so the next run's page would // reload under its run; a client host keeps an idle HMR client connected @@ -136,7 +136,7 @@ test( timeout, ) -// Final pass #56: under heavy load, a test worker's event loop can stay +// Under heavy load, a test worker's event loop can stay // blocked (other tests' synchronous work) right when the idle HMR client // connects at host start. A client of this process must still reach the // server: Node's address-family selection gives a connection attempt diff --git a/packages/compiler-test-utils/tests/integration/rsbuild-dev-server.test.ts b/packages/compiler-test-utils/tests/integration/rsbuild-dev-server.test.ts index fb1767d006..0c8d519794 100644 --- a/packages/compiler-test-utils/tests/integration/rsbuild-dev-server.test.ts +++ b/packages/compiler-test-utils/tests/integration/rsbuild-dev-server.test.ts @@ -230,7 +230,7 @@ test('settle() rejects at its bound while a plugin writes a file the compiles re ) }, 30_000) -// Coupling N21: a plugin may watch an original source itself and hand +// A plugin may watch an original source itself and hand // Rspack a module built from it, so the source is in no compile's // dependencies. The edit's outcome is still awaited: the plugin's own // watcher invalidates the compiler, and the compile that follows the write @@ -403,8 +403,8 @@ function watchedBy({ compiler, read }: Captured) { // Rspack attaches its watcher on the tick after the first compile, and // watchpack then scans the app's directories; a file deleted before that is -// never reported (FOLLOWUPS "UPSTREAM (W3-harness2)"). The start resolves -// only once the watcher knows every app file the compile read. +// never reported (oracle/KNOWN-BUGS.md, "Upstream issues"). The start +// resolves only once the watcher knows every app file the compile read. test('the start resolves once the watcher knows every app file the compile read', async () => { const compilers: Array = [] const server = await createRsbuildDevServer({ @@ -477,8 +477,7 @@ test('the start resolves with a compiler whose watcher ignores every file, while // written a moment before the first compile fall within the accuracy // watchpack allows for modification times (up to 2 s), so its first scan // would report them changed and Rspack would start a second compile by -// itself, during a test's first edit (DECISIONS 2026-10-20 "Rsbuild -// first-edit harness fixes"). +// itself, during a test's first edit. test("the app's initial files predate the first compile beyond the watcher's accuracy", async () => { let firstCompile: number | undefined const server = await createRsbuildDevServer({ diff --git a/packages/compiler-test-utils/tests/outcome.test.ts b/packages/compiler-test-utils/tests/outcome.test.ts index 971e45ac26..2062026cfb 100644 --- a/packages/compiler-test-utils/tests/outcome.test.ts +++ b/packages/compiler-test-utils/tests/outcome.test.ts @@ -1,5 +1,5 @@ /** - * Controls of the edit completion by outcome (outcome.ts; N21): the wait + * Controls of the edit completion by outcome (outcome.ts): the wait * ends once the outcome holds with the hosts quiet, however many steps the * edit took and however late after the first one it shows; it fails at * its one bound, or at once on a problem. The old page wait failed a diff --git a/packages/compiler-test-utils/tests/strict-runner.test.ts b/packages/compiler-test-utils/tests/strict-runner.test.ts index e1503c2936..003a0dd3f6 100644 --- a/packages/compiler-test-utils/tests/strict-runner.test.ts +++ b/packages/compiler-test-utils/tests/strict-runner.test.ts @@ -1,7 +1,6 @@ /** - * Contract test of the strict module runner (strict-runner.ts; N9, - * RULES-AUDIT §2.D #4): server code still resolves, loads and evaluates - * through Vite's own module runner, and a static import of a name the + * Contract test of the strict module runner (strict-runner.ts): server + * code still resolves, loads and evaluates through Vite's own module runner, and a static import of a name the * imported module does not export throws as an ES module link does, * instead of reading `undefined` (what Vite's runner does for an inlined * module). Namespace imports, dynamic imports and import cycles keep their diff --git a/packages/compiler-test-utils/vite.config.ts b/packages/compiler-test-utils/vite.config.ts index 39d8d798fc..4aef98b495 100644 --- a/packages/compiler-test-utils/vite.config.ts +++ b/packages/compiler-test-utils/vite.config.ts @@ -18,7 +18,7 @@ export default defineConfig({ name: packageJson.name, dir: './tests', watch: false, - // At most 4 test processes per Vitest run (PERF-STUDY 2026-10-23): each + // At most 4 test processes per Vitest run: each // runs real bundlers, dev servers and its own browser, and Nx runs several // packages' tiers at once. More workers add swap and load flakes, not // speed. `--maxWorkers` on the command line still overrides it. diff --git a/packages/react-start-rsc/tests/integration/rsc-css-diagnostics.test.ts b/packages/react-start-rsc/tests/integration/rsc-css-diagnostics.test.ts index 4b4b3458c7..8e68733454 100644 --- a/packages/react-start-rsc/tests/integration/rsc-css-diagnostics.test.ts +++ b/packages/react-start-rsc/tests/integration/rsc-css-diagnostics.test.ts @@ -26,7 +26,7 @@ export const Route = createFileRoute('/')({ `, } -// J7.3 / D8(c), G5: the real RSC integration currently skips identifier and +// J7.3, G5: the real RSC integration currently skips identifier and // spread arguments silently. Two calls in one file require one warning naming the file. // G5 requires positions on errors, not on this warning; wording/channel are free. test.fails.each(['vite', 'rsbuild'] as const)( diff --git a/packages/react-start-rsc/tests/integration/rsc-css.test.ts b/packages/react-start-rsc/tests/integration/rsc-css.test.ts index 278afc23ae..12f394c4ca 100644 --- a/packages/react-start-rsc/tests/integration/rsc-css.test.ts +++ b/packages/react-start-rsc/tests/integration/rsc-css.test.ts @@ -27,7 +27,7 @@ import { import type { Row } from './rsc-css-app' const rows = { - // Source: V4 red-astra-r2/19: both calls in one helper module deliver CSS. + // Both calls in one helper module deliver CSS. helperA: { key: 'helper-a', imports: `import { renderA } from '../pair'\n`, @@ -40,7 +40,7 @@ const rows = { body: 'return renderB()', consumer: 'renderable', }, - // Source: V4 red-astra-r2/20: a .jsx provider is an equally supported input. + // A .jsx provider is an equally supported input. javascript: { key: 'javascript', imports: renderableImport, @@ -48,7 +48,7 @@ const rows = { consumer: 'renderable', jsx: true, }, - // A fragment root with children from two components (V4 red-astra/21). + // A fragment root with children from two components. fragmentRenderable: { key: 'fragment-renderable', imports: renderableImport, @@ -342,7 +342,7 @@ export const wrap = (node: React.ReactNode) => renderServerComponent(node) const cardBackground = (row: Row) => app.style(row, '[data-testid=card]', 'background-color', CARD_BACKGROUND) - // V4 red-astra/21: a JSX fragment root must get the CSS of every child, + // A JSX fragment root must get the CSS of every child, // like an element root. test.each([ { name: 'renderServerComponent', row: rows.fragmentRenderable }, @@ -393,7 +393,7 @@ export const wrap = (node: React.ReactNode) => renderServerComponent(node) // as safe to wrap. // Impact: a stream of a conditionally chosen element has no CSS, so its // styles never arrive. - // Source: decision D8 (b). + // Source: SPEC J7.3. test.fails.each([ { argument: 'flag ? : ', row: rows.ternary }, { argument: 'flag && ', row: rows.logicalAnd }, @@ -437,7 +437,7 @@ export const wrap = (node: React.ReactNode) => renderServerComponent(node) ) // Bug: the alternate JSX branch has no CSS, just like the consequent - // (decision D8 (b), H02). + // (SPEC J7.3). // Source: react-start-rsc src/plugin/rscCssTransform.ts:93: a conditional // argument is not top-level JSX (`isTopLevelJsx`, 116-119, unwraps only // parentheses and TS wrappers), so the transform skips the call and never @@ -461,7 +461,7 @@ export const wrap = (node: React.ReactNode) => renderServerComponent(node) // type is `renderToReadableStream(node)`; `options` is typed only under // the react-server condition). It must not break: the options reach // React's renderer (its `onError` runs and its digest is in the stream). - // CSS is not required (user ruling 2026-10-18, loosening decision D8 (a)). + // CSS is not required (SPEC J7.3). test('renderToReadableStream(, options) renders with the options', async () => { expect(JSON.parse(await app.text(rows.options))).toEqual({ digest: 'MARK_DIGEST:MARK_BOOM', @@ -471,8 +471,8 @@ export const wrap = (node: React.ReactNode) => renderServerComponent(node) // A plain-data model (`{ card: }`) is undocumented too: it must // not break, and the model reaches the client. Neither CSS for its - // elements nor a warning is required, nor their absence (user rulings - // 2026-10-18). + // elements nor a warning is required, nor their absence (SPEC §2.2, + // J7.3). test('renderToReadableStream with a plain-data model streams the model', async () => { expect(await app.text(rows.plainModel)).toBe('MARK_MODELMARK_CARD') }) @@ -481,7 +481,7 @@ export const wrap = (node: React.ReactNode) => renderServerComponent(node) // cannot see the JSX of (a variable, a spread). // Impact: the stream has no CSS, so its styles never arrive, and nothing // tells the developer. - // Source: decision D8 (c): warn in dev only. + // Source: SPEC J7.3: warn in dev only. test.fails.each([ { name: 'an identifier', row: rows.identifier }, { name: 'a spread', row: rows.spread }, diff --git a/packages/react-start-rsc/tests/integration/rsc-start-build.test.ts b/packages/react-start-rsc/tests/integration/rsc-start-build.test.ts index c80d584ae7..e49e2867e4 100644 --- a/packages/react-start-rsc/tests/integration/rsc-start-build.test.ts +++ b/packages/react-start-rsc/tests/integration/rsc-start-build.test.ts @@ -2,8 +2,8 @@ * A production build of a React Start app with RSC enabled on Vite * (`rsc-app.ts`: `buildApp()` of the `client`, `ssr` and `rsc` * environments, served by Start's preview server) in a real page: which - * entry of a dependency each environment runs (SPEC J4.3, J4.16, J4.12, - * V2-12 (c)), and the CSS of server components rendered with each RSC + * entry of a dependency each environment runs (SPEC J4.3, J4.16, J4.12), + * and the CSS of server components rendered with each RSC * helper (SPEC J7.2, J7.3). The dev counterparts are rsc-start-dev.test.ts * and rsc-css-matrix.test.ts. */ @@ -212,7 +212,6 @@ describe('Vite production build with RSC', () => { // and initialises the package once, whether SSR or the browser calls it; // SSR's own code gets `default`, the browser `browser`; no client file of // the build has another environment's entry. - // Source: V2-12 (c). test('each environment runs its own entry of a dependency; the provider runs the handler', async () => { const page = await open('/env') await page.waitForText('ssr MARK_DEFAULT provider MARK_REACT_SERVER:1', { diff --git a/packages/react-start-rsc/tests/integration/rsc-start-client-module.test.ts b/packages/react-start-rsc/tests/integration/rsc-start-client-module.test.ts index e459d16172..254da03573 100644 --- a/packages/react-start-rsc/tests/integration/rsc-start-client-module.test.ts +++ b/packages/react-start-rsc/tests/integration/rsc-start-client-module.test.ts @@ -13,7 +13,8 @@ describe('Vite dev: a separate RSC provider', () => { // directive of its source module, so the RSC bundler turns the provider's // exports into client references and the handler is not there to run. // Impact: a server fn co-located with a client component cannot be called. - // Source: start S21 (compile-level pin in known-bugs-start-compiler.test.ts). + // Source: the compile-level pin in start-plugin-core + // tests/known-bugs-start-compiler.test.ts. test.fails( "a server function of a 'use client' module runs on the server", async () => { diff --git a/packages/react-start-rsc/tests/integration/rsc-start-dev.test.ts b/packages/react-start-rsc/tests/integration/rsc-start-dev.test.ts index ad94746c3e..f70685df23 100644 --- a/packages/react-start-rsc/tests/integration/rsc-start-dev.test.ts +++ b/packages/react-start-rsc/tests/integration/rsc-start-dev.test.ts @@ -16,7 +16,6 @@ describe('Vite dev: a separate RSC provider', () => { // conditions (`react-server`), and the provider initialises the package // once; SSR's own code gets the `default` entry and the browser's the // `browser` entry, and no client script has another environment's entry. - // Source: start S11, S18 (case 3), S40; V2-12 (c). test('each environment runs its own entry of a dependency; the provider runs the handler, whether SSR or the browser calls it', async () => { const server = await startRscDevServer({ browser: true, diff --git a/packages/react-start-rsc/tests/integration/rsc-start-hmr-rsbuild.test.ts b/packages/react-start-rsc/tests/integration/rsc-start-hmr-rsbuild.test.ts index 1daecd94ad..3921d08de5 100644 --- a/packages/react-start-rsc/tests/integration/rsc-start-hmr-rsbuild.test.ts +++ b/packages/react-start-rsc/tests/integration/rsc-start-hmr-rsbuild.test.ts @@ -14,8 +14,7 @@ describe('Rsbuild dev: edits with a separate RSC provider (SPEC J3.6)', () => { // the handler makes the next call run the new code and the client output // never has it; editing the component then hot-updates the page, keeping // its state; no full reload either way, and the server fn still answers. - // Source: SPEC J3.6, V2-13 (#7618 as quoted), Rsbuild row (DECISIONS - // 2026-10-19, `@rsbuild/plugin-react`). + // Source: #7618 (SPEC J3.6). test('a handler edit reaches the next call and a component edit hot-updates, keeping the state, without a full reload', async () => { const server = await startRscRsbuildDevServer({ browser: true, diff --git a/packages/react-start-rsc/tests/integration/rsc-start-hmr.test.ts b/packages/react-start-rsc/tests/integration/rsc-start-hmr.test.ts index c98a52f913..d95248772b 100644 --- a/packages/react-start-rsc/tests/integration/rsc-start-hmr.test.ts +++ b/packages/react-start-rsc/tests/integration/rsc-start-hmr.test.ts @@ -1,5 +1,5 @@ /** - * Edits with a separate server function provider (SPEC J3.6, V2-13): a + * Edits with a separate server function provider (SPEC J3.6): a * React Start app with RSC enabled on a Vite dev server, or on an Rsbuild * dev server with React Refresh from `@rsbuild/plugin-react` (`rsc-app.ts`), * a route module that also declares the server function its loader and page @@ -27,8 +27,8 @@ describe('Vite dev: edits with a separate RSC provider (SPEC J3.6)', () => { // A route module that also declares a server function: editing the // handler makes the next call run the new code; editing the component // hot-updates the page, keeping its state, and the server fn still - // answers; no full reload either way (user ruling 2026-10-18). - // Source: SPEC J3.6, V2-13 (#7618 as quoted), start S12 on Vite. + // answers; no full reload either way (SPEC J3.6, G10). + // Source: #7618. test('a handler edit reaches the next call and a component edit hot-updates, without a full reload', async () => { const server = await startRscDevServer({ browser: true, diff --git a/packages/react-start-rsc/tests/integration/rsc-start-private.test.ts b/packages/react-start-rsc/tests/integration/rsc-start-private.test.ts index 8d3cc9e932..7fb9fa4520 100644 --- a/packages/react-start-rsc/tests/integration/rsc-start-private.test.ts +++ b/packages/react-start-rsc/tests/integration/rsc-start-private.test.ts @@ -3,7 +3,7 @@ import { openRscPage, startRscDevServer, waitForHydration } from './rsc-app' import { callFromPage, page } from './rsc-start-page' describe('Vite dev: a separate RSC provider', () => { - // J4.2 (user ruling D6): only server functions client code references are + // J4.2: only server functions client code references are // callable over HTTP. `internal` is called by `greet`'s handler only // (server origin, allowed); a request by its id from the browser must be // refused. @@ -13,7 +13,7 @@ describe('Vite dev: a separate RSC provider', () => { // provider. // Impact: a server fn only server code uses is callable by anyone who // learns its id. - // Source: start S36; the compiler-level pin was in + // Source: the compiler-level pin was in // start-plugin-core/tests/createServerFn/createServerFn.test.ts. test.fails( 'a server function only server code calls is not callable from the browser', diff --git a/packages/react-start-rsc/tests/integration/rsc-start-rsbuild.test.ts b/packages/react-start-rsc/tests/integration/rsc-start-rsbuild.test.ts index 5339b41a5f..994d96bbf9 100644 --- a/packages/react-start-rsc/tests/integration/rsc-start-rsbuild.test.ts +++ b/packages/react-start-rsc/tests/integration/rsc-start-rsbuild.test.ts @@ -1,13 +1,12 @@ /** * Start with RSC on Rsbuild (`rsc-app.ts`: Start's Rsbuild plugin, its RSC * layer and `react-server-dom-rspack`): which entry of a dependency each - * environment runs (SPEC J4.3, J4.16, V2-12 (c)), and an edit of a route - * module that declares the server function its loader and page call (SPEC - * J3.6, V2-13). The Vite counterparts are rsc-start-dev.test.ts and - * rsc-start-hmr.test.ts. + * environment runs (SPEC J4.3, J4.16), and an edit of a route module that + * declares the server function its loader and page call (SPEC J3.6). The + * Vite counterparts are rsc-start-dev.test.ts and rsc-start-hmr.test.ts. * - * A component edit keeping state (V2-13's other half, with React Refresh - * from `@rsbuild/plugin-react`) is in rsc-start-hmr.test.ts. + * A component edit keeping state (the other half of J3.6, with React + * Refresh from `@rsbuild/plugin-react`) is in rsc-start-hmr.test.ts. */ import { afterAll, beforeAll, describe, expect, test } from 'vitest' import { @@ -125,7 +124,6 @@ function Page() { // initialises the package once, whether SSR or the browser calls it; SSR's // own code gets `default`, the browser `browser`, and the client output // has no other environment's entry. - // Source: V2-12 (c). test('each environment runs its own entry of a dependency; the provider runs the handler', async () => { expect(server.errors).toEqual([]) const page = await openRscPage(server, '/env') @@ -146,7 +144,7 @@ function Page() { expect(page.errors).toEqual([]) }) - // J3.6, V2-13 (#7618 as quoted) on Rsbuild's RSC layer: after an edit of + // J3.6 (#7618) on Rsbuild's RSC layer: after an edit of // the handler of a route module's server fn, the page applies the hot // update (its loader runs the new handler) and the next call runs it, // without a full reload; the client's hot update never has the handler. diff --git a/packages/react-start-rsc/vite.config.ts b/packages/react-start-rsc/vite.config.ts index fa4b61d6aa..84da533d0b 100644 --- a/packages/react-start-rsc/vite.config.ts +++ b/packages/react-start-rsc/vite.config.ts @@ -36,7 +36,7 @@ const config = defineConfig({ test: { name: packageJson.name, watch: false, - // At most 4 test processes per Vitest run (PERF-STUDY 2026-10-23): each + // At most 4 test processes per Vitest run: each // runs real bundlers, dev servers and its own browser, and Nx runs several // packages' tiers at once. More workers add swap and load flakes, not // speed. `--maxWorkers` on the command line still overrides it. diff --git a/packages/router-generator/tests/deny-route-group-config.test.ts b/packages/router-generator/tests/deny-route-group-config.test.ts index 4344171f1f..8dfa2261b4 100644 --- a/packages/router-generator/tests/deny-route-group-config.test.ts +++ b/packages/router-generator/tests/deny-route-group-config.test.ts @@ -91,8 +91,8 @@ describe('route files named like a route group', () => { // Bug: the generator rejects a `(group).tsx` route file with an error that // names the file relative to the routes directory (`(group).tsx`, // `nested/(group).tsx` for `src/routes/nested/(group).tsx`), neither - // absolute nor project-relative (SPEC §5.7; DECISIONS 2026-10-20 "file - // names in diagnostics"); it neither warns with the file's name nor routes + // absolute nor project-relative (SPEC G5, §5.7: a diagnostic names the + // file by its absolute or project-relative path); it neither warns with the file's name nor routes // the app. // Source: src/filesystem/physical/getRouteNodes.ts (the "route // configuration for a route group" error interpolates `filePath`, the diff --git a/packages/router-generator/tests/generator-options.test.ts b/packages/router-generator/tests/generator-options.test.ts index cb3d39ae87..2a0793fa01 100644 --- a/packages/router-generator/tests/generator-options.test.ts +++ b/packages/router-generator/tests/generator-options.test.ts @@ -109,7 +109,7 @@ function Posts() { } ` - // (UTF-8 BOMs: outside the compiler test corpus, SPEC \u00A72.1 selects + // (UTF-8 BOMs: outside the compiler tests, SPEC \u00A72.1 selects // BOM-free sources.) test.each([ { @@ -710,8 +710,8 @@ export const Route = createFileRoute('/')({}) }) // An empty routeFileIgnorePrefix ignores nothing by prefix: a "-" file is - // a route like any other. Source: V4 round 2 escape astra-r2/03 (the - // default "-" restored for an empty prefix). + // a route like any other (a generator must not restore the default "-" + // for an empty prefix). test('with an empty routeFileIgnorePrefix, a "-" route file is a route', async () => { const root = await createApp({ 'src/routes/__root.tsx': rootRoute(), @@ -835,8 +835,8 @@ export const Route = createFileRoute('/posts/')({}) describe('custom tokens matching longer names', () => { // The routeToken regex of the docs (file-based-routing.md: "filenames like // `dashboard.main-layout.tsx` ... would all be recognized as layout - // routes") matches the whole name of a layout file. - // Source: r5-gaps N11 (rg:2723: every name read as bracket-wrapped). + // routes") matches the whole name of a layout file (a generator that read + // every name as bracket-wrapped missed it). test('a routeToken regex matching whole names makes such a file the layout route of its directory', async () => { const root = await createApp({ 'src/routes/__root.tsx': rootRoute(), @@ -860,8 +860,8 @@ export const Route = createFileRoute('/posts/')({}) }) }) - // A token RegExp keeps its flags' meaning: `\p{L}` needs the `u` flag. - // Source: V4 round 2 escape astra-r2/01 (the `u` flag dropped). + // A token RegExp keeps its flags' meaning: `\p{L}` needs the `u` flag (a + // generator must not drop it). test('a Unicode-mode routeToken regex makes a file with a non-ASCII name the layout route of its directory', async () => { const root = await createApp({ 'src/routes/__root.tsx': rootRoute(), @@ -992,13 +992,13 @@ async function directoryOnAnotherDevice() { const otherDevice = await directoryOnAnotherDevice() describe('tmpDir', () => { - // Bug (K-19): with `tmpDir` on another filesystem than the app (e.g. the + // Bug (SPEC J1.16): with `tmpDir` on another filesystem than the app (e.g. the // app on a disk and TSR_TMP_DIR on a tmpfs), every publication fails: // renaming the temporary file onto the route file or the route tree fails // with EXDEV, and the run fails. The atomic fallback is to write the // temporary file beside the destination and rename it there (SPEC J1.16); // a copy over the destination is not atomic (the destination file must be - // replaced, not rewritten in place). Real filesystems only (ruling Q1): a + // replaced, not rewritten in place). Real filesystems only (SPEC §9): a // host without a second writable filesystem skips the pin. // Source: src/generator.ts `safeFileWrite` renames from // `getTempFileName`'s file in `config.tmpDir`. diff --git a/packages/router-generator/tests/generator.test.ts b/packages/router-generator/tests/generator.test.ts index 41aba06b59..74a858a9ff 100644 --- a/packages/router-generator/tests/generator.test.ts +++ b/packages/router-generator/tests/generator.test.ts @@ -248,7 +248,7 @@ describe('generator fixtures', async () => { // Windows checkouts with `autocrlf` give route files CRLF line endings: the // routes are the same as with LF sources, and a second run changes nothing. -// Source: the #8504 confidence campaign (crlf-gen-run). +// Source: review of #8504. describe('route files with CRLF line endings', () => { it('gives the routes of LF sources, and a second run changes nothing', async () => { const lf = await generateCrlf('\n') diff --git a/packages/router-generator/tests/known-bugs.test.ts b/packages/router-generator/tests/known-bugs.test.ts index 9187545500..31ef71eb15 100644 --- a/packages/router-generator/tests/known-bugs.test.ts +++ b/packages/router-generator/tests/known-bugs.test.ts @@ -123,8 +123,7 @@ export const Route = route('/old')({})`) // user's import of the same name. // Source: router-generator/src/transform/transform.ts:502-565 // (`normalizeRouteImports` adds the import when no import of the router - // package owns the constructor); fuzzing (oracle mode, V2), 7 unmodified - // corpus files. + // package owns the constructor); fuzzing, 7 unmodified files of real apps. // Impact: the written route file declares `createFileRoute` twice and no // longer parses, so the app fails to build. test.fails( diff --git a/packages/router-generator/tests/owned-edits.ts b/packages/router-generator/tests/owned-edits.ts index 15610fb743..08dcc82882 100644 --- a/packages/router-generator/tests/owned-edits.ts +++ b/packages/router-generator/tests/owned-edits.ts @@ -5,7 +5,7 @@ * The generator owns the route id argument of the `Route` constructor call * and the constructor's callee (`createFileRoute` / `createLazyFileRoute`), * and it may add, move or drop the constructor's binding. How it does that - * to the import statements is free (ruling Q10): it may write a new import + * to the import statements is free (SPEC J1.2): it may write a new import * or edit, merge, split, reorder or reprint any import statement. What the * imports bind is the user's: every binding keeps its imported name, local * name, source module, type/value meaning and import attributes, and every diff --git a/packages/router-generator/tests/route-file-upkeep.test.ts b/packages/router-generator/tests/route-file-upkeep.test.ts index f6508ffc85..1ad40d6fb2 100644 --- a/packages/router-generator/tests/route-file-upkeep.test.ts +++ b/packages/router-generator/tests/route-file-upkeep.test.ts @@ -7,9 +7,9 @@ * * What the generator may change is checked by `expectOnlyOwnedEdits` * (owned-edits.ts): the id argument, the constructor callee and the import - * statements, as long as every other binding they hold stays (ruling Q10). + * statements, as long as every other binding they hold stays (SPEC J1.2). * An unused import of the other route constructor may be removed or kept - * (coordinator ruling on audit D ASK-1; SPEC J1.2). + * (SPEC J1.2). */ import path from 'node:path' import { afterEach, describe, expect, test, vi } from 'vitest' @@ -154,8 +154,8 @@ export { Route } `, }, { - // (one route per route file, DECISIONS 2026-10-18: the other call is - // an ordinary function call with a path-like string argument) + // (one route per route file, SPEC §2.2, J2.1: the other call is an + // ordinary function call with a path-like string argument) name: 'another call with a path argument before it', body: `const otherPath = encodeURI('/other') export const Route = createFileRoute('/old')({}) @@ -375,8 +375,8 @@ export const Route = createFileRoute('/old')({}) uses: 'cfr', }, { - // (both aliases of the same export stay bound; V4 round 2 escape - // astra-r2/02 dropped one) + // (both aliases of the same export stay bound; a generator that + // dropped one passed the other cases) name: 'two aliases of another router export', imports: `import { Link as Primary, Link as Secondary } from ${router}`, uses: 'Primary, Secondary', diff --git a/packages/router-generator/tests/route-paths.test.ts b/packages/router-generator/tests/route-paths.test.ts index 8b3b0bf4c6..aa6fd6e3b9 100644 --- a/packages/router-generator/tests/route-paths.test.ts +++ b/packages/router-generator/tests/route-paths.test.ts @@ -285,8 +285,7 @@ describe('layouts and groups', () => { // "Conflicting configuration paths were found" for `/` (the layout's full // path is `/`, like the index route's), although the layout matches no URL // of its own. A childless pathless layout is a valid, if useless, route - // (DECISIONS 2026-10-18 "childless pathless layout"; SPEC J1.15; - // routing/file-naming-conventions.md:35). + // (SPEC J1.15; routing/file-naming-conventions.md:35). // Source: src/utils.ts:1101-1125 (`checkRouteFullPathUniqueness` compares // the inferred full paths of all routes, pathless layouts included). // Impact: creating `_auth.tsx` before its first child route stops route @@ -326,8 +325,8 @@ describe('layouts and groups', () => { // A pathless layout under a route that exists only as a lazy route file // (`posts.lazy.tsx`, no `posts.tsx`) nests under the lazy-only route's - // virtual anchor (guide/code-splitting.md:222-224; DECISIONS 2026-10-18 - // PIN-A; SPEC J1.14). Control for the pin below. + // virtual anchor (guide/code-splitting.md:222-224; SPEC J1.14). Control for + // the pin below. test( 'a pathless layout under a route with only a lazy route file nests under that route', () => @@ -374,15 +373,14 @@ describe('layouts and groups', () => { 60_000, ) - // Bug (PIN-A): a pathless layout one directory below a lazy-only route + // Bug (SPEC J1.14): a pathless layout one directory below a lazy-only route // (`app/posts.lazy.tsx`, no `app/posts.tsx`, and // `app/posts/drafts/_layout.tsx` with children) is attached to the next // real ancestor (`/app`) instead of to the lazy-only route's virtual anchor // `/app/posts`, so `/app/posts/drafts/child` renders without the // `/app/posts` page around it (same rule as the control above: - // guide/code-splitting.md:222-224; DECISIONS 2026-10-18 PIN-A; SPEC J1.14). - // Distinct from the G1 pin above (a lazy-only pathless layout losing its - // directory path). + // guide/code-splitting.md:222-224; SPEC J1.14). Distinct from the pin of a + // lazy-only pathless layout losing its directory path. // Source: src/generator.ts:1561-1606 (`isPathlessLayoutWithPath`: the // search for the layout's parent skips virtual routes, which include the // anchors of lazy-only routes). @@ -446,9 +444,8 @@ describe('layouts and groups', () => { ) // A layout with a piece file only (no route file) still adds no path - // segment, and is no page of its own. - // Source: r5-gaps N5 (rg:455: such a layout got `path: '/'`, which makes - // the router match the layout itself at `/`). + // segment, and is no page of its own (a layout given `path: '/'` makes the + // router match the layout itself at `/`). test('a pathless layout with only a Vue component piece in a route group has no path', async () => { const root = await createApp({ 'src/routes/__root.ts': rootRoute('vue'), @@ -481,10 +478,10 @@ describe('layouts and groups', () => { // when nothing above it is a route. The route tree's types still say // `/foo/bar`. A layout with a route file (`foo/_auth.tsx`) is right. // Impact: the child route matches `/bar` instead of `/foo/bar`, and - // links typed `/foo/bar` lead nowhere. Unlike the pending PIN-A ruling - // (a pathless layout with a route file under a lazy-only route: which - // route is its parent), here the URL disagrees with the generated types. - // Source: mutation run R4 final re-audit (G1). + // links typed `/foo/bar` lead nowhere. Unlike the case of SPEC J1.14 (a + // pathless layout with a route file under a lazy-only route: which route + // is its parent), here the URL disagrees with the generated types. + // Source: mutation testing. test.fails.each<{ name: string target: 'react' | 'vue' diff --git a/packages/router-generator/tests/route-pieces.test.ts b/packages/router-generator/tests/route-pieces.test.ts index eb809c9373..37ea099596 100644 --- a/packages/router-generator/tests/route-pieces.test.ts +++ b/packages/router-generator/tests/route-pieces.test.ts @@ -166,10 +166,10 @@ describe('Vue piece files', () => { }) }) - // A `.lazy` route file is a piece of its route too, and may come first. - // Source: r5-gaps N4 (rg:414: the scan for the pieces the route tree needs - // `lazyRouteComponent` for stopped at the first route with any piece, so - // the tree called it without importing it). + // A `.lazy` route file is a piece of its route too, and may come first (a + // scan for the pieces the route tree needs `lazyRouteComponent` for that + // stopped at the first route with any piece made the tree call it without + // importing it). test('a route with a lazy route file next to a route with a component piece both get their lazy parts', async () => { const root = await createApp({ 'src/routes/__root.ts': rootRoute('vue'), @@ -203,7 +203,7 @@ export const Route = createLazyFileRoute('/about')({ // Impact: in a Vue app with directory routes, the layout's component // piece is a page at `/posts/route` instead of the `/posts` layout's // component. - // Source: mutation run R4 final re-audit (G2). + // Source: mutation testing. test.fails( 'a component piece of a directory route (route.component.vue) is the component of the route', async () => { @@ -234,9 +234,9 @@ export const Route = createLazyFileRoute('/about')({ // component does not have, so loading the route fails. // Impact: a Vue app with a `.lazy.vue` route file fails when the route // loads (low: the documented Vue piece is `.component.vue`). A - // `.lazy.vue` file is the lazily loaded component of its route (ruling - // 2026-10-18, SPEC J1.17). - // Source: mutation run R4 final re-audit (G3). + // `.lazy.vue` file is the lazily loaded component of its route (SPEC + // J1.17). + // Source: mutation testing. test.fails( 'a .lazy.vue route file is the lazily loaded component of the route', async () => { @@ -318,7 +318,7 @@ describe('empty files', () => { // files; the other Vue pieces are left empty, the rows above). // Impact: creating an empty `about.lazy.vue` in a Vue app turns it into a // file that fails to compile (low). - // Source: mutation run R4 final re-audit (G3). + // Source: mutation testing. test.fails( 'an empty .lazy.vue route file is not filled with TypeScript route code', async () => { diff --git a/packages/router-generator/vite.config.ts b/packages/router-generator/vite.config.ts index a1af8b04ef..0b1360d69c 100644 --- a/packages/router-generator/vite.config.ts +++ b/packages/router-generator/vite.config.ts @@ -15,7 +15,7 @@ const config = defineConfig({ name: packageJson.name, dir: './tests', watch: false, - // At most 4 test processes per Vitest run (PERF-STUDY 2026-10-23): each + // At most 4 test processes per Vitest run: each // runs real bundlers, dev servers and its own browser, and Nx runs several // packages' tiers at once. More workers add swap and load flakes, not // speed. `--maxWorkers` on the command line still overrides it. diff --git a/packages/router-plugin/tests/code-splitter-imported-options.test.ts b/packages/router-plugin/tests/code-splitter-imported-options.test.ts index 3f76ac7ca3..aea66eaf40 100644 --- a/packages/router-plugin/tests/code-splitter-imported-options.test.ts +++ b/packages/router-plugin/tests/code-splitter-imported-options.test.ts @@ -1,10 +1,10 @@ /** * Route options the code splitter cannot read statically: an options * object imported from another module, `createFileRoute('/x')(options)` - * with `import { options } from './x.options'` (FIX-PLAN V2-10; SPEC J2.8, + * with `import { options } from './x.options'` (SPEC J2.8, * J2.14). The route keeps working through the real router; the compiler * either splits the options correctly or tells the developer once, naming - * the file (the A9 oracle), or refuses the route with an error naming it; + * the file, or refuses the route with an error naming it; * with `deleteNodes` (Start's client list) it either removes the server * options (and what only they import) or tells the developer: never a * silent non-split, never silently kept server options. A local options @@ -62,8 +62,7 @@ describe('route options held in a local object (control)', () => { ) expect(html).toContain('MARK_X_PAGE') expect(loaded).toBe('MARK_X_DATA') - // No warning or error on any channel of the dev server (info is free, - // N15). + // No warning or error on any channel of the dev server (info is free). expectNoProblems(await route.diagnostics()) }) @@ -165,7 +164,6 @@ export const options = { // nothing. // Impact: the route's component is never split, with no word to the // developer (SPEC J2.8: split correctly or report once naming the file). - // Source: FIX-PLAN V2-10 (split-fable O3/gap 5). it.fails('are split, or reported once naming the route file', async () => { const served = await serve() if (!expectWorkingOrRefused(served)) { @@ -188,7 +186,6 @@ export const options = { // imports, silently. // Impact: server handlers and what they read ship to the client (SPEC // J2.8 "never ships their ssr/server/headers silently", J2.14, J4.12). - // Source: FIX-PLAN V2-10. it.fails( 'lose the options of deleteNodes and what only they import, or are reported once naming the route file', async () => { diff --git a/packages/router-plugin/tests/code-splitter-pragmas.test.ts b/packages/router-plugin/tests/code-splitter-pragmas.test.ts index 1c9148649b..a7036c34e1 100644 --- a/packages/router-plugin/tests/code-splitter-pragmas.test.ts +++ b/packages/router-plugin/tests/code-splitter-pragmas.test.ts @@ -56,7 +56,7 @@ const emotionStyled = (html: string) => /class="css-/.test(html) * renderer: the JSX runtime decision of the file (its pragmas, leading or * not, as the project's transform reads them) holds in every module holding * its JSX (SPEC J2.16). A component left unsplit is accepted with a warning - * naming the file and the option (D-04, J2.8). Returns the rendering. + * naming the file and the option (SPEC J2.16, J2.8). Returns the rendering. */ async function expectRendersLikeUntouched(code: string) { const route = await loadWithUntouched(code) @@ -98,7 +98,7 @@ describe('split modules keep file-level JSX pragmas', () => { expect(emotionStyled(rendered)).toBe(true) }) - // D-04 (J2.16): what a pragma written after the imports means is the + // SPEC J2.16: what a pragma written after the imports means is the // project's JSX transform's decision. Vite's (Oxc) reads leading pragmas // only, so the untouched file renders with React's runtime, and so must // the split component: the pragma must not become effective in a chunk. @@ -108,7 +108,6 @@ describe('split modules keep file-level JSX pragmas', () => { // (the imports above it in the route file are gone from the chunk), so // Oxc reads it there: the split component renders with Emotion's runtime // where the untouched file renders with React's. - // Source: V1 split F12 (D-04 ruled 2026-10-18). // Impact: with Vite 8, a `css` prop that the untouched route ignored is // styled once the component is split (or the reverse once the user // relies on the unsplit behaviour): the route renders differently split. @@ -236,11 +235,11 @@ async function referenceModule(route: RouteApp) { } // License comments stay in the route module when the splitter moves or -// removes the code below them (R-14, SPEC G12): minifiers keep legal +// removes the code below them (SPEC G12): minifiers keep legal // comments in the modules that carry them, so the route module keeps the // notice of the code it no longer holds. Copies in other modules and other // orphaned comments are free. Source: #8504. The comment is the explicit -// text contract R-14 names (N11): read in the route module the page loads. +// text contract SPEC G12 names: read in the route module the page loads. describe('the route module keeps the license comments of the route file', () => { it('leading the file', async () => { const legal = '/*! Example Corp. | MIT License */' diff --git a/packages/router-plugin/tests/code-splitter-route-options.test.ts b/packages/router-plugin/tests/code-splitter-route-options.test.ts index 817cc225de..0213d2257f 100644 --- a/packages/router-plugin/tests/code-splitter-route-options.test.ts +++ b/packages/router-plugin/tests/code-splitter-route-options.test.ts @@ -22,7 +22,7 @@ export const Route = createFileRoute('/posts')(options) }, ) expect(await route.isLazy('component')).toBe(true) - // D5: the component's code does not load with the route module, and its + // SPEC J2.5: the component's code does not load with the route module, and its // chunk does not import what only the loader reads. expect( (await route.eagerModules()).some((code) => @@ -373,7 +373,7 @@ export const Route = createFileRoute('/posts')({ `, { files, routeId: '/posts' }, ) - // D5: the split component's modules do not read the loader's binding + // SPEC J2.5: the split component's modules do not read the loader's binding // (an unused import specifier of a module they need is free, §5.9). expect( (await route.loadedBy('component')).some((code) => diff --git a/packages/router-plugin/tests/code-splitter-scope.test.ts b/packages/router-plugin/tests/code-splitter-scope.test.ts index 49ddae71aa..b393403071 100644 --- a/packages/router-plugin/tests/code-splitter-scope.test.ts +++ b/packages/router-plugin/tests/code-splitter-scope.test.ts @@ -3,7 +3,7 @@ * app loads it (`route-app.ts`: the public router plugin in a real Vite dev * server, the route run in a page of the test process's browser): the split code reads * the bindings it read before splitting, and a dependency only another - * option reads is not imported by the chunk (D5: that dependency, found by + * option reads is not imported by the chunk (SPEC J2.5: that dependency, found by * its request in the chunk as the dev server serves it). */ import { parseSync, transformWithOxc } from 'vite' @@ -321,7 +321,7 @@ export const Route = createFileRoute('/')({ // read is the only one the split component makes of a binding the loader // reassigns, the component still sees the loader's reassignment (one // binding, not a copy or a dropped declaration). - // Source: V4 red-astra/24 (a free-reference walk that skips object keys, + // Source: mutation testing (a free-reference walk that skips object keys, // computed ones included). async function expectKeySeesReassignment(code: string) { const route = await loadRoute(code) @@ -360,7 +360,7 @@ export const Route = createFileRoute('/')({ // A computed key that is the only read of a binding the loader shares: // the split component sees the one binding, and its initializer runs - // once. Source: V4 red variant astra/24 (a reference walker that skips + // once. Source: mutation testing (a reference walker that skips // every object key escaped the test above, where a member read also names // the binding). (A `let` the route module reassigns while a chunk reads // it: pinned in integration/known-bugs-code-splitter-ssr-builds.test.ts.) diff --git a/packages/router-plugin/tests/generator-dev-app.ts b/packages/router-plugin/tests/generator-dev-app.ts index 8636750dfb..fc86087aea 100644 --- a/packages/router-plugin/tests/generator-dev-app.ts +++ b/packages/router-plugin/tests/generator-dev-app.ts @@ -14,7 +14,7 @@ * app navigates to it). `settle()` waits for the dev server by its events * (the harnesses' own `settle()`), then for the page's outcome: neither the * dev server nor the page has work in flight (`waitForOutcome`), never on - * how many hot updates or invalidations an edit takes (N21). + * how many hot updates or invalidations an edit takes. */ import { existsSync } from 'node:fs' import path from 'node:path' @@ -157,7 +157,7 @@ export interface GeneratorDevApp { * `log`/`info`/`debug` and stdout writes as `info`, stderr writes as * `warning`; e.g. the generator), and the dev server's own errors * and warnings (Vite's logger, Rsbuild's compile errors and warnings). A - * report may come through any of them (SPEC G5, §5.7; V1R gen G13). + * report may come through any of them (SPEC G5, §5.7). */ diagnostics: (since?: DiagnosticsMark) => Array } @@ -570,7 +570,7 @@ const owned = '\u0000' * file's code outside its import statements with that string literal left * out (`rest`), and what the import statements bind (`imports`): the * generator may write, edit, merge, reorder or reprint import statements - * (ruling Q10), so they are compared by their bindings, and the lines + * (SPEC J1.2), so they are compared by their bindings, and the lines * holding only import statements go, with the blank lines next to them or * at the start of the file (where a removed import leaves its line break * and blanks). The call is found by diff --git a/packages/router-plugin/tests/generator-dev-scenarios.ts b/packages/router-plugin/tests/generator-dev-scenarios.ts index c7ae7c24ed..2a73ea17ee 100644 --- a/packages/router-plugin/tests/generator-dev-scenarios.ts +++ b/packages/router-plugin/tests/generator-dev-scenarios.ts @@ -65,7 +65,7 @@ async function expectHotUpdate( * Asserts that the app reported `file` (an error or a warning naming it) * since `since`, through any real channel (`app.diagnostics`: the * generator's console output, the dev server's logger or compile - * diagnostics; SPEC G5, §5.7; V1R gen G13). + * diagnostics; SPEC G5, §5.7). */ function expectReported( app: GeneratorDevApp, @@ -82,7 +82,7 @@ function expectReported( /** * Asserts that the app reported no error since `since` (e.g. since the * edit fixing a broken file: a report of the broken file before it is - * allowed, through any channel; V1R gen G13). + * allowed, through any channel). */ function expectNoErrorsSince(app: GeneratorDevApp, since: DiagnosticsMark) { expect( @@ -244,7 +244,7 @@ export function describeRouteFileUpkeep( timeout, ) - // Source: gap DV5 (gaps/dev-hmr.md), issue #6775 (reload loop): the dev + // Source: #6775 (reload loop): the dev // server settles (a bounded number of regenerations) and the page // updates in place. test( @@ -264,7 +264,7 @@ export function describeRouteFileUpkeep( // The route tree update that makes the app know a new route must not let // the new route be served unsplit, however soon the app navigates to it. - // Source: gaps DV1/DV17 (gaps/dev-hmr.md), suspected race. + // Source: review (a suspected race). test( 'a route created while the page runs, navigated to as soon as the live router has it, loads its component on navigation', async () => { @@ -322,8 +322,8 @@ export function describeCreatedRoutes( pinCreatedBrokenRouteFiles?: boolean } = {}, ) { - // Source: gap DV17 (gaps/dev-hmr.md): a route created in dev joins HMR like - // the routes the server started with; gap GEN-14 (the root route too). + // A route created in dev joins HMR like the routes the server started + // with (the root route too). describe(`created routes in ${bundler} dev`, () => { test( 'an edit of a created route the page shows is a hot update', @@ -386,7 +386,7 @@ export function describeCreatedRoutes( ) }) - // Source: gap DV4 (gaps/dev-hmr.md): a route file the generator cannot + // A route file the generator cannot // handle is reported, the dev server keeps running, and fixing the file // brings the route back. describe(`route generator failures in ${bundler} dev`, () => { diff --git a/packages/router-plugin/tests/generator-watch-session.ts b/packages/router-plugin/tests/generator-watch-session.ts index cb2c7c824e..502a2fe9c3 100644 --- a/packages/router-plugin/tests/generator-watch-session.ts +++ b/packages/router-plugin/tests/generator-watch-session.ts @@ -2,7 +2,7 @@ * The generator entries of webpack and Rspack in the compiler's own watch * mode (`compiler.watch`, as webpack-dev-server and `--watch` use it), on a * temporary app with file-based routes: what generator-watch-mode.test.ts - * (the corpus) and the file-watcher control outside the corpus run. Waits + * (a compiler test) and a file-watcher control run. Waits * are on the compiler's own build events. */ import { mkdir, rm, utimes, writeFile } from 'node:fs/promises' diff --git a/packages/router-plugin/tests/integration/build-cache.test.ts b/packages/router-plugin/tests/integration/build-cache.test.ts index ecd91b0fba..da86e9aed4 100644 --- a/packages/router-plugin/tests/integration/build-cache.test.ts +++ b/packages/router-plugin/tests/integration/build-cache.test.ts @@ -5,7 +5,6 @@ * initialises once and both see one instance, on a fully cached rebuild and * on a rebuild after an edit of an unrelated file (SPEC G3, G4, J2.4; §9: * a regression test, not a pin). - * Source: V2-28. */ import { writeFile } from 'node:fs/promises' import path from 'node:path' diff --git a/packages/router-plugin/tests/integration/build-harness.test.ts b/packages/router-plugin/tests/integration/build-harness.test.ts index 771d8861cf..1365fdd78f 100644 --- a/packages/router-plugin/tests/integration/build-harness.test.ts +++ b/packages/router-plugin/tests/integration/build-harness.test.ts @@ -68,7 +68,7 @@ const splitRouteExpected = { // Vite and Rspack: the same harness call and outcome as the React cells of // build-frameworks.test.ts (" react ssr/client build the split -// component loads lazily and renders"), which decide it (speedup 6). +// component loads lazily and renders"), which decide it. // webpack here builds minified, as an app does (build-frameworks builds // webpack unminified). describe('router plugin with webpack', () => { @@ -107,7 +107,7 @@ test( // nothing. The code splitter's esbuild adapter also never initialises its // config (no `esbuild` hook calls `initUserConfig`), so it would throw once // it saw a route file. -// Splitting, or refusing (a build error), are both valid fixes (decision D3 (c), SPEC J2.18); +// Splitting, or refusing (a build error), are both valid fixes (SPEC §1.3, J2.18); // a warning on a successful unsplit build is not a refusal. // Impact: `tanstackRouter({ autoCodeSplitting: true })` with esbuild bundles // every route component into the entry, without telling the user. diff --git a/packages/router-plugin/tests/integration/build-production-webpack-unsplit.test.ts b/packages/router-plugin/tests/integration/build-production-webpack-unsplit.test.ts index 19e774d9d8..36c7be20a6 100644 --- a/packages/router-plugin/tests/integration/build-production-webpack-unsplit.test.ts +++ b/packages/router-plugin/tests/integration/build-production-webpack-unsplit.test.ts @@ -18,7 +18,6 @@ describe('webpack', () => { // bundle. For every framework; the React row is also the pin of the // control in known-bugs-route-hmr-production.test.ts. (Rspack: // build-production.test.ts.) - // Source: gap CC-P1 / M3. // Impact: webpack/Rspack production bundles built from a shell without // `NODE_ENV` ship the route HMR code of every route. test.fails.each(frameworks)( diff --git a/packages/router-plugin/tests/integration/build-production.test.ts b/packages/router-plugin/tests/integration/build-production.test.ts index 1103e818c9..e292de9474 100644 --- a/packages/router-plugin/tests/integration/build-production.test.ts +++ b/packages/router-plugin/tests/integration/build-production.test.ts @@ -33,7 +33,7 @@ test.each([true, false])( // pinned for Rspack below); Vite drops the code `import.meta.hot` guards, // and the export the React HMR compile adds ships only to a module that // imports it, which the app (its route tree imports `Route`) does not -// (ruling P1). +// (SPEC G9, J2.4). test.each(frameworks)( 'a production %s client bundle without code splitting has no dev-only code (vite)', async (framework) => { @@ -49,7 +49,6 @@ test.each(frameworks)( // framework; the React row is also the pin of the control in // known-bugs-route-hmr-production.test.ts. (webpack: // build-production-webpack.test.ts.) -// Source: gap CC-P1 / M3. // Impact: webpack/Rspack production bundles built from a shell without // `NODE_ENV` ship the route HMR code of every route. describe('rspack', () => { diff --git a/packages/router-plugin/tests/integration/build-source-maps.test.ts b/packages/router-plugin/tests/integration/build-source-maps.test.ts index 44daff7c37..1888b3adcd 100644 --- a/packages/router-plugin/tests/integration/build-source-maps.test.ts +++ b/packages/router-plugin/tests/integration/build-source-maps.test.ts @@ -252,9 +252,9 @@ describe('vite', () => { // These rows flip once unplugin keeps the map: with a loader passing an // identity map in front of unplugin's (so it returns the plugin's map), the // four split-component rows pass (checked 2026-10-18). The route-module and -// shared-module rows (added for V1R split S12) fail the same way: the frame +// shared-module rows fail the same way: the frame // maps to the generated module's line, one above the throw's. -// Source: oracle-gaps M1; upstream (unplugin), not the router plugin. +// Source: upstream (unplugin), not the router plugin. // Impact: stack traces, devtools and error trackers point at lines of the // generated split module (here line 3 instead of line 5 of the route file). describe.each(['rspack', 'webpack'] as const)('%s', (bundler) => { diff --git a/packages/router-plugin/tests/integration/code-splitter-dead-code.test.ts b/packages/router-plugin/tests/integration/code-splitter-dead-code.test.ts index 5864c573fb..626abdb9ee 100644 --- a/packages/router-plugin/tests/integration/code-splitter-dead-code.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-dead-code.test.ts @@ -7,7 +7,7 @@ import { build, clientMountEntry, head, routeApp } from '../build-harness' * Which code a production client build drops is the bundler's decision: one * app per bundler holds the route of every test below (`routes/index.tsx` * and the routes the entry exports as `Route`), built once and run - * once per route (speedup 6). + * once per route. */ type BundlerName = 'vite' | 'rspack' | 'webpack' @@ -138,12 +138,12 @@ describe('the reference module only drops code that splitting left unused', () = // eliminates newly unreferenced identifiers", "unexported circular references" // and "SCC with external caller used -> all preserved". Whether unused user // code is kept or dropped is free, and unused code may name a binding its - // module no longer declares (user ruling 2026-10-17, widened: the bundlers + // module no longer declares (SPEC G8: the bundlers // delete it; the validator checks what Rolldown's tree-shaking keeps); // every module stays valid and the split component still reaches its // helper. - // The other half of the ruling: the unused functions (and any binding they + // The other half of that rule: the unused functions (and any binding they // name that their module no longer declares) do not reach a production // client bundle. it.each(['vite', 'rspack', 'webpack'] as const)( @@ -167,7 +167,7 @@ describe('the reference module only drops code that splitting left unused', () = // Bundlers drop an unused call of a function annotated #__NO_SIDE_EFFECTS__, // so the annotation must move with the function into whichever module the // code splitter puts it in, also in a file whose pragma comment every -// emitted module repeats (SPEC G2, G12; V1 split F38). Observed on the +// emitted module repeats (SPEC G2, G12). Observed on the // production client output: the unused call (and the effect it would run) // is gone, the used one still renders. The emitted name of the function is // free. diff --git a/packages/router-plugin/tests/integration/code-splitter-import-attributes.test.ts b/packages/router-plugin/tests/integration/code-splitter-import-attributes.test.ts index 0ff4066576..53e8dbd84b 100644 --- a/packages/router-plugin/tests/integration/code-splitter-import-attributes.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-import-attributes.test.ts @@ -1,6 +1,6 @@ /** - * An import moved into a split chunk keeps its attributes (SPEC J2.16, J2.17, - * decision D9): the bundler that compiles the chunk still applies them. + * An import moved into a split chunk keeps its attributes (SPEC J2.16, + * J2.17): the bundler that compiles the chunk still applies them. * Vite gives an import attribute no meaning (its dev server and build drop * them), so this is judged with webpack, which honours `type: 'json'`: a * `.txt` file holding JSON loads as JSON only through the attribute (without diff --git a/packages/router-plugin/tests/integration/code-splitter-imports-exports.test.ts b/packages/router-plugin/tests/integration/code-splitter-imports-exports.test.ts index f44d39575a..2aa8385ff6 100644 --- a/packages/router-plugin/tests/integration/code-splitter-imports-exports.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-imports-exports.test.ts @@ -6,7 +6,7 @@ import { build, head, routeApp } from '../build-harness' describe('TypeScript-only syntax', () => { // With `verbatimModuleSyntax`, TypeScript keeps `import { type Db } from // './db'` as `import './db'`. A module a route file imports only for types - // need not load in the client (ruling L3, 2026-10-17; same as the Start + // need not load in the client (SPEC J2.5; same as the Start // client in start-plugin-core known-bugs-start-compiler.test.ts "a // server-only module imported only for a type specifier"). Only Vite reads // the app's tsconfig in this harness. diff --git a/packages/router-plugin/tests/integration/code-splitter-plugin-pipeline.test.ts b/packages/router-plugin/tests/integration/code-splitter-plugin-pipeline.test.ts index 8dc6772103..e17f0278b6 100644 --- a/packages/router-plugin/tests/integration/code-splitter-plugin-pipeline.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-plugin-pipeline.test.ts @@ -13,8 +13,7 @@ import { build, routeApp } from '../build-harness' // (TS2440). A real build either fails with an error, or // builds a page that renders; it never builds a page that breaks. The // error is read on every channel the build reports through (the thrown -// error, the bundler's, the console: SPEC §5.7). Source: the #8504 -// confidence campaign (DX-07). +// error, the bundler's, the console: SPEC §5.7). Source: review of #8504. it.each(['vite', 'rspack'] as const)( 'a route file that imports and declares Route fails its build with an error, or renders (%s)', async (bundler) => { diff --git a/packages/router-plugin/tests/integration/code-splitter-pragmas.test.ts b/packages/router-plugin/tests/integration/code-splitter-pragmas.test.ts index 694aa2bfcc..e825714562 100644 --- a/packages/router-plugin/tests/integration/code-splitter-pragmas.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-pragmas.test.ts @@ -16,7 +16,7 @@ import type { Framework } from '../build-harness' const timeout = 120_000 -// D-04 (SPEC J2.16): a chunk's JSX compiles under the runtime decision of +// SPEC J2.16: a chunk's JSX compiles under the runtime decision of // its source file. What a pragma written after the imports means is the // project's JSX transform's decision (Vite's Oxc reads leading pragmas only; // Rspack's SWC reads a pragma above any top-level statement), and the split @@ -80,7 +80,6 @@ return getComputedStyle(document.getElementById('styled')).color`) // Oxc reads it there: the split component is styled by Emotion where the // untouched route left the `css` prop as an attribute. Same bug as the // fast-tier pin in ../code-splitter-pragmas.test.ts. - // Source: V1 split F12 (D-04 ruled 2026-10-18). // Impact: with Vite 8, a route renders differently once its component is // split. test.fails( @@ -96,7 +95,7 @@ return getComputedStyle(document.getElementById('styled')).color`) // act on: naming the route file, or both plugins) or fails with an error // naming both plugins (their package, factory or plugin name; the wording // is free), so the user can act. Never a silent wrong result. -// Source: V1 split F18; V2-26 (#6760: `vueJsx()` before the router plugin). +// Source: #6760 (`vueJsx()` before the router plugin). describe('a framework JSX plugin registered before the router plugin', () => { const route = ( framework: Framework, @@ -199,7 +198,7 @@ export const Route = createFileRoute('/')({ component: Page }) // leaves: the count the click set is reset). With Vite 8 and // vite-plugin-solid the pragma's only other effect on the unsplit app is a // page reload instead of a hot update, which G10 does not let a test -// require. Source: V1 split F14, V1R split S07. (React's `/* @refresh reset */` has no +// require. (React's `/* @refresh reset */` has no // observable effect under Vite 8's `@vitejs/plugin-react`, split or not: no // outcome to assert.) describe('refresh pragma comments of a route file, in a real page', () => { diff --git a/packages/router-plugin/tests/integration/code-splitter-robustness.test.ts b/packages/router-plugin/tests/integration/code-splitter-robustness.test.ts index 451e4e47cd..131695c161 100644 --- a/packages/router-plugin/tests/integration/code-splitter-robustness.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-robustness.test.ts @@ -6,7 +6,7 @@ import { expect, test } from 'vitest' import { build, clientMountEntry, head, rootRoute } from '../build-harness' /** - * One app per bundler holds both unusual route files (speedup 6): a route + * One app per bundler holds both unusual route files: a route * file with a non-ASCII name (its route at `/café/日本語`, re-exported by * the entry as `CafeRoute`) and a JavaScript route file (`routes/index.jsx`, * the entry's `Route`). Built once and run once per route; each test reads diff --git a/packages/router-plugin/tests/integration/code-splitter-router.test.ts b/packages/router-plugin/tests/integration/code-splitter-router.test.ts index 1bab0d3f76..be37942967 100644 --- a/packages/router-plugin/tests/integration/code-splitter-router.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-router.test.ts @@ -134,7 +134,7 @@ return results`) }) // An option value that is already lazy (`lazyRouteComponent(() => -// import(…))`, ruling OQ13): the code splitter may leave it in the route +// import(…))`, SPEC §6 OQ13): the code splitter may leave it in the route // module or split it and chain its preload; either way, once the router has // preloaded the route, rendering it requests no new module and shows no // pending fallback (SPEC J2.6). One real Vite client build in Chromium: @@ -216,8 +216,7 @@ export async function renderPreloaded() { // another lazy component: the router's preload loads the outer chunk only, // and the first render suspends (pending fallback) and requests the page // module. Leaving the value in the route module or chaining the inner - // preload both fix it (ruling OQ13). - // Source: SPEC §6 OQ13 (coordinator ruling 2026-10-18). + // preload both fix it (SPEC §6 OQ13). // Impact: apps that already wrap a route component in // lazyRouteComponent show their pending component, and wait for a // request, on every navigation the router had preloaded (intent diff --git a/packages/router-plugin/tests/integration/dev-full-bundle.test.ts b/packages/router-plugin/tests/integration/dev-full-bundle.test.ts index 60cc6e4d1b..21d292de86 100644 --- a/packages/router-plugin/tests/integration/dev-full-bundle.test.ts +++ b/packages/router-plugin/tests/integration/dev-full-bundle.test.ts @@ -1,6 +1,6 @@ /** * Code splitting in Vite's full-bundle dev mode (`experimental.bundledDev`, - * SPEC §2.1 "Modes", J2.13; V2-29): Rolldown's dev engine bundles the client + * SPEC §2.1 "Modes", J2.13): Rolldown's dev engine bundles the client * with the router plugin's emitted modules, a real browser page runs the * bundle with Vite's HMR client, and the test edits the route file on disk. * The page renders, the split component's code loads only when the router diff --git a/packages/router-plugin/tests/integration/dev-source-maps.test.ts b/packages/router-plugin/tests/integration/dev-source-maps.test.ts index d94e5c8b66..a6b7bcffe1 100644 --- a/packages/router-plugin/tests/integration/dev-source-maps.test.ts +++ b/packages/router-plugin/tests/integration/dev-source-maps.test.ts @@ -8,7 +8,7 @@ * which of them holds which code are free (SPEC §5.3). Maps are the ones the * page's modules point to (Vite's inline maps, Rsbuild's `sourceMappingURL`), * read with a standard consumer (`@tanstack/compiler-test-utils/source-maps`). - * Source: V2-15a (#6667, #3828). + * Source: #6667, #3828. */ import path from 'node:path' import { fileURLToPath } from 'node:url' @@ -212,7 +212,7 @@ describe('rsbuild dev server', () => { // build-source-maps.test.ts). The modules compiled from the route file // then map to the lines of the code splitter's output (here the throw of // the shared function to line 2 instead of 3; re-verified 2026-10-21). - // Source: V2-15a (#6667, #3828); upstream (unplugin), not the router + // Source: #6667, #3828; upstream (unplugin), not the router // plugin. // Impact: in Rsbuild dev, a thrown error in a split component, and a // breakpoint in it, resolve to the generated split module's lines. diff --git a/packages/router-plugin/tests/integration/known-bugs-code-splitter-client-builds.test.ts b/packages/router-plugin/tests/integration/known-bugs-code-splitter-client-builds.test.ts index 165184fa07..017526aa8f 100644 --- a/packages/router-plugin/tests/integration/known-bugs-code-splitter-client-builds.test.ts +++ b/packages/router-plugin/tests/integration/known-bugs-code-splitter-client-builds.test.ts @@ -18,7 +18,7 @@ const clientBundlers: Array = ['vite', 'rspack', 'webpack'] describe('route options written in other shapes', () => { // The unused `makeOptions` of the two rows above may name a `Page` its - // module no longer declares (user ruling 2026-10-17, widened: the bundlers + // module no longer declares (SPEC G8: the bundlers // delete it), as long as that dead code does not reach a production client // bundle (which the build harness also checks for any dangling name). test.each( @@ -61,7 +61,7 @@ export const Route = ${route} describe('what split chunks hold', () => { // Bug: once the pin above is fixed, the split option must also end up - // split, or the build must say why (decision D11). Splitting the result of + // split, or the build must say why (SPEC J2.8, G5). Splitting the result of // a call would change when the call runs, so the user has to change the // pattern: a warning naming the file and the option is acceptable. Today // the build fails first (same root cause as the pin above). @@ -105,10 +105,10 @@ describe('exported bindings', () => { // copy. One instance is the goal: the function the route renders on its // error path is the one the entry imports, its module-level state is // created once (SPEC J2.4, G9); and the option is split, or unsplit with - // a warning naming the route file (decision D11), whichever chunk holds it. + // a warning naming the route file (SPEC J2.8), whichever chunk holds it. // Impact: the component's code ships twice and runs as two components. // Whether the option is lazy or reported is the router transform's - // decision, so one bundler shows it (speedup 7: the Rspack and webpack + // decision, so one bundler shows it (the Rspack and webpack // cells were decided by the same transform as this Vite cell). test.fails( 'an exported errorComponent written as `PostErrorComponent as any` is one instance in the client (vite build)', diff --git a/packages/router-plugin/tests/integration/known-bugs-code-splitter-client-output.test.ts b/packages/router-plugin/tests/integration/known-bugs-code-splitter-client-output.test.ts index bf080797d2..15dd8645ae 100644 --- a/packages/router-plugin/tests/integration/known-bugs-code-splitter-client-output.test.ts +++ b/packages/router-plugin/tests/integration/known-bugs-code-splitter-client-output.test.ts @@ -56,7 +56,7 @@ export const Route = createFileRoute('/')({ // Whether a server-only option reaches the client bundle is the router // transform's decision (an option it keeps stays referenced by the route - // options), so one bundler shows it (speedup 7: the Rspack and webpack + // options), so one bundler shows it (the Rspack and webpack // cells of the two tests below were decided by the same transform as // their Vite cells). @@ -251,7 +251,7 @@ export const Route = createFileRoute('/')({ // code-split") is injected into the route module unless the build // process's `NODE_ENV` is `production`, instead of following the // bundler's mode as the rest of the code splitter does. webpack and Rspack - // set `NODE_ENV` only inside the bundle. Source: gap CC-P2. + // set `NODE_ENV` only inside the bundle. // Impact: webpack/Rspack production bundles built from a shell without // `NODE_ENV` log a development warning in every user's console, with the // developer's absolute file path. diff --git a/packages/router-plugin/tests/integration/known-bugs-code-splitter-page-code.test.ts b/packages/router-plugin/tests/integration/known-bugs-code-splitter-page-code.test.ts index e6923e6999..7c03d2c0dc 100644 --- a/packages/router-plugin/tests/integration/known-bugs-code-splitter-page-code.test.ts +++ b/packages/router-plugin/tests/integration/known-bugs-code-splitter-page-code.test.ts @@ -172,8 +172,8 @@ ${component}`, // Whether it renders is pinned at the compiler level ("top-level writes // to the split component (property assignment) stay with the binding // they write"); a fix must keep the component in its chunk. - // Source: the #8504 confidence campaign (exported-bindings fixture L, - // where a candidate fix moved the component to the entry). + // Source: review of #8504 (a candidate fix moved the component to the + // entry). routeCase( 'an exported function component next to a helper the loader and the component share', 'shared-helper-export', @@ -197,7 +197,7 @@ export const Route = createFileRoute('$PATH')({ // `Route` only) allows; whether our compiler or the bundler's // tree-shaking does it is free, with or without `"sideEffects": false` or // a `/* @__PURE__ */` initialiser. - // Sources: gaps S14, Z4, H1, H2; #8504's exported-bindings chunks tests. + // Source: #8504's exported-bindings chunks tests. // Impact: page code exported for tests or reuse loads with the entry chunk. const exported: Array = [ routeCase( @@ -237,8 +237,7 @@ ${component}`, } ${component}`, ), - // Source: the #8504 confidence campaign (exported-bindings S5, G1 and - // fixture C). + // Source: review of #8504. routeCase( 'an exported const used as the component', 'exported-const-component', @@ -262,7 +261,7 @@ ${component}`, // module both chunks import, which the route module re-exports, so it // loads with the entry chunk unless the app declares `"sideEffects": // false` (then the bundler drops the unused re-export). - // Source: the #8504 confidence campaign (exported-bindings G1). + // Source: review of #8504. const exportedSharedByOptions = routeCase( 'an exported component two split options render', 'exported-two-options', @@ -278,8 +277,8 @@ export const Route = createFileRoute('$PATH')({ // Goals for split options the code splitter leaves in the route module. const unsplit: Array = [ // Bug: a route option written as a method (`component() {}`) is not - // split (only property values are). Source: gap S11, ruling on method - // shorthand. + // split (only property values are). SPEC J2.9: method shorthand + // options are splittable like any other. // Impact: the component loads with the entry chunk. routeCase( 'a component written as a method', @@ -296,7 +295,7 @@ export const Route = createFileRoute('$PATH')({ // (`computeSharedBindings` and the reference compiler skip // `createRootRoute`), so its errorComponent and notFoundComponent, which // only render on errors, load with the entry chunk. Its `component` - // renders on every page and may stay. Source: gap S20, decision D12. + // renders on every page and may stay (SPEC J2.7). const rootRoute = `import { createRootRoute, Outlet } from '@tanstack/react-router' export const Route = createRootRoute({ component: () => , @@ -315,7 +314,7 @@ export const Route = createRootRoute({ // statically, so the component's code loads with the entry, silently. // Splitting them would change when the call runs, so the user has to // change the pattern: a warning naming the file and the option is the - // expected outcome (decision D11). + // expected outcome (SPEC J2.8, G5). const destructured = routeCase( 'route options destructured from a call result', 'destructured-options', @@ -331,7 +330,7 @@ export const Route = createFileRoute('$PATH')({ component: MyComponent, loader } ) // Bug: a split chunk keeps the route file's exported declarations that - // its option does not read (decision D5; compiler-level pin in "what + // its option does not read (SPEC J2.5; compiler-level pin in "what // split chunks hold"), and bundlers keep them. const unreadExport = routeCase( 'an exported helper the split option does not read', diff --git a/packages/router-plugin/tests/integration/known-bugs-code-splitter-property-write.test.ts b/packages/router-plugin/tests/integration/known-bugs-code-splitter-property-write.test.ts index 75ccf9ac24..aa1a278175 100644 --- a/packages/router-plugin/tests/integration/known-bugs-code-splitter-property-write.test.ts +++ b/packages/router-plugin/tests/integration/known-bugs-code-splitter-property-write.test.ts @@ -6,11 +6,10 @@ * component (or a support module or factory a compiler emits for it) is * dropped from the entry is each bundler's tree-shaking decision, with and * without `"sideEffects": false`: Vite/Rolldown, Rspack and webpack treat - * annotated factories differently (FOLLOWUPS, annotation divergence), so - * every cell is its own outcome (V1R split S17 restored the seven cells the - * speed pass removed). Each cell is a small app of its own (the property - * write breaks today's entry chunk, which would take the other cases of a - * shared app down with it); the cells build concurrently. + * annotated factories differently, so every cell is its own outcome. Each + * cell is a small app of its own (the property write breaks today's entry + * chunk, which would take the other cases of a shared app down with it); + * the cells build concurrently. */ import { describe, it } from 'vitest' import { build, buildWithRsbuild, head } from '../build-harness' @@ -57,7 +56,7 @@ export async function mount(path: string) { // production client output, whose entry chunk reads the undeclared `Page`. // Keeping a copy of the component and its write in the route module as // well is no fix: the page code then loads with the entry chunk. -// Source: the #8504 probe (memos/splitter.md B6). +// Source: #8504. // Impact: the app's entry throws when it loads ("Page is not defined"). describe.concurrent.each(['vite', 'rspack', 'webpack', 'rsbuild'] as const)( '%s', diff --git a/packages/router-plugin/tests/integration/known-bugs-code-splitter-ssr-builds.test.ts b/packages/router-plugin/tests/integration/known-bugs-code-splitter-ssr-builds.test.ts index 869585d3f0..6ae174e424 100644 --- a/packages/router-plugin/tests/integration/known-bugs-code-splitter-ssr-builds.test.ts +++ b/packages/router-plugin/tests/integration/known-bugs-code-splitter-ssr-builds.test.ts @@ -329,7 +329,7 @@ describe('app paths', () => { // as a split chunk, and throws "The split value for the virtual route ... // was not found" for the modules of an app in a directory named like // `tsr-split-demo`. - // Source: round-3 mutation testing (splitter-hosts P3). + // Source: mutation testing. // Impact: an app in such a directory cannot be built. // Fix-agnostic: the directory name holds what the compiler's own split // ids hold, read from the modules a dev server serves for the route's @@ -413,4 +413,4 @@ PostsPage.title = 'Posts' // `this` in split callbacks (a split loader called as a method of its // chunk's namespace by router-core's `lazyFn`): a runtime cause (#8688), -// not pinned in the compiler corpus. +// not pinned in the compiler tests. diff --git a/packages/router-plugin/tests/integration/known-bugs-dev-server.test.ts b/packages/router-plugin/tests/integration/known-bugs-dev-server.test.ts index 5e173ebb1b..6f4c3cb99f 100644 --- a/packages/router-plugin/tests/integration/known-bugs-dev-server.test.ts +++ b/packages/router-plugin/tests/integration/known-bugs-dev-server.test.ts @@ -220,7 +220,7 @@ ${cardB ? 'let renders = 0\nfunction CardB() { renders++; return {"B" + rende // the next edit or a restart; an added one is copied into each chunk instead // of shared (two module states: each chunk's `CardB` counts its own // renders). - // Source: gap DV8 (gaps/dev-hmr.md); #8504 code-splitter-plugin-pipeline + // Source: #8504 code-splitter-plugin-pipeline // .test.ts ("a dev server compiling an edited route out of order"). // Any fix passes: the page renders the edited route, with one module // state for what the split options share. diff --git a/packages/router-plugin/tests/integration/known-bugs-route-hmr-components.test.ts b/packages/router-plugin/tests/integration/known-bugs-route-hmr-components.test.ts index 24e80adfb9..ec44650bb4 100644 --- a/packages/router-plugin/tests/integration/known-bugs-route-hmr-components.test.ts +++ b/packages/router-plugin/tests/integration/known-bugs-route-hmr-components.test.ts @@ -85,9 +85,10 @@ ${route('v2')}`, // Source: ReactFreshBabelPlugin-test "registers likely HOCs with inline // functions" and "registers top-level variable declarations with arrow // functions"; #8504 react-refresh-route-components ("written inline and - // wrapped in ..."), where the wrapped rows pass; ruling on #8721 "keeps a + // wrapped in ..."), where the wrapped rows pass; #8721 "keeps a // method-shorthand component option" (split row). Formerly read React - // Refresh's registrations and modelled its runtime (ruling 2026-10-18). + // Refresh's registrations and modelled its runtime (now real tools only, + // SPEC §8). // Any fix passes: the edit shows without a full reload. test.fails.for([ ...[ @@ -176,8 +177,8 @@ export const Route = createFileRoute('/')({ component: page${options} }) // Impact: edits to the component do not show until a reload. // Source: ReactFreshBabelPlugin-test "only registers pascal case // functions"; the former in-process pin "registers a lowercase split - // component declared as %s" (V1 HMR-17: React Refresh's registrations, - // read, are not what the page shows). Controls: the lowercase function + // component declared as %s" (React Refresh's registrations, read, are + // not what the page shows). Controls: the lowercase function // declaration (split) and the unsplit variables of // route-hmr-browser-names.test.ts. // Any fix passes: the edit shows without a full reload or errors. @@ -215,7 +216,7 @@ export const Route = createFileRoute('/')({ component: page${options} }) // (SyntaxError: Export 'SplitComponent' is not defined): the page never // shows the route. // Source: #8504 react-refresh-route-components ("that is also the unsplit - // pendingComponent"); V1 HMR-17 (registration read in process). + // pendingComponent"); the former in-process registration read. // Any fix passes: the page shows the route, and an edit shows in place. test.fails( 'vite: a lowercase function component that is also the unsplit pendingComponent renders, and an edit shows in place', @@ -244,7 +245,7 @@ export const Route = createFileRoute('/')({ component: page${options} }) // Impact: in development, the route module fails to load (SyntaxError: // Export 'page' is not defined): the page never shows the route. // Source: ReactFreshBabelPlugin-test "registers top-level exported function - // declarations" (`export { Baz }`); V1 HMR-17. Unsplit: route-hmr-browser + // declarations" (`export { Baz }`). Unsplit: route-hmr-browser // -names.test.ts. // Any fix passes: the page shows the route, and an edit shows in place. test.fails( diff --git a/packages/router-plugin/tests/integration/known-bugs-route-hmr-production.test.ts b/packages/router-plugin/tests/integration/known-bugs-route-hmr-production.test.ts index 1e6c6187cb..f1fee2bf68 100644 --- a/packages/router-plugin/tests/integration/known-bugs-route-hmr-production.test.ts +++ b/packages/router-plugin/tests/integration/known-bugs-route-hmr-production.test.ts @@ -49,7 +49,7 @@ export const Route = createFileRoute('/')({ component: Page }) 60_000, ) - // Source: gap P1 / DV51. (No esbuild row: the esbuild plugin neither + // (No esbuild row: the esbuild plugin neither // generates nor splits routes, pinned in build-harness.test.ts, so it // could not fail.) test.each(['rspack', 'webpack'] as const)( @@ -61,9 +61,9 @@ export const Route = createFileRoute('/')({ component: Page }) ) // The pin of the control above (`NODE_ENV` unset: the route HMR plugin - // follows `NODE_ENV` at plugin creation, not the bundler's mode; gap CC-P1 - // / routes.md R7) is "rspack/webpack a production react client bundle - // without code splitting has no dev-only code" in + // follows `NODE_ENV` at plugin creation, not the bundler's mode) is + // "rspack/webpack a production react client bundle without code splitting + // has no dev-only code" in // build-production.test.ts and build-production-webpack.test.ts: the same // build (React, automatic code splitting off, the plugin's `addHmr` // default, `NODE_ENV` unset), whose check of the bundlers' hot APIs diff --git a/packages/router-plugin/tests/integration/known-bugs-route-hmr.test.ts b/packages/router-plugin/tests/integration/known-bugs-route-hmr.test.ts index e8646f313d..351c183fad 100644 --- a/packages/router-plugin/tests/integration/known-bugs-route-hmr.test.ts +++ b/packages/router-plugin/tests/integration/known-bugs-route-hmr.test.ts @@ -75,13 +75,12 @@ function Page() { // component: the router renders a new component, so the page loses the // component's local state (signals, refs, form input) on both hosts, and // on Vite the whole document reloads, losing all client state. Rsbuild's - // new text alone does not prove that the live component kept its identity - // (H11). + // new text alone does not prove that the live component kept its identity. // Goal (any fix): with either host and the framework's plugin, the // edit shows without a full reload, and the live route keeps the component // the page rendered. - // Source: decision D10 (Solid/Vue split components keep their identity - // across hot updates, as React's do); gaps H8/H9. + // SPEC J3.2: Solid/Vue split components keep their identity across hot + // updates, as React's do. test.fails.for( (['vite', 'rsbuild'] as const).flatMap((bundler) => (['solid', 'vue'] as const).map((target) => ({ bundler, target })), @@ -154,9 +153,9 @@ function Page() { // in an Rsbuild app without automatic code splitting. // Source: router-plugin src/core/hmr/webpack-adapter.ts:71 (`const hotData // = hot.data ??= {}`); solid-refresh 0.6.3 `$$refreshStandard` (reads - // `hot.data` as the previous run). Found by W2-g; cause located by - // W6-scope (a probe reading `hot.data` without assigning it passes this - // pin, reverted). + // `hot.data` as the previous run). Found in review; cause located by a + // probe (reading `hot.data` without assigning it passes this pin; + // reverted). test.fails( 'rsbuild: an edit of an unsplit Solid route shows its new component in place', async ({ expect, onTestFinished }: TestContext) => { @@ -186,14 +185,14 @@ function Page() { // (route-hmr-browser-plugin.test.ts). // Impact: edits of such a route's component do not show until a reload, // silently. - // Source: NEW (W2-g, found by the real page; the former in-process model + // Source: review (found by the real page; the former in-process model // compared a component whose text did not change between versions). - // Ruling (R-09 / D11, 2026-10-17): same-file route factories are + // SPEC J2.10, J2.8: same-file route factories are // unsupported but user-fixable. Any fix passes: the edit takes effect // without errors, in place, or, when the compiler warns naming the route // file through a real channel (the dev server's logger or console, or the // page), possibly after a reload. A warning never excuses an edit that - // does not show (V1R hmr H08; `expectEditShownOrReportedFallback`). + // does not show (SPEC G10; `expectEditShownOrReportedFallback`). // Silent wrong output fails. test.fails.for(['vite', 'rsbuild'] as const)( '%s: an edit of a route a helper function creates shows its new component, reloading only when the file is reported (autoCodeSplitting: false)', diff --git a/packages/router-plugin/tests/integration/pages/code-splitter-dead-code.test.ts b/packages/router-plugin/tests/integration/pages/code-splitter-dead-code.test.ts index 71038fcacd..052aef8deb 100644 --- a/packages/router-plugin/tests/integration/pages/code-splitter-dead-code.test.ts +++ b/packages/router-plugin/tests/integration/pages/code-splitter-dead-code.test.ts @@ -3,11 +3,11 @@ * moves into a chunk, and that every surviving effect runs once (SPEC * J2.5, J2.12, G1, G3). Each route runs in a real browser page served by a * real Vite dev server with the public router plugin (`route-app.ts`); the - * route's other modules are files of the app, which record what runs. D5 + * route's other modules are files of the app, which record what runs. J2.5 * absence checks read the modules the page loads: a user marker (a decoded * string of the user's code), never declared names, import specifiers or * printed text; what an unused import leaves is judged in a production - * build of the app, after tree-shaking (ruling 2026-10-24). + * build of the app, after tree-shaking (SPEC J2.5, §5.9). */ import { describe, expect, it } from 'vitest' import { expectDiagnostic } from '@tanstack/compiler-test-utils/diagnostics' @@ -204,7 +204,7 @@ return [loaded, await render('component')]`), // eliminates newly unreferenced identifiers", "unexported circular references" // and "SCC with external caller used -> all preserved". Whether unused user // code is kept or dropped is free, and unused code may name a binding its - // module no longer declares (user ruling 2026-10-17, widened: the bundlers + // module no longer declares (SPEC G8: the bundlers // delete it; the validator checks what Rolldown's tree-shaking keeps); // every module stays valid and the split component still reaches its // helper. @@ -226,7 +226,7 @@ export const Route = createFileRoute('/')({ component: () =>

{helper()}

} 'moves mutually recursive helpers only the component uses, and their imports, out of the route module (hmr: $hmr)', async ({ hmr }) => { // The helpers carry user markers (their results are unchanged), so - // that their code is recognised wherever it goes (D5, N10). The + // that their code is recognised wherever it goes (SPEC J2.5). The // markers join values of another module, so no compiler can fold // them away. const route = await loadRoute( @@ -287,7 +287,7 @@ export const Route = createFileRoute('/')({ ) // What loads with the route in a production build no longer holds the // code that reads `used` (whether it keeps loading `bar`, or an import - // specifier tree-shaking drops, is free: ruling 2026-10-24). + // specifier tree-shaking drops, is free: SPEC §5.9). expect((await route.production()).locate('MARK_APPLES').eager).toEqual([]) }) @@ -447,7 +447,7 @@ export const registerAnalytics = (path: string) => registered.push(path) // Type arguments name types only: TypeScript erases them, so a type, its // parameters and the values a `typeof` there names are no reads of module -// bindings. Source: #8504 (shared-bindings helper tests; lost case L6). +// bindings. Source: #8504 (shared-bindings helper tests). it.each([ { name: 'a function type', type: '(value: Item) => void' }, { name: 'a constructor type', type: 'new (value: Item) => object' }, @@ -538,7 +538,7 @@ export const Route = createFileRoute('/')({ // An unused function that renders the split component stays as written, or // goes, without keeping the component's imports in the route module. // Other shapes are pinned in known-bugs-code-splitter.test.ts ("page code - // left in the route module"). Source: #8504 (corpus-diff, Jp-K/DmCompanionAi + // left in the route module"). Source: #8504 (real apps: Jp-K/DmCompanionAi // frontend_old/src/routes/_layout/chat.tsx). it('moves the split component and its imports into its chunk when an unused function renders it', async () => { const route = await loadRoute( @@ -657,7 +657,7 @@ export const Route = createFileRoute('/')({ // Nothing that loads with the route requests what only the component // reads; in a production build, nothing the component loads holds the // code only the loader runs (an import specifier tree-shaking drops - // is free: ruling 2026-10-24). + // is free: SPEC §5.9). expect( await route.run( `return performance.getEntriesByType('resource').map((entry) => new URL(entry.name).pathname)`, @@ -685,7 +685,7 @@ export const Route = createFileRoute('/')({ // declarations sharing an export statement"; Next.js // ssg/getStaticProps/should-remove-re-exported-variable-declarations-safe // The declarators carry user markers, so that each one's code is - // recognised wherever it goes (D5, N10). The markers are part of what the + // recognised wherever it goes (SPEC J2.5). The markers are part of what the // route shows and returns, so no compiler can fold them away. it.each([ { @@ -732,7 +732,7 @@ export const Route = createFileRoute('/')({ await route.run(`return [options.loader(), await render('component')]`), ).toEqual(['MARK_MAIN main', '
chunk
']) // In a production build too, after tree-shaking (what each module - // imports from './messages' is free: ruling 2026-10-24) + // imports from './messages' is free: SPEC §5.9) const built = await route.production() expect({ page: built.locate('MARK_PAGE').eager, diff --git a/packages/router-plugin/tests/integration/pages/code-splitter-determinism.test.ts b/packages/router-plugin/tests/integration/pages/code-splitter-determinism.test.ts index 44d972b859..29a893931a 100644 --- a/packages/router-plugin/tests/integration/pages/code-splitter-determinism.test.ts +++ b/packages/router-plugin/tests/integration/pages/code-splitter-determinism.test.ts @@ -5,7 +5,7 @@ * determinism`). Each root is a real app directory served by its own dev * server (`./route-app`), observed in a real browser page. The slow tier * builds the same app in two directories. Windows module ids are platform - * evidence for a Windows run (N24). + * evidence for a Windows run. */ import path from 'node:path' import { describe, expect, test } from 'vitest' diff --git a/packages/router-plugin/tests/integration/pages/code-splitter-imports-exports.test.ts b/packages/router-plugin/tests/integration/pages/code-splitter-imports-exports.test.ts index dc2ab3f493..6685b3745e 100644 --- a/packages/router-plugin/tests/integration/pages/code-splitter-imports-exports.test.ts +++ b/packages/router-plugin/tests/integration/pages/code-splitter-imports-exports.test.ts @@ -3,7 +3,7 @@ * (`route-app.ts`: the public router plugin in a real Vite dev server, the * route run in a page of the test process's browser). What each module imports is * judged by what loads and works (requests, rendered output, the instances - * other modules of the app import), and by D5 checks of user code absent + * other modules of the app import), and by J2.5 checks of user code absent * from a module (decoded user markers), never by the spelling of import * statements. The attribute of an import moved into a chunk is judged by a * bundler that honours it: integration/code-splitter-import-attributes.test.ts. @@ -95,9 +95,9 @@ export const namespaced = 'namespaced' }, ) // Nothing that loads with the route module (the route module and the - // modules it imports statically, V1 split F30) holds what only the split + // modules it imports statically) holds what only the split // components read, and no split chunk holds what only the loader reads - // (D5: the user code, found by its markers). + // (SPEC J2.5: the user code, found by its markers). const eager = await route.eagerModules() for (const marker of [ 'MARK_COMPONENT', @@ -262,7 +262,7 @@ export const Route = createFileRoute('/')({ }) // Import assertions (`assert { type: 'json' }`) are the deprecated form of - // import attributes (decision D9, J2.17). Here: the route keeps working + // import attributes (SPEC J2.17). Here: the route keeps working // and the JSON module moves with the component. That the attribute keeps // its meaning in the chunk: integration/code-splitter-import-attributes.test.ts. it('keeps an import assertion of a route file working', async () => { @@ -348,7 +348,7 @@ function Page() { { files: { 'foo.ts': `export const Foo = () => 'foo'\n`, - // Another module of the app imports the re-export (ruling P1) + // Another module of the app imports the re-export (SPEC G9, J2.4) 'importer.ts': `export { ${exported} } from './route'\n`, }, }, @@ -706,7 +706,7 @@ export const Route = createFileRoute('/')({ ) // The chunk of a split option holds only what that option needs: an - // exported component of another option is not copied into it (D5: its + // exported component of another option is not copied into it (J2.5: its // code, found by its marker). it.each([ { @@ -918,7 +918,6 @@ export const Route = createFileRoute('/')({ // Impact: with `verbatimModuleSyntax` (Vite reads it from tsconfig) the // client build fails ([MISSING_EXPORT] "readVersion" is not exported by // "routes/index.tsx?tsr-shared=1"); in dev the route module fails to load. - // NEW (infra-fix H3, 2026-10-18). it.fails( 'reads an ambient var merged with an interface from the environment in a shared declaration, with verbatimModuleSyntax', async () => { diff --git a/packages/router-plugin/tests/integration/pages/code-splitter-module-state-bindings.test.ts b/packages/router-plugin/tests/integration/pages/code-splitter-module-state-bindings.test.ts index 75edfd7def..38d7f777d8 100644 --- a/packages/router-plugin/tests/integration/pages/code-splitter-module-state-bindings.test.ts +++ b/packages/router-plugin/tests/integration/pages/code-splitter-module-state-bindings.test.ts @@ -21,7 +21,7 @@ type CodeSplitGroupings = NonNullable // what loads with the route module but in what loading the component loads, // and a binding only the loader reads is not in what loading the component // loads (when the two are not grouped) but in what loads with the route -// module or the loader (D5: the user's own code, told by a string marker in +// module or the loader (SPEC J2.5: the user's own code, told by a string marker in // its body or initializer, whatever the compiler names or prints). A route // whose readers do not include the component gets one reading no binding, // so that what loading it loads can be checked, except next to a class (a diff --git a/packages/router-plugin/tests/integration/pages/code-splitter-module-state.test.ts b/packages/router-plugin/tests/integration/pages/code-splitter-module-state.test.ts index e069d2812d..a7c84b9af7 100644 --- a/packages/router-plugin/tests/integration/pages/code-splitter-module-state.test.ts +++ b/packages/router-plugin/tests/integration/pages/code-splitter-module-state.test.ts @@ -132,7 +132,7 @@ export const Route = createFileRoute('/')({ // TypeScript erases type positions, so a declaration the split component // only reads in a type is created once, by the route module. (Next to a // type alias that reads it: pinned in known-bugs-code-splitter.test.ts.) - // Source: #8504 (corpus-diff, forms that cast `as z.infer` + // Source: #8504 (real apps: forms that cast `as z.infer` // in the split component). it('creates a declaration the split component only reads in a type once', async () => { const route = await loadRoute( @@ -223,7 +223,7 @@ return { // Initializers whose side effects hide in their syntax, read by the loader // and the split component: each runs once and both options read the one // value (when it runs is free). Source: #8504 -// (shared-bindings-helpers.test.ts; lost case L8). +// (shared-bindings-helpers.test.ts). describe('a shared initializer with side effects', () => { it.each([ { @@ -612,8 +612,8 @@ const value = { read() { return config }, }`, }, - // The private method is the only code reading `config` (V4 round 2, - // red-astra-r2/04: a compiler ignoring private method bodies). + // The private method is the only code reading `config` (found by + // mutation testing: a compiler ignoring private method bodies). { name: 'a private method, the only reader of the binding', declarations: `const config = init({ name: 'config' }) @@ -868,7 +868,7 @@ export const see = (store) => store.label }, ) // Whether the route module creates it is free; loading the - // notFoundComponent chunk does not (it holds only what it needs, D5). + // notFoundComponent chunk does not (it holds only what it needs, SPEC J2.5). expect( await route.run(`// Until the page requests the module, nothing has created the store const inits = async () => @@ -916,7 +916,7 @@ export const Route = createFileRoute('/')({ // component: the call runs when the chunk loads, after `Page` is // initialized (SPEC G3: ordering dependencies kept; J2.6: the chunk loads // and renders). A `function Page() {}` declaration is hoisted and would hide -// a wrapper evaluated above it (V4 round 2, red-fable-r2/06). +// a wrapper evaluated above it (found by mutation testing). describe('a split component wrapped in a call of a const component', () => { it.each([ { diff --git a/packages/router-plugin/tests/integration/pages/code-splitter-plugin-pipeline-routes.test.ts b/packages/router-plugin/tests/integration/pages/code-splitter-plugin-pipeline-routes.test.ts index 924db7e150..c4bc46c05f 100644 --- a/packages/router-plugin/tests/integration/pages/code-splitter-plugin-pipeline-routes.test.ts +++ b/packages/router-plugin/tests/integration/pages/code-splitter-plugin-pipeline-routes.test.ts @@ -293,7 +293,7 @@ return { ) }) -// The most common root route (1,891 corpus files, V2-30): `createRootRoute()` +// The most common root route (1,891 files of real apps): `createRootRoute()` // without options. Through the plugin it stays a valid module that // evaluates, and the real router renders its child through the default // `Outlet` (SPEC J2.1, J2.7). @@ -387,7 +387,7 @@ export const Route = createFileRoute('/hmr')({ }, ) - // Source: corpus-diff, tinloof/tanstack-wsr src/types.ts (an empty type + // Source: real apps: tinloof/tanstack-wsr src/types.ts (an empty type // import fixes TypeScript's "inferred type cannot be named" error); #8504 // (a guard against a printer bug, yuku-toolchain/yuku#258). it.each(['solid', 'vue'] as const)( @@ -412,13 +412,12 @@ export const Route = createFileRoute('/hmr')({ }) // A route the route file creates inside a function of the same file (a -// helper, an IIFE) is unsupported but user-fixable (user ruling 2026-10-17, -// decision D11): it is either split like a module-scope route (and +// helper, an IIFE) is unsupported but user-fixable (SPEC J2.10, +// J2.8): it is either split like a module-scope route (and // hot-updates in place), or left unsplit with a warning naming the file, in // production as in development. Either way it renders correctly; silent // wrong output, or unsplit without a warning, fails. -// Sources: #8504 (code-splitter-plugin-pipeline.test.ts); the #8504 -// confidence campaign (route-factory cases 1-3 and 5, dev-hmr D1/D2). +// Sources: #8504 (code-splitter-plugin-pipeline.test.ts); review of #8504. describe('a route created inside a function', () => { /** * Whether a warning on any channel names the route file (absolute or @@ -517,8 +516,7 @@ export const Route = (() => // component makes the chunk render the module-level one. Leaving such // options unsplit with a warning naming the file is a valid fix (the // pattern is unsupported but user-fixable); unsplit and silent is not. - // Source: the #8504 confidence campaign (route-factory cases 4, 5 with a - // split loader, 6, 6b and 6c; F-21). + // Source: review of #8504. // Impact: the route throws when it renders or loads, or silently renders // the wrong component. it.fails.each([ @@ -626,7 +624,7 @@ export const Route = createFileRoute('/made')({ component: () =>

made

}) }) // A route the splitter does not split is reported, once per file - // (decision D11: the user can change the pattern), across the edits of + // (SPEC J2.8: the user can change the pattern), across the edits of // the files of one dev server. it.each(Object.entries(factoryRoutes).slice(0, 2))( 'built in %s is split, or reported once per file across repeated transforms', diff --git a/packages/router-plugin/tests/integration/pages/code-splitter-route-options-state.test.ts b/packages/router-plugin/tests/integration/pages/code-splitter-route-options-state.test.ts index 24e675c8a3..f4251da199 100644 --- a/packages/router-plugin/tests/integration/pages/code-splitter-route-options-state.test.ts +++ b/packages/router-plugin/tests/integration/pages/code-splitter-route-options-state.test.ts @@ -253,7 +253,7 @@ export const Route = createFileRoute('/posts')({ `, { routeId: '/posts' }, ) - // D5: the split component's modules hold neither `fetchPosts` nor + // SPEC J2.5: the split component's modules hold neither `fetchPosts` nor // `prefix` (their user markers). const chunk = await route.loadedBy('component') expect( @@ -431,8 +431,8 @@ return [html, registered.length, registered[0] === Route]`), // moves: here React Compiler's opt-out of a component. Shape of the // deleted code-splitter snapshot fixture random-number. Name- and // form-independent: every function of the route's modules whose own body - // renders the chart starts with the directive (SPEC N12: not one - // FunctionDeclaration named Chart). + // renders the chart starts with the directive (SPEC G12; names are free, + // §5.1: not one FunctionDeclaration named Chart). it("keeps a 'use no memo' directive in the body of a component that moves into a chunk", async () => { const route = await loadRoute(`${head}function Chart() { 'use no memo' diff --git a/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-bindings.test.ts b/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-bindings.test.ts index 0269549929..ba2970b33a 100644 --- a/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-bindings.test.ts +++ b/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-bindings.test.ts @@ -93,7 +93,6 @@ describe('module state next to bindings that read Route', () => { // (`removeBindingsDependingOnRoute`), and a destructuring is never split // across modules, so a `Map` declared next to a binding that reads `Route` // is created by the route module and again by the chunk that reads it. - // Source: gap S19. // Impact: the loader and the component use two different caches. test.fails( 'a destructuring whose sibling reads Route keeps one cache for the loader and the component', @@ -251,7 +250,7 @@ export const Route = createFileRoute('/')({ })`, }, { - // Source: #8504 (mutation testing P-03). + // Source: #8504 (mutation testing). name: 'a pragma written with two spaces', code: `/** @jsxRuntime classic */ /** @jsx jsx */ @@ -287,7 +286,7 @@ export const createJsx = () => { // and keeping it in the chunk without sharing it creates it again there. // Impact: the split component throws "jsx is not defined", or the route // module and the chunk each create their own factory. - // Source of the `@jsx` only row: the #8504 probe (R-13; a project whose + // Source of the `@jsx` only row: #8504 (a project whose // JSX runtime is classic: `@vitejs/plugin-react` with `jsxRuntime: // 'classic'`). test.fails.each([ @@ -360,7 +359,7 @@ export default Page`, binding: 'Page', }, { - // Source: #8504 (lost case L4). + // Source: #8504. name: 'a function exported as default by specifier', declaration: `function Page() { return

page

@@ -396,12 +395,12 @@ export const Route = createFileRoute('/')({ ${options}component: ${binding} }) // two functions: a binding that reads `Route` is never shared // (`removeBindingsDependingOnRoute`), so the chunk declares a copy of the // exported function. Importers of the route module and the route must - // share one instance (user ruling 2026-10-17, P1): a copy in the chunk is - // this bug even when the function holds no state. Source: gap S19. + // share one instance (SPEC G9, J2.4): a copy in the chunk is + // this bug even when the function holds no state. // Impact: code that relies on the identity of an exported hook or helper // (memoisation, registries, `===` checks) sees two of them. // (The title lives in `staticData`, typed by the documented - // `StaticDataRouteOption` augmentation; V1 split F28.) + // `StaticDataRouteOption` augmentation.) test.fails( 'an exported function that reads Route is the one the split component calls', async () => { @@ -454,7 +453,7 @@ return { // Bug: a split component that reads a `Route` declared with `const` and // exported later (`export { Route }`) gets a chunk that creates the route // again instead of importing it from the route module. - // Source: corpus-diff, route files that end with `export { Route }` + // Source: real apps: route files that end with `export { Route }` // (rahulroy0322/RacketHub, mchar7/nohiki-monorepo); #8504 // (code-splitter-route-options.test.ts), where it passes. // Impact: the split component reads a second route object, which the @@ -625,8 +624,8 @@ return [await options.loader(), load()]`), /** * Loads a route whose errorComponent option is the exported * `PostErrorComponent`, written as `value`, next to another module of the - * app that imports `PostErrorComponent` from the route file (ruling P1: - * through a real importer). `withAuth` (`./with-auth`) is an identity + * app that imports `PostErrorComponent` from the route file (SPEC G9, + * J2.4: through a real importer). `withAuth` (`./with-auth`) is an identity * function. The component records the instance it runs as (`./see`). * Returns what the route's errorComponent renders, whether it ran as the * importer's instance, and whether the option is split or the user is told @@ -693,7 +692,7 @@ return { rendered, sameInstance: seen.length === 1 && seen[0] === imported }`) // the exported component, so the route renders another instance than the // one other modules import (and no "not code-split" warning is shown). // Either outcome of the bare identifier (one instance, split or unsplit - // with a warning) is fine (ruling P1, decision D11). + // with a warning) is fine (SPEC G9, J2.4, J2.8). // Reach: the repository's examples (react and solid // basic-virtual-file-based posts-detail.tsx) and e2e apps (react, solid // and vue basic-file-based-code-splitting, virtual and rspack-virtual @@ -701,8 +700,7 @@ return { rendered, sameInstance: seen.length === 1 && seen[0] === imported }`) // PostErrorComponent as any`; no other module imports it there, so they // show no symptom. // Source: compilers.ts:945-960 (the export check only handles a bare - // Identifier), :572-591, the copy via :1170-1242; fuzzing (oracle mode, - // round 2, F1). + // Identifier), :572-591, the copy via :1170-1242; fuzzing. // Impact: code that relies on the identity of the component (`===` // checks, registries, memoised props) sees two of them, and the component // code ships twice (see the build pin below). @@ -727,10 +725,10 @@ describe('TypeScript-only syntax', () => { // Bug: the code splitter rejects an ES decorator after `export` (`export // @dec class`, valid since TypeScript 5.0): "Decorators must be placed // before the export keyword". - // A real bug (ruling NEW-1): the syntax is valid TypeScript. The pin reads + // A real bug (SPEC §2.1, G1): the syntax is valid TypeScript. The pin reads // the compiled module without running the page (whether a browser runs // the decorator syntax is not the compiler's). - // Source: round-3 mutation testing (router-utils P6). + // Source: mutation testing. // Impact: a route file with such a class cannot be built once code // splitting is on. test.fails('a decorator after `export` compiles', async () => { @@ -767,8 +765,8 @@ export const Route = createFileRoute('/')({ component: () =>
}) // Bug: the code splitter cannot parse a constructor parameter decorator // (TypeScript `experimentalDecorators`, as dependency injection libraries - // use them) and fails the build. Source: the #8504 confidence campaign - // (F-22), where #8504 compiles it. + // use them) and fails the build. Source: review of #8504, which compiles + // it. // Impact: a route file with such a class cannot be built once code // splitting is on. test.fails( @@ -942,7 +940,7 @@ export const Route = createFileRoute('/')({ component: Page }) // workaround here; router-utils/src/ast.ts:72 `generateFromAst` prints // with it). The Start compiler has the same bug (pin in // start-plugin-core/tests/start-compiler-preserves-user-code.test.ts). - // Source: fuzzing (oracle mode, round 2). + // Source: fuzzing. // Impact: the split component's chunk fails to compile, so the build // fails. test.fails( diff --git a/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-server.test.ts b/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-server.test.ts index dbaf5df1e4..44aec0571a 100644 --- a/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-server.test.ts +++ b/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-server.test.ts @@ -88,9 +88,9 @@ return [rendered, await renderComponent(${read})]`) // route module (`removeIdentifierLiteral`), even when other code there // still reads it. Only `export function`/`export const` declarations are // checked, so export lists, aliases and exports that use the binding lose - // it. Source: #8505 (`export { component as View }`), gap O7. + // it. Source: #8505 (`export { component as View }`). // A fix may also leave `Page` unsplit, but must then tell the user, in - // production builds too (decision D11): unsplit and silent is still this + // production builds too (SPEC J2.8, G5): unsplit and silent is still this // bug. // Impact: the route module throws when it loads ("Page is not defined", // "Export 'Page' is not defined"), so the route never renders. @@ -122,7 +122,7 @@ return [rendered, await renderComponent(${read})]`) imported: 'View', }, { - // Source: #8504 (lost case L4). + // Source: #8504. name: 'a default export by specifier', exports: 'export { Page as default }', imported: 'default', @@ -209,7 +209,7 @@ return [loaded, rendered, { ...(await app('subscribe.ts')).runs }]`), ) // Bug: same root cause as above, for an unsplit option that names the - // split component. Source: corpus-diff, bex-co/bex + // split component. Source: real apps: bex-co/bex // src/routes/databases.$databaseId.tsx (`component: Page, // pendingComponent: Page`); #8504 (code-splitter-route-options.test.ts), // where it passes. @@ -238,8 +238,8 @@ function Page() { // split component (which reads `Route`, so it moves to its chunk) with // `typeof`. Reading an undeclared name with `typeof` does not throw, so // the route module loads and the option silently sees `'undefined'`. - // Source: fuzzing (oracle mode, round 2: `beforeLoad` and `loaderDeps` - // readers of components of the repository's e2e routes). + // Source: fuzzing (`beforeLoad` and `loaderDeps` readers of components of + // the repository's e2e routes). // Impact: code that checks the component (`typeof Page === 'function'`) // takes the wrong branch on every navigation, with no error. test.fails( @@ -326,7 +326,7 @@ export const Route = createFileRoute('/posts')({ // the pins above, which cover bindings declared in the route file. // Source: compilers.ts:571-593 (`removeIdentifierLiteral`), :1555-1593 // (the binding is removed), :768-777 (the emptied import is dropped); - // fuzzing (oracle mode, N1). + // fuzzing. // Impact: the route throws "PostsPage is not defined" where the other code // runs (head() on every navigation, an importer's render). test.fails( @@ -356,8 +356,8 @@ export const Route = createFileRoute('/posts')({ ) // Bug: same root cause as above, for an exported component that renders - // the imported split one, used by another module of the app (ruling P1: - // through a real importer, not the export list). Adapted from the + // the imported split one, used by another module of the app (SPEC G9, + // J2.4, J4.13: through a real importer, not the export list). Adapted from the // repository's // examples/solid/start-supabase-basic/src/routes/_authed/posts.$postId.tsx // (written for React here; the code splitter handles the import the same @@ -450,7 +450,7 @@ export const Route = createFileRoute('/')({ component: Page }) // Bug: a route option that names a class cannot be split: the virtual // compiler throws "Unexpected splitNode type ☝️: ClassDeclaration". // A class only the route option reads must be split like a function - // component (our limitation otherwise, decision D11). A fix may leave an + // component (our limitation otherwise, SPEC J2.8). A fix may leave an // exported class unsplit, but must then tell the user, in production // builds too. // JavaScript route files: the route types of React accept function @@ -554,7 +554,7 @@ export const Route = createFileRoute('/')({ component: Page }) // Bug: when the split component is imported (`import { Page } from // './Page'`), the code splitter also removes every bare import of that path // from the route module (`removableImportPaths`), including the user's own - // `import './Page'`. Source: gap O2. + // `import './Page'`. // Impact: what that module does when it loads (registrations, styles, // polyfills) is deferred until the component chunk loads. test.fails( @@ -719,8 +719,8 @@ ${serverOptions} // Bug: `deleteNodes` only removes route options written as `key: value` // (`ObjectProperty`); a method (`ssr() {}`, `async ssr() {}`, - // `headers() {}`) is kept, with the imports it uses. Source: gap D11/S26 - // (docs `selective-ssr.md` promise `ssr` is stripped). + // `headers() {}`) is kept, with the imports it uses. Source: docs + // (`selective-ssr.md` promise `ssr` is stripped). // Impact: Start's client bundle ships the route's `ssr`/`headers` code and // its server-only imports. test.fails.each([ @@ -743,7 +743,7 @@ export const Route = createFileRoute('/')({ // route options (a spread, a computed key, options built by a call) are // kept, with their imports, and nothing reports it. Removing them is best // effort; refusing the route with an error naming the route file and the - // option is a valid fix too. Source: gap D11. + // option is a valid fix too (SPEC J2.8). // Impact: Start's client bundle silently ships server handlers and their // server-only imports. test.fails.each([ @@ -811,9 +811,8 @@ export const Route = createFileRoute('/')( // server-only options and their imports on the client. Unlike opaque // options above, these must be removed: the options are written in the // file, so refusing the route is not an option. - // Source: the #8504 confidence campaign (suspects SU-4/8; 4 corpus files - // in 3 repositories cast their options, `as never` or `as any`, when the - // handlers' types do not fit); V1 split F35. + // Source: review of #8504 (4 files in 3 repositories of real apps cast their + // options, `as never` or `as any`, when the handlers' types do not fit). // Impact: Start's client bundle ships server handlers and their // server-only imports (build-level canary in // integration/known-bugs-code-splitter-client-output.test.ts). @@ -842,7 +841,7 @@ describe('look-alike route factories', () => { // another package (a namespace member call) is left alone // (code-splitter-plugin-pipeline.test.ts). // Source: found while replacing the spelling-only look-alike controls of - // code-splitter-plugin-pipeline.test.ts (V1R split S13, W4-split). + // code-splitter-plugin-pipeline.test.ts. // Impact: a route file whose own code uses a helper named // `createFileRoute` (a widget registry, a test fixture builder) fails to // load once code splitting is on. diff --git a/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-shapes.test.ts b/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-shapes.test.ts index 30509cb59b..46c0e59f25 100644 --- a/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-shapes.test.ts +++ b/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter-shapes.test.ts @@ -27,7 +27,7 @@ import type { Plugin } from 'vite' * The modules of the app the served module `code` depends on (static * imports, re-exports and dynamic imports), as the requests the dev server * resolved them to (`/lib.ts`): an independent parse of what the page - * receives, for D5 checks that a split chunk does not depend on a module of + * receives, for SPEC J2.5 checks that a split chunk does not depend on a module of * the app that its option does not use (SPEC J2.5). */ function dependencies(code: string) { @@ -72,8 +72,8 @@ describe('route options written in other shapes', () => { // `satisfies` cannot be split: the virtual compiler throws // "Unexpected splitNode type ☝️: TSSatisfiesExpression". These are our // limitations, so the goal is a split - // component (decision D11). - // Sources: corpus-diff, openalgon-alt/agri-prep-path + // component (SPEC J2.8). + // Sources: real apps: openalgon-alt/agri-prep-path // src/routes/admin/access.tsx (`createFileRoute('/admin/access')({ … } as // any)`); differential fuzzing (casts around the route factory call); // React Router route-chunks-test.ts "chunkable" detection of export @@ -130,8 +130,8 @@ export const Route = ${route} // splits makes the build throw "Unexpected splitNode type ☝️: // MemberExpression" (LogicalExpression, TaggedTemplateExpression, // ClassExpression). These are our limitations, so the goal is a split - // option (decision D11). - // Source: round-3 mutation testing (compilers-B, bug B). + // option (SPEC J2.8). + // Source: mutation testing. // Impact: a route whose component is a namespace member (`Pages.Home`), a // fallback (`A ?? B`), a styled-components tagged template or a class // cannot be built once code splitting is on. @@ -235,8 +235,8 @@ export const Route = createFileRoute('/')({ // Source: compilers.ts:1081-1082 (`babel.parse(outputSplitNodeCode)`). // Sources: differential fuzzing; dev servers of the e2e apps, where the // `?tsr-split=component` module failed with HTTP 500; #8504 - // (code-splitter-jsx.test.ts), where the JSX rows pass; fuzzing (oracle - // mode, V3) for the TypeScript rows. + // (code-splitter-jsx.test.ts), where the JSX rows pass; fuzzing for the + // TypeScript rows. // Impact: the route cannot be built once code splitting is on, or renders // a value that is not its component. test.fails.each<{ @@ -314,7 +314,7 @@ describe('route factories written in other shapes', () => { // Bug: the code splitter only recognises `createFileRoute` under its own // name, so a route whose factory is imported under an alias is not split, // and nothing says so. Our limitation, so the goal is a split component - // (decision D11). Source: the #8504 confidence campaign (K-21b, DX-02). + // (SPEC J2.8). Source: review of #8504. // Impact: the route's components load with the entry chunk, silently. test.fails( 'a component is split when createFileRoute is imported under an alias', @@ -334,8 +334,8 @@ function Page() { // Bug: the code splitter only compiles files whose code matches // `createFileRoute(`, so a route whose factory call has a type argument // (`createFileRoute<'/'>('/')`) is left as is, and nothing says so. Our - // limitation, so the goal is a split component (decision D11). - // Source: round-3 mutation testing (splitter-hosts X1). + // limitation, so the goal is a split component (SPEC J2.8). + // Source: mutation testing. // Impact: the route's components load with the entry chunk, silently. test.fails( 'a component is split when createFileRoute has a type argument', @@ -353,7 +353,7 @@ export const Route = createFileRoute<'/'>('/')({ component: Page }) // Bug: route options returned by a call (`createFileRoute('/')( // makeOptions())`) are neither split nor reported. The user can write the // options inline, so a warning naming the file is an acceptable outcome - // (decision D11). Source: the #8504 confidence campaign (DX-02, RF-8). + // (SPEC J2.8). Source: review of #8504. // Impact: the route's components load with the entry chunk, silently. test.fails( 'route options returned by a call are split or reported', @@ -376,8 +376,8 @@ export const Route = createFileRoute('/')(makeOptions()) // split options into the same chunk names, so one route renders the // other's component, silently. Supporting it, or refusing it with an error // or a warning naming the file, are both valid fixes. - // Source: the #8504 confidence campaign (corpus-diff K-01; the #8630 pin - // was dropped without a ruling). + // Source: review of #8504 (the pin of #8630 was + // dropped without a decision). // Impact: a route renders another route's component. test.fails( 'each of two file routes of one module renders its own component, or the module is reported', @@ -427,14 +427,14 @@ describe('what split chunks hold', () => { // imports they use, whether its option reads them or not // (`compilers.ts`, the virtual compiler keeps exported declarations). // Bundlers cannot drop them: the chunk is imported with `import()` and read - // through a computed key. Source: decision D5. + // through a computed key (SPEC J2.5). // Impact: every split chunk of the route downloads and evaluates the route // file's exported helpers and their dependencies again. test.fails( 'a split chunk holds only what its option needs, not the other exports of the route file', async () => { // Each exported declaration carries a marker its code keeps under any - // name a compiler gives it (SPEC J2.5 D5: identified independently of + // name a compiler gives it (SPEC J2.5: identified independently of // names) const route = await loadRoute( `${head}import { heavy } from './heavy' @@ -481,7 +481,7 @@ export const Route = createFileRoute('/')({ component: Page }) 'split chunks do not re-export or declare the re-exports and default class of the route file', async () => { // The class carries a marker its code keeps under any name a - // compiler gives the class (SPEC J2.5 D5: identified independently + // compiler gives the class (SPEC J2.5: identified independently // of generated names). const marker = 'default-class-marker-7f3a' const route = await loadRoute( @@ -577,9 +577,9 @@ return { rendered, untouched, libraryLoadsEagerly }`) } // Bug: the route module keeps importing the classic JSX factory its pragma - // names after the JSX that compiles to it moved to a split chunk (D5 - // family). Source: #8504 (code-splitter-pragmas.test.ts; mutation testing - // P-03), where it passes. + // names after the JSX that compiles to it moved to a split chunk (SPEC + // J2.5). Source: #8504 (code-splitter-pragmas.test.ts; mutation testing), + // where it passes. // Impact: the entry chunk loads the JSX library for nothing. // The factory is the real one (`@emotion/react`'s `jsx`), rendered by the // real React: the split component renders as the untouched file renders @@ -619,8 +619,8 @@ ${head}export const Route = createFileRoute('/')({ // The `@jsxFrag` row of the pin above, without its import check: a chunk // that keeps an unused `Fragment` specifier on the import of `react` it - // needs anyway pulls in no unrelated dependency (SYNTHESIS N10: an unused - // specifier is free, §5.9), so what remains to check is that the split + // needs anyway pulls in no unrelated dependency (an unused specifier is + // free, SPEC §5.9), so what remains to check is that the split // component renders as the untouched file renders it, with `@jsx` and // `@jsxFrag` pragmas naming React's real factories. test('a split component of a file with @jsx and @jsxFrag pragmas renders as the untouched file', async () => { @@ -727,7 +727,7 @@ return { // Bug: the code splitter declares fixed names in the modules it emits // (`SplitComponent`, `SplitLoader`) without checking that the route file - // does not use them. Source: gap S38. + // does not use them. // Impact: a route file with such a binding cannot be built ("Duplicate // declaration") or its options read the generated value instead of the // user's. @@ -812,7 +812,7 @@ return { // compile, through the same framework transform), does not declare, given // to bindings of the route file, keep their values in every split option. // Names of Vite's own import rewriting (`__vite__`) are the tool's. - // Source: gap S38, R3 (generated names) of the coupling audit. + // Generated names: SPEC G9, §5.1. // Impact: a route file whose binding has a name the compiler introduces // cannot be built, or its options read the generated value. test.fails( diff --git a/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter.test.ts b/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter.test.ts index 083cc1fd68..62e9ebd4ae 100644 --- a/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter.test.ts +++ b/packages/router-plugin/tests/integration/pages/known-bugs-code-splitter.test.ts @@ -17,7 +17,7 @@ import { head, holdsMarker, loadRoute } from '../../route-app' * The modules of the app the served module `code` depends on (static * imports, re-exports and dynamic imports), as the requests the dev server * resolved them to (`/lib.ts`): an independent parse of what the page - * receives, for D5 checks that a split chunk does not depend on a module of + * receives, for SPEC J2.5 checks that a split chunk does not depend on a module of * the app that its option does not use (SPEC J2.5). */ function dependencies(code: string) { @@ -138,8 +138,8 @@ const read = () => Value.One`, declaration: `namespace Value { export const one = init(1) } const read = () => Value.one`, }, - // Source: the #8504 confidence campaign (mutation testing MHR2/MHR3: a - // direct read takes another path than a read through a helper). + // Source: mutation testing of #8504 (a direct read takes another path + // than a read through a helper). { name: 'an enum, read directly', declaration: `enum Value { One = init(1) }`, @@ -346,7 +346,7 @@ register(items)`, // erases it), but the reference module keeps the declaration for it. { name: 'a type alias that reads it', - // Source: corpus-diff, route files that derive a type with + // Source: real apps: route files that derive a type with // `type FormValues = z.infer` declaration: `const value = init(1) type Value = typeof value`, @@ -457,7 +457,7 @@ return [rendered, callsBeforeChunks, effects.calls]`), // A reference cycle that nothing else reads keeps its own references, so a // fix that drops only declarations nothing references still copies it. // Source: router-utils/src/compiler-helpers.ts:884-901 (called from - // compilers.ts:1278); the call rows: fuzzing (oracle mode, N2), e.g. + // compilers.ts:1278); the call rows: fuzzing, e.g. // `const parts = [BarController, BarElement]; Chart.register(...parts)`. // Impact: side effects run again for every chunk that loads, even a chunk // holding only the errorComponent (duplicated subscriptions, logging, @@ -492,8 +492,7 @@ const b = () => a`, Value = track(), }`, }, - // Types read no value at runtime. Source: the #8504 confidence campaign - // (corpus-diff K-08 and K-21a). + // Types read no value at runtime. Source: review of #8504 (real apps). { name: 'an unused subscription only a type alias reads', effect: `const unsubscribe = subscribe(() => {}) @@ -564,7 +563,7 @@ export const Route = createFileRoute('/')({ files: { 'lib.ts': `export const x = 1\n`, // Another module of the app imports a name the route file - // re-exports (ruling P1: through a real importer) + // re-exports (SPEC G9, J2.4: through a real importer) 'importer.ts': `import { x } from './route'\nexport const v = x\n`, }, }, @@ -579,7 +578,7 @@ export const Route = createFileRoute('/')({ expect({ reExported, rendered, - // What loading the component requests depends on `./lib` (D5: an + // What loading the component requests depends on `./lib` (SPEC J2.5: an // unrelated module of the app, by the request it resolves to) componentRequestsLib: (await route.loadedBy('component')).some((code) => dependencies(code).includes('/lib.ts'), @@ -663,7 +662,7 @@ export const Route = createFileRoute('/')({ // Bug: same as the type alias row above, in a route module compiled by the // route HMR plugin (automatic code splitting off), which runs the same - // reference compiler. Source: the #8504 confidence campaign (F-06). + // reference compiler. Source: review of #8504. // Impact: as above, in development without automatic code splitting. test.fails( 'the initializer of a declaration only an exported type alias reads runs when a route module compiled for HMR loads', @@ -715,7 +714,7 @@ describe('page code left in the route module', () => { // Sources: tanstack.com src/routes/index.tsx (`type PrincipleProof` next to // `function PrincipleProof`); babel-dead-code-elimination // dead-code-elimination.test.ts "function" > "declaration" and "variable" > - // "identifier"; corpus-diff, Jp-K/DmCompanionAi + // "identifier"; real apps: Jp-K/DmCompanionAi // frontend_old/src/routes/_layout/chat.tsx; #8504 // (code-splitter-dead-code.test.ts), where they pass. // Impact: the page's code and dependencies load with the entry chunk. @@ -796,8 +795,8 @@ ${code} describe('split route options', () => { // Bug: once the object form compiles (pins above), its handler must also // end up split: a loader configured to be split that stays in the route - // module is our limitation, not a pattern the user can change (decision - // D11). Only the handler can move; the router reads the other keys + // module is our limitation, not a pattern the user can change (SPEC + // J2.8). Only the handler can move; the router reads the other keys // (`staleReloadMode`) from the route options. Today the compiler throws // first (same root cause as above). A compiler that builds these routes // but keeps a method handler, or a handler next to a spread, in the route diff --git a/packages/router-plugin/tests/integration/route-hmr-browser-frameworks.test.ts b/packages/router-plugin/tests/integration/route-hmr-browser-frameworks.test.ts index 01423da7dc..a34553fb74 100644 --- a/packages/router-plugin/tests/integration/route-hmr-browser-frameworks.test.ts +++ b/packages/router-plugin/tests/integration/route-hmr-browser-frameworks.test.ts @@ -6,7 +6,7 @@ * router package to a real browser page, and the test edits its route files * on disk (`route-hmr-page.ts`). An edit of a route file shows its new * code: the new loader's data and the new component body. Whether without a - * full reload, keeping the split component (decision D10): where it does, + * full reload, keeping the split component (SPEC J3.2): where it does, * required here; where it does not, pinned in known-bugs-route-hmr.test.ts. * * React apps: route-hmr-browser.test.ts. diff --git a/packages/router-plugin/tests/integration/route-hmr-browser-metadata.test.ts b/packages/router-plugin/tests/integration/route-hmr-browser-metadata.test.ts index 78454e6468..7955972003 100644 --- a/packages/router-plugin/tests/integration/route-hmr-browser-metadata.test.ts +++ b/packages/router-plugin/tests/integration/route-hmr-browser-metadata.test.ts @@ -79,7 +79,8 @@ export const Route = createFileRoute('/')({ component: () =>

home

})`, `new URLSearchParams(location.search).get('term') ?? ''`, ) // A fresh app per replacement/removal keeps this to one edit per - // file (the Rsbuild lost-removal ruling, 2026-10-19). + // file (Rspack loses a removal during a compile: oracle/KNOWN-BUGS.md, + // "Upstream issues"). expect( await app.edit( { 'routes/items/$itemId.tsx': item('v2', removed) }, @@ -109,7 +110,7 @@ export const Route = createFileRoute('/')({ component: () =>

home

})`, // Bug: a replacement index export must keep the generated navigation // target, which differs from its fullPath's trailing slash. - // Source: V4 red-astra-r2/05 (J3.1, G1, G9). + // Source: mutation testing (SPEC J3.1, G1, G9). // Impact: user code importing Route builds a different link after HMR. test( 'an edited index export keeps its public navigation target', diff --git a/packages/router-plugin/tests/integration/route-hmr-browser-names.test.ts b/packages/router-plugin/tests/integration/route-hmr-browser-names.test.ts index 90d929c107..4aee698cf1 100644 --- a/packages/router-plugin/tests/integration/route-hmr-browser-names.test.ts +++ b/packages/router-plugin/tests/integration/route-hmr-browser-names.test.ts @@ -8,8 +8,8 @@ * How the compiler gets there (renaming, hoisting, registration) is free. * * Replaces the in-process registration checks of - * react-refresh-route-components.test.ts and known-bugs-route-hmr.test.ts - * (V1 HMR-17): those read which names React Refresh's transform registered, + * react-refresh-route-components.test.ts and known-bugs-route-hmr.test.ts: + * those read which names React Refresh's transform registered, * which neither shows new code nor kept state. Pins: known-bugs-route-hmr * -components.test.ts (integration). What modules importing the exports get: * react-refresh-route-components.test.ts. diff --git a/packages/router-plugin/tests/integration/route-hmr-browser-options.test.ts b/packages/router-plugin/tests/integration/route-hmr-browser-options.test.ts index 1361e14f05..993fe9d435 100644 --- a/packages/router-plugin/tests/integration/route-hmr-browser-options.test.ts +++ b/packages/router-plugin/tests/integration/route-hmr-browser-options.test.ts @@ -9,7 +9,7 @@ * naming, registration, hook signatures) is free. * * Replaces the in-process registration and signature checks of - * react-refresh-route-components.test.ts (V1 HMR-17), which read the names + * react-refresh-route-components.test.ts, which read the names * and hook signatures React Refresh's transform computed. * * Concurrent: each test has its own dev server and page, and mostly waits. @@ -215,10 +215,10 @@ export const Route = createFileRoute('/')({ component: () =>

index

}) // An edit that adds component options before an inline component shows // in place. Whether the component keeps its state is free: adding sibling - // options next to an inline component may remount it (ruling 2026-10-24, - // SPEC J3.2). Source: the former react-refresh-route-components "names - // hoisted components after their option, so adding options keeps the - // family" (ReactFreshIntegration-test "preserves state ..."). + // options next to an inline component may remount it (SPEC J3.2). Source: + // the former react-refresh-route-components "names hoisted components + // after their option, so adding options keeps the family" + // (ReactFreshIntegration-test "preserves state ..."). test.for([false, true])( 'an edit that adds component options before an inline component shows in place (autoCodeSplitting: %s)', async ( diff --git a/packages/router-plugin/tests/integration/route-hmr-browser-plugin.test.ts b/packages/router-plugin/tests/integration/route-hmr-browser-plugin.test.ts index c5ec9a0c48..066d6c5143 100644 --- a/packages/router-plugin/tests/integration/route-hmr-browser-plugin.test.ts +++ b/packages/router-plugin/tests/integration/route-hmr-browser-plugin.test.ts @@ -169,15 +169,15 @@ export const Route = ${call} }) // A route the route file creates inside a function of the same file (a -// helper, an IIFE) is unsupported but user-fixable (user ruling 2026-10-17, -// decision D11): it is either split like a module-scope route and +// helper, an IIFE) is unsupported but user-fixable (SPEC J2.10, +// J2.8): it is either split like a module-scope route and // hot-updated in place, or left unsplit with a warning naming the file // (code-splitter-plugin-pipeline.test.ts). Either way, an edit shows its // new loader data and component without errors: in place, or, when the // compiler warns naming the route file through a real channel (the dev // server's logger or console, or the page), possibly after a reload. A -// warning never excuses an edit that does not show (V1R hmr H08, split -// S11; `expectEditShownOrReportedFallback`). (A helper function +// warning never excuses an edit that does not show (SPEC G10; +// `expectEditShownOrReportedFallback`). (A helper function // without automatic code splitting keeps its old component silently: // pinned in known-bugs-route-hmr.test.ts.) describe.concurrent.each(['vite', 'rsbuild'] as const)( diff --git a/packages/router-plugin/tests/integration/route-hmr-browser-updates.test.ts b/packages/router-plugin/tests/integration/route-hmr-browser-updates.test.ts index 501b61a49b..94597e559f 100644 --- a/packages/router-plugin/tests/integration/route-hmr-browser-updates.test.ts +++ b/packages/router-plugin/tests/integration/route-hmr-browser-updates.test.ts @@ -1,6 +1,6 @@ /** * What a route file edit does to the live router of a running app (SPEC - * J3.1, J3.3, G10), through real tools only (SYNTHESIS recipe P7): a real + * J3.1, J3.3, G10), through real tools only (SPEC §8): a real * dev server with the public router plugin and the framework's plugin, a * real page running the dev server's own HMR client, and edits of route * files on disk (`openRouteHmrPage`). The app keeps its own reference to the @@ -11,11 +11,11 @@ * (handle-route-update.test.ts, deleted) checked with explicit inputs: * matching and resolving next to an edited parent or pathless * layout, params parsing, the generated route state of the hot `Route` - * export, the lazy options the route tree gave a route (V4 red-astra/08), + * export, the lazy options the route tree gave a route, * removed loaders and callbacks, loader races with an older refresh or an * inactive preload, route context, and descendants of an edited parent; * and an edit of a route the router the HMR code finds on the page does not - * have (a second router created after the app's; ruling Q5). + * have (a second router created after the app's; SPEC J3.11). */ import { describe, test } from 'vitest' import { openRouteHmrPage } from '../route-hmr-page' @@ -309,7 +309,7 @@ export const Route = createRootRoute({ expect(await app.page.text('#app')).toBe('root hot home') // The old loader does not run again; the hot one runs at least once // (how often an edit runs a changed loader is the router's business, - // ruling 2026-10-24) + // SPEC J3.1) const { old, hot } = await calls(app) expect({ old, hot: hot! >= 1 }).toEqual({ old: 2, hot: true }) expect( @@ -391,7 +391,7 @@ export const Route = createRootRoute({ })()`) await visit(app, '/pre', 'pre hot') // The obsolete loader does not run again; the new one runs at least - // once (ruling 2026-10-24: not exactly once) + // once (SPEC J3.1: not exactly once) const { preOld, preNew } = await calls(app) expect({ preOld, preNew: preNew! >= 1 }).toEqual({ preOld: 1, diff --git a/packages/router-plugin/tests/integration/route-hmr-browser.test.ts b/packages/router-plugin/tests/integration/route-hmr-browser.test.ts index 32b75f0042..e0aed61598 100644 --- a/packages/router-plugin/tests/integration/route-hmr-browser.test.ts +++ b/packages/router-plugin/tests/integration/route-hmr-browser.test.ts @@ -397,9 +397,9 @@ describe.concurrent.each(['vite', 'rsbuild'] as const)( }, ) - // Source: decision on rp:1304 (shellComponent + HMR, 2026-10-18), the - // add-hmr snapshot fixture createRootRoute, and the factory ruling - // (2026-10-18: a reload is fine, the edit must show). + // Source: SPEC J3.5 (shellComponent and HMR), the add-hmr snapshot + // fixture createRootRoute, and SPEC J3.3, G10 for routes whose options a + // factory call builds (a reload is fine, the edit must show). it( 'shows an edited root route in place, and the shell component the edit adds, changes or removes; an edit of a route whose options a factory call builds shows', async ({ expect, onTestFinished }) => { @@ -477,7 +477,7 @@ export const Route = createFileRoute('/')(makeOptions('${version}')) ), ).toEqual(inPlace) // Route options a factory call builds: the edit shows, after a hot - // update or a reload (ruling 2026-10-18). + // update or a reload (SPEC J3.3, G10). await app.edit({ 'routes/index.tsx': factoryRoute('v2') }, 'made v2') }, timeout, @@ -491,7 +491,7 @@ export const Route = createFileRoute('/')(makeOptions('${version}')) // has it ignore), also without a component of its own or as the root route. // Sources: react-refresh-route-components "a React route module compiled // for Vite stays a Fast Refresh boundary" (it called the refresh runtime's -// boundary check by hand; ruling 2026-10-18). +// boundary check by hand; now real tools only, SPEC §8). describe.concurrent( 'vite: a React route module without a component, and a root route with an inline component', () => { @@ -560,9 +560,9 @@ export const Route = createFileRoute('/')({ // components" (ReactFreshBabelPlugin-test "registers likely HOCs with // inline functions"; #8504 "written inline in a memo / forwardRef call"), // which read React Refresh's registrations and modelled how its runtime -// resolves memo / forwardRef (ruling 2026-10-18); the former +// resolves memo / forwardRef (now real tools only, SPEC §8); the former // known-bugs-route-hmr "an edit of a React route with only inline components -// is a hot update" (gap H6a: the route HMR plugin runs before React +// is a hot update" (the route HMR plugin runs before React // Refresh, so a route whose components are all inline still becomes a // boundary). The split bodies have no JSX: with JSX, the code splitter // cannot split the call (pinned in known-bugs-code-splitter.test.ts "a diff --git a/packages/router-plugin/tests/integration/split-mode-parity.test.ts b/packages/router-plugin/tests/integration/split-mode-parity.test.ts index b48fb3ae9c..ae20701d3f 100644 --- a/packages/router-plugin/tests/integration/split-mode-parity.test.ts +++ b/packages/router-plugin/tests/integration/split-mode-parity.test.ts @@ -1,5 +1,5 @@ /** - * Dev/build parity of the split decision (FIX-PLAN V2-16; SPEC G13, J2.13, + * Dev/build parity of the split decision (SPEC G13, J2.13, * J2.2, J2.3): for one app and one configuration, which route options are * lazy, which load together and which `deleteNodes` removed are the same in * a dev server and in a production build, on Vite and on Rsbuild, and are diff --git a/packages/router-plugin/tests/known-bugs-dev-server.test.ts b/packages/router-plugin/tests/known-bugs-dev-server.test.ts index 706d22a97b..3b54f39e9a 100644 --- a/packages/router-plugin/tests/known-bugs-dev-server.test.ts +++ b/packages/router-plugin/tests/known-bugs-dev-server.test.ts @@ -120,7 +120,7 @@ describe('router config file', () => { // The next route file edit generates the route tree with the new // configuration. (Whether the `tsr.config.json` edit itself regenerates - // it is free: ruling Q9.) + // it is free: SPEC J1.10.) test( 'a route file edit after a tsr.config.json edit generates the route tree with the new configuration', async () => { diff --git a/packages/router-plugin/tests/known-bugs-route-hmr-bindings.test.ts b/packages/router-plugin/tests/known-bugs-route-hmr-bindings.test.ts index 824503602f..f2e7b8f41b 100644 --- a/packages/router-plugin/tests/known-bugs-route-hmr-bindings.test.ts +++ b/packages/router-plugin/tests/known-bugs-route-hmr-bindings.test.ts @@ -7,8 +7,8 @@ * code the user's class, and the route module throws when it loads, so the * page cannot render the route. The bookkeeping is built by the first route * module the page evaluates: the root route, which the route tree imports - * first, so the route file here is the app's root. Found by B1 while - * piloting the route app (2026-10-21). + * first, so the route file here is the app's root. Found in review while + * piloting the route app. * * Fix-agnostic: any fix that leaves the user's `Map` alone (a global * reference that no user binding captures, another structure, no diff --git a/packages/router-plugin/tests/production-bundle.ts b/packages/router-plugin/tests/production-bundle.ts index bf8cbc1379..6bacebd91f 100644 --- a/packages/router-plugin/tests/production-bundle.ts +++ b/packages/router-plugin/tests/production-bundle.ts @@ -6,7 +6,7 @@ * The build decides production by its own signal (the bundler's production * mode), with `NODE_ENV` unset, and the plugin's default for `addHmr`. * - * The decision is by purpose, through paired real builds (N18): a build + * The decision is by purpose, through paired real builds: a build * with route HMR off (`addHmr: false`, `NODE_ENV=production` when the * plugin is created) is the control, which differs in the development * features only. The production bundle renders the route in a real browser diff --git a/packages/router-plugin/tests/react-refresh-route-components.test.ts b/packages/router-plugin/tests/react-refresh-route-components.test.ts index 4a1fd72a0f..e99e6961ab 100644 --- a/packages/router-plugin/tests/react-refresh-route-components.test.ts +++ b/packages/router-plugin/tests/react-refresh-route-components.test.ts @@ -109,9 +109,9 @@ export const Route = createFileRoute('/')({ component: page })`, // on a real page: integration/route-hmr-browser-names.test.ts and // integration/route-hmr-browser-options.test.ts (they replace the checks of // which names React Refresh's transform registered and of the hook -// signatures it computed, V1 HMR-17). Split route components written inline +// signatures it computed). Split route components written inline // in a memo / forwardRef call: route-hmr-browser.test.ts. A route file -// creates one route (ruling 2026-10-18): no test of components of other +// creates one route (SPEC §2.2, J2.1, J2.11): no test of components of other // routes a function of the file creates. // A route module stays a React Refresh boundary in Vite: diff --git a/packages/router-plugin/tests/route-app.ts b/packages/router-plugin/tests/route-app.ts index 69afe62c1c..2f9070cb1f 100644 --- a/packages/router-plugin/tests/route-app.ts +++ b/packages/router-plugin/tests/route-app.ts @@ -1,7 +1,7 @@ /** - * A route file loaded the way an app loads it (SYNTHESIS recipe P1; - * RULES-AUDIT R3, R23–R25): the public composed `tanstackRouter` plugin and - * the framework's own Vite plugin run in a real Vite dev server + * A route file loaded the way an app loads it (SPEC §8: real tools only): + * the public composed `tanstackRouter` plugin and the framework's own Vite + * plugin run in a real Vite dev server * (`@tanstack/compiler-test-utils/plugin-host`), on an app written to disk * (`__root.tsx`, the route file, the files the test gives). The router * plugin's own route generator registers the route (a virtual route config @@ -34,7 +34,7 @@ * plugin options, the route's file and id, the app's tsconfig), and leased * to one test at a time (`leaseHost`): a test holds the host it wrote a * route into until it ends, and a concurrent test of the same configuration - * gets another host (FINAL-PASS #13, #19). Each `loadRoute` writes its files + * gets another host. Each `loadRoute` writes its files * to the app as a dev server sees an edit (`edit`: written to disk, reported * by Vite's watcher, settled on a bounded outcome), and removes the files of * the previous route of that host. A route whose host has moved on to @@ -221,7 +221,7 @@ const emittedKey = (environment: string, id: string) => `${environment}\0${id}` * Every plugin of the option is observed, however Vite gets it: in nested * arrays, as a Promise (the option is returned with each Promise replaced * by one that resolves to the same, observed, plugins), or returned by a - * plugin's `applyToEnvironment` for an environment (FINAL-PASS #49). + * plugin's `applyToEnvironment` for an environment. */ function observeEmitted( option: PluginOption, @@ -1006,7 +1006,7 @@ export interface RouteApp { * holding user code (each pair observed in a fresh document): no file of * the test, and no compiled module but one that only imports and * re-exports (`forwardsOnly`: a small forwarding module over the group's - * module is allowed, ruling 2026-10-24). Groups sorted, each sorted. + * module is allowed, SPEC J2.2). Groups sorted, each sorted. */ groups: () => Promise>> /** @@ -1358,7 +1358,7 @@ const refreshGlobals = ['$RefreshReg$', '$RefreshSig$'] /** * The decoded values of the string literals and template quasis of a module * (an independent parse: a user marker is found whatever its quoting or - * escaping), for D5 checks that user code is absent from a module. The + * escaping), for SPEC J2.5 checks that user code is absent from a module. The * module specifiers of imports and exports are not values of the code (a * request's query may name an option). Throws on code that does not parse: * an absence check on it would prove nothing. diff --git a/packages/router-plugin/tests/route-hmr-page.ts b/packages/router-plugin/tests/route-hmr-page.ts index 29636fcd48..9f14f2ccb0 100644 --- a/packages/router-plugin/tests/route-hmr-page.ts +++ b/packages/router-plugin/tests/route-hmr-page.ts @@ -12,7 +12,7 @@ * accept the update, the framework's refresh runtime (React Refresh, Solid * Refresh, Vue's HMR runtime) patches components, and the route HMR code * the router plugin emits updates the live router. The harness waits on the - * edit's outcome (`waitForOutcome`, coupling N21): the dev-server harnesses' + * edit's outcome (`waitForOutcome`): the dev-server harnesses' * `settle()`, then the page showing the edit with neither the dev server * nor the page having work in flight (transforms, the page's requests, a * reload), within one overall bound; never on how many hot updates or @@ -433,7 +433,7 @@ export const Route = createRootRoute({}) const files = Object.keys(edited).join(', ') await server.write(edited) - // Until the edit's outcome (N21; `waitForOutcome`): the page shows + // Until the edit's outcome (`waitForOutcome`): the page shows // the edit, and neither the dev server nor the page has work of it // in flight, within one overall bound. How many hot updates, // invalidations or `vite:afterUpdate` events the edit takes, and how @@ -625,14 +625,14 @@ export function mountsOf(app: RouteHmrPage): Promise> { /** * Edits a route the compiler may handle, or leave to a reported fallback - * (an unsupported but user-fixable shape: R-09, D11), and asserts what + * (an unsupported but user-fixable shape: SPEC J2.10, J2.8), and asserts what * both outcomes share: the page shows the edit (`expected`: new loader data * and component, also after a reload) without errors. A diagnostic never * stands in for that. Without a warning naming `file` through a real * channel (`app.warnings()`: the dev server's logger, its console, the * page), the edit must also apply in place (no reload); with one (the - * fallback, e.g. the route left unsplit), a reload is allowed (V1R hmr H08, - * split S11). Returns which outcome it was. + * fallback, e.g. the route left unsplit), a reload is allowed (SPEC G10). + * Returns which outcome it was. */ export async function expectEditShownOrReportedFallback( app: RouteHmrPage, diff --git a/packages/router-plugin/tests/served-code.ts b/packages/router-plugin/tests/served-code.ts index c8bcc4b66e..4685940572 100644 --- a/packages/router-plugin/tests/served-code.ts +++ b/packages/router-plugin/tests/served-code.ts @@ -1,8 +1,8 @@ /** - * Independent observers of code as the dev server serves it to the page - * (SYNTHESIS P8): an Oxc parse of the served JavaScript, for the few checks - * that SPEC states on modules (D5 dependency absence, directives), never - * on generated names, layout or printing. + * Independent observers of code as the dev server serves it to the page: + * an Oxc parse of the served JavaScript, for the few checks that SPEC states + * on modules (J2.5 dependency absence, directives), never on generated + * names, layout or printing. */ import { parseSync } from 'vite' diff --git a/packages/router-plugin/vite.config.ts b/packages/router-plugin/vite.config.ts index f77cb9330e..dbff9f7101 100644 --- a/packages/router-plugin/vite.config.ts +++ b/packages/router-plugin/vite.config.ts @@ -22,7 +22,8 @@ if (process.env.VITEST) { * of the process's bounded page pool (`@tanstack/compiler-test-utils/ * browser`). A test process keeps its browser and its free hosts across * test files (`isolate: false`): a file starts only the hosts no earlier - * file left free. Both are bounded (FINAL-PASS #40). + * file left free. Both are bounded (Chromium's shared memory limits how + * many pages can be open at once). */ const pagesProject = { extends: true, @@ -40,7 +41,7 @@ const config = defineConfig({ name: packageJson.name, dir: './tests', watch: false, - // At most 4 test processes per Vitest run (PERF-STUDY 2026-10-23): each + // At most 4 test processes per Vitest run: each // runs real bundlers, dev servers and its own browser, and Nx runs several // packages' tiers at once. More workers add swap and load flakes, not // speed. `--maxWorkers` on the command line still overrides it. diff --git a/packages/start-plugin-core/tests/binding-names.ts b/packages/start-plugin-core/tests/binding-names.ts index c4258b5e2d..66b911eeb9 100644 --- a/packages/start-plugin-core/tests/binding-names.ts +++ b/packages/start-plugin-core/tests/binding-names.ts @@ -1,7 +1,7 @@ /** * The binding names of a module's code (an independent parse, Oxc through * Vite's `parseSync`): what an adaptive hygiene probe offers user code as - * names, after reading them from what the compiler served (SPEC G15, N14). + * names, after reading them from what the compiler served (SPEC G15). */ import { parseSync } from 'vite' diff --git a/packages/start-plugin-core/tests/clientOnlyJSX/clientOnlyJSX.test.ts b/packages/start-plugin-core/tests/clientOnlyJSX/clientOnlyJSX.test.ts index 66c36bafbb..60ca663977 100644 --- a/packages/start-plugin-core/tests/clientOnlyJSX/clientOnlyJSX.test.ts +++ b/packages/start-plugin-core/tests/clientOnlyJSX/clientOnlyJSX.test.ts @@ -12,11 +12,11 @@ const hosts = useHydrateHost() // (which renders its fallback whenever it renders on a server), the server // output renders what the uncompiled source renders there (a plain Vite // host, `render.ts`). Whether the SSR -// output keeps the children's imports is left open (neutral names, user -// ruling 2026-10-17). The client keeps the children: it renders them once +// output keeps the children's imports is left open for neutral file names +// (SPEC J4.11, §5.12). The client keeps the children: it renders them once // the page hydrated (integration/clientOnlyJSX.test.ts). Other components // named ClientOnly are left alone. -// N4 (replaces the former snapshot fixtures of this directory). +// Replaces the former snapshot fixtures of this directory. describe(' children', () => { /** * The libraries the fixtures import (plain text components): the source diff --git a/packages/start-plugin-core/tests/createIsomorphicFn/createIsomorphicFn.test.ts b/packages/start-plugin-core/tests/createIsomorphicFn/createIsomorphicFn.test.ts index b8aeb80a01..cb8e879e11 100644 --- a/packages/start-plugin-core/tests/createIsomorphicFn/createIsomorphicFn.test.ts +++ b/packages/start-plugin-core/tests/createIsomorphicFn/createIsomorphicFn.test.ts @@ -33,7 +33,7 @@ async function callOnServer(served: ServedCase, names: Array) { // Each output runs only its environment's implementation; an isomorphic fn // without one for that environment is a no-op returning undefined, and the // client has no server implementation. `noImpl` stays a runtime call. -// Replaces the former snapshot fixtures of this directory (N2). +// Replaces the former snapshot fixtures of this directory. describe('each output runs the implementation of its environment', () => { const files = { 'x.server.ts': `export const server = (value: string) => value\n`, @@ -48,7 +48,7 @@ import { client } from './x.client' /** * The client does not load the server module, and the SSR environment * does not load the `.client` module (import protection denies it on the - * server, user ruling 2026-10-18). + * server, SPEC J4.11, §5.12). */ async function expectEnvImports(served: ServedCase) { expectNotLoaded(await served.loads(), ['./x.server']) diff --git a/packages/start-plugin-core/tests/createMiddleware/createMiddleware.test.ts b/packages/start-plugin-core/tests/createMiddleware/createMiddleware.test.ts index 243f144414..789baa4d47 100644 --- a/packages/start-plugin-core/tests/createMiddleware/createMiddleware.test.ts +++ b/packages/start-plugin-core/tests/createMiddleware/createMiddleware.test.ts @@ -53,7 +53,7 @@ export const logger = createMiddleware({ type: 'function' }).client( // chain itself) and drops its server part: `.server()`, `.validator()` (the // validator only runs on the server) and the code and imports only they // read. -// Replaces the former snapshot fixtures of this directory (N3). +// Replaces the former snapshot fixtures of this directory. describe('the client keeps the browser part of a middleware', () => { /** A case of `code` (and `files`), which every environment serves. */ async function evaluateClient( @@ -129,7 +129,7 @@ export const withWrapper = createMiddleware({ type: 'function' }) }) // Source: snapshot fixture createMiddlewareValidator.tsx, inline snapshot - // "should compile validator method" (gap MW2) + // "should compile validator method" test('the validator and its module leave the client', async () => { const served = await evaluateClient(`import { createMiddleware } from '@tanstack/react-start' @@ -196,7 +196,7 @@ export const getUser = async () => ({ role: 'admin' }) ]) }) - // Source: snapshot fixture createStart.tsx (gap MW5) + // Source: snapshot fixture createStart.tsx test('middleware of a createStart instance keeps .client() and drops .server()', async () => { const served = await evaluateClient( `import { createStart } from '@tanstack/react-start' diff --git a/packages/start-plugin-core/tests/createServerFn/caller-dead-code.test.ts b/packages/start-plugin-core/tests/createServerFn/caller-dead-code.test.ts index 3e57b9a4c0..25746a4b85 100644 --- a/packages/start-plugin-core/tests/createServerFn/caller-dead-code.test.ts +++ b/packages/start-plugin-core/tests/createServerFn/caller-dead-code.test.ts @@ -16,7 +16,7 @@ import { // handler either way. "Drops" is observed as loading: the modules a page // importing the module loads (`loads`: what the browser requests and Vite's // client module graph holds), never as an inventory of its import -// declarations (FIX-PLAN S06). Every module the fixtures import is a real +// declarations. Every module the fixtures import is a real // file of the case. const host = useStartHost() @@ -500,8 +500,7 @@ export const fn = ${wrap(`createServerFn().validator(schema)`)}.handler(async ({ // declaration keeps its validator. An inline chain is stripped ("when the // handler only reads it through a validator or a middleware", above). // Source: start-compiler/compiler.ts:1296-1330 (the chain walk stops at an - // identifier), start-compiler/handleCreateServerFn.ts:277-290; fuzzing (oracle - // mode, N4). + // identifier), start-compiler/handleCreateServerFn.ts:277-290; fuzzing. // Impact: the validator and its imports (schemas, server-only modules) // ship to the client, which never runs them. test.fails.each([ diff --git a/packages/start-plugin-core/tests/createServerFn/createServerFn.test.ts b/packages/start-plugin-core/tests/createServerFn/createServerFn.test.ts index 8f7a9fc897..f6710df063 100644 --- a/packages/start-plugin-core/tests/createServerFn/createServerFn.test.ts +++ b/packages/start-plugin-core/tests/createServerFn/createServerFn.test.ts @@ -185,8 +185,8 @@ export const issueServerFn = createIssueServerFn().handler(async () => 'issue-ha // module of the app (or of a plugin) provides. // Fix-agnostic: however the compiler learns the factory's provenance, the // module compiles and its server fn works. -// Source: B2 repair (rerouting "keeps query-bearing virtual module -// identities distinct" through the public plugin). +// Source: the former test "keeps query-bearing virtual module identities +// distinct", rerouted through the public plugin. test.fails( 'a server fn whose factory a virtual module serves by its exact id compiles in dev', async () => { @@ -219,10 +219,10 @@ export const greet = createServerFn().handler()` }) // Builders, route files and formatting: replaces the factory and -// isomorphic-fns snapshot fixtures (N5, N6) and the `.handler(` formatting -// detection unit tests (N7). +// isomorphic-fns snapshot fixtures and the `.handler(` formatting +// detection unit tests. describe('server fns of builders, route files and reformatted code', () => { - // Source: snapshot fixture factory.tsx (N5) + // Source: snapshot fixture factory.tsx test('a server fn builder with middleware is callable as a factory', async () => { const served = await serveCase(await host(), { 'module.tsx': `import { createServerFn, createMiddleware } from '@tanstack/react-start' @@ -275,7 +275,7 @@ export const x = createFakeFn().handler(() => { ]) }) - // Source: snapshot fixture isomorphic-fns.tsx (N6; #8504 + // Source: snapshot fixture isomorphic-fns.tsx (#8504 // start-compiler-factories.test.ts "provider compiles env fns") test('a route file: the provider runs the server fns, each output runs its isomorphic branch', async () => { const code = `import { createFileRoute } from '@tanstack/react-router' @@ -370,7 +370,7 @@ throw new Error('the click gave no results: ' + element.innerHTML)`, // Reformatted code (Vite/Babel may move the dot to its own line) and a // builder from another module (TanStack/router#7280 class). // Replaces compiler.test.ts "handles .handler with whitespace variations" - // and "handles whitespace between . and handler" (N7). + // and "handles whitespace between . and handler". describe.each<{ where: string files: Record @@ -404,7 +404,7 @@ export const base = createServerFn()`, // builder imported from another module, a comment between the dot and // `handler` hides the server fn. // Impact: the handler and its server-only imports ship to the client. - // Source: N7 (TanStack/router#7280 class). + // Source: TanStack/router#7280 class. const run = where === 'another module' && name === 'a comment after the dot' ? test.fails diff --git a/packages/start-plugin-core/tests/createServerFn/declaration-sites.test.ts b/packages/start-plugin-core/tests/createServerFn/declaration-sites.test.ts index a81fbfe9da..4af5440198 100644 --- a/packages/start-plugin-core/tests/createServerFn/declaration-sites.test.ts +++ b/packages/start-plugin-core/tests/createServerFn/declaration-sites.test.ts @@ -1,5 +1,5 @@ /** - * Where a `createServerFn` can be written (SPEC J4.6; user ruling D13): + * Where a `createServerFn` can be written (SPEC J4.6): * top-level server fns work everywhere; a server fn nested in a function * whose handler reads no local of the function works too (goal pins); any * other position works or is rejected with a clear error at the call, and @@ -107,7 +107,7 @@ test.each(literalPlacements)( ) // Bug: dependency-free nested handlers remain in successful client output. -// Source: start-SYNTH S13; the four public make/pick usages below. +// The rows: the four public make/pick usages below. // Impact: client calls execute the server handler locally instead of using RPC. test.fails.each(literalPlacements)( 'a server fn declared in $name never ships its nested handler to the client', @@ -162,7 +162,7 @@ test.each(placements.filter((placement) => !placement.declarator))( const wrappedTwice = `const wrap = (fn: T) => fn export const fn = wrap(wrap(createServerFn().handler(async () => db.inner())))` -// Loosened regression of the goal below (S16): wrapped in user helper calls, +// Loosened regression of the goal below: wrapped in user helper calls, // a top-level server fn never ships its handler to the client, whatever // factories the module imports. test.each(['createServerFn alone', 'another Start factory'])( @@ -183,7 +183,7 @@ test.each(['createServerFn alone', 'another Start factory'])( // supported recognition form (SPEC J4.5), so rejecting is no fix here. // Impact: the build fails for a module whose server fn the user can only // write unwrapped. -// Source: FIX-PLAN S16 (Sol F17); declaration-sites "wrapped in two calls". +// Source: declaration-sites "wrapped in two calls". test.fails.each([ 'createServerFn alone', 'another Start factory', @@ -216,7 +216,7 @@ export const fn = createServerFn().validator().handler(async () => 1)` } }) -// Goal (N13, user ruling D13): a server fn nested in a function is supported +// Goal (SPEC J4.6): a server fn nested in a function is supported // like a top-level one when its handler reads no local of the function: the // client gets an RPC, and the server runs its handler under the id the // client uses. (One whose handler reads a local may also be rejected: @@ -243,7 +243,7 @@ describe.each(['createServerFn alone', 'another Start factory'])( }, ) -// Goal (N13, user ruling D13): a server fn created in the handler of another +// Goal (SPEC J4.6): a server fn created in the handler of another // one is supported. The client gets an RPC of the outer server fn, its // handler runs on the server under the id the client uses and calls the // inner one there; how the inner one is compiled is left open. Today it is @@ -273,7 +273,7 @@ test.fails.each([ }, ) -// Goal (N13, user ruling D13): two functions of a module each declare a +// Goal (SPEC J4.6): two functions of a module each declare a // server fn under the same local name; each runs its own handler. // Today they are left untransformed, rejected or extracted into an invalid // server module (pins in known-bugs-start-compiler.test.ts, placement "a diff --git a/packages/start-plugin-core/tests/createServerFn/exports-and-directives.test.ts b/packages/start-plugin-core/tests/createServerFn/exports-and-directives.test.ts index 9a63fadc7f..3fc2fefd8d 100644 --- a/packages/start-plugin-core/tests/createServerFn/exports-and-directives.test.ts +++ b/packages/start-plugin-core/tests/createServerFn/exports-and-directives.test.ts @@ -245,11 +245,11 @@ export const fn = createServerFn().handler(async () => 'fn')`, }) describe('directives', () => { - // Split (S4 B-mixed): a handler with a directive prologue is a working - // server fn. Where its directives end up on the server (they have no - // effect in a module, which is always strict, and outside RSC) is not - // observable, so the former check of the provider's printed function - // prologues is dropped (SPEC §5.4, §5.5). + // A handler with a directive prologue is a working server fn. Where its + // directives end up on the server (they have no effect in a module, which + // is always strict, and outside RSC) is not observable, so the former + // check of the provider's printed function prologues is dropped (SPEC + // §5.4, §5.5). // Source: Next.js server-actions fixtures server-graph/8 test('handler directives stay in the provider', async () => { const served = await serveCase(await host(), { @@ -305,7 +305,7 @@ describe('server function ids', () => { // the public `url` of the server fns the client and server code get. // Source: SolidStart compile.spec.ts "keeps ids of existing functions when a // function is added above them", "keeps production ids stable ..." - // (FIX-PLAN S04: their edit-stability is not required). + // (their edit-stability is not required). test('dev: ids are repeatable for unchanged input, and each version of a module runs its own handlers by id', async () => { const existing = `export const load = createServerFn().handler(async () => 'load') export const save = createServerFn().handler(async () => 'save')` @@ -400,7 +400,7 @@ describe('module formats', () => { // either (SSR: "Parse failure: Unexpected JSX expression"; the client gets // the TypeScript as is), and its build fails the same way for any query // import of a `.cts` module (`./fn.cts?x`). Not a compiler outcome - // (coordinator 2026-10-21; FOLLOWUPS UPSTREAM "`.cts`"). + // (Vite's own default). // Source: @vitejs/plugin-rsc cjs.test.ts (fixtures/cjs) for (const file of ['fn.mts']) { test(`${file} may use angle-bracket type assertions`, async () => { diff --git a/packages/start-plugin-core/tests/createServerFn/handler-scope.test.ts b/packages/start-plugin-core/tests/createServerFn/handler-scope.test.ts index a90fd3acad..b894bd132c 100644 --- a/packages/start-plugin-core/tests/createServerFn/handler-scope.test.ts +++ b/packages/start-plugin-core/tests/createServerFn/handler-scope.test.ts @@ -161,7 +161,7 @@ export const later = createServerFn().handler(async () => 'later:')`, }, { // Replaces createServerFn.test.ts "should remove imports used only as - // caller handler identifiers" (N10). + // caller handler identifiers". name: 'an imported function', code: `import { getUsers } from './users.server' export const fn = createServerFn().handler(getUsers)`, @@ -195,8 +195,8 @@ export const fn = createServerFn().handler(async () => // module keeps `createServerFn().handler(() => 'client')`, the isomorphic // fn's client implementation passed as the handler; the call does not give // its 'client' either). -// Source: TanStack/router#8446; #8504 handler-scope.test.ts (corpus-diff, -// imaimai17468/tanstack-start-handler-call-expression-repro; red on main) +// Source: TanStack/router#8446; #8504 handler-scope.test.ts +// (imaimai17468/tanstack-start-handler-call-expression-repro; red on main) test.fails('the handler can be a createIsomorphicFn call', async () => { expect( await callHandler(`import { createIsomorphicFn } from '@tanstack/react-start' diff --git a/packages/start-plugin-core/tests/createServerFn/placements.ts b/packages/start-plugin-core/tests/createServerFn/placements.ts index 95ed939c1a..db4d62fe15 100644 --- a/packages/start-plugin-core/tests/createServerFn/placements.ts +++ b/packages/start-plugin-core/tests/createServerFn/placements.ts @@ -90,7 +90,7 @@ export function make() { }, { // SPEC J4.6 ("other positions (…, block) likewise work or error - // clearly"); user ruling 2026-10-20 restoring corpus inputs U082/U086. + // clearly"). name: 'a block at the module top level', code: `export const registry: Array = [] { @@ -181,7 +181,7 @@ register(createServerFn().handler(async () => db.inner()))`, * function (`id`): it cannot be hoisted as it is. The compiler either keeps * the complete RPC semantics safely (each `make(id)` instance calls a server * handler that sees its own `id`, and nothing leaks) or rejects it with a - * clear error naming the capture (SPEC J4.6, §5.13; user ruling D13). + * clear error naming the capture (SPEC J4.6, §5.13). */ export const capturingPlacement: Placement = { name: 'a function body, with a handler reading a local of the function', diff --git a/packages/start-plugin-core/tests/diagnostics.ts b/packages/start-plugin-core/tests/diagnostics.ts index af819b1c15..d388e50baf 100644 --- a/packages/start-plugin-core/tests/diagnostics.ts +++ b/packages/start-plugin-core/tests/diagnostics.ts @@ -1,7 +1,7 @@ /** * What the Start compiler reports, checked through the shared diagnostic - * oracle (`@tanstack/compiler-test-utils/diagnostics`; SPEC G5, §5.7; - * ruling 2026-10-22): a compile error is reported, at the line (and column) + * oracle (`@tanstack/compiler-test-utils/diagnostics`; SPEC G5, §5.7: file + * and position only): a compile error is reported, at the line (and column) * of the user's module it is about; never its wording, code frame or * channel. And the check that a misplaced server fn is supported, or * rejected that way, and kept off the client, through the public Start @@ -152,7 +152,7 @@ export async function expectNoClientHandler( * What `settle` gives for a `createServerOnlyFn` called outside the server, * or a `createClientOnlyFn` called outside the client (J4.10): it is a * function (`settle` gives back what is no function), and calling it threw - * (ruling 2026-10-22: the error's wording is not checked). An asymmetric + * (SPEC G5, §5.7: the error's wording is not checked). An asymmetric * matcher: compare with `toEqual`. */ export const throwsError = expect.toSatisfy( diff --git a/packages/start-plugin-core/tests/importProtection/mock-helpers.ts b/packages/start-plugin-core/tests/importProtection/mock-helpers.ts index e921576cb9..1df72658f5 100644 --- a/packages/start-plugin-core/tests/importProtection/mock-helpers.ts +++ b/packages/start-plugin-core/tests/importProtection/mock-helpers.ts @@ -162,7 +162,7 @@ export const describeValuePrelude = `${probeMockPrelude}const describeValue = ${ /** * What identifies the runtime diagnostic of a use of a mock: its severity - * and, for a denied file, the file (ruling 2026-10-22: diagnostics are + * and, for a denied file, the file (SPEC G5, §5.7: diagnostics are * checked by file and position only; a use of the mock of a denied * specifier names no file of the app). Which importer used the mock is not * required: the violation names it, SPEC J6.5. diff --git a/packages/start-plugin-core/tests/importProtection/original-location.ts b/packages/start-plugin-core/tests/importProtection/original-location.ts index 81d646f258..4161708f7f 100644 --- a/packages/start-plugin-core/tests/importProtection/original-location.ts +++ b/packages/start-plugin-core/tests/importProtection/original-location.ts @@ -29,7 +29,7 @@ export function originalLocation( * import a tool rewrote), or where a pin checks that it is there. */ unavailable?: boolean - /** Other accepted places (e.g. a marker's origin, audit F ASK-1). */ + /** Other accepted places (e.g. a marker's origin, SPEC J6.5). */ others?: Array } = {}, ) { diff --git a/packages/start-plugin-core/tests/importProtection/start-apps.ts b/packages/start-plugin-core/tests/importProtection/start-apps.ts index 3a68307c8f..a331bfa222 100644 --- a/packages/start-plugin-core/tests/importProtection/start-apps.ts +++ b/packages/start-plugin-core/tests/importProtection/start-apps.ts @@ -14,8 +14,8 @@ * callback receives them (`server.violations`, `build.violations`; SPEC * J6.5, J6.6), never parsed from the printed report. That each is printed * (a warning or an error the user sees) is checked by `expectViolationsAt` - * and `expectPrinted`, only for the file and position it names (ruling - * 2026-10-22). + * and `expectPrinted`, only for the file and position it names (SPEC G5, + * §5.7). */ import path from 'node:path' import { fileURLToPath } from 'node:url' @@ -106,8 +106,7 @@ export function violationRecorder( /** * The steps of `info.trace` from the entry to the importer. A trace may be - * listed entry first or entry last (SPEC J6.5, ruling "restructured - * compilers", R10): one whose first step is the importer, and whose last + * listed entry first or entry last (SPEC J6.5, §5.19): one whose first step is the importer, and whose last * step is not, is listed entry last. */ export function traceFromEntry(info: ViolationInfo): ViolationInfo['trace'] { @@ -170,7 +169,7 @@ export function inEnvironment( /** * A violation a test expects: its environment type, the importer's use of * the denied import (`use`: `file:line:column`) and the other places it - * may be reported at instead (SPEC J6.5, V1R ip I01: any line of the + * may be reported at instead (SPEC J6.5: any line of the * import, another genuine use, a marker's origin), written out: `file:line` * (any column), `file:line:column`, or `file` (no location). */ @@ -188,7 +187,7 @@ export const violationLabel = (expected: ExpectedViolation) => * The file, line and column of a location (`file`, `file:line` or * `file:line:column`): only a trailing `:line` or `:line:column` is the * position, so a file named with a colon (Rspack's `webpack:/src/a.tsx`, - * the F2 pin) keeps its whole name. + * pinned in reported-location.test.ts) keeps its whole name. */ export function locationParts(location: string): { file: string @@ -207,7 +206,7 @@ export function locationParts(location: string): { * The file of the app a location names: its file (`locationParts`) without * a URL scheme such as Rspack's `webpack:/` (how the report names the file * is pinned in reported-location.test.ts, "the reported importer is a file - * of the app", F2). + * of the app"). */ export const appFileOf = (location: string) => locationParts(location).file.replace(/^[a-z]+:\/+/, '') @@ -461,8 +460,8 @@ export const factoryTopLevelCall = `export const request = getRequest()\n` * `export * from`, line 1) and a module importing one of its names * (`src/c.ts`, as `v`), with the import-protection options that deny it: * a denied file, and a package denied by a specifier rule. The denied - * module's value carries `MARK_SECRET`. For the ruling Q4 rows (RULINGS - * "Q4: `export *` of a denied module"). + * module's value carries `MARK_SECRET`. For the rows of SPEC J6.8 on + * `export *` of a denied module. */ export const starReexportApps: Array<{ name: string @@ -501,8 +500,7 @@ export const starReexportApps: Array<{ * marker; any column of it, or the file without a location), at the * importer's use of the import (`use`, `file:line:column`) or at a line of * the importer's import of the marked module (`imports`, `file:line`). - * Each location is fine (coordinator ruling on audit F ASK-1; SPEC J6.5, - * V1R ip I01). + * Each location is fine (SPEC J6.5). */ export function expectMarkerViolation( violation: Violation, @@ -519,8 +517,8 @@ export function expectMarkerViolation( /** * Asserts that a `severity` diagnostic the user sees (`diagnostics`: every - * channel) names the importer of `violation` and its position (SPEC §5.7: - * file and position; ruling 2026-10-22). + * channel) names the importer of `violation` and its position (SPEC G5, §5.7: + * file and position only). */ export function expectPrinted( diagnostics: Array, diff --git a/packages/start-plugin-core/tests/integration/clientOnlyJSX.test.ts b/packages/start-plugin-core/tests/integration/clientOnlyJSX.test.ts index fb60405584..57157f99f6 100644 --- a/packages/start-plugin-core/tests/integration/clientOnlyJSX.test.ts +++ b/packages/start-plugin-core/tests/integration/clientOnlyJSX.test.ts @@ -188,7 +188,7 @@ describe(' in a hydrated page', () => { // the children of a `` use is eliminated from the server build // (the build above reports no import-protection violation: by default a // violation fails a build) and its code is not in the server bundle. -// Source: DECISIONS 2026-10-18 "Server-side *.client.* imports" +// Source: SPEC J4.11, §5.12. test('a *.client.* module only ClientOnly children use is not in the server build', () => { expect( // (everything the build reported, on every channel) diff --git a/packages/start-plugin-core/tests/integration/hydrate-build-cases.ts b/packages/start-plugin-core/tests/integration/hydrate-build-cases.ts index 7aadafd36e..ad8b8cedc7 100644 --- a/packages/start-plugin-core/tests/integration/hydrate-build-cases.ts +++ b/packages/start-plugin-core/tests/integration/hydrate-build-cases.ts @@ -163,7 +163,7 @@ export function hydrateBuildSuite(bundler: StartBundler) { // Source: hydrate-split-modules.test.ts "bindings only the split children // use leave the parent", "server: bindings only the stripped fallback uses // are removed"; hydrate-captures.test.ts "a destructured loop variable…, - // module helpers move" (placement); gaps "biggest gap 1". + // module helpers move" (placement). test.each([ { name: 'a project module', @@ -282,7 +282,6 @@ export function hydrateBuildSuite(bundler: StartBundler) { // and only its boundary's children are lazy. One page renders the three // routes (their boundaries render at the same time, so their identities // must not collide either). - // Source: gap H10 (round2/oracle-gaps) let routes: Promise | undefined test.each([ { name: 'in their own groupings', route: 'separateGroups' }, @@ -324,8 +323,7 @@ export function hydrateBuildSuite(bundler: StartBundler) { // router-plugin/tests/code-splitter-jsx.test.ts). // Control: the "in their own groupings" row above (same route shape, // without `head`). - // Source: fuzzing (oracle mode, round 2, F4: real Start builds, Vite and - // Rsbuild). + // Source: fuzzing (real Start builds, Vite and Rsbuild). // Impact: the route's component throws a ReferenceError when it // renders, so the page never renders. test.fails( @@ -377,8 +375,7 @@ export function hydrateBuildSuite(bundler: StartBundler) { // that bundlers must keep (it is not marked pure), so the children of an // unused exported component still ship: the call stays in the eager // code, and its chunk is emitted. - // Source: hydrate-when-transform.ts:653-690 (the call at :676); fuzzing - // (oracle mode, round 2, F2). + // Source: hydrate-when-transform.ts:653-690 (the call at :676); fuzzing. // Impact: the code of components nothing renders loads in the client. test.fails( 'an unused exported component with a boundary is not in the client', @@ -393,7 +390,7 @@ export function hydrateBuildSuite(bundler: StartBundler) { // up in the lazy chunk when the bundler may drop its initializer from the // parent (a function, or a call marked pure). // Source: hydrate-when-transform.test.ts "unwraps exported declarations - // needed by extracted virtual modules" (N20). + // needed by extracted virtual modules". test.each([ { name: 'a function', page: 'widgetFunction' }, { name: 'a pure call', page: 'widgetPureCall' }, @@ -423,7 +420,7 @@ export function hydrateBuildSuite(bundler: StartBundler) { // an exported declaration the children use has one instance, initialized // once" (compiler level); this is its production-build row. // Source: hydrate-when-transform.test.ts "unwraps exported declarations - // needed by extracted virtual modules" (N20); V1 hydrate-rsc 24. + // needed by extracted virtual modules". // Impact: the initializer's side effects run twice, and the children use // another instance than the module exports (e.g. another store). test.fails( @@ -451,7 +448,6 @@ export function hydrateBuildSuite(bundler: StartBundler) { // run from their lazy chunk on the client, maps through the chunk's // emitted source map to its line in the page. The column is left out: // minifiers map the throw to different tokens of the expression. - // Source: oracle-gaps M1 (round 2). test.each([ { name: 'minified', minify: true }, { name: 'unminified', minify: false }, @@ -497,7 +493,6 @@ export function hydrateBuildSuite(bundler: StartBundler) { // names the user's file and the line of the boundary (SPEC J5.5, G5, // §5.7: no wording is required). Every channel of the failed build is // read (a compiler may print the details and fail with a short error). - // Source: FIX-PLAN HYD-07 (file + position, A9) test.each([ { name: 'a function child', children: '{() =>

child

}' }, { name: 'a hook call', children: '

{useThing()}

' }, diff --git a/packages/start-plugin-core/tests/integration/hydrate-build-dev.test.ts b/packages/start-plugin-core/tests/integration/hydrate-build-dev.test.ts index d122ac3424..572a971b24 100644 --- a/packages/start-plugin-core/tests/integration/hydrate-build-dev.test.ts +++ b/packages/start-plugin-core/tests/integration/hydrate-build-dev.test.ts @@ -44,8 +44,8 @@ createRoot(document.getElementById('root')!).render() // at the same root (a new Vite dev server with the same plugins on the same // app directory). // Source: hydrate-when-transform.test.ts "invalidates cached Hydrate - // source for virtual module loads" (gaps H21 / DV42; the compiler half is - // in hydrate-boundary-forms.test.ts) + // source for virtual module loads" (the compiler half is in + // hydrate-boundary-forms.test.ts) test( 'client: a chunk requested before its parent module renders the children, and an edit reaches it', async () => { diff --git a/packages/start-plugin-core/tests/integration/hydrate-dev-edits.ts b/packages/start-plugin-core/tests/integration/hydrate-dev-edits.ts index d8a6bd4416..afe06d6cfb 100644 --- a/packages/start-plugin-core/tests/integration/hydrate-dev-edits.ts +++ b/packages/start-plugin-core/tests/integration/hydrate-dev-edits.ts @@ -13,7 +13,7 @@ import type { BrowserPage } from '@tanstack/compiler-test-utils/browser' /** * Modules only the children of one boundary import, each with a marker in * its code: which of them the page downloaded (not when their top-level - * code runs, which is free: ruling "child-only module evaluation", SPEC G3). + * code runs, which is free: SPEC J5.6, G3). */ const childModules = Object.fromEntries( ['a', 'b'].map((name) => [ diff --git a/packages/start-plugin-core/tests/integration/hydrate-dev-rsbuild.test.ts b/packages/start-plugin-core/tests/integration/hydrate-dev-rsbuild.test.ts index 0a41a0e267..b1e1b5b851 100644 --- a/packages/start-plugin-core/tests/integration/hydrate-dev-rsbuild.test.ts +++ b/packages/start-plugin-core/tests/integration/hydrate-dev-rsbuild.test.ts @@ -1,5 +1,5 @@ /** - * The edit rows of hydrate-dev.test.ts (FIX-PLAN V2-20, SPEC J5.2, G10) on + * The edit rows of hydrate-dev.test.ts (SPEC J5.2, G10) on * Start's Rsbuild dev server, seen from a real browser page: React Refresh * from `@rsbuild/plugin-react`, Solid's hot updates from * `@rsbuild/plugin-solid` (with `@rsbuild/plugin-babel`, configured like a @@ -26,7 +26,6 @@ import { solidAppConfig } from './hydrate-pages' const timeout = 60_000 describe('Rsbuild dev', () => { - // Source: FIX-PLAN V2-20 (Rsbuild, React) test( 'React: a loaded child hot-updates in place, and a sibling opened later shows the edited version', async () => { @@ -59,7 +58,6 @@ export const Route = createFileRoute('/')({ component: Widgets }) timeout, ) - // Source: FIX-PLAN V2-20 (Rsbuild, Solid) test( 'Solid: a loaded child hot-updates in place, and a sibling opened later shows the edited version', async () => { diff --git a/packages/start-plugin-core/tests/integration/hydrate-dev-solid.test.ts b/packages/start-plugin-core/tests/integration/hydrate-dev-solid.test.ts index 8e7a43a5c2..b98f16c54a 100644 --- a/packages/start-plugin-core/tests/integration/hydrate-dev-solid.test.ts +++ b/packages/start-plugin-core/tests/integration/hydrate-dev-solid.test.ts @@ -13,9 +13,8 @@ const timeout = 60_000 describe('Vite dev, Solid', () => { // A Solid boundary is served with the Solid packages, its chunk renders, - // and an edit reaches it (the stand-in row deleted in wave 2, on the real - // packages, with Solid's hot updates). - // Source: FIX-PLAN V2-20 (Solid half); W2-h-2 hand-over (gaps H21/H22) + // and an edit reaches it (replaces a former row that used stand-in + // packages: here the real packages, with Solid's hot updates). test( 'a loaded child hot-updates in place, and a sibling opened later shows the edited version', async () => { diff --git a/packages/start-plugin-core/tests/integration/hydrate-dev.test.ts b/packages/start-plugin-core/tests/integration/hydrate-dev.test.ts index 7b4d30fe12..bed0c1d141 100644 --- a/packages/start-plugin-core/tests/integration/hydrate-dev.test.ts +++ b/packages/start-plugin-core/tests/integration/hydrate-dev.test.ts @@ -7,11 +7,11 @@ * the edits are files written to disk, which Vite's watcher reports. * * - A loaded child hot-updates in place, and a sibling whose code had not - * loaded yet shows the edited version when it opens (FIX-PLAN V2-20, - * SPEC J5.2, G10), React and Solid. + * loaded yet shows the edited version when it opens (SPEC J5.2, G10), + * React and Solid. * - Route code splitting and `` in one route module: the split * route component's boundaries hydrate the server's HTML (splitter - * composition, FIX-PLAN HYD-04). + * composition). * * The Rsbuild counterparts of the edit rows: hydrate-dev-rsbuild.test.ts. */ @@ -43,7 +43,6 @@ const reactOptimizeDeps = { } describe('Vite dev, React', () => { - // Source: FIX-PLAN V2-20 (React half) test( 'a loaded child hot-updates in place, and a sibling opened later shows the edited version', async () => { @@ -87,7 +86,6 @@ export const Route = createFileRoute('/')({ component: Widgets }) // The router splits the route component into its own module, which the // Hydrate plugin splits again: the page hydrates the server's HTML with // both, the deferred child loading its code on its interaction. - // Source: FIX-PLAN HYD-04 "splitter composition" (W2-h-1 hand-over) test( 'boundaries of a split route component hydrate the server HTML', async () => { diff --git a/packages/start-plugin-core/tests/integration/hydrate-pages-react.ts b/packages/start-plugin-core/tests/integration/hydrate-pages-react.ts index 026c399570..c1f908df30 100644 --- a/packages/start-plugin-core/tests/integration/hydrate-pages-react.ts +++ b/packages/start-plugin-core/tests/integration/hydrate-pages-react.ts @@ -12,7 +12,7 @@ * function `when` evaluated on the client only (J5.8), the fallback of a * boundary mounted after startup (J5.3), a server fn called from split * children (J4.13), which `Hydrate` elements are boundaries (J5.1), and - * the children under parent updates (J5.8, V2-19). + * the children under parent updates (J5.8). */ import { afterAll, beforeAll, describe, expect, test } from 'vitest' import { @@ -89,29 +89,30 @@ const fixtures: Record = { // inert. (Solid: the "nested" row of hydrate-pages-solid.ts runs the same // path on Rsbuild.) // Source: hydrate-split-modules.test.ts "react chunks loaded from the - // source code alone ..." (B2 dropped the Rsbuild path; FINAL-PASS #5). + // source code alone ..." (its Rsbuild path, which that test no longer + // covers). nestedGates: `import { Hydrate } from '@tanstack/react-start' import { load, never } from '@tanstack/react-start/hydration' import { Counter } from '../counter' export function Page() { return
}`, - // Source: V4 red-astra-r2/10. These are eleven literal boundaries in one + // These are eleven literal boundaries in one // source module, rather than eleven instances of one mapped boundary. eleven: `${head}export function Page() { return <>${Array.from({ length: 11 }, (_, index) => ``).join('')} }`, - // Source: V4 red-astra-r2/11. Edge spaces are visible inline content. + // Edge spaces are visible inline content. edgeSpaces: `${head}export function Page() { return <>A B C }`, - // Source: V4 red-astra-r2/12. The options object is shared by a boundary + // The options object is shared by a boundary // and an ordinary server/client render consumer. sharedFallback: `${head}const opts = { when: idle(), fallback: wait } export function Page() { return <> }`, - // Source: V4 red-fable-r2/14. A render-local hoisted function still + // A render-local hoisted function still // captures this render's values when the child runs in another module. hoistedRows: `${head}export function Page() { const rows = ['a', 'b'] @@ -122,7 +123,7 @@ export function Page() { } }`, // Source: hydrate-boundary-forms.test.ts "a nested boundary and a later - // sibling hydrate with the ids the server renders" (gap H6) + // sibling hydrate with the ids the server renders" nested: `${head}export function Page() { return ( <> @@ -157,7 +158,7 @@ export function Other({ early }: { early: boolean }) { return }`, // Boundaries in mutually exclusive branches at the same position, then - // the page switches branches after it hydrated (S37). + // the page switches branches after it hydrated. switching: `${head}import { useState } from 'react' export function Page() { const [flag, setFlag] = useState(true) @@ -168,7 +169,7 @@ export function Page() {
}`, // Source: hydrate-boundary-forms.test.ts "a renamed import of Hydrate is a - // boundary" (gap H11) + // boundary" renamed: `import { Hydrate as HW } from '@tanstack/react-start' import { interaction } from '@tanstack/react-start/hydration' import { Counter } from '../counter' @@ -193,12 +194,12 @@ export function Page() { return
}`, // Source: hydrate-boundary-forms.test.ts "a dynamic split={flag} (%s) - // still splits the children" (gap H14) + // still splits the children" dynamicSplit: `${head}export function Page({ flag }: { flag: boolean }) { return
}`, - // A let the component reassigns before the boundary renders (V4 red - // variant astra/14): the hydrated children read its latest value. + // A let the component reassigns before the boundary renders: the + // hydrated children read its latest value. latestLet: `${head}export function Page({ active }: { active: boolean }) { let label = 'first' if (active) { @@ -266,7 +267,7 @@ const prefetchRows = { } `, ), - // Source: hydrateWhen PrefetchState fixture (HYD-06) + // Source: hydrateWhen PrefetchState fixture prefetchState: `${head}import { useState } from 'react' export function Page({ split }: { split: boolean }) { const [status, setStatus] = useState('idle') @@ -372,7 +373,7 @@ Object.assign(fixtures, fallbackForms, prefetchRows, { export function Page() { return
    { (globalThis as any).__clicked = 'click'; return 'click' }}>{letters.map((letter) => { const upper = letter.toUpperCase(); return
  • {upper}
  • })}{(function () { return 'iife' })()}
}`, - // A function \`when\` (HYD-12): evaluated on the client only. + // A function \`when\`: evaluated on the client only. whenFunction: `${head}export function Page() { return ( 'greet-handler-marker') export function Page() { return }`, - // A namespace-imported boundary hydrating on interaction (DECISIONS - // 2026-10-18: recognised like a named import, J5.1). + // A namespace-imported boundary hydrating on interaction (recognised like + // a named import, J5.1). namespaceGated: `import * as Start from '@tanstack/react-start' import { interaction } from '@tanstack/react-start/hydration' import { Counter } from '../counter' @@ -567,7 +568,6 @@ return [button('outer').textContent, button('inner').textContent]`, // Boundaries in mutually exclusive branches may share an identity; after // the switch the other branch's boundary renders and works, and the // boundary after them keeps its state. - // Source: S37 (V1 start) test('switching between boundaries in exclusive branches after hydration', async () => { const page = await app.hydrate('switching', { script: `const button = (label) => root.querySelector('button[data-label="' + label + '"]') @@ -707,7 +707,7 @@ return [button('outer').textContent, button('inner').textContent]`, // A prefetch function's `preload()` loads the boundary's children; the // state it sets shows before any interaction. - // Source: FIX-PLAN HYD-06 (hydrateWhen PrefetchState fixture) + // Source: hydrateWhen PrefetchState fixture test('a prefetch function preloads the children and updates the parent state', async () => { const page = await app.hydrate('prefetchState', { script: `await waitFor(() => root.querySelector('[data-status]').textContent === 'prefetched') @@ -739,7 +739,7 @@ return [button('outer').textContent, button('inner').textContent]`, // The function form of `when` is evaluated on the client only (J5.8): the // server renders the boundary without calling it. - // Source: FIX-PLAN HYD-12 (hydrate-boundary-forms.test.ts `when` table) + // Source: hydrate-boundary-forms.test.ts `when` table test('a function when is called on the client only, and its strategy hydrates the children', async () => { const page = await app.hydrate('whenFunction', { serverScript: 'globalThis.__whenCalls ?? []', @@ -756,7 +756,6 @@ return [button('outer').textContent, button('inner').textContent]`, // A click in the split children calls the server fn by the id the server // runs it under, however the chunk reaches it (its own caller or the // parent's); the SSR build's server entry runs the handler for that id. - // Source: FIX-PLAN HYD-14 describe.concurrent('server fns called from split children', () => { test.each([ { @@ -913,14 +912,13 @@ return [button('outer').textContent, button('inner').textContent]`, ) describe.concurrent('which elements are boundaries', () => { - // Goal (DECISIONS 2026-10-18 "namespace imports"; SPEC J5.1): a + // Goal (SPEC J5.1, J7.2): a // namespace member `` is a boundary like a named import, // so its children's code loads when it hydrates, not with the page. On // main the compiler leaves it unsplit (it still hydrates the server's // HTML: "namespace-imported Start.Hydrate boundaries" above), so the // click loads nothing. - // Source: FIX-PLAN §D "Namespace " (replaces the in-process - // goal of known-bugs-hydrate.test.ts) + // Replaces the in-process goal of known-bugs-hydrate.test.ts. test.fails( 'a namespace-imported Start.Hydrate loads its children when it hydrates', async () => { @@ -958,8 +956,8 @@ return beforeFocus`, // and after a keyed reorder, in the boundary clicked; a new `when` or // `prefetch` object does not restart a hydrated boundary (it would show // the server's HTML again). The same page with `split={false}` (left in - // place by the compiler) is the reference: the framework's behaviour. - // Source: FIX-PLAN V2-19 (SPEC J5.8, J5.4) + // place by the compiler) is the reference: the framework's behaviour + // (SPEC J5.8, J5.4). test('split children follow their parent through updates and a reorder, like unsplit ones', async () => { const [split, reference] = await Promise.all([ app.hydrate('updates', { script: updatesScript }), diff --git a/packages/start-plugin-core/tests/integration/hydrate-pages-solid.ts b/packages/start-plugin-core/tests/integration/hydrate-pages-solid.ts index decb5818ed..79ceffdccf 100644 --- a/packages/start-plugin-core/tests/integration/hydrate-pages-solid.ts +++ b/packages/start-plugin-core/tests/integration/hydrate-pages-solid.ts @@ -308,12 +308,11 @@ export function solidPageSuite(bundler: StartBundler) { expect(page.consoleErrors).toEqual([]) }) - // Goal (DECISIONS 2026-10-18 "namespace imports"; SPEC J5.1): a + // Goal (SPEC J5.1, J7.2): a // namespace member `` of `@tanstack/solid-start` is a // boundary like a named import. On main it is left unsplit (it hydrates: // "namespace-imported Start.Hydrate boundaries" above), so the click // loads nothing. - // Source: FIX-PLAN §D "Namespace " (Solid row) test.fails( 'a namespace-imported Start.Hydrate loads its children when it hydrates', async () => { @@ -403,8 +402,7 @@ export function solidPageSuite(bundler: StartBundler) { // The split children read the newest signals, context and callbacks // (never a frozen first read), before their boundary hydrates, after // their code loaded and after a reorder, in the boundary clicked. The - // same page with `split={false}` is the reference. - // Source: FIX-PLAN V2-19 (SPEC J5.8, J5.4) + // same page with `split={false}` is the reference (SPEC J5.8, J5.4). test('split children follow their parent through updates and a reorder, like unsplit ones', async () => { const [split, reference] = await Promise.all([ app.hydrate('updates', { script: updatesScript }), @@ -424,7 +422,7 @@ export function solidPageSuite(bundler: StartBundler) { // instead of using the parent module's (`createContext` runs again // there), the Solid twin of known-bugs-hydrate.test.ts "client: the // children use the module-level context of the parent module". - // Source: FIX-PLAN V2-19 probe (a context declared in the page module) + // Found with a context declared in the page module. // Impact: split children of a Solid page read another context than the // one their parent provides (here its default value). test.fails( diff --git a/packages/start-plugin-core/tests/integration/hydrate-pages.ts b/packages/start-plugin-core/tests/integration/hydrate-pages.ts index 8f88b36ecf..43979c65bb 100644 --- a/packages/start-plugin-core/tests/integration/hydrate-pages.ts +++ b/packages/start-plugin-core/tests/integration/hydrate-pages.ts @@ -183,7 +183,7 @@ export interface HydrationApp { } /** - * Page script of the parent-update scenario (SPEC J5.8; FIX-PLAN V2-19), + * Page script of the parent-update scenario (SPEC J5.8), * for a page with two keyed boundaries (`a`, `b`, hydrating on * interaction) rendering a child `