This is a selection menu, not a table of contents. Each entry says what a section holds and when a session needs it, so you load only what your subject touches. Read this menu, then load those sections by heading text:
node scripts/doc-section.mjs docs/testing.md "<Heading>" ["<Heading>" ...]A heading loads with every subsection under it, and
--listprints every heading. Match by heading text (exact, or a unique prefix), never by line number.Headings are an interface. Skills, agents, tickets and other docs name these headings (
Known flakesamong them). Rename one only in the change that updates every call and citation naming it, found withrgover tracked and untracked files.
Rules and mechanics.
Commands: Thebun runscripts for tests, defect checks, lint and the full gate. Load it when you need the command for a gate.Name the defect: Every subject entry in the next list, about 76k in all. Load those subsections instead; the whole section is rarely needed.Bootstrap falsification: The four entries nested below: howscripts/verify-defects.mjsproves a named defect. Load it when you run, change or explain the defect verifier.Snapshot, sandboxes and links: The in-memory snapshot, the sandbox directory, recreated links and the rootnode_modulesrefusal. Load it when you change what a sandbox holds, or a sandbox fails to resolve an import.What a run requires, and how it fails or stops: Record and anchor rules, baselines, the per-defect run, what counts as a clean end, the progress reporter and exit witness, the stall stop and leftover cleanup. Load it when you read a verifier failure or change its verdicts.Jobs and selectors:--jobs,--ids,--editedand--changed, what a filtered run reports, and whybun run checkre-proves no defect. Load it when you choose how to prove a lane's records.Hook-free tests and mutation anchors: Why bootstrap tests stay hook-free, the check's limits, and updating an anchor after a format change. Load it when you write a named test or an anchor stops matching.
Known flakes: The one unexplained Windows worker exit and its recurrence table. Load it when a gate fails with exit code 3221225477.Future integration fixtures: The synthetic projects and edge cases still to build. Load it when you plan fixture work.Selection validation: Comparing selection against a full baseline, the edit corpus's checks and the falsification corpus's. Load it when you validate or change selection or falsification scheduling.Performance validation: How to report measurements and keep benchmarks out of correctness tests. Load it when you measure or benchmark.
Which defects and test files cover each subject. Each entry below is a ### under Name the defect: the defect id ranges, the test files and fixtures that cover a subject, and the harness seams those tests use. Load the entries your subject touches before writing or repairing a test.
Named-defect rule and where records live: The rule that every behavior test rejects a concrete wrong behavior, and the per-workspacedefects.jsonwith repository-unique ids. Load it when you write any behavior test.Core freshness and test identity: Thepackages/corerecords forevidence.test.tsandtest-identity.test.ts. Load it when you test freshness rating or test identity.Vitest discovery, runs and run safety: Discovery and run records and fixtures, abort hold points, run safety (force-stop, loader choice, no writes, snapshots), selection facts discovery reports, and not-covered workspaces. Load it when you testpackages/daemon/src/vitest/.Results store and refused records: The store's records over realnode:sqlitefiles, a newer-schema store, refused discoveries and refused runs. Load it when you testpackages/daemon/src/store/.Daemon process, start handshake, protocol and stop: The daemon, protocol, client and confirmed start records, the start handshake, late answers and the stop sequence. Load it when you test the server, lifecycle start and stop, or the client connection.Endpoint proof, process trees and the Windows job helper: The proof, rendezvous, store lock and job-tree records, the heartbeat children, the client's refusal reasons, andwindows-job.test.ts. Load it when you test the endpoint proof, process-tree ending or the Windows job helper.Executor host rejections and crashed runs: The host-thread rejection guard over thehost-rejectionfixture, and crashed runs over theexecutor-crashfixture. Load it when you test the executor process or crash handling.Scheduling runs and holds: The schedule of runs overscheduling-harness.tsandround-fixtures.ts,RunHistory, the self-changing workspace and discovery holds, and the falsification look the scheduler takes. Load it when you test the scheduler, due rules, holds or the look.What the daemon is doing in every answer: The round, execution and selection facts in answers, the rig's hold options,RecordingStorerun ids, and the protocol-version tests. Load it when you test the schedule an answer reports, or raise the protocol version.Input tracking, invalidation and access-time events: The tracker's records, itsfs.watchmock and inotify model,onPlatform,fixtureRepository, git file locations, the access-time judgment, and a watcher failure with the reconciliation after it. Load it when you testpackages/daemon/src/inputs/or the tracker.Listed files the inputs leave out: Events, reads and Linux watches on listed files the inputs leave out, and the setup files both fingerprints digest. Load it when you test listed-file watching or reads.Run judgment and interruption: Judging a run by its workspace's inputs, interruption,BuildPlacement, and the review's gaps there. Load it when you test the run verdict or interruption.Declared non-inputs, protection and crawled links:rt-test.jsonnon-inputs, the widenings selection leaves out for one, protection through other spellings of the root, the crawled-link walk, and protection's Windows case fold. Load it when you test non-inputs, protection orcrawl-links.ts.Environment variables in the fingerprint: The environment digest andnonInputVariables, the start environment each executor gets, and the variables Vite carries. Load it when you testenvironment-digest.tsorcarried-variables.ts.Env files and nested projects containers: Env sources and the env file reader over theselection-factsfixture, and not-known env sources over thenested-projectsfixture. Load it when you test env files or Vitest 5 containers.Workspace selection, aliases and the source scan: Workspace-level selection, Vite roots and alias analysis, alias rewriting, tsconfigextendsandfile:URLs, and the source scan'snode:fsand git seams. Load it when you testpackages/daemon/src/selection/.Dependency builds and narrowed inputs: Selection input, the build in its executor process and its crash hooks, where a build's parse record is created, narrowed inputs, and the build's 120 s bound. Load it when you test dependency builds or input narrowing.Falsification jobs, mutation transforms and reach: The falsify records, thefalsifyfixture with its run hook, directory link and temp directory override, the one job per Vitest line, the judge over hand-built facts, the canary set's job overpackages/daemon/canaries/, the canary reading over stand-in installs, the canary gate over stand-in installs and through the lifecycle's rig, the executor-crash holds, and the schedule of falsification jobs over the lifecycle's rig. Load it when you testpackages/daemon/src/falsify/, the canary set, the canary reading, the canary gate indaemon/canary-gate.ts, the executor's falsification job ordaemon/falsification.ts.Summary and path status queries: The summary and path-status records, the CLI'ssummaryandstatus, and reading the paths a query names. Load it when you testsummaryorstatus.Wait and changes queries:waits.test.ts,changes.test.ts, the server's request checks, real-daemon cases, and thewaitandchangescommands. Load it when you testwaitorchanges.Defect definitions and the defects query: The definition file reader, validator and resolver records, the answer's moment, gaps, scope, bounds and refusals, the server's and client's request checks, and thedefectscommand. Load it when you testpackages/daemon/src/defects/,query/defects-answer.tsorrt-test defects.Defect evidence and its standings: The stored evidence records over realnode:sqlitestores, the definition digest and evidence freshness over definitions resolved from real files, the answer's evidence fields, the evidence refusal log and the command's text, with the fact builders they share. Load it when you testpackages/daemon/src/store/defect-evidence.ts,store/evidence-facts.ts,defects/defect-standings.ts, or the evidence an answer orrt-test defectsreports.CLI start and stop, and the agent hook:cli.test.ts's simulated terminal for start and stop, andhook.test.tsfor the Claude Code hook. Load it when you test the CLI's start and stop or the agent hook.Edit corpus: The edit corpus records and what each replayed sequence must reject. Load it when you test or extend the edit corpus.Falsification corpus: The falsification corpus records, the one replay each Vitest line keeps for the file, and which records take a real canary reading under a mutated daemon. Load it when you test or extend the falsification corpus.Daemon suite temp root, watchdog and teardown: The run-scoped temp parent, the watchdog, teardown and the run-cleanup records. Load it when a daemon test leaves processes or directories behind, or you touch the harness teardown.Tooling records, id allocation and one assertion per test: Legacy tooling records, unique ids and the orchestrator's id ranges, and one assertion per test. Load it when you add a defect record or a tooling test.
Use bun run test:run for Vitest, bun run test:defects for the bootstrap defect checks, bun run check:defects for the static catalog check, bun run lint for oxlint, and bun run check for all current gates. Use bun run test only when you intend to leave a watcher running. The project does not use Bun's built-in test runner.
Give every behavior test a concrete wrong behavior to reject. Record expected behavior independently from the implementation. Prefer examples that distinguish the intended behavior from a plausible mistake.
Each workspace keeps a defects.json beside its tests, associating each named test with one explicit mutation and the file it mutates; separate files let lanes in different workspaces add defects without sharing a file. Defect ids are unique across the repository.
D001 through D008, in packages/core/test/defects.json, cover the freshness core in packages/core/test/evidence.test.ts, and D1000 through D1005, in the same file, cover test identity in packages/core/test/test-identity.test.ts.
D1791, D1861 and D1862, in packages/core/test/defects.json, cover the whole test-identity key in packages/core/test/test-identity.test.ts.
D1010 through D1083, D1160 through D1199, and D1206 through D1208, in packages/daemon/test/defects.json, cover Vitest test discovery and runs (packages/daemon/src/vitest/) in packages/daemon/test/, against the fixture projects in test/fixtures/daemon/; the run-interrupt fixture's config and the run-unqueued fixture's global setup report run events to a host global, so D1175 through D1184, D1186, D1199, D1206 and D1208 abort a run at an exact point; a mid-run abort keys on the running test's annotation, which reaches the host by direct RPC, because Vitest batches per-test ready and result events in a throttled worker flush that can be held until the next update; D1080 and D1188 hold a discovery in the run-interrupt fixture's configureVitest hook and a run in the run-unqueued fixture's global setup until an overlapping one has ended.
D1276 through D1325 and D1327 through D1336, in packages/daemon/test/defects.json, cover run safety: the store's force-stop field, its migration from schema version 1 and the adapter version in packages/daemon/test/store.test.ts, where D1282 holds a version-1 store's migration open in a worker thread while the store under test opens the same file; the config-loader choice and the refusal of workspaces outside the consumer root or reached twice in packages/daemon/test/find-workspaces.test.ts, over temporary trees with junctions; interrupting a discovery, a run's force-stop field and a consumer tree left unwritten in packages/daemon/test/discover-tests.test.ts, where the discover-interrupt and force-stop fixtures mark the moment to abort by writing a file the test polls for, and the no-writes fixtures' configs turn on snapshot updates, a custom coverage provider and the module cache; and the force-stop itself in packages/daemon/test/force-stop.test.ts, which mocks FORCE_STOP_GRACE_MS down to 1 s and waits for it in real time, over the force-stop fixture's 20 s loops; D1325 holds an async globalSetup in the force-stop fixture's late-queue workspace past the mocked grace; and D1331 through D1336 write a CRLF snapshot file holding an unchecked entry from the test, so git's newline conversion cannot remove it, into the no-writes fixtures and into the snapshot-projects fixture, whose second project names its own snapshot environment.
D2093 through D2124, in packages/daemon/test/defects.json, cover each discovered workspace's selection facts: the store's report column, its migration from schema versions 1 and 2 and its strict reader in store.test.ts; the setup files, global setup files, aliases and test file patterns discovery reports, on Vitest 5 and 4.1, in discover-tests.test.ts, over the selection-facts fixture, whose test writes a setup file beside the consumer root and a directory link to its setup folder before discovery; and, in test-module-file.test.ts, a test module on another Windows drive, whose path stays absolute and lies outside the consumer root for the input filter, through a node:path mock that is Windows' module, so it is proven on either host.
D4293 through D4298 and D4300, in packages/daemon/test/defects.json, cover the setup files RT Test places in a project (placeSetupFileFirst in packages/daemon/src/vitest/workspace-session.ts), in discover-tests.test.ts over the client-environment fixture: two inline projects of one config, client, whose environment file declares viteEnvironment: "client" as jsdom's and happy-dom's do, so the fixture needs neither, and node, which has a setup file of its own. A fixture's copy lies under the run's temp parent, outside this repository, so RT Test's source lies under no directory Vitest puts on a project's allow list, as a consumer's build does. D4293 through D4296 read a discovery and a run of the fixture on Vitest 5 and on Vitest 4.1, each against a guard placed without its directory joining the allow list. D4297 and D4298 open a session through inWorkspaceSession that collects and runs nothing, and read the loaded Vitest through inClientEnvironmentSession: D4297 that the one Vite server the two projects share on Vitest 5, whose inline projects reuse their declaring config's server by default, allows the guard's directory once, against a push with no check; D4298 that the guard comes ahead of the node project's own setup file on both lines, against a file placed last. D4300, in test-module-file.test.ts, whose node:path is Windows' module on either host, calls placeSetupFileFirst on a hand-built project with a Windows path and reads the allow list's one entry spelled with forward slashes, against a directory added in its native spelling. D1285 and D1286 pin adapter version 4. Not covered: a shared server on Vitest 4.1, where only browser-mode clones share one and RT Test runs none.
D3337 through D3359, in packages/daemon/test/defects.json except D3358 and D3359, which are in packages/cli/test/defects.json, and the re-anchored D1033, D1300, D2097, D2098, D2122, D2260, D2791, D2792, D2829, D2830, D2831, D2846, D2859, D3040, D3041, D3128 and D3129, cover package workspaces with a test script that are not Vitest workspaces, and a state directory outside the consumer root (notCovered in packages/daemon/src/vitest/find-workspaces.ts, the discovery's drop of a candidate holding one of its test modules in discover-tests.ts, the store's schema version 10 with its discoveries.not_covered column and migrations, the summary's workspace-not-vitest entry and path status's reading of it, and start --state-dir). The listing's cases, a workspace listed by two patterns and the sources not read are covered in find-workspaces.test.ts over trees the test writes. The drop of a candidate a root config collects, through a discovered test or a module that failed to load, is covered in discover-tests.test.ts over the not-covered fixture. The round trip, the empty and the absent list, and the migrations from versions 9 and 2 are covered in store.test.ts, whose helpers that lower a store's version drop not_covered. The summary entry and status at and inside the workspace are covered in query.test.ts over hand-built results. A start whose --state-dir lies outside the root, reached by summary and stop through the root alone, and the human lines for a packages/tooling workspace the test adds are covered in packages/cli/test/cli.test.ts over the daemon-lifecycle fixture.
D4115, in packages/daemon/test/defects.json, reads the install's directory in load-vitest.test.ts: a workspace that reaches a stand-in install through a directory link resolves the install's own path.
D4334 through D4344, D4346, D4352 and D4353, in packages/daemon/test/defects.json, cover a rediscovery handed lists and the lists a run's job reports (rediscoverTests and carriedSpecifications in packages/daemon/src/vitest/discover-tests.ts, runLists and collectedTests in vitest/test-lists.ts, and the discover and run arms of daemon/executor-main.ts and daemon/executor.ts). In discover-tests.test.ts, rediscoverCarried rediscovers a copy of the single fixture once per Vitest install, handed a list of a.test.mjs that names a test the file does not hold, so a kept list reads apart from a collected one, and a list of a module no file holds, beside b.test.mjs, which the test writes and hands no list for: D4334 through D4336 read the kept list, the collected module and the module paths the workspace lists, the module that left not among them, D4337 the workspace's counts without its time, and D4342 the whole list on Vitest 4.1. rediscoverLinked writes one test module and a directory link to its folder, which Vitest lists as two specifications that locate to one module on both lines, and hands one list of it; D4338 reads the list's test once beside the test the second listing collected. rediscoverPair rediscovers a copy of the consumer fixture with packages/app, packages/lib and packages/old confirmed, the first two each holding x.test.mjs in a project with no name and the third on a faked Vitest 3.2.4, handed one list, of packages/app's module: D4346 reads the kept test in app beside the collected one in lib, against lists kept whatever workspace they were handed for, and D4352 reads packages/old's row as unsupported with no module counted. listedRunOf runs a fixture's root workspace once per Vitest install through runWorkspaceListing and keeps the run with its lists, and D4339, D4340 and D4341 each read Vitest 5 and 4.1 in one assertion through onBothLines: D4339 no list for the run-crash fixture's crashed module beside one for the module that ran, D4340 no list for the run fixture's module whose module-level beforeAll throws, which the run records as ran, and D4341 the declared modes of a skipped and a todo test. In executor.test.ts, inSingleConsumer opens a real Executor over a copy of the single fixture: D4343 sends a discovery job a list and reads the kept test and the collection counts back, against an executor process that discovers with no list, D4344 reads a run job's lists, and D4353 sends a discovery job no list and reads the workspace's collection in its outcome. D1053's record mutates collectedTests in vitest/test-lists.ts, where the mode is now read. Not covered: a module listed twice whose second listing fails to collect, and a rediscovery handed lists on Vitest 4.1 through a directory link.
D1211 through D1249 and D1256 through D1266, in packages/daemon/test/defects.json, cover the results store (packages/daemon/src/store/) in packages/daemon/test/store.test.ts, each against a real node:sqlite store in a temporary directory; D1239 reads through a second store while a run is being written, and D1264 holds the schema's creation open in a worker thread while the store under test opens the same new file.
D4357 through D4373 and D4379 through D4381, in packages/daemon/test/defects.json, cover a stored run replacing its workspace's earlier runs and a stored discovery its worktree's earlier discoveries (removeEarlierRuns in packages/daemon/src/store/write-run.ts and removeEarlierDiscoveries in write-discovery.ts), in store.test.ts: the record replaced whole with its rows, and replaced whatever fingerprint each earlier one was stored under, a digest, another digest or none; a run stored in place of another given a run identity of its own; each part of the key, another workspace's, worktree's and project's record kept; a write that fails removing nothing; a second store that reads while a replacing record is written, through a getter on the record, and finds the earlier one; defect evidence left as it was, read through a store opened afterwards; no child row left behind; a latest record refused as unreadable replaced with its rows; and the store's page count unmoved across 100 further saves once each key has been replaced. D1225 stores a run of each of two workspaces, since a second run of one workspace takes the first one's place. A test that needs several records of one key, as a store an earlier RT Test wrote holds them, seeds them through writeRunsKept and writeDiscoveriesKept, which write each record under a worktree of its own and move it to the scope through a second connection: D1235, D1832, D1833, the refused run tests D3266 through D3269, and the helpers that build a store of an older schema version.
D2915 through D2934, D2958 through D2963 and D2970, in packages/daemon/test/defects.json, and the re-anchored D1238, D1239, D1248, D1260, D1457, D1458, D2052, D2691 and D2906, cover a latest discovery the store refuses as unreadable and a store a newer RT Test migrated while the daemon held it open (UnreadableRecordError and readLatestResults in packages/daemon/src/store/, the record read and write guards in transaction.ts, the lifecycle's refusal log and a refused write's listed reason in packages/daemon/src/daemon/lifecycle.ts and job-endings.ts, and the answer's refusal in packages/daemon/src/query/summary.ts). The store side is covered in store.test.ts, over stored rows a second connection corrupts or whose user_version it raises: D2925 raises it inside a write a worker thread holds until the store asks for its write lock, D2926 raises it as the read's BEGIN runs, through a pass-through spy on DatabaseSync.prototype.exec, and D2963 commits a discovery and a run through a second store as the read's schema version is prepared, through a spy on DatabaseSync.prototype.prepare. The daemon's plan, log and listing are covered in lifecycle.test.ts over a real store, where D2931 raises the version during the run's job and D2958 to D2961 change the stored discovery between the daemon's reads, and D2970 fails a discovery's write, which is logged with its error and never as ended, and the answer's refusal and its cut in query.test.ts.
D3266 through D3284, in packages/daemon/test/defects.json except D3278, which is in packages/cli/test/defects.json, and the re-anchored D1801, D1884, D2928, D2929, D2960 and D2961, with D1802 updated, cover a latest run the store refuses as unreadable (selectLatestRuns in packages/daemon/src/store/read-runs.ts, the run-refused state and the summary's refusedRun in packages/daemon/src/query/, the CLI's refused line, and packages/daemon/src/daemon/refusal-notes.ts, which logs the discovery's refusal too). The readable runs beside a refusal, the refusal's reason and cause chain, no older run standing in, and a store failure that still throws are covered in store.test.ts, over rows a second connection gives a status no reader knows or an unreadable unhandled_errors under PRAGMA ignore_check_constraints, where D3270 fails a run's test rows through a pass-through spy on StatementSync.prototype.all. The state, its freshness, the path status count, the zero count and the workspace facts are covered in query.test.ts over hand-built results, the CLI line in packages/cli/test/cli.test.ts over a scripted answer, and the refused workspace's run and each run refusal's log entry in lifecycle.test.ts over a real store.
D1436 through D1459, D1461 through D1498, D1500 through D1504 and D1531 through D1540, in packages/daemon/test/defects.json, cover the daemon process, its local protocol and its client (packages/daemon/src/daemon/, packages/daemon/src/client.ts) and the confirmed start (packages/daemon/src/vitest/confirmed-start.ts): the line decoder and the named bounds in packages/daemon/test/protocol.test.ts; the connection rules in server.test.ts, over a throwaway endpoint with stand-in handlers; the scheduler's start, status and stop in lifecycle.test.ts, with a scripted executor; the Linux runtime directory and start lock in runtime-directory.test.ts, which stubs the platform, the user id and lstat so each runs on Windows too; the confirmed start and each workspace's working directory in discover-tests.test.ts, over the confirmed and cwd fixtures; and daemons started from source in daemon.test.ts, over the daemon-lifecycle fixture, whose packages/a holds collection, a test or a synchronous global setup when the test writes a file and records the executor's process id; D1497 raises SIGTERM inside the daemon through the emit-sigterm.mjs preload, since no Windows process can deliver it, D1496 closes a forked executor's channel itself, since Windows ends a killed daemon's children, and D1485 lists the client's modules through list-modules.mjs. D1482 covers the not-confirmed discovery status in store.test.ts. D1531 through D1540 cover the endpoint's stale-holder seam, a relative runtime directory, a startup message that is not a confirmed start, a root-relative confirmed config, a runtime-directory path that is a file, a stop that waits while another listener holds the endpoint, a not-confirmed workspace the scheduler skips, a request without a protocol version, and the close grace for a client that stops reading.
D1764, D1765 and D1767, in packages/daemon/test/defects.json and packages/daemon/test/daemon.test.ts, cover the start handshake: a daemon abandons a start whose channel closes or carries anything but begin after its serving report, and runs its schedule to idle once the start is accepted.
D4374 through D4377, in packages/daemon/test/defects.json and packages/daemon/test/daemon.test.ts, cover the log's entry for a stored run (runStoredEntry in packages/daemon/src/daemon/job-endings.ts and its one call in lifecycle.ts): D4374 reads a real daemon's log beside its store, each stored run logged once with the digest the store holds for it, ahead of its run ended entry; D4375 raises the store's schema version through a second connection while a run is held, so the run's write is refused and no entry names it stored; D4376 and D4377 pin the entry's text for a run stored under a digest and for one stored not fingerprinted. D2691, D2692 and D3446 count the runs a daemon stored from those entries, through loggedRuns in packages/daemon/test/stored-run-log.ts, since the store holds only each workspace's latest run.
D3187 through D3216, D3247 through D3249 and D3254 through D3256, in packages/daemon/test/defects.json, and the re-anchored D1444, D1448, D1459, D1463, D1569, D1838, D1881 and D2520, cover answers written once their work ends (the per-connection answer queue, MAX_UNANSWERED_REQUESTS and the stop signal in packages/daemon/src/daemon/server.ts, the lifecycle's stopSignal and its stop sequence, which runs every closing after a failed step, and the bound on DaemonConnection.request). The late answer beside other connections, the order on one connection, the bound on unanswered requests, the mismatched connection's end, a stop and a client's close with requests pending, and a late answer's checks are covered in server.test.ts. They run over stand-in handlers whose summaries answer with a promise the test settles, since no production handler answers late yet. The client's bound, its refusals and an overlapping request are covered there through DaemonConnection on a fake clock. A late rejection after a close, and a stop sequence that rejects, are asserted free of unhandled rejections through packages/daemon/test/unhandled-rejections.ts, which sets Vitest's listeners aside for the test's body. The stop signal, isStopping() and the rejected stop sequence are covered in lifecycle.test.ts. D3192, D3249 and D3254 through D3256 cover the review's gaps: closings after a rejected tracker stop and a stopped() that still resolves, in lifecycle.test.ts; the bound counting requests answered at once behind a pending one, and a stop request behind 8 pending, in server.test.ts; and a tracker stop whose watcher close throws still releasing a wait on its change signal, in input-tracker.test.ts.
D1459, D1462, D1881, D2520, D2537, D2677 and D3192 mutate daemon/stop-sequence.ts, which holds the lifecycle's stop sequence.
D1556 through D1580, D1656 through D1665 and D1681 through D1684, in packages/daemon/test/defects.json, cover the daemon's proof, rendezvous, store lock and process tree: the proof's binding and construction, the key's removal and the Windows key directory's DACL in endpoint-proof.test.ts, which injects spawnSync so the icacls and whoami answers run on either host; the challenge limit and the proven answers in server.test.ts, over a real key; the /tmp/rt-test-<uid> rendezvous in runtime-directory.test.ts; the Linux process group and the Windows tree walk in process-tree.test.ts, which stubs the platform, process.kill and the system-tool runner; holding each executor's tree before its job in executor.test.ts, which replaces the tree containment with a recording stand-in; impostors on the real endpoint, the key read before a request, and the key and store lock over a daemon's life in daemon.test.ts; and the children a global setup or a test starts, directly, from a forked worker or through a shell, in job-tree.test.ts, where the daemon-lifecycle fixture's spawn-children marker starts heartbeat children, each of which connects to an endpoint the test names in the fixture's child-endpoint file before its first beat and answers with its process id, so a test asks each child whether it still runs and the OS closes a killed child's connection.
D3285 and D3286, in packages/daemon/test/defects.json, pin the client's refusal reasons in endpoint-proof.test.ts: the whole message provenRequest throws for an answer whose proof was made with another key, and the verifier's reason for an answer that carries no proof.
D2402, D2403, D2407 through D2416, D2420, D2421 and D2423 through D2425, in packages/daemon/test/defects.json, cover the daemon tests' connection handling: each error on a heartbeat child's connection, before or after it closes, the process id each child announces on connecting, and each answer in job-tree.test.ts, where the test emits the error on its own socket as the socket would, D2409 holds a heartbeat child's real connection open until the exit barrier asks about it through a pass-through mock of isRunning, and D2420 preloads test/fixtures/daemon/reset-on-first-line.mjs, which resets the child's connection on the test's first write, and D2423 preloads test/fixtures/daemon/end-lifetime-on-first-line.mjs, which ends the child's lifetime on the test's first write; the raw connection's end after an error in server.test.ts; and a stand-in's unreadable request, a JSON value that is not an object and a test body that fails after one, in daemon.test.ts.
D2567, in packages/daemon/test/defects.json, has a process outside the fixture hold a heartbeat child's announced id in packages/daemon/test/job-tree.test.ts.
D1698, D1699, D2816 through D2827, D2834 through D2845, D2848 and D2849, in packages/daemon/test/defects.json, cover the Windows job object helper (packages/daemon/src/daemon/windows-job.ts) in packages/daemon/test/windows-job.test.ts, which mocks spawn with stand-in helpers that follow a script, answer each command across a tick, record each command and kill, and close only when the test says so, and sets SystemRoot, so each runs on either host: the start diagnosis under a policy and outside one, and a first line that is neither; a start that answers past the answer bound but inside its own, and its own bound at both edges; a helper ended by its answer bound, by an error before its first line or by closing, a read error on its output, a write error on its input and a second error on its process, a helper whose exit Node recorded before its close event, an executor that never started or exited before, during or after its helper's start or during its assign, the hold that arms kill-on-close only after the assign and its refusal, a failed release, the answer's escapes, a close during or after a helper's start, on a running helper, with an answer in flight or after the helper closed, and a job tree ended twice.
D2748 through D2774, in packages/daemon/test/defects.json except D2770 and D2774, which are in packages/cli/test/defects.json, cover the executor's guard against unhandled rejections on its host thread (packages/daemon/src/vitest/host-rejections.ts, its install in executor-main.ts, the executor's --unhandled-rejections=throw fork flag and inherited stderr, and the session's merge in workspace-session.ts), and how a discovered workspace's unhandled errors are answered. Each host site (config at load, plugin transform, global setup and teardown) is covered on Vitest 5 and 4.1, with a discovery, a failed session, a test body's rejection beside a host one and a strict NODE_OPTIONS, in executor.test.ts over the host-rejection fixture. The fixture's RT_HOST_REJECTION names the site that leaks, synchronously, so no timer decides it. The guard itself runs in a Node process of its own through the fixture's guard-driver.mjs, since replacing a Vitest worker's process.emit would take its own reporting. A stored run and the guard's line in the daemon's log are covered in daemon.test.ts. The summary's workspace-unhandled-errors entry and a path status naming it above the path are covered in query.test.ts, over hand-built discoveries. The human summary's unhandled error count and that entry are covered in packages/cli/test/cli.test.ts, over the daemon-lifecycle fixture, where leakAtDiscovery and leakAtFirstRun make packages/a's global setup leak at the discovery or the first run alone.
D2775 through D2795 and D2797 through D2801, in packages/daemon/test/defects.json except D2789, D2790, D2798 and D2801, which are in packages/cli/test/defects.json, cover a run whose executor process dies with no stop asked of it (packages/daemon/src/daemon/executor.ts, due-workspaces.ts and scheduler.ts, the store's crashed-run columns and the schema version that makes earlier code refuse them, the query's run-crashed state and crashed latestRun, and the CLI's crashed line and cut reason). The executor side is covered in executor.test.ts over the executor-crash fixture, whose crash file, which the test writes before a job, makes its global setup throw uncaught on the next event-loop turn, exit with code 3 from its teardown, or send ready on the executor's channel, and whose hold-point directory, once the test creates it, holds its first test so an abort or a close lands mid-run. It covers a crash on Vitest 5 and 4.1, a teardown's process.exit, an exit after an abort or a close, the stop flag's reset between jobs, a discovery's death, a project's own message on the channel, which is ignored and logged, and, through the recorded containment and withinBound, a dead executor's job that settles rather than never. The answer's state, freshness under settled inputs, reason and cut are covered in query.test.ts. The retry and its due reasons, a failed run's included, are covered in scheduler.test.ts, where a retry armed because the last attempt stored nothing does not run a workspace that reads current again by plan time, reached through a run that does not begin because the revision moved. The migration from version 4, which keeps each run and discovery, and a crashed run's read-back are covered in store.test.ts. The human summary's crashed line is covered in packages/cli/test/cli.test.ts, over the daemon-lifecycle fixture, whose packages/a global setup throws at the setup count its crash-at marker names; its cut reason is covered through a scripted querySummary, cutReasonText directly, and a line or paragraph separator escaped by oneLine. D1495 in daemon.test.ts pins a killed run stored crashed, and D2660 is re-anchored to retryReason.
D2642 through D2681, D2684 through D2695, D2728 through D2747 and the re-anchored D1451, D1452, D1455, D1465, D1538, D1880, D1953, D1987, D2080 through D2084, D2090, D2092, D2517, D2537, D1883, D1885, D1921 and D1998 cover the schedule of runs (packages/daemon/src/daemon/scheduler.ts, due-workspaces.ts, round-selection.ts, the lifecycle's job path, the tracker's periodic count, whether a job's verdict names a change while it ran, Narrowing.select, the view's committed inputs and the freshness helpers query/summary.ts calls): the due rule, the once-per-revision record, the quiet window, rediscovery, retry at a periodic reconciliation, each round's log and its queue order in packages/daemon/test/scheduler.test.ts, which drives the real scheduler through its parts over scheduling-harness.ts's stand-in tracker and store and round-fixtures.ts's stand-in narrowing, with a fake clock for the window; a workspace the confirmed start omits, the throwing executors, the rejecting close, the list of jobs that stored nothing, the activity once a job returns and a run planned at a revision that moved in lifecycle.test.ts; the periodic count and whether a verdict names a change while its job ran in input-tracker.test.ts; the view's snapshot in query.test.ts; Narrowing.select in select-tests.test.ts; and a restart over current results and an edit's rerun over the daemon-lifecycle fixture in daemon.test.ts, whose copy withDaemonConsumer makes a git repository ignoring the markers the fixture and its tests write while a job runs, since a file that changes during a job is an input edit that leaves its workspace due.
D3133 and D3134, in packages/daemon/test/defects.json, cover the guards by which RunHistory in packages/daemon/src/daemon/run-history.ts tells a once-more run owed at one input revision and list of test modules from a first run at another, in scheduler.test.ts.
D3138 through D3184, in packages/daemon/test/defects.json except D3174 through D3179 and D3183, which are in packages/cli/test/defects.json, and the re-anchored D1465, D1987, D2661, D2668, D2729, D2788, D2888, D2990, D2991 and D2992, cover holding a workspace whose own runs and discoveries keep changing its inputs (packages/daemon/src/daemon/change-record.ts, run-history.ts, the scheduler's and lifecycle's recording, the job window's digests, and the answer's and CLI's self-changing reason), in scheduler.test.ts over the rig's scripted windows and digests, in lifecycle.test.ts over narrowed builds with a RewritingExecutor, in input-tracker.test.ts and in packages/cli/test/cli.test.ts.
D3296 through D3330, in packages/daemon/test/defects.json except D3324 through D3326, which are in packages/cli/test/defects.json, and the re-anchored D1987, D1988, D2658, D2659, D2663, D2732, D2975, D3096, D3139, D3147, D3180, D3182 and D3184, with D1879 and D2159 repaired, cover holding a discovery whose own jobs keep changing its inputs, discovering once more at an unmoved revision, and a refused run's due reason (packages/daemon/src/daemon/discovery-history.ts, the scheduler's recording into it, the lifecycle's report of a change while the discovery ran, the schedule's selfChangingDiscovery, DUE_REASON.runRefused through due-workspaces.ts and query/summary.ts, and the CLI's lines). The count, the hold, its release and re-hold, the periodic retry and the once-more wait are covered in scheduler.test.ts over the rig's scripted discovery jobs (discovered: the paths a discovery changes, a moved revision, a change while it ran), with a fake clock for the 2000 ms wait. D3147, D3180 and D3182 rediscover over a discovery fingerprint that cannot be computed, which no count holds. RecordingStore in scheduling-harness.ts refuses a workspace's latest run through refuseLatestRun until a later run replaces it. The report's three sources are covered in lifecycle.test.ts, the refused due reason through queryBasis in query.test.ts, and the human lines in packages/cli/test/cli.test.ts over hand-built answers.
D4045 through D4049 and D4156, in packages/daemon/test/defects.json, cover the falsification look the scheduler takes once a plan finds nothing due (#step, #falsify and #idle in packages/daemon/src/daemon/scheduler.ts), in scheduler.test.ts: a look that asks for another plan is followed by one, a run or a discovery that became due while a job ran goes before the next look, the idle entry is logged again after a job, a round at a later revision reads pending on the job in progress, and a look that took nothing because the revision moved during it is followed by the run the move made due, with no idle entry and no idle call before it. The rig's falsified option scripts each look, given its index and the stand-in inputs, which it may move as a change during a job does; a scripted look is recorded in the rig's calls as look@<revision>, and an unscripted one takes nothing and is not recorded.
D4313 through D4320, D4327 through D4333, D4349 and D4350, in packages/daemon/test/defects.json, of which D4331, D4349 and D4350 are in carried-lists.test.ts with the first eight and the rest in lifecycle.test.ts, cover the lists the daemon hands a rediscovery and the discovery it stores again with a run's lists (packages/daemon/src/daemon/carried-lists.ts, vouchedModules and withModuleLists in vitest/test-lists.ts, and the lifecycle's #discover and #settleRun). carried-lists.test.ts drives listsToCarry, listRefresh and withModuleLists over hand-built stored records: listOf builds a module's list, listing a discovered workspace over lists, ran the module a run recorded for a list, and latestOf what a store holds. D4313 through D4316 read what a rediscovery is handed: nothing from a discovery of another adapter version, nothing from a workspace whose collection raised an unhandled error, only a module its workspace's latest run ran with exactly the listed tests (and nothing of a module that run did not run, of a workspace with no stored run or of one whose latest run crashed), and nothing, with the error logged, when the read throws, which carriedOverFailedRead turns into a value so an escaping throw fails the assertion. D4317 through D4320 and D4331 read the refresh: its bindings, a list of a module the discovery does not list, a list holding no test, lists equal to the discovery's own beside one that gained a test, and a list that differs only in a test's declared mode; D4349 reads a workspace of two modules, one replaced, the other's tests as they were, and D4350 a discovery of another adapter version, which is not stored again, beside one of the current version, which is. In lifecycle.test.ts, ListingExecutor is a scripted executor that records the lists each discovery was handed and reports a collection beside its discovery and lists beside each run, ReadingBackStore a RecordingStore whose readLatestDiscovery gives the discovery written last, and RefreshFailingStore one whose second discovery write throws. D4327 seeds a store with a discovery under an earlier fingerprint and a run that ran its listed test, through ranAsListed, and reads what the rediscovery was handed. afterDifferingRunLists runs a daemon whose run lists another test than its discovery does: D4328 reads the discovery stored again with the fingerprint each was written under, D4329 the log's line, and D4330 the run kept and the failure logged as the refresh's when the second write throws. collectionEntries gives the log's lines after a discovery whose job reported two workspaces: D4332 the discovered one's counts, D4333 the failed one's line, against a lifecycle that logs none. D1987 and D1988 script a run that ran the listed test (declaredModuleStart), since a discovery reads current only while each stored run vouches for its lists. Not covered: vouchedModules handed a run with no modules and listsToCarry handed a workspace with no run, where a dropped guard throws rather than answers; and the dependency builds taking up a discovery stored again, which no single mutation breaks, since each read of the latest results hands the builds the stored discovery.
D2971 through D3035, D3086 through D3090 and D3095 through D3105, in packages/daemon/test/defects.json except D3021 through D3029, D3032 through D3034, D3086, D3088 and D3101 through D3104, which are in packages/cli/test/defects.json, and the re-anchored D1841, D1842, D1845, D1987, D2655, D2693, D2734, D2740, D2741, D2933, D3008, D3032 and D3033, cover what the daemon is doing in every answer (packages/daemon/src/daemon/workspace-schedule.ts, the scheduler's and the lifecycle's recording into it, the due-reason kinds in due-workspaces.ts, the explanation round-selection.ts returns, the answer's schedule and latestSelection and both nothing-to-answer reasons in packages/daemon/src/query/summary.ts, the CLI's round, execution and selection lines and the summary's invalidated label, the protocol version, and the #discover fingerprint's re-check of listed files the inputs leave out). The round's waits, each execution state, the refined due reasons, the reasons a selection chose a queued workspace and each bound on the explanation are covered in scheduler.test.ts, which reads scheduler.schedule after scripted rounds, and the bounds directly on a WorkspaceSchedule. The rig's scripted run can carry the lifecycle's verdict (notKept) and the paths that interrupted it (interruptedBy), and can be held before it stores (held) or after (heldAfterStore); a discovery can be held begun (discoveryHeld); and heldFrom holds the dependency build wait from a given round on, which is the hold point for reading the schedule between two rounds. RecordingStore in scheduling-harness.ts gives each run it writes or seeds its own id, run-<index>, from writeRun and readLatestResults alike, since the invalidated label is keyed by the stored run's id, and each discovery its own id, discovery-<index> (discoveryIdAt), since the dependency builds and the narrowing are keyed by the stored discovery's id. It records each evidence write it is handed (evidenceWrites), keeps one record for each judgement that has a verdict under the bindings and digests handed in, reads them back in readLatestResults, holds evidence an earlier job stored through seedEvidence, and fails each write while failingEvidence is set; it checks nothing of a reply's facts, which the real store's tests do. The label and the interrupted state through a real answer, the answer's activity, and the discovery's re-check are covered in lifecycle.test.ts. There, D3030 reports a listed module changed once protection has taken the discovery. D1879 and D2090 report it only until then, through untilProtected, as the tracker answers for a module a declared pattern kept unwatched: protection reads it into the digests, and protectedFileChangedSince skips every path already there. The stand-in inputs record each such check's since in changedSince, and D3100 fakes Date and moves it 5 s during the discovery, so the job's start and the moment the fingerprint is composed differ. The answer's schedule and label, the held round and the unstored jobs in both nothing-to-answer reasons are covered in query.test.ts, over a real WorkspaceSchedule the stand-in view carries, and the CLI's lines in packages/cli/test/cli.test.ts over hand-built answers. The protocol-version tests in server.test.ts, daemon.test.ts, lifecycle.test.ts and cli.test.ts read PROTOCOL_VERSION, and each mismatch case sends PROTOCOL_VERSION + 1, so raising the version cannot turn a mismatch test into a match. D4113 in protocol.test.ts is the exception: it pins the version as the literal 6, so it is the one test a raise of the version rewrites, with its record. D2978, D2989, D3015 and D3034 were repaired for the held round's retry and a chain step's cut detail. D1879 and D2090 were rewritten over a declared-covered module after the #discover re-check made their earlier stand-in report the change to both checks. D3107 through D3111, in packages/daemon/test/defects.json, cover a round's selection that throws (the replan at that revision explains it, over the stand-in narrowing's record of the paths it was asked about), the answer's cut unstored-job reasons, and the server's two version checks, where an older client's hello sends PROTOCOL_VERSION - 1.
D1877 through D1924, D1935 through D1955, and D1960, in packages/daemon/test/defects.json except D1889, D1890 and D1940 through D1944, which are in packages/cli/test/defects.json, D1954, which is in packages/daemon/test/selection/defects.json, and D1955, which is in packages/core/test/defects.json, cover input tracking and invalidation (packages/daemon/src/inputs/, the lifecycle's job binding, the queries' fingerprint comparison and the answers' input facts). The job binding, the wait for the first reconciliation and the tracker's start and stop are covered in lifecycle.test.ts, over a stand-in tracker that scripts the reconciliation, each workspace's fingerprint and each job's verdict. Freshness by fingerprint, the discovery's freshness, workspaces with no fingerprint, duplicates marked by the discovery or by the run, and the answer's input facts are covered in query.test.ts, over stand-in current inputs. The human answer's input lines and the --json fields are covered in packages/cli/test/cli.test.ts, over one hand-built answer, and so is D1889: a real daemon over the daemon-lifecycle fixture, made a git repository that ignores the fixture's own markers, whose results read current once it idles and stale after an edit. D1954 covers the synchronous git reader in source-scan.test.ts, and D1955 covers core's rating of an empty stored digest in evidence.test.ts. The tracker itself is covered in packages/daemon/test/input-tracker.test.ts, over consumer trees and git repositories written to temporary directories. fixtureRepository in packages/daemon/test/harness.ts builds those repositories under the fixture git settings, with none of the caller's GIT_* variables. input-tracker.test.ts wraps fs.watch in a module mock, so a test can record the path each watch opens on, deliver events the file system never raised (lost events, or the unending stream of D1897), open watches that never report, or make a watch throw ENOSPC or EACCES. It also wraps readEntryDigest so D1947 can make one read throw, and passes git-ignored.js through a module mock so D1960 can make a git check-ignore for a path created after a reconciliation fail, which must still be named among git's unread reasons. D1961 through D1964 and D1966, in packages/daemon/test/defects.json, cover the tracker's recovery and git's file locations: D1961 and D1962 the retry after a reconciliation that could not establish the input set (an event must start one, and not before the 10 s back-off), D1963 a relative core.excludesFile resolved against the repository's top level, D1964 Windows HOME as the home of the user's git config files, injected with the platform and homedir() so it reads nothing from the host, and D1966 a path in a nested repository git cannot answer for, which counts as an input rather than being asked through the enclosing repository. input-tracker.test.ts fakes setTimeout and performance to reach the 5-minute periodic reconciliation and count it by elapsed time. It runs D1891 in a child process from source through --eval, since a tracker that holds the event loop would stall the test's own. D1916 reads process.platform as win32, and D1917, D1918 and D1946 read it as linux, through onPlatform in packages/daemon/test/harness.ts, so each platform's watch path is proven on either host. D1917, D1918 and D1946 run over the test's model of inotify, injected as fs.watch on every host: a watch is bound to the directory it opened on, told apart by file id and birth time, goes dead once that directory is gone, is carried along silently when an ancestor is renamed within its own parent, and reports no change for a subdirectory whose own entries changed, as inotify does. Their proof rests on that model, which a WSL run with the model switched off confirmed against real inotify under Node 24 and 22 for D1917 and D1918. D1919 reaches the consumer root and git's config home through directory links, which stand in for a Windows short (8.3) name. D1922 through D1924, D1949 and D1951 each drop or misname one git file in the watched list.
D2065 through D2086, D2088 and D2090 through D2092, in packages/daemon/test/defects.json, cover access-time events and the wait before each job. The tracker's judgment of an event against its last read of the input (the content digest, the modification and change times, the 2 s bar, the reads a reconciliation or a directory walk keeps, a directory walk over a same-content copy, and a link's stamp) and its wait for the inputs to settle after a stop (D2085) are covered in input-tracker.test.ts, which alters a read's stamp through the readEntryDigest module mock, delivers events through silent watches whose listeners it keeps, and fakes Date so a later reconciliation's read is stamped later. The lifecycle's wait for the inputs to settle before the discovery, the guard and each run is covered in lifecycle.test.ts over the stand-in tracker, and D2086 covers it over a real tracker whose watch wrapper reports an input's change as the first reconciliation ends, as Windows does for a read that refreshes an access time over an hour old.
D4387 through D4403, in packages/daemon/test/defects.json, with the re-expressed D1920 and D2076 and the re-anchored D1903, cover a watcher failure and the reconciliation after it (#watchFailed and a reconciliation's end in input-tracker.ts, InputState.restamped, EventLedger.acceptHeld, QueuedReads.enqueueRestamped and watcher-health.ts). input-tracker.test.ts drives them over silent watches whose listeners it keeps, where loseEvents delivers an event naming no file through the root's watch, as Windows reports a batch of events it lost. A job spanning lost events keeps its fingerprint with nothing in its window (D1920). Lost events during a reconciliation cost another (D4387), through a log hook that writes an input and reports the loss as the first reconciliation ends. An input, or a listed file the inputs leave out, read with its content unchanged and its modification time moved is read again, which marks the job (D4388, D4390), and that read becomes the read held (D4389). A reconciliation that finds only a change time moved keeps the read before it (D2076), with Date faked an hour on so its own read would otherwise rule out a write. A job's end and settled() wait for the read a reconciliation queued (D4391), held through the readEntryDigest module mock. A root watch that fails and cannot open again leaves the job not fingerprinted (D4392), by emitting error on the silent watch and making every later watch throw EACCES. That watch is tried again at the next reconciliation, the periodic one under fake timeouts, so the watcher stays unhealthy while it still cannot open (D4403, in input-watcher.ts, over silentWatchesUntilRefused). A reconciliation that cannot establish the input set, over a directory past the 64-level bound, leaves the watcher unhealthy (D4393), and a lost input set and an event no read vouches for still record a cause (D4401, D4402). The log's unhealthy line and its line naming the inputs read again are D4394 through D4398, D4396 over WatcherHealth alone with a memory log. D4399 and D4400 cover the run in lifecycle.test.ts, over a real tracker inside a real lifecycle with silent watches and a RecordingStore: a run with a nameless event in it is stored under its fingerprint and not run again, and a run with a restamped input is stored not fingerprinted and run once more. silentWatch lives in packages/daemon/test/harness.ts, shared by both files.
D3217 through D3246, D3250 through D3253, D3257 through D3263 and D3265, in packages/daemon/test/defects.json, and the re-anchored D1909, D1951, D2160, D2867, D2894, D3067, D3071, D3081, D3173 and D3181, with D2128 and D2129 in packages/daemon/test/selection/defects.json and the re-anchored D1900, cover events on the listed files the inputs leave out (packages/daemon/src/inputs/listed-files.ts, the reads of them in input-tracker.ts and queued-reads.ts, the held reads in input-state.ts, the Linux listed watches in input-watcher.ts, ProjectInputs.comparedDigests, the listing in protection.ts, and the setup files both fingerprints digest). The tracker's events, job marks, reconciliation reads, relisting and window digests are covered in input-tracker.test.ts over git repositories that ignore gen/, src/gen/ or env/, or hold a package's setup file under node_modules. D3217 reads process.platform as win32 through onPlatform. D3218, D3231, D3232 and D3253 read it as linux, over inotify itself on a Linux host and over the inotify model elsewhere, so the listed watches are proven against real inotify. D3233, D3234 and D3252 make the listed directory's watch throw EACCES or ENOENT through the watch mock. The setup files' fingerprints are covered there over hand-built ProjectInputs. The round's changed paths and the hold's release are covered in scheduler.test.ts, whose rig and stand-in inputs read comparedDigests at each window's edges as the tracker does. Run judgment, its interruption and the count are covered in lifecycle.test.ts. D3257 through D3263, from the review, cover the pending count for an excluded path no discovery lists (win32), a listed directory created after arming and one recreated under an input directory while its read is held (linux over inotify), a rested listed read, a read a new discovery unlisted mid-read, a case-folded listed env file in run judgment (win32 through onPlatform in lifecycle.test.ts), and a listed input held apart. D3265 covers a listed setup file whose read fails with ENOTDIR, as Linux reports a path below a file, in env-files.test.ts, which injects the failure through its node:fs mock so it is proven on either host.
D2862 through D2881 and D2885 through D2892, in packages/daemon/test/defects.json except D2880 and D2881, which are in packages/daemon/test/selection/defects.json, and the re-anchored D1458, D1461, D1684, D1878, D1920, D1921, D1961, D2244, D2251, D2680, D2681, D2687, D2737, D2738, D2739, D2740 and D2747, cover judging a run by its workspace's inputs and interrupting it (packages/daemon/src/daemon/run-judgment.ts, the lifecycle's run verdict, the executor's abort purpose, the job window's paths and causes, BuildPlacement in narrowed-inputs.ts, and the tracker's periodic count by elapsed time). The run's verdict, its interruption and an interrupted run's listing are covered in lifecycle.test.ts, over the stand-in tracker, whose recordPath and recordCause record into each running job's window, and a scripted build executor whose dependency information lists package workspaces a and b, so a path under a/ lies in Vitest workspace a's inputs and one under b/ in none. The watch itself is driven there over stand-in builds and views whose revision and latest build the test moves, with an abort that answers whether it reached a job. The interruption's reason before its job is sent, a stop outranking it, and an abort with no job in progress are covered in executor.test.ts. The elapsed count, with performance faked, and a changed input recorded by its root-relative key are covered in input-tracker.test.ts. Where a build places a changed path, for a workspace selection will not run and beside a refused path, is covered in select-tests.test.ts through placedInTree.
D2893, D2894 and D2902 through D2914, in packages/daemon/test/defects.json except D2902, which is in packages/daemon/test/selection/defects.json, cover the review's gaps: a file that came and went before its read, recorded unless git ignores it or the declaration came to cover it, in input-tracker.test.ts, which delivers the one event naming it through silent watches and, for the declared case, holds its read until protection makes the pattern apply; a change a reconciliation finds, recorded as a path; a revision whose selection refused its inputs, and a build asked again about new paths; the verdict's wait for the end build; an interrupted run that had not loaded; a build that fails to place a run's changed paths at its end verdict; and the executor's abort answer and the purpose it clears between jobs.
D1987 through D2019, D2021 and D2040 through D2052, in packages/daemon/test/defects.json except D2009 through D2014, D2045 and D2046, which are in packages/daemon/test/selection/defects.json, and D2015 through D2018 and D2041 through D2043, which are in packages/cli/test/defects.json, cover declared non-inputs (packages/daemon/src/inputs/non-inputs.ts and declared-non-inputs.ts, the tracker's exclusion of and trigger on rt-test.json, the lifecycle's protection of each discovery's test modules, selection's declared-non-input outcome and non-inputs-file trigger, the start plan's declaration and the answers' nonInputsUnusable). The matcher, the validator and the tracker are covered in input-tracker.test.ts: the matcher over declarations held in memory, and the validator and the tracker over consumer trees written to temporary directories; D1999 makes readJson delete rt-test.json before reading it, through a module mock, and D2008 reads process.platform as win32 through onPlatform and delivers an event naming RT-Test.json through a captured root watch, so the case-folded trigger is proven on either host. The protection sequence is covered in lifecycle.test.ts: D1989 and D1990 over the stand-in tracker, and D1987 and D1988 over a real tracker and store. D1988's discovery job ends only once a pass-through fs.watch wrapper has seen the tracker handle a declared sentinel written after the edit, and its edit keeps the module's access time current, since Windows raises a change event for a read that refreshes an access time over an hour old. Selection is covered in select-tests.test.ts, whose harness reads rt-test.json from the tree and protects each workspace's listed test modules; the query answer in query.test.ts; and the start listing, start --json and the human answer's warning in packages/cli/test/cli.test.ts.
D4404 through D4412, in packages/daemon/test/selection/defects.json, D4413, in packages/daemon/test/defects.json, and the re-anchored D2014 cover the widening a declared non-input raises (the file a widening names in packages/daemon/src/selection/workspace-graph.ts, followedWidenings in widening-links.ts, the selection's wideningsLeftOut, and the log's line in packages/daemon/src/daemon/round-selection.ts). The file a widening names is covered in workspace-graph.test.ts: D4404 over a source file that does not parse beside a plugin-format file and a tsconfig that does not parse, which name none, and D4405 over a package workspace whose directory is a link, so the scan reaches its file by another spelling than its real path, while the root's walk reaches the same file by its real path. Selection is covered in select-tests.test.ts: D4406 and D4411 over two Vitest workspaces whose configs each import a root script, with the unparsed file in the root package workspace, D4406 beside the same tree with no rt-test.json; D4407 through D4410 over the widenings selection still follows (a file no pattern matches, a listed test module, a discovered workspace that reports no selection facts, a plugin-format file under a declared pattern); and D4412 over each workspace's narrowed inputs through narrowedInTree, over two Vitest workspaces apart with an unparsed file in one of them, declared and again with no rt-test.json. The log's line is covered in scheduler.test.ts by D4413, over a stand-in narrowing whose selection lists two widenings left out; selectionOf in round-fixtures.ts builds, by default, a selection that left none out. Not covered: a file reached through a linked file or under a directory listed in another letter case, which take the same comparison as D4405, and a file that cannot be read, nests brackets too deep or cannot be walked, each of which names its file at the same call as D4404.
D2802 through D2815, D2828 through D2833, D2846 and D2847, and the re-anchored D2260, D2791 and D2792, in packages/daemon/test/defects.json, cover protecting a test file Vitest finds through another spelling of the consumer root (packages/daemon/src/inputs/protection.ts, each project's vitestDirectory and patternBases in packages/daemon/src/vitest/selection-facts.ts, and the store's schema version 6, its migrations and its readers). The spelled match beside the real-path one, exclude patterns and includeSource through a spelling, a pattern naming one file, the pattern key, and each pattern base's normalization and unescaping are covered in protection.test.ts, over hand-built discoveries. The crawl's reach across drive spellings and a pattern base at a drive's root are covered in protection-win32.test.ts, which mocks node:path as its Windows module and reads process.platform as win32 through on-platform.ts, so it is proven on either host; it loads no harness, since the harness resolves the repository's paths as it loads. The report and protection through a directory link are covered in discover-tests.test.ts, over the root-spelling fixture, whose config spells its absolute patterns from the root the test started discovery through, named in RT_STARTED_ROOT, and over the selection-facts fixture's linked pending project. The columns' round trip and their refusal of a report missing either field, and the migrations from versions 3, 4 and 5, which drop stored selection facts, are covered in store.test.ts.
D2850 through D2861, D2882, D2883, D2895 through D2901 and D4273 through D4279, in packages/daemon/test/defects.json, and the re-anchored D2111, D2792, D2804, D2805, D2808, D2828 and D2858, cover the directory links Vitest's crawl follows (packages/daemon/src/inputs/crawl-links.ts, walked from each test file pattern's base as packages/daemon/src/inputs/vitest-glob.ts finds it, each project's crawledLinks in packages/daemon/src/vitest/selection-facts.ts, protection's spelling of a file through each link, and the store's schema version 7 with its migration from version 6). The walk is covered in crawl-links.test.ts, over layouts the test writes under its temp directory with junctions on Windows and symbolic links on Linux. The layouts cover a link inside a followed link that leaves the consumer root, the includeSource patterns, a later pattern's base, a base whose name begins with another's, a dangling link, a pattern base not on disk, a refused pattern, an aborted walk, and 1,001 sibling links: past the link bound, inside a node_modules the exclude **/node_modules prunes, and behind a linked node_modules the exclude **/node_modules/** prunes. D4273 through D4278 cover the walk taking a directory's entries 1,000 at a time: a subdirectory and a link listed after a directory's first 1,000 entries, a link listed as its 1,000th entry, the links' order against the directory's own listing as readdirSync gives it (among links of one depth, with the first-listed link the slowest to resolve, and on both sides of the 1,000th entry), and two sibling links, one into the other's target. D4279 covers a link to a file beside a directory link, made on Windows as a file symbolic link, which needs the symbolic link privilege or developer mode as D2852's directory links do. The file passes readdir of node:fs/promises through a mock under which a directory named after-<n> lists <n> plain stand-in files before its real entries, so D4273, D4277 and D4278 reach entries at and past the first 1,000 without writing them. D2901 globs eight such layouts with the tinyglobby Vitest itself resolves, reached through Vitest's own install and called as Vitest calls it, and requires every file it finds to be protected; its layouts include targets whose real paths share a prefix. D2852 makes Windows directory symbolic links, which need the symbolic link privilege or developer mode, for a link back to the root, and allows 60 s, since its mutation walks until a realpath fails. A file named through a crawled link, and links not known, are covered in protection.test.ts over hand-built discoveries. A pattern base below a UNC pattern directory, which keeps its //, is covered in protection-win32.test.ts. The report on Vitest 4.1 is covered in discover-tests.test.ts, whose selection-facts copy gains a unit/shared link to setup before discovery. D2900 there wraps crawledLinks in a pass-through module mock that interrupts the discovery as the walk starts. The round trip, the refusal of stored facts without crawled links, and the migration from version 6, which drops stored selection facts, are covered in store.test.ts.
D3093, in packages/daemon/test/defects.json, and the re-anchored D3068 and D2130 cover protection's case fold on Windows and the shared whole-file digest; D3093 reads process.platform as win32 through onPlatform in protection.test.ts, so it is proven on either host.
D2935 through D2940, D2942 through D2957 and D2964 through D2969, in packages/daemon/test/defects.json except D2954 through D2956 and D2969, which are in packages/cli/test/defects.json, and the re-anchored D2003, D2007 and D2936, cover how the environment enters every fingerprint (packages/daemon/src/inputs/environment-digest.ts, the nonInputVariables member in non-inputs.ts, the environment count and its log line in declared-non-inputs.ts, and the declared variables in the start listing in packages/cli/src/trust-prompt.ts). The session list's values, presence and whether a listed variable is empty, a prefix entry, an exact entry that a longer name begins with, the order the environment lists its variables in, and the variables that stay counted by value are covered in input-tracker.test.ts over environments the test builds. So are Windows' case fold, a declared entry's fold and two names that fold to one key, and Linux's exact names, each through onPlatform and a fresh import of environment-digest.ts, whose case rule is fixed as it loads, so each is proven on either host. A declared variable's value, a declaration added while the tracker runs, a write to process.env after the start, and the environment: log line are covered there over consumer trees written to temporary directories, with each variable set through withEnvironment before the tracker starts. The nonInputVariables grammar, its 256-entry bound, and a nonInputs or nonInputVariables member that is a string or an object are covered there through readNonInputs. The listing, the variables' own heading beside declared patterns, start --json and an empty member are covered in packages/cli/test/cli.test.ts over the daemon-lifecycle fixture.
D3331 through D3336, in packages/daemon/test/defects.json, cover the start environment (takeStartEnvironment and executorEnvironment in packages/daemon/src/inputs/environment-digest.ts, the environment Executor forks each executor process with, and the job executor serve builds in daemon-main.ts): the environment each executor process starts with after the daemon's own gains, changes and loses a variable, and a NODE_V8_COVERAGE the live environment gains or loses, in executor.test.ts; the copy itself in input-tracker.test.ts; and a real daemon's executor processes in daemon.test.ts. D3336 covers, in input-tracker.test.ts through onPlatform, the Windows count of two names that fold to one key, whose values are listed in the order of their names, so swapping values between two spellings moves the digest. They observe each executor process through the test/fixtures/daemon/report-environment.mjs preload, which appends the environment the process started with to the file RT_REPORT_ENVIRONMENT names, and, in the daemon, sets RT_GAINED_AFTER_START at each fork, recording beside the report whether the daemon's environment already held it as each fork began. D2941 is retired, since SnapshotReads now requires its environment, and packages/daemon/test/required-start-environment.ts holds a @ts-expect-error line, which tsc checks, for each argument that carries the start environment.
D3390 through D3419, D3421 and D3422, in packages/daemon/test/defects.json, and the re-anchored D3068 and D3069, with D3072 repaired, cover the listed and declared variables Vite can carry to a workspace's tests (CountedEnvironment and carriedUnion in packages/daemon/src/inputs/carried-variables.ts, the count's by-value names in environment-digest.ts, the text envFileDigest returns from the read that digests it, the carried names and the held-digest check in fingerprint.ts, and each workspace's log line in declared-non-inputs.ts). Each reference form, an escaped $, a reference through the start environment's values, the longer and shorter names a reference reaches, the env prefixes, a stray $ in a file or a reached value, the discovery's union, the digest a workspace carrying nothing keeps, and the digest memo are covered in carried-variables.test.ts over env file text and start environments the test builds. D3401 reads process.platform as win32 through onPlatform and a fresh import of carried-variables.ts, so the case-folded prefix is proven on either host. The workspace and discovery fingerprints over a real env file, one workspace's reference leaving another's fingerprint unmoved after the discovery's is composed from the same reads, and a held env file digest that differs from or matches the content read are covered there over trees written to temporary directories. D3412 holds the digest the tracker's own readEntryDigest reads. The log line's reasons, its warning, and its once-per-change, to-none and silent cases, across a re-read of rt-test.json, are covered there through DeclaredNonInputs over a memory log. D3411, in env-files.test.ts, makes the open of an env file the inputs hold fail through that file's node:fs mock. D3068 is re-anchored to the single read that gives an env file's digest and text, and D3069 to where envFileDigests maps that read's nothing-there to absent, and D3072, in input-tracker.test.ts, now pins that a narrowed-out env file whose held digest is not the content on disk leaves no fingerprint, while D3421 proves an edit to a narrowed-out env file whose held digest is the content on disk moves the workspace's fingerprint, and D3422 that a workspace counting every listed and declared variable by value moves on a change to one no reference names. handBuiltEnvironment in packages/daemon/test/harness.ts builds the counted environment every hand-built fingerprint takes, empty by default.
D3036 through D3085, D3091 and D3092, in packages/daemon/test/defects.json, and the re-anchored D1898, D1900, D2792 and D3049, with D2128 and D2129 in packages/daemon/test/selection/defects.json, cover each workspace's env files (packages/daemon/src/inputs/env-files.ts, each project's env sources in packages/daemon/src/vitest/selection-facts.ts, the env files fingerprint.ts digests and protectedFileChangedSince checks, the env files protection.ts protects, holdsFileContent in input-inventory.ts, and the store's schema version 8 with its migration from version 7). Each project's own config's and the root config's env source, its directory named root-relative, climbing with .. outside the root or none when the config turns env files off, its prefixes and its mode, are covered in discover-tests.test.ts on Vitest 4.1 and 5, over the selection-facts fixture. That fixture's root config sets a mode of its own and a prefix list, and its bare, pending, rooted and absolute projects set an env directory outside the root, envDir: false, a mode of their own, and prefixes or a mode written as a string, null or a number. A Vitest 5 inline project inherits the root config unless it sets extends: false, so the tests pinning a project's own prefixes run on Vitest 4.1. The env file reader is covered in env-files.test.ts, which passes statSync, fstatSync, openSync, readFileSync and closeSync through a module mock of node:fs. There a test makes a path or an open handle report a FIFO or a socket, or makes a stat, open, read or close fail with a given code, so each case is proven on either host, and it counts the descriptors the reader left open before closing them. A workspace's and the discovery's fingerprint over env files created, edited, deleted, held by the inputs or held by type or link target, a workspace that is unreported or failed, and the time check before protection are covered in input-tracker.test.ts, over hand-built ProjectInputs in a temporary directory and, for a gitignored .env.local, through a real tracker. A declared pattern over an env directory is covered in protection.test.ts, and the round trip, refusal and migration of env sources in store.test.ts, where D1280, D2097, D2846, D2791, D2831, D2859, D3040, D3041, D3128 and D3129 now pin schema version 10.
D3113 through D3132, in packages/daemon/test/defects.json, and the re-anchored D2792, D3038, D3074 and D3121, cover the env sources of a workspace holding a nested projects container (the not-known report in packages/daemon/src/vitest/selection-facts.ts, its stored reason in inputs/env-files.ts and inputs/fingerprint.ts, and the store's not-known shape and schema version 9 with its migration from version 8). The report on Vitest 5.0 and 4.1 is covered in discover-tests.test.ts over the nested-projects fixture. Its root config declares the container app/vitest.config.mjs, which declares an inline project and the container inner, beside a top-level inline project. Its packages/flat, packages/inline and packages/single workspaces declare projects by path with no container, only an inline project, and none. The fixture's present-vitest.mjs plugin, in each workspace's config, makes the resolved Vitest present the version RT_FIXTURE_VITEST_VERSION names and the container record RT_FIXTURE_CONTAINER_RECORD names (absent, or a JSON value) from its configureVitest hook, which Vitest calls after it records its containers. So an unverified Vitest 5 minor, a record in another shape, an empty record, 22 recorded containers, an unverified minor recording an empty list, a record listing a value that is not a path, and one container recorded twice are proven on the installed 5.0.1. A not-known project's env files are covered in env-files.test.ts, the fingerprint's stored reason and the unreported text in input-tracker.test.ts, and the round trip, refusal and migration from version 8 in store.test.ts.
D1346 through D1433 and D1511 through D1524, in packages/daemon/test/selection/defects.json, cover workspace-level selection (findPackageWorkspaces in packages/daemon/src/vitest/find-workspaces.ts, and packages/daemon/src/selection/) in packages/daemon/test/selection/workspace-graph.test.ts and packages/daemon/test/selection/select-tests.test.ts, each over a consumer tree that packages/daemon/test/selection/harness.ts writes to a temporary directory and passes through the package listing and the dependency information, and most through the selection; D1357 reaches the consumer root through a junction, D1515 links one workspace into another through a junction, and D1365 reads process.platform as win32 to prove the case-insensitive capture-alias match on either host. D2192 through D2205 cover alias widening and how an explanation quotes an alias's find in workspace-graph.test.ts, and D2206 through D2210 cover recognizing rt-test.json as the host compares names in select-tests.test.ts, where D2206 and D2207 read process.platform as win32 and D2209 as linux through onPlatform, so each host's comparison is proven on either host.
D2257 through D2272 and D2287 through D2293 cover each project's reported Vite root, the store's migration to schema version 4, and alias analysis. D2257 through D2261 cover the Vite root and the migration, in packages/daemon/test/discover-tests.test.ts (D2258 over the selection-facts fixture's rooted project) and in store.test.ts (records in packages/daemon/test/defects.json). The rest cover each alias paired with its own project's Vite root, in packages/daemon/test/selection/select-tests.test.ts (D2262 and D2287), and, in workspace-graph.test.ts, the analysis of aliases whose replacement begins with /, /@fs/, // or /@, holds $$ or ends in a separator, or whose RegExp find is not anchored at the import's start (records in packages/daemon/test/selection/defects.json).
D2382 through D2401, D2404 through D2406, D2417 through D2419, D2422, D2426 and D2427, in packages/daemon/test/selection/defects.json, cover each alias rewriting the imports the source scan reads (packages/daemon/src/selection/alias-specifiers.ts) and how a glob's literal directory is read, in workspace-graph.test.ts: the .. climb, a string find's match and a RegExp find's $ patterns and y flag, each place a rewrite resolves, the widenings for one Vite may not read as a path, each quoted once, and for a RegExp that does not compile, every matching alias, a customResolver alias, a glob whose Vite root or replacement holds (, a glob beginning with **, which reaches every package workspace, and a glob's literal directory ending before an escaping \. D2405, D2417 and D2422 read process.platform as win32 and D2418 as linux through onPlatform: on Windows, \ separates in an aliased glob's rewrite and in a plain glob beginning with none of /, ./ and ../, and is an escape in any other plain glob. D2406 keeps a plain and an aliased import of one file as two edges.
D2428 through D2439, D2452 through D2471 and D2476 through D2492, in packages/daemon/test/selection/defects.json, cover locating a bare tsconfig extends as TypeScript 6.0.3 does and file: URLs (packages/daemon/src/selection/extends-lookup.ts, the extends edges of tsconfig-edges.ts, and the file: URL branches of specifier-edges.ts, alias-specifiers.ts and vitest-edges.ts) in workspace-graph.test.ts. They cover each step of the lookup order through exports (pattern precedence, trailers, folder keys, arrays, refused targets and conditions), the tsconfig field, a package's own name and the node_modules walk, over packages the test writes under the tree's node_modules. They also cover the edge to the workspace holding the located config, with none for an installed package, a linked base read at its real path, each widening the lookup names, recorded once at the extends edge, a cycle through a directory link, and a file: URL as an alias prefix, as an alias rewrite and in source, a glob holding ? or # included. workspace-graph.test.ts passes node:url through a module mock that converts a file: URL as the platform onPlatform sets, so D2461 proves a bare Windows drive on either host.
D1581 through D1655, D1666 through D1680 and D1700, in packages/daemon/test/selection/defects.json, cover the scan for dependencies no package.json declares (source-walk.ts, source-imports.ts, specifier-edges.ts, tsconfig-edges.ts, jsonc.ts and git-ignored.ts in packages/daemon/src/selection/) in packages/daemon/test/selection/workspace-graph.test.ts and packages/daemon/test/selection/source-scan.test.ts, over the same harness; source-scan.test.ts replaces node:fs so that opendirSync on a directory named pad-<n> yields <n> entries and one named skipped-<n> yields <n> node_modules entries before its own, counting the entries read and a path named unreadable.ts, unlistable or unreadable-link cannot be read, and its git cases build real repositories with the fixture git settings under a global config holding a failing hook, commit signing and a config-only identity, including a nested repository and a submodule, where D1650 points an inherited GIT_DIR at another repository and D1651 configures a core.fsmonitor program that writes a marker when run, and it wraps oxc-parser's Visitor to count how many a scan builds.
D2220 through D2237 and D2247 and D2248, in packages/daemon/test/selection/defects.json, and D2238 through D2246 and D2249 through D2252, in packages/daemon/test/defects.json, cover selection's input and the dependency build in an executor process of its own. buildSelectionInput is covered in select-tests.test.ts over hand-built discoveries; D2220, D2227 and D2230 select over a consumer tree through the selection harness's selectFromDiscovery. The build's parse observer is covered in workspace-graph.test.ts through parsesInTree. The build itself is covered in executor.test.ts over real executor children. D2239 writes a source of 100,000 a+ terms, which ends the process inside oxc-parser, and expects exit code 3221225725 on Windows and signal SIGSEGV on Linux. D2240, D2241, D2244 through D2246, D2251, D4262 and D4264 preload test/fixtures/daemon/build-hook.mjs through NODE_OPTIONS, with withBuildHook in packages/daemon/test/build-hook.ts. Once the build is about to record the file a test names, that preload ends the executor before the record names the file, removes the record and ends the executor, or records the file and holds the parse without end, which gives an abort or a close a hold point. D2249 writes a walked tsconfig of 100,000 +1 terms that ends the process inside the parser, and D2252 makes the record's removal fail through a module mock of removeParseRecord. D4261 through D4264, in packages/daemon/test/defects.json, cover where a build's parse record is created and that it is removed however the build ends. D4263 is in executor.test.ts beside D2250, over a directory that does not exist, so the record's creation fails before any process starts; it compares the start of the reason, since the file-system error that follows quotes the path too. D4264 is beside D2242: the build hook's exit action ends the build's executor before its reply, and the test lists the directory the record was created in. D4261 is in lifecycle.test.ts: ScriptedBuilds keeps the directory each build was handed in directories, and every stand-in start hands the lifecycle PARSE_RECORD_DIRECTORY, a name apart from the identity's state directory. D4262 is in daemon.test.ts over a real daemon with no confirmed workspace, whose consumer is three files the test writes, with no Vitest and no defect definition. The preload acts only in a process whose entry is the executor's, so the daemon that inherits it holds only its build, at a source file with a random name. The test counts the parse records naming that file in the user's own RT Test directory, and the parse records in the state directory. Every daemon of the user shares that directory, so the test reads only entries named dependency-build-<uuid>.parsing and unlinks only one whose content is its own file's label.
D2504 through D2538 and D2551 through D2564, in packages/daemon/test/defects.json except D2532, D2533 and D2551 through D2553, which are in packages/daemon/test/selection/defects.json, and D2535, D2536 and D2562 through D2564, which are in packages/cli/test/defects.json, cover each Vitest workspace's inputs narrowed by its dependency build (packages/daemon/src/inputs/narrowed-inputs.ts, packages/daemon/src/daemon/dependency-builds.ts, the lifecycle's build wait, the tracker's change signal and the answers' inputsNotNarrowed). The builds and each run's wait are covered in lifecycle.test.ts over the stand-in tracker, whose revision moves only when the test moves it, and a scripted build executor that answers on the next event-loop turn and ends a held build at an abort, and keeps the directory each build was handed, from a consumer root the test wrote; the stand-in start's own root is a name under the temp directory no test creates, so the other lifecycle tests' builds fail before their job. Each view state and the answer fact are covered in query.test.ts through the real currentInputs over a hand-built snapshot and a stand-in narrowing; each workspace's narrowed set in select-tests.test.ts over a consumer tree through narrowedInTree, where D2553 refuses the path a:b.txt; the fingerprint's held test module and the tracker's change signal in input-tracker.test.ts, the signal under trackingOwnGitHome; and the CLI's warning line and --json field in cli.test.ts, where D2536 gives the daemon-lifecycle fixture's two packages a package.json, so a real daemon narrows them.
D2579 through D2602, D2607, D2609 and D2610, in packages/daemon/test/defects.json, cover the bound on a dependency build and the builds ending (packages/daemon/src/daemon/dependency-builds.ts, packages/daemon/src/inputs/narrowed-inputs.ts, the lifecycle's query view of the builds and the answers' inputsNotNarrowed kinds): D2602 in query.test.ts and the rest in lifecycle.test.ts. A test moves the bound's clock by faking only setTimeout and clearTimeout, so flush, which waits on setImmediate, still returns, and shortens the bound through DependencyBuilds' boundMs option, except D2580, which pins the 120000 ms default at 119999 ms and 120000 ms, and D2582, which runs on it. A scripted build that never ends is ended only by an abort, and D2590 uses an executor whose build produces its dependencies as the abort reaches it, so the build ends after the bound's timer fired. The builds' rounds are made to throw through the stand-in inputs' settleFails script (D2595 through D2600, D2607 and D2609) or, over a whole lifecycle, changedFails (D2601). D2603 through D2606, in packages/cli/test/defects.json, cover the human warning's cause for each new kind in cli.test.ts (D2603, D2604) and each kind's spelling in the --json field, read from the constants @rt-test/daemon/client exports (D2605, D2606). D2510, D2512, D2515, D2516, D2527, D2528, D2536 and D2558 are re-anchored to the source the bound changed.
D3604 through D3653, D3709, D3735 through D3745, D3750 through D3811, D3870 through D3875, D3966 through D3989, D4035 through D4039, D4116 through D4148, D4185 through D4197, D4203 and D4299, in packages/daemon/test/falsify/defects.json, cover a falsification job (packages/daemon/src/falsify/, the executor's falsify job in packages/daemon/src/daemon/executor.ts and executor-main.ts, the canary reading in packages/daemon/src/daemon/canary-reading.ts and packages/daemon/src/falsify/canary-set.ts, the canary gate in packages/daemon/src/daemon/canary-gate.ts, the parse offset parseGuarded reports in packages/daemon/src/selection/source-imports.ts, and the canary file packages/daemon/canaries/canaries.json), in packages/daemon/test/falsify/. The anchor matcher's counting, line endings and replacement are covered in anchor-match.test.ts, and the probe placement in reach-probe.test.ts, which calls mutateWithProbe on source text the test gives and, where the claim is what a probed text does when it runs, runs that text as a script through ran, in a node:vm context of its own whose recorder counts the probe's firings, or through ranWithoutRecorder, in one that defines no recorder; neither loads Vitest, and each expected text, position and value is derived from ADR-0008's placement rule.
The job is covered in falsify-workspace.test.ts over the falsify fixture. falsifiedOn runs one job per Vitest install and keeps it for the file, since a job loads Vitest and runs every experiment, and each test reads both lines in one assertion through onBothLines. The job reaches the consumer copy through a directory link, so each mutation's file is named by a path other than its real path, and runs with TMPDIR, TMP and TEMP pointed at a directory of the case's own, where Vitest's forks pool would copy transformed modules. The fixture's config sets isolate: false, bail: 1 and fileParallelism: false, which the job must override, orders test files by module id, and holds an inline unit project and packages/lib with a config of its own. Its plugin reports each transform to the host global RUN_HOOK as transform:<id>, and a module whose text holds a reach probe as mutated:<id>. At each event the test looks in the temp directory for a file holding a probe's call; it rewrites src/label.mjs at that module's first transform, while the baseline runs, and appends a test to test/loaded.test.mjs at the math module's first mutated transform, during the add experiment, after the job has invalidated the math module and before any later run asks for that test file. The tree check expects exactly those two edits. The experiments run in the order experiments lists them, and that order carries cases: add is the first to mutate the math module, and lib, the last to run, mutates it again before the restored baseline. The once experiment's test fails the first time it meets a mutated value and passes every time after, through a marker file whose path falsifiedOn names in RT_FIXTURE_ONCE_MARKER, under the job's temp directory, so its confirming run differs; with the variable unset a mutated value throws. The hook also records each mutated: event as mutatedServes, one entry per run in which the root's server served a mutated module; the lib project has a config of its own with no plugin and reports none. D3784 runs a job of its own over add, greet and lib and aborts at the greet module's second mutated serve, which is inside that experiment's confirming run. The suite module leaks a rejection in every run, so loaded and lib, whose next started run is that module's experiment or the restored baseline, read unclear (D3776), and add, whose next started run is loaded's, reads detected (D3774). The fixture's test modules each show one case: math an in-test site beside a test that fails a matcher added by expect.extend; loaded a site executed while the file loads; suite a suite's beforeAll site with a suite nested in it, a suite whose afterEach throws, failing beforeAll hooks at the top level and nested, and a leaked rejection; concurrent two concurrent tests; once a test that fails once and then passes; label the two modules edited or mutated mid-job; and alone-a and alone-b a test that passes only while no other file has run in its worker. The fixture's module-cache workspace holds a project whose own config sets experimental.fsModuleCache, for the refusal on Vitest 4.1 and its absence on Vitest 5. D3735 drives the stale-transform guard over a hand-built module graph, D3743 calls recordRun with an error raised in the test's own process, and D3742 passes a signal already aborted.
D3870 through D3875 read the digest of its mutation file's text that each experiment record carries. startDigest gives the expected value: wholeDigest of the fixture's module as committed, read whole as UTF-8 as a query reads the file, which is the module's text when a job over a copy starts. D3870 and D3871 read experiments of the shared job that all mutate the math module, one that ran and five decided without a run, each of the five with its reason beside the digest. D3872 reads the unreadable experiment, whose record must hold no such member. D3873 reads the label experiment, whose module the test rewrites while the baseline runs, so its record must carry the digest of the text the job read. D3874 and D3875 each run a job of their own per Vitest line through digestCarriedOver, which writes src/written.mjs into a copy of the fixture with the test's exact text, a byte order mark or CRLF line endings, and names a test in no module, so the job decides the experiment from the text it read and runs nothing. The whole not-run records D3642, D3643, D3644, D3646 and D3647 compare hold four members, the fourth the math module's digest.
What an error is called is covered in the same file over the error-kinds fixture, a project unit with one test module whose six tests pass while its count module gives 2 and each fail by one kind of error once it is mutated: an error of a class two steps below Error that sets no name, thrown in the test's body, from inside an expect.extend matcher and from inside a negated one, an error of a second class that sets no name, one step below Error, which the job is not given, a plain Error, and an extended matcher's failing result. errorKindsOn runs one job per Vitest install over a copy of the fixture and keeps it for the file, with HtmlElementTypeError the one declared name and each test one experiment's intended test. D4035 reads the judgement and the error facts of the five thrown errors, and D4036 those of the matcher's failing result, each on both lines through judgementsAndErrorFacts. D4035 is the reading that goes red when a Vitest release serializes an error's constructor another way.
D4299 runs one job per Vitest install over the client-environment fixture through clientEnvironmentJob, with one experiment that mutates the label the client project's test reads, and reads it detected on both lines in one assertion, against a reach setup file placed by a bare unshift, whose directory is then on no allow list, so the baseline does not pass.
The judge and the facts it reads are covered in verdict.test.ts, which loads no Vitest: it calls judge on hand-built facts and experimentFacts on hand-built job records. detection() builds facts that hold every condition of a detection and ranOnce() an experiment with one run; where a test reads through besideDetection, its assertion holds the detection beside the facts it changed, so one fact alone accounts for the reading. reasonsAsEachIsRemoved pins an order of reasons: it reads facts that hold every trouble at once, then takes each away from the front. detectingJob() builds the records of a job whose one experiment reads detected, and firstJudgement reads that experiment through experimentFacts and judge as the job does, so a fact dropped between the record and the judge shows as a wrong judgement. errorFactsUnder reads hand-built serialized errors as the intended test's errors under a list of declared names: a name other than Error, the error's own or one it inherits, kept whatever its class (D4037), an own constructor field that is not in Vitest's serialized form (D4038), and an error with no name (D4039). The canary set is covered in canaries.test.ts, which copies packages/daemon/canaries/ into a temp directory, links each Vitest install, and runs one job per line with the experiments and assertion error names read from canaries.json. D3786 compares every canary's verdict and reason with that file; the other tests pin a literal judgement, with its detail, for the canaries whose guard a mutation drops. job-readings.ts holds the readings the job test files share: onEachLine, ranJob, judgementOf, errorFactsOf, which gives the intended test's errors in an experiment's first run as the facts its judgement was decided from, and errorMarkersOf, which reads through it.
The canary reading is covered in canaries.test.ts too, by D4116 through D4148. Every one of them but D4116 takes its reading of a stand-in install, a manifest and one file that fakeVitest writes under the test's own temp directory, with a stand-in job in place of Executor.falsify. taken builds a consumer root that holds one file, its state directory that holds one file, and the stand-in install, hands takeCanaryReading what the case arranges (a job, a canary directory, a state directory), and returns the reading beside the log's entries, the count of jobs sent, what the state directory holds afterwards, and changed: each line of the consumer root outside the state directory, and of the install, that differs from before the reading, a line being an entry's path with a file's digest or a link's target. A weakened placement or removal runs only over such a stand-in: no test, and no record's mutation, runs one with an install of this repository as the link's target. D4116 alone links the real installs. readThroughExecutor takes a reading of each through an Executor of its own, over the bundled set, from a state directory under a root that links the other line, and its one assertion holds the reading, that the directory is gone while the executor is still open, and that both installs and the consumer's files are as they were; its record mutates the config file name the job is sent, so placement and removal run as written. It sends two real jobs, about half a minute on Windows and a quarter on Linux. sentToJob gives what the one job of a reading over the bundled set was sent (D4118 through D4121), with the expected experiments read from the canary file by the test file's own reader. ranReply builds a reply that read ran from judgements typed as the judge's, over a stand-in canary directory that holds only a canary file (namedCanary, setOf, canaryDirectoryOf), so a set can name a judgement no job reads (D4122 through D4127, D4137 through D4140). overCanaryFiles reads sets whose file is missing, is not JSON or lacks a member, each beside a whole file that is used (D4128 through D4130). D4141 reads what is placed from inside the job, D4142 holds one reading's job open while a second is taken from the same state directory, in D4144 through D4147 the stand-in job alters the placed directory before it ends (the placed path swapped for a link to a sibling in the state directory, a real directory put where the link was, the directory removed, the link removed), and D4148 hands the reading its state directory through a directory link. Not covered: a recursive removal that fails once the link is gone and a real path that cannot be read for another reason than a missing directory, since no stand-in makes either fail on both platforms, and the removal on Windows under Node 22.
The canary gate is covered in the same file by D4185 through D4197 and D4203, in packages/daemon/test/falsify/defects.json. gated builds a real CanaryGate over the stand-in install of standInPlace, a stand-in set of the canaries the case names, the case's stand-in job and a memory log, all under the test's own temp directory, with the workspace whose node_modules holds that install. takeUnread takes the canary job of the install the gate reads as unread for a workspace, in the caller's tick, and refuses an install that does not lie under the case's directory, so no test takes a reading of an install the host holds. linkedWorkspace adds a second workspace that reaches the same install through a directory link, refusal gives what the gate says of a workspace whose install's reading disagreed on two canaries, and unsupportedWait what it says of a workspace that resolves no supported Vitest, beside the resolution's own reason. D4185 through D4188 and D4191 read what the gate keeps (a confirmed and a disagreed reading, under the directory and the version together, and nothing of a no reading), D4189, D4190, D4192 and D4193 its wording, D4194 that the job is handed over in the tick the gate is asked, and D4195 through D4197 the log's start and end entries. D4203 reads a canary whose reply held a reason and no verdict as the refusal names it, with that reason and the judgement named for it.
The job through the executor is covered in falsify-executor.test.ts over the executor-crash fixture, whose test module a.test.mjs is also the file each experiment mutates. Its crash file ends the executor process during the baseline. A hold-point directory holds the fixture's first test in the baseline, and a mutation that points that test at hold-point-2 holds it in the experiment alone, so an abort lands in the run the test names. D3773 sends a declared error name through Executor.falsify and reads its experiment as detected. D3811 falsifies over the host-rejection fixture with its plugin site leaking on the executor's own thread, and reads the experiment as job unclean beside the same job with no leak.
D4050 through D4104, D4106, D4107, D4109 and D4157 through D4160, in packages/daemon/test/defects.json, cover the schedule of falsification jobs (packages/daemon/src/daemon/falsification.ts and falsification-plan.ts, the lifecycle's wiring of them, answeredJob in packages/daemon/src/query/summary.ts, and the running check in daemon/workspace-schedule.ts), in lifecycle.test.ts. falsifying runs a real DaemonLifecycle over a consumer written under a temporary directory: each workspace's source, with one function for each test, rt-test.json, and definition files, by default one definition for each test, named <PATH><index>, whose mutation is that test's own line. The discovery and each run are scripted, every test passing, so each definition is eligible, and the look reads the real files. FalsifyingExecutor answers each job from the case's replies, or holds it (HELD) until an abort, which ends it as the case's aborted says while abortFinds is true, or until the test ends it with end. replied builds the reply of a job that ran to its end, each experiment judged by the judge over the facts given for its defect (NO_VERDICT, SURVIVED, a detection when none is given); aborted builds the reply an abort leaves, by which definition was running, whether in its confirming run, whether the first baseline had ended, and which definitions were decided before any run; decidedBeforeAnyRun builds a reply with no baseline. Each reply carries the digest of each mutation's file as the file stands, as a job records it.
The look's file reads end on no turn a test can count, so these tests wait on what the daemon did: sent until a number of jobs have been sent, idled until the scheduler has logged a number of idle entries, which it does each time a look takes nothing after work, and afterPeriodicReconciliation until the look after a reconciliation has closed its window. Each wait resolves after 15 s of the process's own clock whether or not it was reached, with whether it was, so a daemon a mutation keeps from getting there fails the test's assertion and never its timeout. A test whose expected value a daemon that did nothing would also give, as no evidence write, no abort or no further job, asserts that answer beside it, so a daemon slower than the bound on a loaded machine fails the test where it would have passed it unseen. The 10 minute bound and the quiet window run under underFakeClock, which leaves setImmediate and the process clock real; D4070 pins the bound by advancing the faked clock 599,999 ms, which aborts nothing, and then 1 ms more, which does. EditableInputs changes every workspace's fingerprint when the test sets edited, and NamingInputs makes the next job to end read a verdict the test set, as a job reads an event that named an input at an unmoved revision. D4089 seeds the store with a passing run of a workspace the confirmed start no longer holds, and D4097 fails a run's store write at one revision and returns the fingerprint to the earlier one, so a run's entry and a falsification's stand for one workspace. D4157 holds the look's own wait for the inputs through heldSettleIf, armed once the daemon has idled and true only while the round reads planned at the revision the test then moves to, since the scheduler's own wait comes while that round is still pending; it registers the stop behind the held wait, so the stop lands once the look has begun its read, and it asserts that the wait was held. D4160 reads its entry through summary(), which cuts a reason as every answer does. D4108, in query.test.ts, aborts the signal of worktreeStandings over a root with no rt-test.json, where its guard is the only check between its file reads and the daemon's moment.
D4166 through D4184, D4201, D4202 and D4204, in packages/daemon/test/defects.json, cover the seam between the look and the canary gate (daemon/falsification.ts), in lifecycle.test.ts. The rig's gate option hands the lifecycle a ScriptedGate, a stand-in that takes no reading: resolves gives the install each workspace resolves, or what the gate says of one with no supported Vitest, and readings what each canary job reads by its index, or HELD, which keeps the job in progress until the test ends it with end. It keeps a confirmed or a disagreed reading by install and nothing of a no reading, as the gate does, words what it keeps through the gate's own readingWait, and records the workspace of each standing asked (asked) and of each canary job taken (canaryJobs). A canary job has no link to the rig's executor, so a test of an abort reads the abort's purpose on the executor and ends the job itself. Without the option, every test of the rig runs with a gate that confirms every install and takes none. ClosingInputs runs a callback as the next window on the tracker closes; D4169 and D4170 arm it from the gate's resolves, so a change of the input revision and a stop land between a look's close and its canary job. D4180 and D4181 run under underFakeClock. D4198 through D4200, in the same defects.json, cover the resolver's walk (vitest/load-vitest.ts) in load-vitest.test.ts: stand-in installs in stores of their own (storedInstall), a workspace that links one (linkedTo), and repoint, which points the link at another, with every resolution of a test in one process. D4201 reads a canary job that gave no reading while no time bound was reached as marked with what happened, D4202 the log's entry for a refused workspace's mark, which says what ends the refusal, and D4204, through startEntries, that the log names no falsification job as started for a workspace while its canary job runs or once a look refused it.
D1792 through D1847 and D1863 through D1866, D1870 through D1872 and D1875, in packages/daemon/test/defects.json, cover the summary and path-status queries (packages/daemon/src/query/, the store's readLatestResults, the server's and lifecycle's query answers, and packages/daemon/src/query-client.ts): each state, freshness, not-discovered entry and path decision in query.test.ts, over hand-built stored records typed against the store's and, for path status, a consumer tree written to a temporary directory; the latest run per workspace and worktree in store.test.ts; the stopping check, the line limit on both sides, a throwing query and a relative path in server.test.ts; the answer's activity and nothing-stored jobs and a query during a run in lifecycle.test.ts; and in daemon.test.ts, queries to a real daemon held mid-run by the daemon-lifecycle fixture's hold marker, and a proving stand-in answering as a daemon that predates the queries or is stopping, or, for D1875, dropping the connection mid-request. D1848 through D1855, D1867 through D1869, D1873, D1874 and D1876, in packages/cli/test/defects.json, cover rt-test summary and rt-test status in packages/cli/test/cli.test.ts, where D1849 through D1851 plant a failing test file in the fixture's packages/b, and D1874 replaces the daemon-lifecycle fixture's packages/b config with one that throws. D4110 and D4111, in packages/daemon/test/defects.json, cover the no-answer reason's wording of a falsification entry and of the falsifying activity, in query.test.ts, and D4112, in packages/cli/test/defects.json, the CLI's wording of the entry, in packages/cli/test/cli.test.ts over a hand-built answer.
D3360 through D3389 and D3420, in packages/daemon/test/defects.json, and the re-anchored D1826, D1829, D1844, D1872, D1891, D1960, D2164, D2170, D2959, D3261, D3367, D3369, D3370, D3377 and D3379, cover reading the paths a query names (packages/daemon/src/query/caller-paths.ts, the named read in input-tracker.ts, queued-reads.ts and input-jobs.ts, readEntryDigest in input-inventory.ts, the lifecycle's late pathStatus and withoutFingerprints in path-status.ts, and PATH_STATUS_BOUND_MS in query-client.ts). The Windows refusals of a missing name and the Linux answer for one are covered in query.test.ts, each reading process.platform through onPlatform, so each is proven on either host. The named read of an edited, unchanged, deleted, new, git-ignored and case-folded file and of a folder, of a held input now a directory or unreadable and of a dangling link, the jobs a found change marks, the paths it could not read, its wait, its pending count and its end at a reconciliation running or beginning are covered in input-tracker.test.ts over silent watches, holding a read through the readEntryDigest mock; D3376 reads process.platform as win32 through onPlatform. input-inventory.test.ts covers a path below a file read as absent (D3386) through a pass-through mock of node:fs/promises lstat, so it detects on either host. The late answer, a request aborted during its read, and an answer whose read could not read its path (D3420) are covered in lifecycle.test.ts over the stand-in tracker, whose heldNamedRead script holds each named read and unreadNamed scripts what it could not read. In daemon.test.ts, a real daemon's status of a file saved before any event reports it is covered under the test/fixtures/daemon/silent-watch.mjs preload, which makes every watch the daemon opens report nothing, and each query's bound through a spy on DaemonConnection.prototype.request over a keyed stand-in. D4280 through D4292, in packages/daemon/test/defects.json, cover a batch's named reads taken together (QueuedReads.read in queued-reads.ts and readTogether in input-inventory.ts). input-tracker.test.ts covers the reads in flight together and sixteen at once, their place after the batch's event reads, a read applied in the turn it returns, a directory found where the tracker already holds one, a held input found replaced by a directory, a batch whose event read lost the input set, a batch whose named read failed, and the stop, each over silent watches. holdingEachReadOf there records by base name each read of a path an event or a query named, holds the ones a test names until it releases them, and answers a scripted name without a read; a walk's own reads pass it by, since the inventory calls readEntryDigest inside its own module. A test gathers one batch by holding the queue behind an event read of a path no test writes, and none waits on a clock. D4284 queues, as the named read hands back what it read, a change of protection for the next turn of the event loop, the earliest another writer of the state can run, and the real walk then reads the file. input-inventory.test.ts covers the pool under a real inventory (sixteen files read at once, every one of twenty files held as an input, a file that cannot be read) by holding or failing lstat through its pass-through mock, and the pool alone (no read begun after a failure, counted once the pool has settled) over readTogether with no file at all. oneShot in packages/daemon/test/harness.ts is the promise with its resolver those holds are built from.
D4321 through D4326, D4347, D4348 and D4351, in packages/daemon/test/defects.json, cover the discovery's freshness in an answer once each stored run must vouch for its workspace's lists (packages/daemon/src/query/list-freshness.ts, its use in query/summary.ts, and discoveryCurrent in QueryBasis and defects/worktree-standings.ts, which also hands the resolver whether the answer's discovery freshness is current), in query.test.ts over hand-built records. discoveryAtDigest stores a discovery under DIGEST, vouchingRun a run under it that ran the tests given, and discoveryCurrentWith settled inputs under which the discovery's own fingerprint is the stored one and each workspace's the digest given, so the discovery's own freshness is current in every case and only the run's vouching decides. D4321 reads stale while the workspace is due beside current once it is not, D4322 unknown under a refused latest run, D4323 unknown under a run that recorded another test beside current under one that recorded the listed one, D4324 current beside a workspace with no stored run, D4347 unknown under a vouching run stored not fingerprinted, and D4348 unknown when an earlier workspace's current run recorded another test although a later workspace's run vouches. D4325 and D4326 hold the two readers of the discovery's own fingerprint apart from the list-rated value: two same-named tests of a workspace that is not due read current in the summary, and evidence for a test told apart only by its position reads current in the defects answer, each while another workspace is due and the answer's discovery reads stale. D4351 reads, at the layer D3721 reads, a not-discovered reason that says the discovery is not current while the workspace's stored run is due under a discovery current by its own fingerprint, and not once that run is current; D3721's record mutates listsCurrent. Not covered: stale winning over unknown across workspaces.
D3424 through D3463 cover the wait for files: D3424 to D3449, D3456 and D3457 to D3460 in packages/daemon/test/defects.json, and D3450 to D3455 and D3461 to D3463 in packages/cli/test/defects.json. server.test.ts covers the server's checks of a wait request: no limit takes 100 s, a null limit is refused, and 1001 paths and 3600001 ms are refused against 1000 paths and 3600000 ms, and a wait naming no path is refused. waits.test.ts covers binding, the unread paths taken once its reads have settled, settling (a plan that makes nothing due, a workspace that does not cover the files), superseding, the limit, a client that leaves and a refused wait; it drives Waits (daemon/waits.ts) over a StandInInputs tracker, a scripted builds state, a stand-in schedule reader and stored results the test sets, with narrowingSelecting in round-fixtures.ts selecting per changed path. query.test.ts covers the covering workspaces (coverageAt in query/wait-answer.ts: listed files, env files not known, the widening) and the answer's counts and named failures (waitAnswer). lifecycle.test.ts covers a wait the lifecycle answers once its covering run ends. Against a real daemon, daemon.test.ts covers a test file saved under the silent watcher settling only after its workspace ran again (D3446), an edit to a held run's test file superseding the wait (D3447), where a second wait answering unsettled at a 1 s limit witnesses that the first had bound before the edit, queryWait's bound (D3448) through queryBounds, which answers a wait too, and a directory refused (D3449). packages/cli/test/wait-command.test.ts covers the command's arguments, exit codes and text, answering every queryWait from a hoisted module mock rather than a daemon.
D3476 to D3496 and D3498 to D3518 cover the changes for files, D3476 to D3496, D3498 to D3502, D3509 to D3511, D3517 and D3518 in packages/daemon/test/defects.json, and D3503 to D3508 and D3512 to D3516 in packages/cli/test/defects.json. changes.test.ts drives Changes (daemon/changes.ts) over a StandInInputs tracker, scripted builds and stored results the test sets, covering a query refused whole, the moment read after the named read, an unread named file, inputs the tracker cannot vouch for, the given cursor handed back while an edit's build has not ended, recording before comparing, recording at build ends, at a store that begins a build and at an input change, no record at a moment not determined, the scope and the counts; it drives the journal (daemon/change-journal.ts) directly for a flip and flip back, the standing at the cursor, an entry's key, another life's cursor and expiry at 100000 recorded changes against 99999; and it composes answers (query/changes-answer.ts) over journal readings for each failing state, the no-outcome states, a rerun still failing, a recovery, an entry appearing and going away, the workspace-level entry kinds, the order and the bound of 20, and the first error line of a failing change, a failed run and a failed module. server.test.ts covers a changes request's path bound and cursor check. Against a real daemon, daemon.test.ts covers a test file saved under the silent watcher leaving the answer not determined with the given cursor handed back (D3500), a first call after an edit taking the latest recorded cursor and the next call listing its rerun's failure (D3501), and the request queryChanges sends (D3502). packages/cli/test/changes-command.test.ts covers the command's arguments, exit codes, --json document and text, the unread files, the counts in scope and outside, no test in scope and why an unusable cursor was not used, answering every queryChanges from a hoisted module mock.
D3654 through D3708, D3710 through D3734, D4006 through D4017, D4021, D4024 through D4028, D4030, D4031 and D4040 cover defect definitions and the defects query (packages/daemon/src/defects/, packages/daemon/src/query/defects-answer.ts, matchesBelow in packages/daemon/src/inputs/non-inputs.ts, the server's and lifecycle's defects answer, queryDefects in packages/daemon/src/query-client.ts, and packages/cli/src/commands/defects.ts). D3654 through D3690, D3711, D3712, D3714 through D3720, D3726 through D3728, D3731, D4006 through D4017, D4028 and D4040 are in packages/daemon/test/defects/defects.json; D3691 through D3701, D3706 through D3708, D3710, D3713, D3721 through D3725, D3732 through D3734, D4021, D4024 through D4027, D4030 and D4031 are in packages/daemon/test/defects.json; D3702 through D3705, D3729 and D3730 are in packages/cli/test/defects.json.
packages/daemon/test/defects/definitions.test.ts covers the reader, the validator and the resolver. The reader (readDefinitionFiles) runs over consumer trees the test writes to temporary directories: each kind of invalid entry, a file two patterns match, a pattern that matches nothing (D3711), a pattern with a wildcard directory segment (D3717), an rt-test.json that is absent, unparseable, a link, a directory or not an object (D3654, D3655, D3718 through D3720), and a parse failure's reason, which D3659 and D3716 pin as quoting no file text and D3660 as giving the parser's position, its line and column optional since a Node line may leave them out. The assertionErrors member is read over the same trees, through settingsDeclaring, the text of an rt-test.json declaring names, with a defects member only when patterns are given, and settingsProblem, the entry a problem in rt-test.json makes: the names read beside the definition files and anew at each read (D4006, D4007), the bound of 256 on both sides (D4008, D4009), each refusal with its reason (D4009 through D4012), the refusal of Error with its reason whole (D4040), a problem in each member as two entries with the defects member's first (D4013), the two members checked apart (D4014, D4016), the names' entry before the walk's (D4015), and a file that cannot be read at all as one entry (D4017). D4028 counts the reads of rt-test.json through a spy on the scripted map the node:fs/promises mock consults at every read. Directory links are junctions on Windows and symbolic links on Linux. A pass-through mock of node:fs/promises fails opendir, readFile or stat for a path the test scripts, for a directory that cannot be listed (D3665), a file that cannot be read (D3667) and a link whose target cannot be checked (D3712). D3668 makes the tree a real git repository for an ignored directory. D3669 answers readIgnoredPaths with a scripted listing that leaves out a file created after it, while the real git check-ignore runs, since git lists an ignored file that exists when it is asked. The validator (checkDefinitions) runs over values held in memory, except D3676 and D3715, which write a directory link and files into a temporary directory for a mutation file reached through a link outside the root; D3727 wraps the check so a mutant that throws fails at the assertion. The resolver (readAnchors, then resolveDefinitions) runs over hand-built discoveries and mutation files in a temporary directory: not discovered and its two reason clauses, ambiguity and the fields that narrow it, invalid winning over a missing anchor (D3686, D3731), and the anchor count over LF and CRLF files, repeated, absent and overlapping occurrences, an unreadable file and an anchor never read (D3687 through D3690, D3714, D3728). Each describe that reads definition files passes DAEMON_TEST_TIMEOUT_MS, since the reader asks git for ignored paths.
query.test.ts covers the answer (defectsAnswer) over hand-built stored discoveries and a consumer tree written to a temporary directory, through defectsOver, whose moment reads the stored results when it is called: gaps and a test only an invalid definition names (D3691), the scope by discovered module and the definitions and definition file problems that lie in every scope (D3692 through D3694, D3713, D3724, D3725), the state counts, the order and the bound of 500 over 503 seeded definitions (D3695, D3732), the bound of 1,000 and the per-module counts over 1,001 seeded tests (D3696, D3697), the refusals (D3698, D3699), reasons cut to 1,000 characters (D3722, D3723), the resolved identity with its duplicate mark and the facts every answer carries (D3733, D3734), the discovery's currency reaching the resolver under settled inputs whose discovery digest matches or differs (D3721), and the moment taken only once the reads have ended, which D3710 shows by changing the stored results after the call returns. D4026 shows it of the last read: the moment's own callback rewrites the mutation's file, so an anchor read after the moment reads anchor missing. A case says what rt-test.json holds through the settings of defectsOver's setup, which declaring builds for a list of names: a names problem in every scope's total and listing (D4021), the invalid entries in the order the read gives them (D4030), a path's counts over its own definitions alone (D4024), definitions of one state listed file by file over two definition files the walk reads in the other order (D4031), what worktreeStandings returns to a caller that is not the answer (D4025), and the no-answer of a worktree with no stored discovery (D4027). The bounds are seeded rather than mocked down, so the file needs no module mock.
server.test.ts covers a defects request whose path is not absolute and the narrower-path advice of an answer past the line limit (D3700, D3701), composing its own handlers over handlers(false). daemon.test.ts covers the path and the 60,000 ms bound queryDefects sends, over a keyed stand-in and a spy on DaemonConnection.prototype.request (D3706, D3707). lifecycle.test.ts covers the lifecycle passing the caller's path to the answer (D3708). packages/cli/test/defects-command.test.ts covers rt-test defects: the arguments it sends, a second path refused, the text and the --json document, the not-listed line and the counts taken from the answer's counts (D3702 through D3705, D3729, D3730), answering every queryDefects from a hoisted module mock.
D3910 through D3965, D3990 through D4002, D4018 through D4020, D4022, D4023, D4029 and D4041 cover stored defect evidence and what each definition reads of it (writeEvidence and selectEvidence in packages/daemon/src/store/defect-evidence.ts, the evidence a store keeps between its reads in store/kept-evidence.ts, the rebuild of facts and readings in store/evidence-facts.ts, the evidence table and the version 10 migration in store/schema.ts, packages/daemon/src/defects/defect-standings.ts, the names and the consumer root worktreeStandings hands the standings in packages/daemon/src/defects/worktree-standings.ts, the evidence fields of packages/daemon/src/query/defects-answer.ts, the evidence refusal log in packages/daemon/src/daemon/refusal-notes.ts, and packages/cli/src/commands/defects.ts). D3932 through D3950, D3965, D3996, D4000, D4018 through D4020 and D4041 are in packages/daemon/test/defects/defects.json; D3958 through D3962 and D3999 are in packages/cli/test/defects.json; the rest are in packages/daemon/test/defects.json. Every migration record of store/schema.ts anchors on a statement that holds the evidence table, and its test pins schema version 11.
packages/daemon/test/experiment-facts.ts holds the fact builders these tests share with the judge's in falsify/verdict.test.ts and with the schedule's in lifecycle.test.ts: detection, ranOnce, baseline and mutatedRun build an experiment's facts, ranReply builds a job's reply whose judgements are the judge's own over each experiment's facts, and detectionFor builds a stored detection bound to a standing's definition digest and mutation file digest. It imports scheduling-harness.ts for the Vitest version a hand-built discovery reports, and nothing of harness.ts.
store.test.ts covers the write and the read over a real node:sqlite store seeded only through writeEvidence: each record's bindings and the mutation file digest of the experiment record naming its defect (D3910, D3911), replacement in one worktree alone (D3912), a judgement with no verdict (D3913), the one transaction, where a pass-through spy on StatementSync.prototype.run reads through a second store after the first insert (D3914), each refusal by what it names (D3915 through D3921, D3925, D3926), no member the fact types do not name reaching a row (D3927, D3928), a verdict decided before any run, whose reply replyWithUnrun builds with not-run records as the job leaves them (D3963), an unclear verdict with what its confirming run read (D4002), rows a second connection corrupts, and a row of a newer or an older falsifier version (D3922 through D3924, D4114), the evidence read from the snapshot the discovery is read from, where a spy on DatabaseSync.prototype.prepare commits a discovery and a verdict as the read's schema version is prepared (D3931), a store at each schema version from 1 to 10, which writeStoreAt takes back as that version's migration's inverse (D3929, D3964), and a new store read by a store opened again (D3930), and the evidence a store keeps between its reads: a second and a third read answering the first's records and refusals with one fetch in all, counted by a pass-through spy on StatementSync.prototype.all, across a run this store writes between them (D3990), the read after this store's own evidence write (D3991), a row a second store handle replaced, then rows a second connection deleted and corrupted (D3992), another worktree's and another project's own evidence, through readsAcross (D3993, D3994), and, in the newer-schema block, a store migrated after it read and kept a scope's evidence (D3995).
defects/definitions.test.ts covers the digest and the standings over definitions resolved from real files in temporary directories, through standingsIn, whose case names the definitions, the definition file they are read from, the discovered tests, the files and the moment's facts: what the digest covers and what it does not (D3932, D3933, D4000, through lastDigests), the declared names as a set, which gives every definition another digest when the list gains or loses a name and the same one when it is reordered or repeats a name (D4018 through D4020, through digestsDeclaring), each cause of staleness beside the same detection reading current (D3934 through D3939, through besideCurrent), a falsifier version below the current one, the literal 3, reading stale as one above it does (D4041), every cause and every reason named (D3940, D3996), unknown under no current fingerprint and under a discovery that is not current (D3941, D3942), the anchor read's digest of a file with a byte order mark and CRLF line endings (D3943), a state that wins over stored evidence, refused evidence, the listed errors, the order of the states, the counts and eligibility (D3944, D3945, D3947 through D3950, D3965), and a module that failed to collect (D3946).
query.test.ts covers the answer over evidence bound as a job binds it: withDetections writes a case's files, stores a detection for each definition with the digests its standing gives, and hands back the function that answers under the inputs given (D3951 through D3955, D3997, D3998). detectedDeclaring does the same beside an rt-test.json declaring names, and hands back the function that answers once the file declares the names given to it: a detection read under the same set and under a list that gained or lost a name (D4022), a member that cannot be used read as the empty set (D4023), and the consumer root the standings digest under (D4029). lifecycle.test.ts covers the evidence refusal log over a real store, through afterEvidenceStored, which stores a reply once the daemon is idle and returns the log's evidence refusal entries (D3956, D3957, D4001). packages/cli/test/defects-command.test.ts covers the text over scripted answers, through printedLines, which counts the printed lines each pattern matches (D3958 through D3962, D3999).
D1711 through D1745 and D1768 through D1770, in packages/cli/test/defects.json, cover the rt-test CLI's start and stop (packages/cli/src/, the start plan in packages/daemon/src/start-plan.ts, and stopDaemon's process id in packages/daemon/src/client.ts) in packages/cli/test/cli.test.ts, which drives main in process with captured streams and a simulated terminal whose stdin reports itself a TTY and types each reply once the y/N question appears, starts real daemons over the daemon-lifecycle fixture through the daemon harness, whose run-scoped temp root the cli project's global setup shares, and runs bin.ts from source as a child process under list-modules.mjs for D1740; D1716 and D1717 put a control sequence and a line break into the fixture's package.json workspaces, and D1730 adds a workspace while the question is pending.
D3526 through D3559, D3564, D3565 and D3567 through D3569, in packages/cli/test/defects.json, cover the Claude Code agent hook (packages/cli/src/commands/hook.ts, hook-memory.ts and hook-report.ts): all but D3564, in packages/cli/test/hook.test.ts, drive rt-test hook claude-code in process through main, with queryChanges scripted and userDirectory pointed at each test's own temporary directory, each run starting in a later millisecond than the last as separate hook processes do, and D3551 and D3556 end a run at its 2,000 ms bound under fake timers; D3564, in packages/cli/test/cli.test.ts, runs the hook against a started daemon over the daemon-lifecycle fixture with the real user directory. D3560 through D3563 and D3566, in packages/daemon/test/defects.json, cover the bound a changes query gives the proof of the daemon's hello and its request, in packages/daemon/test/daemon.test.ts (D3560 and D3566), and the user's own RT Test directory, in packages/daemon/test/runtime-directory.test.ts, which mocks lstatSync, mkdirSync, existsSync and protectDirectory so a Linux or a Windows directory is judged on either host without creating one.
D3466 through D3473, D4345 and D4378, in packages/daemon/test/defects.json, cover the edit corpus in packages/daemon/test/edit-corpus.test.ts: D3466 through D3470 replay a sequence of edit-corpus-sequences.ts over the test/fixtures/daemon/edit-corpus fixture and assert checkSequence returns its clean report, against a selection that follows no dependency edge, a scheduler that reruns a workspace holding a current result, a tracker that keeps declared non-inputs as inputs, a selection that widens every path to the whole project, and a run that records a failed test as passed; D3471 through D3473 drive the check's storedRunFindings over the stored runs a daemon's log names, each history built from literal run stored: entries through runsLogged in packages/daemon/test/stored-run-log.ts, against a duplicate execution never reported, a run compared with its workspace's first run rather than its previous one, and a baseline that runs a workspace twice unreported; D4378 drives runsLogged alone, against every stored run read as not fingerprinted, over entries that include the one written ahead of the write for a run stored not fingerprinted, which names no stored run. D4345 replays the sequence that adds a failing test to an existing test module and then removes it, declaring each of its workspaces to run once at each edit, against stored runs whose lists never reach the discovery, so the daemon's answers count one test where the module holds two.
D4211 through D4246, in packages/daemon/test/defects.json, cover the falsification corpus in packages/daemon/test/falsification-corpus.test.ts. replayedOn replays the corpus once per Vitest install over the test/fixtures/daemon/falsification-corpus fixture and keeps the report for the file, since a replay is a daemon life that takes a real canary reading before it falsifies; D4211 through D4217 each read one line's report in one assertion, so a suite run pays two replays and the defect verifier, which runs each test alone, pays one for each record. D4211 and D4212 assert replayCorpus returns its clean report on Vitest 4.1 and on Vitest 5, against evidence freshness that ignores a change of its workspace's inputs, so the weakened assertion keeps its detection, and against a judge that reads a failed setup hook as a body failure. D4213 through D4217 each assert the report holds no finding of one kind, through findingsOn: a state not as declared, against an anchor missing that reads invalid definition (D4213) and an occurrence that is not compared (D4214); a count not as declared, against a verified count over every current verdict (D4215); a definition falsified outside the declared set, against a look that takes definitions whose evidence reads current (D4216); and a step not settled, against the canary gate handed Executor.falsify unbound in daemon/daemon-main.ts (D4217). Under D4212's mutation the canary reading of the replay's install disagrees and the gate refuses both workspaces, and under D4217's every reading is a no reading, so each of those two replays ends at its deadline with its baseline not settled, inside the test's timeout. No record mutates daemon/canary-reading.ts, daemon/canary-gate.ts, vitest/load-vitest.ts or falsify/canary-set.ts, so every replay's placement and removal run as written. Those four modules and the executor's child process import none of the files D4211 and D4213 through D4216 mutate; the look that asks the gate, in daemon/falsification.ts, loads all three.
D4218 through D4246 drive the comparisons of packages/daemon/test/falsification-corpus-findings.ts over hand-built readings, each mutating that file. D4218 through D4238 assert the findings by kind, step and subject through named, a finding's detail being wording there; D4239 asserts the throw, D4240 through D4245 what isSettled and waitingDefinitions return, and D4246 the finding's detail, which is what its mutation removes. listed builds an answer's definitions from a step's declared readings with the ones a case names read otherwise. D4218 through D4223 read the state comparison through each of its members (state, eligibility, evidence freshness, reason) and its two listings; D4224 through D4227 the total, eligible and verified counts and a state's count; D4228 through D4231 the falsified sets, with the baseline's arm and a record the store lost, over stored and afterJob; D4232 the Vitest version; D4233 through D4237 the tree, with an entry changed, added and removed and a file the step edited that reads as before or holds other bytes than the step wrote; D4238 and D4239 the mutation search and its control; D4240 through D4244 five of the settle's six conditions, through settledWithout, which reads a finished reading beside the same reading with one condition broken; D4245 the waiting definitions; and D4246 what the not-settled finding names.
Not covered: the length of the settle's hold and the value of the replay's deadline, each of which shows only beside a second defect in the daemon; a state the answer counts that no step declares; a confirmed workspace the schedule does not list; a definition listed with no id; and a not-settled finding with no answer read. A mutation that writes into the consumer's tree is proven over hand-built readings only, and the job's own writes are watched by the falsify records.
The daemon tests create their temp directories under one parent per run, which the global setup packages/daemon/test/temp-root.ts creates and removes at teardown, and packages/cli shares that setup. A directory a process still holds at the end of the run fails that run. Before any daemon can start, the run records in that parent where the daemon would hold its store lock, key and Linux socket, where the fixture writes its executors' process ids, and each daemon process id a test receives. The setup starts a detached watchdog, test/scripts/run-watchdog.mjs, tied to the Vitest process by a pipe. When that process ends without its teardown, as a killed run does, the watchdog ends each recorded process still running whose command line, or on Linux whose working directory, lies inside the parent, or that such a process started, reading its start time just before the kill so an id another process has since taken is spared. It then removes the recorded keys and sockets and the parent, and exits. The teardown does the same and fails the run naming any process it had to end, and the next run's setup cleans up any ended run the watchdog left (test/scripts/run-cleanup.mjs).
D1754 through D1756, D1761, D1774 through D1779, D2442, D2474, D2496 and D2542, in test/scripts/run-cleanup/defects.json, cover the daemon suite's teardown in packages/daemon/test/temp-root.ts and the daemon harness's record and end sequence in packages/daemon/test/daemon-harness.ts, over real idle Node processes; D1755, D1756, D1761, D1774, D1778 and D1779 provide the run's temp parent to the harness through Vitest's worker state, and D2496 fails a test body while the process query cannot be made. They mutate files under packages/, so they are product records, and they move to packages/daemon/test/defects.json when next touched.
Every other defects.json under the root test/ holds legacy records for the repository's tooling, whose mutated files lie outside packages/. No new tooling record is written, and a tooling fix that breaks one deletes it (_agent-docs/crew.md § Gates). Ids stay unique across the repository, which bun run check:defects enforces. The orchestrator allocates each lane a range of defect ids so parallel lanes never pick the same one. Each test has one assertion, so a targeted assertion failure has a clear scope.
The runner's own stall tests (test/scripts/defects/runner-stop.test.ts) never let a real clock decide a stall. Each runs the runner's setTimeout and clearTimeout on a fake clock, taps the process the runner spawns through the node:child_process mock, and advances the clock only after the tap shows the event its claim needs: the first progress line, the output, a later line, or the exit. The stand-in (test/fixtures/defects-runner/stand-in.mjs) repeats a line until the test writes released, so no duration of its own decides when it stops. A runner test in which the idle window only bounds a hang passes the 20 s REAL_WINDOW_MS. The waits poll through holdsWithin, which imports setTimeout from node:timers/promises by name, and a named import of a Node builtin stays real under the fake clock.
scripts/verify-defects.mjs reads packages/, lint/, scripts/, test/, .claude/hooks/, the root tsconfigs, _agent-docs/_flow-config.yaml, and .claude/settings.json into an in-memory snapshot, skipping node_modules and dist and never following a link, and writes that snapshot into each of its sandboxes. A run's sandboxes share one directory under the operating system's temp directory, named rt-test-verify-defects-<pid>-<start time>-<random> after the id and start time of the process that owns it, and the check refuses a temp directory at or inside the repository, or at or below any node_modules. It records the links a sandbox needs and recreates them in every sandbox, as a relative symlink or, on Windows, a junction, which can hold only an absolute path. A link in a copied directory whose target the snapshot also copies, such as the packages/<pkg>/node_modules/@rt-test/<name> link Bun makes for a workspace dependency, points at that sandbox's own copy. A link in a copied directory into the root node_modules, and one link per package in the root node_modules (each package of a scope, and no entry whose name starts with a dot), point at the installed package, so a sandbox's node_modules is a real directory and Vitest's results cache stays inside the sandbox. The check refuses a root node_modules entry that resolves into the repository outside node_modules, as a hoisted workspace package does, since a sandbox would run that live source. Since the sandboxes sit outside the repository and below no node_modules, an import none of those links answers fails to resolve. It resolves Vitest through its package manifest and executes its Node entry point with argument arrays.
The check requires every D### test to have exactly one defect record, whether its title follows it( on the same line or the next, and every mutation anchor to match exactly once. It requires each sandbox to match the snapshot byte for byte and to hold exactly the recreated links, each with its recorded target, and a baseline to pass every named test and no other test before any mutation: a full run's baseline runs the whole configured suite, so a test file with no named test fails the check. New tooling tests under the root test/ carry no named defect, so run a whole-catalog check the owner asks for as node scripts/verify-defects.mjs --ids <ids> over every product record: each record in a defects.json under packages/, and the run-cleanup records above that mutate files under packages/. A run filtered by --ids, --edited or --changed baselines only the test files it verifies. Each sandbox then takes one defect at a time from a shared queue: it applies the exact mutation to the file its record names, runs only the test file that holds the named test, filtered to that test, requires that file alone to be collected and that test to fail with an assertion failure, and restores the file. A mutated run that reports the named test file alone but not exactly one named assertion failure is reported with the run's exit status, its passed count and each failed test's first message line. A baseline or mutated run that otherwise passes or detects still fails when it did not end cleanly: Vitest reported no run end, an unhandled error Vitest reported or its main process recorded, a process.exit call its main process recorded, such as a close timeout, or no recorded exit, which a kill leaves; a named assertion failure beside any of these is not a detection. Every failure the check reports for a Vitest run that started, a baseline or a mutated run, whether stopped, interrupted or finished, ends with how Vitest ended the run and its unhandled errors, what the run's main process recorded about its ending, then that run's stderr and its stdout tail; a verdict on a run that wrote a report first quotes each file's error and the tests the report left pending. Each Vitest run carries a reporter, scripts/lib/defects/progress-reporter.mjs, that writes a line per collected module and per started or finished test and hook, and one at the run's end with Vitest's end reason and unhandled errors, which the JSON report leaves out. Vitest's main process also loads scripts/lib/defects/exit-witness.mjs through --import, which appends to a record beside the report each uncaught exception, each unhandled rejection while another listener handles it, each process.exit call with its caller, and the exit itself, changing none of them. The check stops a run only when no such line arrives for twice LONGEST_TEST_TIMEOUT_MS in test/scripts/longest-test-timeout.mjs, the longest per-test timeout any suite may declare. It ends Vitest's main process and then its pool workers, each only while its id still names the worker it listed, sparing the daemon suite's watchdog, and fails naming the tests still running. A run holding a test whose timeout, times its retries and repeats, exceeds that constant, or a hook or teardown timeout that does, fails naming it. A stopped or interrupted run is a failure, never a detection. When the queue is empty, each sandbox must match the snapshot byte for byte again, dist and node_modules included, apart from Vitest's results cache, and hold the same links, and a final baseline must pass. The working files and the recorded links must still match when the check ends, and the run's directory is removed on exit; a failure to remove it fails the check. A run killed before then leaves its directory behind, and the next run removes each leftover whose owning process has exited and names it; a process that now holds the owner's id with another start time is not the owner, a leftover named by the id alone is kept while any process holds that id, and a leftover whose owner cannot be checked is kept and the reason logged.
--jobs <n> sets the number of sandboxes; it defaults to three quarters of the logical cores, and at least 1. Three selectors filter the run, which verifies the union of what they select. --ids <ids> verifies the named defects, written as one comma-separated list (--ids D12,D40) and repeatable; an id no defects.json records, a list that names no id, or a stray argument stops the run before any sandbox starts. --edited verifies the defects whose record differs from HEAD, or whose test file or mutated file differs from HEAD (staged, unstaged, or untracked); it follows no import and never widens, so a change to a file that no record tests or mutates selects nothing. --changed (bun run test:defects:changed) verifies those defects and also the ones whose test file or mutated file reaches a changed file through relative imports. A changed file the sandbox copies, or a changed vitest.config.ts, package.json or bun.lock, that no such import reaches selects every defect, and the run names it; type declarations and defects.json files are exempt. It follows only relative imports, so a test that reaches a changed file by spawning a process or reading it at run time is not reselected. A filtered run prints the selected and total counts and each selected defect with its reasons, and its last line names its selectors and says it is not the full run. Filtered runs are for iterating and for a lane's proof, which is the only proof a defect gets: bun run check re-proves none, and runs scripts/check-defects.mjs instead, which requires each D### test to have exactly one record and each mutation anchor to match exactly once without running a test. A filtered run says nothing about the defects it skipped, and a run that selects no defect exits 0 after saying that none was verified.
Keep bootstrap tests hook-free: do shared setup lazily inside the test body, so a setup failure fails the test with a non-assertion error rather than passing as a detection. This check is deliberately limited to those known hook-free tests. It does not classify arbitrary project failures or implement the product's general mutation engine. It does not establish that a mutation kills only one test in the whole suite. Preserve that distinction in claims and reports.
Changing source formatting may invalidate an exact mutation anchor. Update it deliberately; do not silently skip or fuzzy-match missing anchors. A changed test or mutation requires fresh evidence.
One Windows failure has no known cause. A Vitest forks worker exited with code 3221225477 (0xC0000005, an access violation) while running packages/daemon/test/force-stop.test.ts under the full suite's load, during D1322, which force-stops a Vitest 4.1 run on the threads pool. It happened once, on 2026-09-29 at 12b6595, and not in about 409 further runs of D1322, alone or beside full suites under extra load. libuv starts each child in a job that bypasses Windows Error Reporting, so no dump exists; capturing one needs a debugger attached before the fault.
| Date | Commit | Test | Exit code |
|---|---|---|---|
| 2026-09-29 | 12b6595 | D1322 | 3221225477 |
On a recurrence, add a row: the date, the commit, the test by its reported count, and the exit code.
Build synthetic projects for plain TypeScript, mocked imports, shared setup, parameterized tests, dynamic imports, generated files, and framework registries. Add fixtures for setup errors, collection errors, unhandled errors, timeouts, runner crashes, and interrupted runs.
Exercise missed watcher events, edits during runs, branch switches, renamed tests, duplicate names, new untracked files, and deleted dependencies. Check that defects in the selection system cannot produce false current passes.
For each controlled edit, run the selected tests and an independent full baseline against the same input snapshot. Compare discovered failures and invalidated states, not just exit codes. Keep negative controls where unrelated changes should retain evidence.
The edit corpus (test/fixtures/daemon/edit-corpus/, checked by packages/daemon/test/edit-corpus.ts) does this for a consumer shaped like Fleet Cooling, on Vitest 4.1: each sequence of edits is replayed against RT Test's own daemon from the committed fixture, and at a baseline before the first edit and after each edit, once a wait on its files has settled and the daemon is idle, a full run by plain Vitest's command line over the same files is compared test by test with the results the daemon stored and the freshness its answers give, and module by module with the number of tests its answers count for the module's file. The runs a step stored are read from the daemon's log, one run stored: entry for each, since the store holds only each workspace's latest run; a run stored under the digest its workspace's previous stored run was stored under is a duplicate execution, the digest covering the adapter version. The check reports a selection miss (NFR2), a duplicate execution (NFR1), any other disagreement (a module whose test count the daemon's answer gives other than as the full run reports it, and a file the daemon's answer counts tests for that the full run reports none for and did not fail to load, among them), a workspace run outside the set the edit declares, a declared run that did not happen, an edit whose full run fails other than what it declares, a wait that does not settle, a daemon that does not go idle, a full run it cannot use, and an input revision moved by an edit that declares no run. Vitest 5 is not in the corpus.
The falsification corpus (test/fixtures/daemon/falsification-corpus/, checked by packages/daemon/test/falsification-corpus.ts) replays milestone M2's acceptance against RT Test's own daemon, once on Vitest 4.1 and once on Vitest 5, each in one daemon life over a fresh copy of the fixture: a library and an app that imports it by package name, with seven defect definitions in two definition files. A replay is a baseline, a step that rewrites the line a definition's anchor names, and a step that weakens the assertion that detected a mutation. After each, once a wait on the step's files (at the baseline, on every test module) has settled and the defects answers have shown, for 400 ms, the round planned, every workspace idle, no change unread, the activity idle and no definition waiting, the check compares the daemon with what the step declares in falsification-corpus-steps.ts: every definition's state, eligibility, evidence freshness and reason; the answer's total, eligible and verified counts and each state's count; which definitions the store holds new evidence for, read from each record's evidence id, so the library's records are the negative control of the step that edits the app; the Vitest version each record carries; the copy's tree outside .git, node_modules and the state directory, where only the step's file may differ and must hold what the step wrote; and every file under the copy, those directories included, for a definition's new text. It reports a step that does not settle, a state or a count not as declared, a definition not declared or not listed, a definition falsified outside the declared set or declared and not falsified, evidence under another Vitest version, a consumer file changed, and a mutation's text on disk. Of NFR7's failure kinds the corpus holds the setup failure alone; the canary set holds every kind. It does not replay a restart, an it.each arm, a definition left without a verdict, or a job an input change ended.
Use observed execution to improve explanations and prioritization before trusting it to narrow selection. Any narrowing rule must have fixtures showing both its precision and its conservative fallback.
Report cold and warm measurements separately. Include runner-only baselines, hardware, OS, runtime versions, file/test counts, and the edit class. Query latency, invalidation latency, selection time, execution time, and instrumentation overhead are separate metrics.
Keep repeatable benchmarks out of correctness tests where machine timing would cause flakes. Never label provisional budgets as achieved measurements.