Skip to content

feat(oracle-gaps): write the stream to <out>/stream.log and name it in the first line - #57

Open
KyleAMathews wants to merge 72 commits into
mainfrom
feat/gap-cli-stream-log
Open

KyleAMathews wants to merge 72 commits into
mainfrom
feat/gap-cli-stream-log

Conversation

@KyleAMathews

@KyleAMathews KyleAMathews commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The oracle-gaps run owns its stream log. The supervisor claims the output directory, writes the note line, and only then starts the child, so a run stopped after its note still leaves a log and one done line. A second run on a live output directory refuses without writing into it. A stale, empty or unreadable run.pid refuses too (maintainer decision "Stale claims refuse; no takeover").

This head merges origin/main at fac63df (#61, after #103) and answers the conformance check of #57 against the v21 design grammar (conformance-open.md, the #57 section) and the merge gate's G1. Rule IDs are v21.2 (model-v21.2.md, freeze-v21.2.md); D-numbers are evidence-v21.2.md.

Changes in this head

  • Merge of main (fix(oracle-gaps): retire a batch's copies from Vitest's state #61). fix(oracle-gaps): retire a batch's copies from Vitest's state #61's per-call output directories and retention hook meet feat(oracle-gaps): write the stream to <out>/stream.log and name it in the first line #57's default output directory: a run with no --out keeps no suffix, and its check pid and retention lines are read from the directory its note line names, before that directory is removed. Main's constructed history ("a batch whose run rejects") and its rejectBatch field come first; feat(oracle-gaps): write the stream to <out>/stream.log and name it in the first line #57's histories and fields follow.
  • D66, the win32 stop's done line is judged again (P10, R10, I7; C 2026-11-13 "Stop window on every platform"). The owesDone exception is removed. Every stop the driver sends on win32 goes through the test stop hook, so it owes its note and one done line. The one stop that owes none is a SIGKILL-equivalent (L1; C 2026-11-13 "Windows stops": a win32 child.kill is TerminateProcess), and no history sends one. A new constructed history, "an unsupervised run stopped after its note", reaches stopNow on POSIX too.
  • D67, randomness wins (R54, M 2026-11-16 "Randomness wins for new fields"). outMode, logBlocked, stopWitness, claimScenario, spawnSignal and spawnDelay are drawn. overlap, spawnStop, spawnOnStart, logLost, supervisorDeath and unsupervised switch a test-only hook, so they stay constants that only constructed histories set (I16). The fingerprint is updated for the drawn fields; fixed seeds shift, as R54 accepts.
  • D68, no drawn field switches a hook (I16, G43). A drawn stop no longer takes after (ORACLE_GAPS_TEST_HOLD_UNTIL); only "every outcome class" sets it, and the take-back drops it. The history-grammar canary now checks that no drawn history switches a test-only hook.
  • D69, the start hold is released by the stop, not by time (R57; C 2026-11-14 "Determinism under load covers witnesses too"). ORACLE_GAPS_TEST_PAUSE_AFTER_STARTED holds the CLI after its started marker until the CLI has kept a stop (or, on win32, until the test stop file exists). A 60 s backstop fails loudly. "A stop as the CLI starts" is entered only when the supervisor started no child, that is, the CLI kept the stop during its loads.
  • G1, the spawn stops. A spawn stop is sent only once the CLI is held at its start, after its drawn delay (0 to 300 ms): after the started marker, or before the CLI's first statement through the driver's own preload (outcome a of the spawn-delay law, now judged on stopped runs; it was dead code). New constructed histories: "a stop before the CLI starts" and "a stop by SIGTERM as the CLI starts", both POSIX only (R56: win32 cannot deliver a signal to a Node process).
  • D72, no ps. The supervised child tells that it leads its process group by a signal 0 to the group its pid names, not by ps -o pgid= -p. psMissing (a PATH that names no command) is drawn, and the constructed history "a supervised check with no ps on its PATH" reaches it (POSIX only, beside the supervisor-death state: R56, K23).
  • D70, a dangling claim. A run.pid that the claim's link finds and no read does now refuses as an unreadable claim, with no report written into the directory. The "keeps changing" refusal is removed. claimScenario draws dangling, and the constructed history "a start refuses a dangling claim" reaches it.
  • Refusal order (P10 as amended in v21.2, R10). With logBlocked drawn, a random seed found that the model owed the wrong refusal beside a fault. The model now follows the CLI's stages: argument refusals, then the stream log, then the check. The driver claims a fault's refusal only when the run reached that fault.
  • Shards. Linux fixed-seed: the six new constructed histories are in shard 1, because shard 3 (rest) took 8m28s. Windows: they are in shards 9 and 10. The local e2e shards list them too.

Evidence

Local runs used one Vitest worker, on macOS (this laptop) unless they say Linux (an 8-vCPU Arca Arclet). "Parent" means c6779eb or cfcc7fa: those commits change only the oracle, so their production code is the code before this round's fix.

D66: the win32 stop's done line (P10, R10, I7)

  • Law: every stop owes its note and exactly one done line on each stream, on every platform (C 2026-11-13 "Stop window on every platform"). Only a SIGKILL-equivalent owes none (L1).
  • Reach: "an unsupervised run stopped after its note" (constructed, every platform). On win32 every stop goes through stopNow.
  • RED (blind spot on the old oracle): the mutant below, run against fd6ef6a (c466605 merged with main). The four POSIX stop units pass (4 passed). The code shows why: on POSIX no history reaches stopNow, and on win32 owesDone was false.
  • GREEN: the new unit passes at the parent (cfcc7fa) and at the head.
  • Mutant: stopNow exits without writing its line. The new unit kills it at checkpoint stopped, law greppable stream: "stderr has 0 done lines and ends with oracle-gaps: note --hang-limit 20000 ms is above …".
  • Windows (CI run 43888777409): every stop's done line is judged there now. "an unsupervised run stopped after its note" (shard 10), "a stop as the CLI starts" (shard 7), "a stop with the default output directory" (shard 8), and the run and after stops of "every outcome class" (shard 2) pass the done-line checks. Shard 2 fails only on main's idle reach gap, which is reported after every law has passed. Shard 4 fails only on main's win32 abort witness (fix(oracle-gaps): supervise the check on win32; log each CLI run in the e2e driver #79), after its warm stop passed. No mutant was run on Windows.

D67, D68: randomness wins and no drawn hook (R54, I16)

  • Law: a new field that changes what runs is drawn; a drawn field never switches a test-only hook (M 2026-11-16).
  • Reach at the fixed seed (the union over every fixed-seed unit): before is fd6ef6a, the merge of c466605 with main, on an Arca Arclet (202 states, 71 units). After is d2d7235, local (207 states, 76 units).
    • Lost: none.
    • Gained: "a start refuses a dangling claim", "a stop before the CLI starts", "a stop by SIGTERM as the CLI starts", "a supervised check with no ps on its PATH", "an unsupervised run stopped after its note".
    • The generated unit alone went from 3 states to 52, because the shifted seed now draws a richer history.
  • Hook canary: tests/gap-report-history-fingerprint.test.ts samples 500 drawn histories at three seeds. It passes at the head. With after put back in the drawn when (the parent's draw), it fails.
  • Random seeds (head): random seed: generated 8 times, the random units of the 8 feat(oracle-gaps): write the stream to <out>/stream.log and name it in the first line #57 constructed histories twice. The new determinism units of the six new histories pass. One random counterexample was found and fixed (next item).

Refusal order beside a blocked log (P10 v21.2, R10)

  • RED: ORACLE_SEED=-118669542 ORACLE_PATH=0:0:0:0:0:0:0 ORACLE_PROPERTY='oracle-gaps.report' ORACLE_UNIT='random seed: generated' at 9c8110d: a history entered "refused noTypescript", which the property does not declare. A scratch matrix (a blocked log beside each of the 14 faults) failed 7 of 14: the state for brokenOwner, setupThrows, noTypescript and apiLessTypescript; the first lines for brokenVitest and projects (the model owed their refusal, but the CLI refused the log); and "the refusal does not name the stream log" for outsideSource (the CLI refused the argument first).
  • GREEN: the replay passes, and the scratch matrix passes 14 of 14 (it was not committed). The drawn logBlocked × fault keeps it in the generated campaign.

D69: the start hold (R57)

  • Law: a driver holds the CLI at a named pause point, released by the driver or by a count the CLI records, never by time.
  • Reach: "a stop as the CLI starts" (POSIX and win32) and "a stop by SIGTERM as the CLI starts" (POSIX) are entered only when the supervisor started no child. At the fixed seed their drawn delays are 295 ms and 292 ms.
  • RED (parent c6779eb, its hold of 1 ms by time): both units fail: constructed history "a stop as the CLI starts" did not enter a stop as the CLI starts, and the same for SIGTERM.
  • GREEN: both pass at the head.
  • Mutants: (1) the old 200 ms hold released by time: both units are killed by the same reach failure. (2) keepEarly deleted: killed at stopped: "the run's first lines are ["",""], not "oracle-gaps: note log /out-stop/stream.log" on each stream".

G1: the spawn stops (the spawn-delay law; C 2026-11-13 under P10)

  • Reach: "a stop before the CLI starts" (outcome a, POSIX), "a stop by SIGTERM as the CLI starts" (POSIX), and "a stop as the CLI starts" (outcome b). The drawn spawnSignal and spawnDelay apply to all three. Outcome (a) is reached deterministically: the driver's preload holds Node's start, and the signal's default action ends the process.
  • GREEN: the three pass at the parent and at the head (outcome a depends on no CLI code).
  • Note: outcome (a) is judged on stopped runs now: nothing on either stream, no stream log, and an exit by the signal. Before, the branch read a started field after its directory was removed, so it could not fire.

D72: no ps (outside the grammar; R39 by analogy)

  • Shown in a container: node:24.8.0 (Debian), with ps removed, and then with a BusyBox-like ps that rejects -p. ORACLE_GAPS_INTERNAL_SUPERVISED=1 setsid node index.mjs --help exits 3 at c466605 ("the run cannot read its process group, so it cannot arm its supervisor watchdog"), and exits 0 at the head.
  • RED (parent c6779eb): "a supervised check with no ps on its PATH" fails at cli, law completion: "the run ended in an internal error … the run cannot read its process group".
  • GREEN: it passes at the head.
  • Mutant: the ps lookup restored: killed by the same completion violation.

D70: a dangling claim (R44, R45, I17)

  • RED (parent c6779eb): "a start refuses a dangling claim" fails at claimScenario, law ownership: a dangling gave ["refused (run.pid in <out> keeps changing; fix rerun the check; …)"], owed ["refused (run.pid in <out> can't be read; fix if no run uses <out>, delete <out>/run.pid)"].
  • GREEN: it passes at the head.
  • Mutant: the refusal writes its report: killed: a dangling wrote beyond its claim attempt: run.pid kept true, other files ["results.json","summary.md"].

Fixed-seed shards and CI

Answers to the other conformance items

  • K57-1 (note first): resolved by the P10 amendment in v21.2 (note-log first once a check starts; the baseline is the first result line). Not drift.
  • K57-2 / D73 (a stop during Node's start prints nothing): now witnessed deterministically ("a stop before the CLI starts") and judged as outcome (a). It still rests on C 2026-11-13 under P10, which is flagged for the maintainer, and is not an L1 case without a ruling.
  • K57-3 / D74 (zero shipped bytes): index.mjs is 31,545 B raw and 10,514 B gzip at the head, against 31,503 B and 10,448 B at c466605 (+42 B, +66 B). The ps lookup and the "keeps changing" refusal are removed. The stop-released hold is longer than the time hold. The scope of "shipped" for the oracles package stays K14's question.
  • D71 (no once-guard for the unsupervised stop): not changed, and no witness reproduces it. A second stop must come before the first stop's writes complete. On POSIX, process.stdout and process.stderr write a short line at once, and the callbacks that lead to process.exit run as next ticks, before the next timer or signal callback. On win32, Node makes stdout and stderr pipes blocking. The win32 done line is judged again (D66), so a second done line there would now fail CI.
  • D65 / K18, K19 (appended histories shift every seed): this head appends 6 constructed histories and changes drawn fields, so every fixed and random seed's draws move (R54 accepts that for new drawn fields). The reach lost and gained is above. "Replay by history" (M 2026-11-16) settles K18 and K19 in the framework, not here.

Limits

  • Windows was not run before the push: its evidence is this PR's CI. No mutant was run on Windows.
  • Windows 4/10 is over the 10-minute limit (above). This is open.
  • An unsupervised POSIX run has no group to end, so a stop while the witness's test spins leaves that test's own child (measured on the parent: "1 of the processes the run started outlived the CLI"). The POSIX witness of stopNow therefore stops the run at its note, before any process starts. Win32 ends a run's children through the job object that libuv puts them in. This is recorded in the oracle's declared limits, beside C 2026-11-13 Windows (e).
  • Two drawn stops still switch a test-only hook. warm switches ORACLE_GAPS_TEST_WARM_PROBE, and on win32 every drawn stop goes through ORACLE_GAPS_TEST_STOP. Both are main's pattern (D68), and both need the maintainer's decision. Only after was made constructed-only here.
  • A stop during Node's own start, between the driver's preload and the CLI's started marker, is not generated, because its outcome follows timing.
  • ps is missing only as an empty PATH. A real BusyBox system was not run, only a shim that rejects -p.
  • The oracles repository has no coverage map. The platform scopes (R56) are recorded in the oracle's declared limits and here.
  • Not run here: brokenOwner (determinism: the CLI's heartbeat list depends on wall-clock timing, so five determinism units fail on main #91) and apiLessTypescript (reach: "a heartbeat named a busy mutant" depends on wall-clock timing and is reached 1 to 2 times per shard #84), which are main's failures.

Register entries this touches

M 2026-11-16 "Randomness wins for new fields", "P10 exemptions ratified"; M 2026-11-14 "Stale claims refuse; no takeover"; M 2026-11-13 "Two runs on one live --out"; C 2026-11-13 "Stop window on every platform", "Windows stops", "Test-only hooks", "Under P10, flagged for maintainer review" (outcome a); C 2026-11-14 "Determinism under load covers witnesses too", "Platform-scoped reach (#73)" (now M-29, R56).

This pull request and its description were written by Isaac.

KyleAMathews and others added 4 commits November 12, 2026 20:17
The maintainer's decision of 2026-11-12: an agent that runs a check in
the background learns where to read its stream from the run itself. A run
that starts a check names `<out>/stream.log` in its first line on both
streams (`oracle-gaps: note log <path>`), and that file holds the
stderr's lines, in order, cold, through the daemon, and after a stop or
an abort. The driver records each run's first lines and whether its log
equals its stderr; two calibrations give a log that misses a line and a
naming line after another line.

Co-authored-by: Isaac <no-reply@databricks.com>
…og first

The maintainer's decision of 2026-11-12 names the stream log first in
every run that starts a check, refusals in it included. The refusal law
(#46) owed stdout = the done line alone; it now owes [note log, done
line] when the check started, and [done line] for a refusal of the run's
arguments, which comes before any check (outsideSource, and the static
oracle's argument refusals). Law 15's log checks apply to runs that start
a check.

Co-authored-by: Isaac <no-reply@databricks.com>
…irst

A run that starts a check creates `<out>/stream.log`, writes
`oracle-gaps: note log <path>` as its first line on both streams, and
writes every stderr line to the log too: the cold check's lines, a daemon
reply's stderr, an internal error's or refusal's ending, the completed
done line, and the supervisor's own done line for a stopped or crashed
run.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@changeset-bot

changeset-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07766d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tanstack/oracles Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b704bf34-145c-4328-bee2-0abd872a0ef5
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/TanStack/oracles/@tanstack/eslint-plugin-oracles@57
npm i https://pkg.pr.new/TanStack/oracles/@tanstack/oracles@57

commit: 07766d3

KyleAMathews and others added 4 commits November 13, 2026 10:23
…nd run on a live --out

The supervisor opens <out>/stream.log and writes the note before it spawns
the child; it resolves --out once and passes it to the child and to the
daemon request; it tees the child's stderr, V8 lines included, to the log.
A run whose log cannot be opened is refused before any check (exit 2, one
done line), and a second run on a live output directory is refused without
writing into it (maintainer decision, 2026-11-13).

Oracle: out-mode (explicit or default) and log-blocked and overlap
histories, with the law that a completed run's results.json sits beside its
stream log and that a refused run writes nothing into a live directory.
Stop histories use the stop-only witness.

Co-authored-by: Isaac <no-reply@databricks.com>
…le fixes

Oracle changes: out-mode, stop-only and stop-at-spawn dimensions appended to the
history grammar (earlier fields unchanged on the sampled histories); the five
new states as own-history states; overlap generated only for an explicit out, a
live first run, and a fault-free history; the overlap wait ends on the first
run's exit; constructed fault histories reset the end-to-end dimensions their
generated base may draw. CLI: pre-restructure index.mjs from 5a92a3e.

Co-authored-by: Isaac <no-reply@databricks.com>
…un.pid on exit

A run claims its output directory with run.pid: a temp file that already holds
the pid, linked to run.pid (fails if it exists), so two starts cannot both
claim. The claim is released on every exit but SIGKILL. A claim whose pid is
gone is taken over; a live one refuses the second run and names the pid.

Oracle: the spawn-delay law (outcome a or b, judged by the started marker,
added with the next commit), the overlap hold guard (a test-only hook), the
stop history that waits for the CLI to start, and the appended history fields.

Co-authored-by: Isaac <no-reply@databricks.com>
… loads

The CLI's first project statement is now the handler install, so a stop that
arrives during the loads is kept and acted on once the note is written. The
single run path (P4) is in the same file; the static-import variant with the
same handlers passed the default-out units, so the dynamic loads are not the
cause of any batch failure (review of #57).

A test-only marker, ORACLE_GAPS_TEST_STARTED, is written as the first project
statement so the oracle can tell a stop before the CLI started (no output is
allowed) from one during its loads (the full output is required).

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews added a commit that referenced this pull request Nov 13, 2026
… witnesses

- P10: the Windows CLI runs assert the done line on both streams, and that
  it matches the exit code (scripts/windows-witness.mjs done).
- A package with no package.json is refused with exit 2 and a done line
  that names it (Windows witness).
- One early stop: SIGINT once the CLI prints its first line; the run must
  end with the stop's done line on both streams, or with no output (#57).
- Per-shell replay (framework, accepted by the coordinator): a failing
  property's PowerShell and cmd lines each reproduce the failure in their
  own shell. The POSIX line is run in PowerShell and must not reproduce (the
  RED). A run that printed only the POSIX line fails here (the mutant).
- The tsc link lookup in package.test.ts reads npm's Windows shim, not a
  symlink.
- The eslint plugin suite runs even when the framework suite fails.
- Job timeouts are 20 minutes, as high backstops (2026-11-12).

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews added a commit that referenced this pull request Nov 13, 2026
… forward-slash done lines

- Stop (#57, all-or-nothing) on the unsupervised win32 path: a stop of a run
  that has started now writes its `oracle-gaps: done stopped (<signal>)` line
  on both streams and exits 128 + signal, as the supervisor does. A stop
  before the run starts still prints nothing (index.mjs, runStarted).
- Test-only stop hook: when the file ORACLE_GAPS_TEST_STOP names appears, the
  CLI takes the same stop as a SIGINT (index.mjs). The Windows stop witness
  uses it (a non-console parent cannot deliver Ctrl+C there; child.kill on
  win32 is TerminateProcess, which is a SIGKILL-like limit, so no line is owed).
- Static oracle: the `unknown` long-argument case uses 30,000 characters on
  win32. Windows caps a command line at 32,767 characters; a longer one never
  starts (status null). Narrowing, recorded in the PR: the POSIX runs keep
  100,000.
- e2e and static model: the expected done line's report path is forward-slash
  (inline in the model; the e2e corruption check likewise).
- The diagnostic Get-Content line is removed.

Evidence block
- Law: the all-or-nothing stop law (#57) on every platform; keys and report
  paths forward-slash (register: Windows paths; stop window on every platform).
- Reach: the existing static and e2e histories; the stop witness is one run.
- RED: run 43498457502, stop witness `stop was not all-or-nothing (signal
  SIGINT, exit null)`; static `with unknown arguments, the refusal exited null`;
  e2e `the last stdout line is ... report D:/...`, not `...\out\summary.md`.
- GREEN: pending the next Windows run. Local: the CLI lints and loads; the
  stop witness is queued on the e2e lock for a fixture run.
- Mutant: pending (the replay witness, on a throwaway branch).
- Limits: OS delivery of Ctrl+C is not exercised on Windows; TerminateProcess
  is treated like SIGKILL; the win32 argv cap narrows the long-argument case.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews and others added 4 commits November 13, 2026 19:41
…rawn 0-150 ms otherwise

The constructed stop history waits for the started marker (ORACLE_GAPS_TEST_STARTED)
and then signals at once, so the signal lands in the CLI's loads on every machine.
Generated histories keep the drawn 0-150 ms delay and signal (SIGINT or SIGTERM).
Verified: the real CLI passes; the late-handler mutant (handlers after the project
loads) is rejected with started-but-no-output.

Co-authored-by: Isaac <no-reply@databricks.com>
A refusal of the arguments comes before any check, so its output is its done
line alone, through the daemon as in a cold run. The cold stream check, the
daemon stream check, and the daemon refusal's note now share owesNote(expected),
instead of the daemon path applying the note requirement to every refusal.
Verified: the outsideSource unit passes on the CLI; the mutant that requires a
note for argument refusals fails it.

Co-authored-by: Isaac <no-reply@databricks.com>
The started marker (ORACLE_GAPS_TEST_STARTED) is written after the stop handlers
are installed, so a marker means the CLI can handle a stop. A test-only pause
after the marker (ORACLE_GAPS_TEST_PAUSE_AFTER_STARTED, ms) widens the window
for the spawn-stop witness: with the marker before the handlers, a stop during
the pause ended the CLI with a marker and no output (0 of 20 passes); with the
fixed order, 40 of 40 pass.

Co-authored-by: Isaac <no-reply@databricks.com>
…ults.json's state

A stale run.pid is taken over only by the racer that creates run.pid.takeover (a
directory only one racer can make), and only after it re-reads the stale pid under
the mutex. Two concurrent starts against a stale claim now yield exactly one claim
(witness: 5 of 5 trials, one claimant each; the mutant without the mutex and the
re-read yields two in 5 of 5). A test-only pause (ORACLE_GAPS_TEST_PAUSE_AT, inert
unless set) widens the window. The results-beside-log message names the directory
and whether results.json is missing, unparseable or read (batch 3, issue #76).

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews added a commit that referenced this pull request Nov 14, 2026
…e path rule (#58)

* ci: add a non-blocking Windows job for the oracle framework and gap CLI

The framework, the eslint plugin, and the gap CLI have never run on
Windows, and users report path problems there. Two diagnostic jobs run on
windows-latest: the unit suites (framework, eslint plugin, gap fast
oracles) and the gap CLI end to end (a fixture package written at run
time, the plain and daemon paths, and one fixed-seed e2e unit). Both are
continue-on-error and each step continues on error, so the first failure
does not hide later ones. Neither is a required check or a dependency of
preview.

Co-authored-by: Isaac <no-reply@databricks.com>

* ci(windows): diagnostic split of the fast suites, fixture package.json

Diagnostic only, not a fix. The first run showed the gap fast suites and the
fixed-seed end-to-end unit hang on windows-latest (cancelled at the job
timeout, with no output after the static oracle and the e2e calibrations
started). The fast suites now run one file per step with a step timeout and
verbose output for the static oracle, so the hang is located. The fixture
gets the package.json it was missing (the CLI reported ENOENT for it). The
job timeouts are raised to 45 minutes so the split steps can finish.

Co-authored-by: Isaac <no-reply@databricks.com>

* ci(windows): diagnostic replay, error-log dump, and discovered-config run

Diagnostic only. Adds a bash replay of the first failing static unit (its
verdict is not printed by the run), a run of the fixture with the discovered
config instead of --config, and a dump of the gap CLI's error.log files from
the OS temp directory, which the daemon run's failure points to.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): one path rule for Windows, and shell-aware replay lines

Forward slashes at entry, native only at the file system. Paths enter the
CLI as argv, as Vite and Vitest report them, and as realpath returns them;
comparisons and keys use one spelling (oracle-gaps/paths.mjs).

- The config wrapper imports the config by a POSIX specifier. A backslash
  in an ES module specifier is a character, so every run with a config
  was refused on Windows (check.mjs, wrapper).
- Mutant copies are keyed and served in forward slashes, as Vite resolves
  and Vitest reports them. The copy map was keyed by native paths, so the
  copies were never served on Windows.
- Module IDs are kept by isAbsolute, not by a leading slash: a Windows ID
  is `C:/...`.
- The package root, the located packages, and the source names use the
  native real path on both sides (realPathOf). The JavaScript realpath
  kept 8.3 short names such as RUNNER~1 and refused every owns entry.
- The daemon listens on a named pipe on win32 (no socket file to
  remove), keys by the same real path as the CLI, and its timeout names
  the end of its log.
- A package with no package.json is refused, not an internal error.
- Replay and rerun lines print PowerShell and cmd forms on Windows; the
  POSIX form is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>

* test: portable npm spawns, a segment rule for production files, native realpath

- npm is an npm.cmd shim on Windows; spawnSync runs it through a shell
  there (package.test.ts, shipped-citations.test.js).
- The probe-form oracle's model decides production by a directory named
  src, split on either separator, not by a substring with `/`. Production
  was right; the model was wrong on Windows.
- The owns test uses the native real path, as the CLI does.

Co-authored-by: Isaac <no-reply@databricks.com>

* ci(windows): sharded Windows jobs in place of the diagnostic ones

The diagnostic steps are gone. The Windows jobs mirror the Linux shards:
the unit suites in one job, the static gap oracle and the fixed-seed
end-to-end oracle in three shards each (pr-shards.mjs), and the gap CLI on
a fixture, including the discovered config and the daemon. Each job has a
15-minute backstop. The jobs are still continue-on-error until every one
is green; that line is removed then.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): give TypeScript and the owner map one spelling of a path

The owners and the instrumenter named files with the platform's
separators, and TypeScript matches a file's name as given, so on Windows
the owner map keyed `src\x.js` while the sources were `src/x.js`, and
CommonJS sites lost their functions. The compiler now gets forward-slash
names, and owner keys are forward-slash (schemata.mjs, owners.mjs,
analysis.mjs).

A path's drive letter is capitalised in the one spelling (paths.mjs), so a
drive's case never decides a path.

New oracle: gap-report-path-spelling (a metamorphic check). Law 1: the
instrumenter gives the same mutant ids for a source under any spelling of
its path. Law 2: relativeWithin answers from the segments alone.

Evidence block
- Law: a path's separators and a drive letter's case do not change what the
  gap CLI decides (paths.mjs, Windows support, 2026-11-13).
- Reach: 200 generated histories (fixed seed 20261113 and random), over four
  module forms, drives in both cases, mixed separators, short and spaced
  names. Reach is not declared (states: []); the histories are not
  measured as reaching a state.
- RED: on the parent commit (72b9495), the Windows jobs of
  #58 failed: the config wrapper
  import (check.mjs), the copy map, the owner keys (owners.mjs), and the
  8.3 short names. On Linux the enumeration law does NOT reproduce the
  Windows failure: the instrumenter gave the same ids on the parent. The
  Windows failure is a platform path.relative difference, which Linux
  cannot produce. The RED for those classes is the Windows CI run.
- GREEN: the Windows jobs (see the PR). Local, on macOS: the new oracle 5
  of 5, the framework 114 of 114, the eslint plugin 7335 of 7335.
- Mutant: relativeWithin as it was before (raw string comparison) fails the
  relation checkpoint; dropping the drive capitalisation fails it too. Both
  run on the parent tree with the oracle and both fail (exit 1).
- Limits: no declared reach; Law 1 uses the forward-slash spelling as its
  reference, so it claims only that the spelling changes nothing; owners,
  realpath, and OS short names are judged by the Windows end-to-end run,
  not by this oracle.

Co-authored-by: Isaac <no-reply@databricks.com>

* ci(windows): P10 done-line, refusal, early-stop, and per-shell replay witnesses

- P10: the Windows CLI runs assert the done line on both streams, and that
  it matches the exit code (scripts/windows-witness.mjs done).
- A package with no package.json is refused with exit 2 and a done line
  that names it (Windows witness).
- One early stop: SIGINT once the CLI prints its first line; the run must
  end with the stop's done line on both streams, or with no output (#57).
- Per-shell replay (framework, accepted by the coordinator): a failing
  property's PowerShell and cmd lines each reproduce the failure in their
  own shell. The POSIX line is run in PowerShell and must not reproduce (the
  RED). A run that printed only the POSIX line fails here (the mutant).
- The tsc link lookup in package.test.ts reads npm's Windows shim, not a
  symlink.
- The eslint plugin suite runs even when the framework suite fails.
- Job timeouts are 20 minutes, as high backstops (2026-11-12).

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): oracles read the platform's replay lines, and scratch packages have a manifest

Windows CI failed the classify oracle's baseline law: the CLI prints a
PowerShell and a cmd replay line there, and the law read only the POSIX
`replay:` line (Difference: "the replay of tests/f0.test.ts is undefined").
The law is unchanged: each replay line the platform prints must read as
`vitest run <file> -t <pattern>` in its own shell, and the owed test is the
one it selects. On win32 the law owes both per-shell lines; elsewhere the
POSIX line (replayLinesOf, powerShellWords, cmdWords).

The static oracle's scratch packages had no package.json, which the CLI now
refuses (args.mjs). Each fixture now writes a minimal manifest; its content
and its histories are unchanged.

Evidence block
- Law: the replay line of each shell reads as the owed command (Law 9,
  baseline; the CLI's replay lines, stream.mjs).
- Reach: the existing classify histories (276 tests); no new histories.
- RED: Windows run 43478073715, classify shard 3 (baseline law, 11
  violations) and the static shard 1 refusal (the missing manifest).
- GREEN: local POSIX classify 276 of 276. The win32 branch runs in the
  Windows job (see the PR).
- Mutant: not run; the win32 branch is exercised only by the Windows job.
- Limits: the win32 branch is checked on Windows only, not by the oracle's
  own generated histories.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): forward-slash report paths, cmd quotes, six shards, and shipped citations

Run 43483101749 (Windows, the first with the witnesses) showed:
- The CLI printed `report <pkg>\out\summary.md` and `tests\a.test.ts` in the
  done line and in the heartbeat. Report paths and display paths are now
  forward-slash (posix, check.mjs, ending.mjs), as the register's keys rule
  requires; the file system still gets native paths.
- The classify oracle's cmd reader rejected `\"` inside a double-quoted
  argument, which Node's argument parser reads as a quote. It now reads it so.
- The static and classify oracles' second scratch package had no manifest.
- Shipped citations joined paths with backslashes, and npm names files with
  forward slashes. The comparison now uses forward slashes.
- The refusal witness searches both streams (a refusal prints to stderr).
- The static and fixed-seed e2e took 3 to 6 times their Linux time on
  Windows, and the Linux shards hit the limit. Windows runs six shards of each
  (pr-shards.mjs `oracle-gaps-static-windows`, `oracle-gaps-fixed-seed-windows`,
  checked by `pr-shards.mjs check`: each test in exactly one shard). The
  classify, probe-form, mutant-validity, and path-spelling oracles run in
  their own job.

Evidence block
- Law: report and display paths are forward-slash; a cmd line reads its
  quoted quotes as Node does (register: deterministic replay; the CLI's
  keys rule).
- Reach: the existing e2e and static histories, unchanged.
- RED: run 43483101749, which printed backslash report paths and failed
  classify on `\"`.
- GREEN: pending the next Windows run; local POSIX suites pass (classify 276,
  shipped citations 2).
- Mutant: not run for this commit.
- Limits: the Windows e2e and static shard timings are measured on the next
  run before the budget claim (P12) is made.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): keys and report paths are forward-slash in the CLI and its models

Run 43493431349 (Windows) failed the static and e2e oracles on report paths:
the done line names its report in forward slashes (the register's Windows
paths rule), but the model built the expected line from the native output
directory, and the declared oracle files were keyed by native relative
paths (`tests\a.test.ts`), so a heartbeat's file was not an owner.

- analysis.mjs, check.mjs: declared oracle files and copies are keyed by
  their forward-slash relative path (relativeWithin).
- gap-report-model-oracle.mjs: the model's expected done line is
  forward-slash (inline, the model does not import production).
- shipped-citations.test.js: the rejection test's strings are forward-slash.

Evidence block
- Law: keys and report paths use forward slashes on every OS (register,
  Windows paths, #58); filesystem calls get native paths.
- Reach: the existing static and e2e histories; no new histories.
- RED: run 43493431349: static 40 refusal-ending violations, e2e 17 baseline
  lead, 12 report-shaped ending, 4 streaming, 3 greppable stream.
- GREEN: pending the next Windows run. Local POSIX: shipped citations 2 of 2,
  CLI lints clean; the Linux keys are unchanged.
- Mutant: not run.
- Limits: the Windows e2e and static timings are measured on the next run.

Co-authored-by: Isaac <no-reply@databricks.com>

* ci(windows): the replay witness runs after a failed stop witness

The early-stop step failed on Windows (SIGINT ends the process through
TerminateProcess, so the CLI's stop handler never runs; the run ended with
a null exit code after its done line), which skipped the replay witness
behind it. The replay witness now runs regardless, so each witness reports.

Co-authored-by: Isaac <no-reply@databricks.com>

* ci(windows): print the replay output the witness reads (diagnostic)

The replay witness found no per-shell lines in the fixture's failing output.
This prints the first lines of that output in the same step, so the next run
shows what vitest printed. Diagnostic, to be removed with the witness fix.

Co-authored-by: Isaac <no-reply@databricks.com>

* ci(windows): the replay fixture declares its fixed seed

The replay fixture failed to load (TypeError reading fixedSeeds[0]), so the
witness saw no failure. It now declares fixedSeeds: [1].

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): the stop law on win32, the stop hook, the argv cap, and forward-slash done lines

- Stop (#57, all-or-nothing) on the unsupervised win32 path: a stop of a run
  that has started now writes its `oracle-gaps: done stopped (<signal>)` line
  on both streams and exits 128 + signal, as the supervisor does. A stop
  before the run starts still prints nothing (index.mjs, runStarted).
- Test-only stop hook: when the file ORACLE_GAPS_TEST_STOP names appears, the
  CLI takes the same stop as a SIGINT (index.mjs). The Windows stop witness
  uses it (a non-console parent cannot deliver Ctrl+C there; child.kill on
  win32 is TerminateProcess, which is a SIGKILL-like limit, so no line is owed).
- Static oracle: the `unknown` long-argument case uses 30,000 characters on
  win32. Windows caps a command line at 32,767 characters; a longer one never
  starts (status null). Narrowing, recorded in the PR: the POSIX runs keep
  100,000.
- e2e and static model: the expected done line's report path is forward-slash
  (inline in the model; the e2e corruption check likewise).
- The diagnostic Get-Content line is removed.

Evidence block
- Law: the all-or-nothing stop law (#57) on every platform; keys and report
  paths forward-slash (register: Windows paths; stop window on every platform).
- Reach: the existing static and e2e histories; the stop witness is one run.
- RED: run 43498457502, stop witness `stop was not all-or-nothing (signal
  SIGINT, exit null)`; static `with unknown arguments, the refusal exited null`;
  e2e `the last stdout line is ... report D:/...`, not `...\out\summary.md`.
- GREEN: pending the next Windows run. Local: the CLI lints and loads; the
  stop witness is queued on the e2e lock for a fixture run.
- Mutant: pending (the replay witness, on a throwaway branch).
- Limits: OS delivery of Ctrl+C is not exercised on Windows; TerminateProcess
  is treated like SIGKILL; the win32 argv cap narrows the long-argument case.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): the temporary directory's real path for state, socket, and logs

The default output directory is under the OS temporary directory, which on
windows-latest is `C:\Users\RUNNER~1\...` (an 8.3 short name). The model's
expected done line names the package by its real path, so the report path
never matched (e2e: `the last stdout line is ... report C:/Users/RUNNER~1/...`).
The temporary directory is now taken by its real path (realPathOf) for the
state directory, the socket, and the error log.

Evidence block
- Law: keys and report paths use one spelling; a real path on both sides
  (register: Windows paths; the realpath rule).
- Reach: the existing e2e histories (the done-line law).
- RED: e2e run 43515364499, done line with RUNNER~1 vs the package path.
- GREEN: pending the next Windows run.
- Mutant: pending; the replay witness mutant runs on the throwaway PR.
- Limits: the stdout gap-count mismatch (`2 gap lines for 0 gaps`) and the
  cold internal error in the incremental law are not yet explained.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): the e2e fixture's temporary directory by its native real path

The e2e oracle realpaths the OS temporary directory with the JavaScript
realpath, which keeps the 8.3 name (C:\Users\RUNNER~1). The CLI prints the
native real path, so the expected report line never matched. Use
realpathSync.native, as the CLI does.

Evidence block
- Law: one real path on both sides (the realpath rule; Windows paths).
- Reach: the existing e2e histories.
- RED: run 43515364499 and ee1a5fd: the done line names RUNNER~1.
- GREEN: pending the next Windows run.
- Limits: the static `output namespace` violations (82 in the last run) are
  not yet traced.

Co-authored-by: Isaac <no-reply@databricks.com>

* ci(windows): split the blocking Windows jobs from the non-blocking ones; fix the tsc lookup type

- Blocking now: the Windows unit suites, the classify, probe-form,
  mutant-validity, and path-spelling job, and the gap CLI fixture job with
  its witnesses (done line, refusal, stop, replay). Their continue-on-error
  is removed.
- Non-blocking, stated in the workflow: the Windows static and e2e jobs,
  which fail on Windows (tracked in the follow-up PR's body by class).
- Linux `Test` failed the typecheck on package.test.ts (the tsc lookup's
  optional capture). Fixed; tsc --noEmit passes locally.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): stop witness, replay quoting by the shells' grammar, and review items F1-F8

Review of #58 at ebc39e6 (NOT READY). This commit fixes:

- F1 (stop never stops): the witness's stop file is absolute (the CLI's cwd is
  the package), a stop requires the stopped line on both streams with exit 130,
  and the stop lands 400 ms after the run starts (the fixture's output is written
  in one burst near its end, so the first output line is no clock).
- F2/F3 (replay quoting): PowerShell reads U+2018 to U+201B as quotes, so every
  such character is doubled inside single quotes. cmd toggles quoting on every
  `"` and expands `%`; a name with either has no cmd form, and its cmd line
  says `use the PowerShell line for this name` (stream.mjs, src/oracle-property.ts).
  The classify oracle reads each shell's line by that shell's grammar (the
  PowerShell quote set; cmd's quote toggling, `^`, and `%`), checks the win32
  printer on every host, and generates adversarial names (curly quotes,
  `& | < > ( ) ^ % !`, quotes, backslashes), drawn as the last field of the test
  record (the fixed seeds' later draws shift; recorded here).
- F(f) (POSIX hook): the test-only stop hook lives in the supervisor and goes
  through its stop, which forwards to the child; a hooked stop gives
  `done stopped (SIGINT)`, exit 130 (local run: outcome (a)). Unsupervised runs
  keep the hook in the process.
- F5: posix() acts only on win32; on POSIX a backslash is a name's character.
- F6: check.mjs realpath of workspace links, report.mjs results path, and
  ending.mjs error log path are forward-slash and use the native real path.
- F7: the blocking Windows jobs are in preview's needs.
- F8: the non-blocking jobs point at #72.
- The Windows replay witness runs each printed PowerShell line and its cmd line,
  for two fixtures with hostile names (curly quote and metacharacters; a double
  quote and `%`).

Evidence block
- Law: the printed replay line replays in the shell it names (register:
  deterministic replay across shells; each printed line must replay on Windows);
  a hooked stop is a stopped line with exit 130 (register: stop window on every
  platform).
- Reach: the classify oracle's 276 generated histories (new adversarial name
  dimension, drawn last); the Windows replay fixtures; one stop per run.
- RED: the parent printer (ebc39e6, with only the platform parameter added) fails
  the new classify oracle on two names: `"vitest run tests/f0.test.ts -t '^’ t0$'"`
  (the PowerShell line ends its quote at U+2019) and the cmd line for `q"t`
  (`which the shell does not read as plain words`). Run locally, exit 1.
- GREEN: classify 276/276 on Linux (current code); POSIX stop witness outcome (a),
  exit 130 (local, under the e2e lock). Windows: pending CI on this head.
- Mutant: the parent printer is the mutant (the curly-quote and cmd forms before
  this commit); the RED run above is its rejection.
- Limits:
  - the stop timing (400 ms after spawn) is an assumption about the fixture's
    length; a run that ends first is reported as a failure, not passed;
  - cmd's `!` is literal (delayed expansion off), an assumption;
  - the classify fixed seeds' later draws shift (the new field is drawn last);
  - the win32 argv cap, the pipe name's machine scope, the POSIX state paths
    moving to the temporary directory's real path (an older daemon is found only
    after its idle timeout), and the unsupervised win32 process-tree exemption
    (#74) are recorded in the PR body.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): path-spelling oracle generates win32 separators and drives only on win32

The Linux run of 50b4ab5 failed gap-report-path-spelling: posix() acts only on
win32 (review F5), so on POSIX a backslash is a name's character and a drive
letter's case is a different name. The oracle now generates backslash joints and
mixed drive letters only on win32; on POSIX it generates `/` joints and `C`.
This narrows the law on POSIX (recorded): the POSIX law is the forward-slash
spelling, and the separator and drive-case laws are judged on win32 (the
Windows classify job runs the oracle there).

Evidence block
- Law: a path's separators and a drive's case change nothing the gap CLI decides
  on win32; on POSIX they are name characters (paths.mjs, F5).
- Reach: the same 200 histories, with the separator and drive alphabets by platform.
- RED: Linux shard 3 of 50b4ab5: "observed value differs" on the path-spelling
  oracle (2 of 5 tests).
- GREEN: local POSIX 5/5.
- Mutant: the win32 mutants run in the Windows classify job; not re-run on POSIX.
- Limits: on POSIX the separator and drive laws are not generated.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): event-triggered stop, derived hostile names, and the POSIX F5 witness

Coordinator rulings, applied:
1. Stop trigger: an event, not a clock. The witness writes the stop file on the
   CLI's first stderr line. Measured (2026-11-14): on a pipe the CLI streams its
   progress on stderr and prints the done summary (stdout) only at the end, so
   stdout is no start marker. No stream.log exists on this branch; the stderr
   line is the event. The 400 ms timer is gone.
2. Classify generator: the hostile names are derived from the test's own fields
   (HOSTILE[(ms+ti) % 7] for one test in four), not drawn. A drawn field would
   shift every later draw of the fixed seeds. Proof: `git diff origin/main` on the
   classify oracle changes no `fc.` line (zero), so the generator is unchanged.
3. Path spelling on POSIX: the oracle generates backslash joints and `x:` drives
   on every platform. The model splits the spelled strings per platform (win32:
   both separators, case-insensitive drive; POSIX: `/` only, a backslash is a
   name's character). On POSIX a disk witness creates the backslash name and
   asserts it exists, realPathOf keeps it native, and posix() leaves it unchanged
   (F5). This removes the earlier POSIX narrowing.

Evidence block
- Law: the stop is delivered at a run event and ends stopped (register: stop
  window on every platform); a backslash name on POSIX is kept native (review F5).
- Reach: the path-spelling oracle's 200 histories, now with backslash and `x:`
  names on POSIX (disk-backed); the classify oracle's existing histories, with
  hostile names on one test in four.
- RED: ebc39e6 with this oracle: 2 of 5 tests fail, "the observed value differs
  from the owed value" (the relation and disk checks).
- GREEN: POSIX local 5/5 (path-spelling); stop witness local POSIX outcome (a),
  exit 130 (event trigger). Windows: pending CI on this head.
- Mutant: the parent (ebc39e6) is the mutant for F5 (posix() rewrites backslashes
  on POSIX); its RED is above.
- Limits: the stdout summary arrives only at the end on pipes (a finding, not a
  fix here); the stop trigger assumes the CLI prints a stderr line before its
  work completes (measured on the fixture only).

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): constructed tests keep their names (classify reach)

The derived hostile names reached constructed tests too (ms 0 at index 0), which
broke the name-relationship reach of two constructed histories ("a failing
baseline test whose name another test's contains" and "... ends another
test's"). A hostile name now applies to generated tests only (ms >= 1).

Evidence block
- Law: the constructed histories reach their declared states (the oracle's own
  reach rule).
- RED: de8a373 run: "constructed history ... did not enter a baseline test whose
  name another test's contains" (Linux shard 3 and the Windows classify job).
- GREEN: local classify 276/276.
- Mutant: not run.
- Limits: as recorded in the previous commit.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): Rerun cmd lines, ! as no-form, separators by platform, prefix rule, witness

Round-2 review of #58 (NOT READY). Items addressed:
1. Rerun (cmd) fell back on win32 every time: an absent command was passed as
   undefined and read as "no cmd form". An absent command is now nothing; only a
   value that cannot be represented has no form (oracle-property.ts commandOf).
   The witness runs the Rerun lines (as `vitest run` plus the line) in pwsh,
   Windows PowerShell 5.1, and cmd.
2. `!` is in the cmd no-form set (framework and printer; DelayedExpansion expands
   it silently). The classify oracle's fallback test follows.
3. The path-spelling generator's original drive and joint domains are restored
   (the win32 form at b904d57); the POSIX spelling's backslash names and `x:`
   drives are an appended `wide` record, used on POSIX only.
4. The witness header, the stop failure text, and the replay comments describe
   the code (event trigger on the first stderr line; the no-form set).
5. isOutside, the owners' node_modules split, and the capture-setup machinery
   regex split on `\` only on win32; on POSIX a backslash is a name's character.
6. (see 4)
7. Windows PowerShell 5.1 (`powershell.exe`) runs each PowerShell line, as well
   as pwsh.
8. configureOracles rejects an envPrefix that is not `[A-Z][A-Z0-9_]*`, with a
   message (the prefix is printed in replay lines). The unit test follows.

Evidence block
- Law: the printed command replays in the shell it names, or says it has no form
  (register: deterministic replay across shells); a Rerun line replays too;
  `!` is a no-form character (coordinator ruling); a POSIX backslash is a name's
  character (register: Windows paths, as amended).
- Reach: the same histories (the win32 domains are unchanged; POSIX uses the
  appended wide record).
- RED (item 1): round-2 review: plain Rerun lines printed "use the PowerShell line"
  on win32.
- GREEN: classify 276/276, path-spelling 5/5, framework 114/114 (locally, POSIX);
  Windows: CI on this head.
- Mutant: the round-2 Rerun behaviour is the mutant (rerunOf passed an absent
  command as no form).
- Limits: U+2019 is not reached by the seeds in the path-spelling or replay
  histories; the hostile names are exercised by the witness's fixture names.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): the witness feeds PowerShell its line on stdin, not as an argument

Run 43548823073 (head 2b7b7f3): the Windows CLI job failed on Windows PowerShell 5.1
("Replay 3 did not reproduce in powershell", a parse exception on the fixture
with a double-quoted name). The witness passed the line as a -Command argument,
so Node's argument quoting turned the double quote into \" and 5.1 does not read
that as an escape. A typed line never passes through an argv: the witness now
pipes the line to `-Command -` on stdin, for pwsh and powershell.exe alike.

Evidence block
- Law: each printed line replays in the shell it names, as a user types it (the
  register's per-shell rule).
- RED: run 43548823073, witness step: "Replay 3 did not reproduce in powershell"
  (the Windows PowerShell 5.1 parse exception).
- GREEN: pending the next Windows run.
- Mutant: the argument passing is the mutant (the run above).
- Limits: a cmd line is still passed verbatim as an argument (cmd has no stdin
  command mode here).

Co-authored-by: Isaac <no-reply@databricks.com>

* diagnostic: the replay witness reports the shell's own error for a line that does not reproduce

Run 43551132190 (abc8b45): "Replay 3 did not reproduce in powershell" with no
reason. The failure now carries the shell's exit code and output, so the Windows
PowerShell 5.1 error for the double-quoted name is visible. Diagnostic; the
witness's pass and fail rules are unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): the -t argument never carries a shell-hostile character (option c)

PowerShell 5.1 passes an embedded double quote in a native .cmd argument
wrongly (run 43553461458: a `"`-named fixture selected no test, exit 0). The
coordinator's ruling (option c): `-t` is a coarse regular-expression filter, and
the exact test is carried by ORACLE_UNIT where a line sets it.

- The `-t` pattern (CLI baseline and framework Rerun) replaces each character a
  shell reads unsafely (`"`, `%`, `!`, the curly quotes) with `.`: still anchored,
  only slightly broader.
- Framework environment values: PowerShell (5.1 and 7) doubles the single and
  curly quotes, which works for any name; cmd's `set "NAME=value"` tolerates a
  double quote, and `%` and `!` have no cmd form (environment values only).
- Classify oracle: a CLI line has no environment values, so a cmd fallback line
  is a breach; the -t argument must carry no shell-hostile character.
- Witness: each PowerShell Replay line's ORACLE_UNIT and ORACLE_PROPERTY decode
  to the printed text (round-trip), in addition to the reproduction in pwsh,
  Windows PowerShell 5.1, and cmd.

Evidence block
- Law: a printed command replays exactly the unit it names, in each shell
  (register: deterministic replay across shells; the coordinator's option c).
- Reach: the classify oracle's 276 histories (the adversarial names, derived);
  the Windows fixtures (`’`, `"`, `%`).
- RED: run 43553461458: "Replay 3 did not reproduce in powershell", exit 0, PowerShell
  5.1 with an embedded double quote in the -t argument.
- GREEN: classify 276/276 and framework 114/114 locally (POSIX); the Windows
  witness runs on this head.
- Mutant: the pre-fix pattern (a raw double quote in -t) is the mutant; the RED
  above is its rejection.
- Limits: the -t pattern is slightly broader for names with a hostile character
  (the wildcard may select a test whose name differs in that position, which the
  classify oracle's names cannot produce).

Co-authored-by: Isaac <no-reply@databricks.com>

* Revert "diagnostic: the replay witness reports the shell's own error for a line that does not reproduce"

This reverts commit 69c82eb.

* fix(windows): cmd env rule, exact witness matching, set-line readers, fixtures (round-3 review)

- F1: a cmd environment value containing `"`, `%`, or `!` has no form (the
  register's rule); `set "VAR=value" &&` is only emitted for a plain value
  (oracle-property.ts commandOf). Fixtures: one with a curly-quote property and
  no `"%!` (a cmd set line runs); one with a single `"` in its property (its cmd
  line points to PowerShell).
- F2: the PowerShell decoder's offset is the value's own position, and decoded
  values are compared exactly with a failing unit's property and unit, as vitest
  prints them (`FAIL <file> > <property> > <unit>`). cmd `set` lines decode too
  and must agree with the PowerShell line.
- F3 (partial): Rerun lines carry no ORACLE_UNIT: the framework reads ORACLE_UNIT
  only for a random unit during a path replay, so a fixed-seed Rerun cannot be
  selected exactly. Reported to the coordinator.
- F6: the path-spelling comment states what it means (no history to keep).
- F7: the classify readers reject `!` and judge `set … &&` prefixes; the fallback
  is allowed wherever the printer uses it (a file path with a hostile character).
- F9: control characters in rerunPatternOf are escaped as stream.mjs does (by
  code point, not a control-character regex).
- The witness fails when a failing unit prints no per-shell line (FAIL lines are
  counted per unit).

Evidence block
- Law: a printed command replays the failing unit it names, in each shell
  (register: deterministic replay across shells; the set rule).
- Reach: the classify oracle's 276 histories; the Windows fixtures.
- RED: run 43555531142 and the coordinator's round-3 review at ae44184 (a `"` in a
  set value broke `&&`).
- GREEN: classify 276/276, framework 114/114, locally (POSIX). Windows: this head.
- Mutant: the pre-fix env rule (a `"` in a set value) is the mutant.
- Limits: Rerun lines are not exact (see F3).

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): the replay witness counts each printed line once, and runs on the package's PATH

Run 43561333340 (9698922), Windows CLI job: "2 random units failed, but 4 Replay
lines printed" (vitest repeats a failing unit's error text, so its replay lines
repeat), and every line failed with "'vitest' is not recognized" (the rewritten
runIn dropped the PATH that adds the package's node_modules/.bin).

- Each distinct printed line counts once, in first-occurrence order.
- Every shell runs with the package's binaries on PATH.

Evidence block
- Law: a printed command replays in each shell it names (the register's per-shell
  rule); each failing unit prints one line (witness rule).
- RED: run 43561333340, the witness: "4 Replay lines printed" for 2 random units;
  "'vitest' is not recognized".
- GREEN: pending the next Windows run.
- Mutant: not run.
- Limits: as in the previous commit (Rerun lines are not exact).

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): the replay witness pairs each printed line with its cmd line and checks coverage

Run 43563021693 (257a5b0): "2 random units failed, but 4 Replay lines printed"
and "Replay 4 has no cmd line": a failing fixed unit prints its replay under the
random unit's name, so one failing unit can have more than one replay line, and
index pairing breaks. A random unit's violation also prints its replay under the
Rerun label, so a Rerun line can carry ORACLE_ variables, and running it with
`vitest run` in front broke it.

- Each distinct PowerShell line pairs with the cmd line printed after it.
- A line that carries ORACLE_ variables is a replay and runs as printed; a bare
  -t line is a rerun and runs as `vitest run` plus its arguments.
- Coverage: every failing unit is matched by a replay whose ORACLE_PROPERTY and
  ORACLE_UNIT decode to its names (a fixed unit by the random unit it replays).

Evidence block
- Law: every failing unit prints a replay that names it exactly, and each printed
  command replays in each shell it names (register: deterministic replay; the
  witness rule).
- RED: run 43563021693: "2 random units failed, but 4 Replay lines printed";
  "Replay 4 has no cmd line"; "Rerun 2 did not reproduce in cmd".
- GREEN: pending the next Windows run.
- Mutant: not run.
- Limits: a bare Rerun line is not exact (see F3).

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): restore the replay witness's helpers that the pairing rewrite removed

Run 0c42c33 (the Windows CLI job): "ReferenceError: decodePs is not defined". The
pairing rewrite replaced the block that held the FAIL map, the PowerShell and cmd
decoders, and the no-form constant. They are restored, and a local smoke run of
the replay branch on a fabricated output reaches the report (pwsh is absent on
this Mac, so its runs fail as expected; no reference error).

Evidence block
- Law: the replay witness reports a failing unit's printed commands (witness rule).
- RED: run 0c42c33: ReferenceError in the replay step.
- GREEN: pending the next Windows run.
- Mutant: not run.
- Limits: as before.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): a Rerun line counts only for its own failing fixed unit (F3 ruling b)

The coordinator's ruling: Rerun lines stay coarse -t filters (a sibling whose name
the anchored pattern matches also runs). The witness now counts a Rerun line only
when the failing fixed unit whose exact name it selects shows its own FAIL line in
its output, so a sibling's failure cannot satisfy it. An exact selector is tracked
in #78; Replay lines select exactly, through ORACLE_PROPERTY and ORACLE_UNIT.

Evidence block
- Law: a Rerun line runs the failing unit it names, and only it counts (register
  amendment: Replay lines select exactly; Rerun lines are anchored, coarse filters).
- Reach: the Windows fixtures (the `Q"1` unit has no Rerun line in CI; the sibling
  case is the Limit's example).
- RED: none in CI yet; the sibling case is not exercised by the fixtures.
- GREEN: pending the next Windows run.
- Mutant: not run.
- Limits: a sibling case is not in the CI fixtures (recorded in the PR body).

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): the witness reads a fixed unit's FAIL line (`fixed seed 1: <name>`)

Run 43569602268 (bd208ac): "Rerun 1 selects no failing fixed unit" for both
fixtures. The FAIL regex expected `fixed seed: ` with no number, but vitest prints
`fixed seed 1: <name>`, so no fixed unit was recorded. (The earlier fix attempt
did not apply; this commit applies it and checks the match.)

Evidence block
- Law: a Rerun line counts only for the failing fixed unit whose exact name it
  selects (witness rule; register: Rerun lines are anchored coarse filters).
- RED: run 43569602268: "Rerun 1 selects no failing fixed unit".
- GREEN: pending the next Windows run.
- Mutant: not run.
- Limits: as recorded in the PR body (sibling case, #78).

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): the Rerun name check ignores vitest's colors

Run 43571581118 (3b97795): each Rerun line reproduced (exit 1, "Failed Tests 1"),
but the check that the failing unit's exact name appears in its output failed:
vitest colors the output, so the name is split by color codes. The witness now
strips the color codes before it matches a unit's name.

Evidence block
- Law: a Rerun line counts for the failing fixed unit whose exact name it selects
  and whose FAIL line its output shows (witness rule).
- RED: run 43571581118: "Rerun 1 did not reproduce in pwsh (exit 1 ... Failed
  Tests 1)" with the name check failing.
- GREEN: pending the next Windows run.
- Mutant: not run.
- Limits: as recorded in the PR body (sibling case, #78).

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(windows): exact FAIL-line matching, a percent-and-bang witness, a control-name oracle case (F3, F9, L2, L3)

- F3: a Rerun line counts only when its target's whole FAIL line appears,
  anchored to the end of the line, after the color codes are removed. `generated2`
  does not satisfy `generated`. The comment now says so.
- F9: the classify oracle's hostile names include a control character (U+0001).
  The printed `-t` pattern escapes it as `\u0001` (stream.mjs escapeControls).
  The register says controls become `.`; the code escapes them, and the code is
  right (the coordinator's correction).
- L2: the CI step prints replay-out.txt before the witness reads it.
- L3: a third fixture, `fixture 100% done!`, witnesses the cmd env no-form branch.

Evidence block
- Law: a printed pattern carries no raw control character (the printer's escape
  rule); a Rerun line counts only for its exact target (witness rule).
- RED (F9): dropping escapeControls from the CLI printer fails 4 classify tests
  ("the stdout has a line that is not a line of the stream"), exit 1, locally.
- GREEN (F9): classify 276/276 with the U+0001 name, locally (POSIX).
- GREEN (F3): the exact-match regex accepts `generated` and rejects `generated2`
  (checked locally); Windows: the next run.
- Mutant: dropping escapeControls (above).
- Limits: the framework's own Rerun escaping has no oracle; the Windows fixtures are
  the only witness for it (L6 and L1 are filed).

Co-authored-by: Isaac <no-reply@databricks.com>

---------

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews and others added 3 commits November 14, 2026 02:01
# Conflicts:
#	packages/oracles/oracle-gaps/index.mjs
The fixed-seed units added with the spawn stop, the stream log, and the overlap
(five units) were not in any Windows fixed-seed shard, so the pr-shards partition
check failed in the Test job. Placed in shards 2 and 3.

Co-authored-by: Isaac <no-reply@databricks.com>
The unsupervised (win32) path is being replaced by a win32 supervisor (#74), so
the seam that forced it on POSIX is removed; its stop witness was not kept. The
unsupervised path's stop law (no done line on a stop) is a Limit of this PR.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews and others added 3 commits November 14, 2026 09:45
…ake over an unreadable claim

The takeover mutex was made as a directory and its pid written after, so a racer
could read it empty, take it for dead, and remove a live mutex. The pid is now
written to a temp file and linked into place, so no reader sees an empty mutex.
An unreadable or empty mutex or claim counts as live and is never taken over.
Witness (two concurrent starts against a stale claim, a test pause between the
create and the pid write): the current code gives one claimed and one crashing
run in every trial; the fix gives one claimed and one refused in every trial.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…l-clock hold

The overlap and the spawn stop 'after' case kept the first run alive with a
wall-clock hold (HOLD_EXIT_MS): under load the first run can end before the
second starts, so the overlap outcome depended on timing. The hold is now a named
point: after the done line the process keeps its exit (and its output claim)
until ORACLE_GAPS_TEST_HOLD_UNTIL names an existing file. The driver releases it
once the second run has been refused, or once the 'after' stop has been sent.
HOLD_EXIT_MS is deleted. The README documents the new hook.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews added a commit that referenced this pull request Nov 14, 2026
…x/win32-supervisor

Keeps #57's claim and mutex rules and its HOLD_UNTIL release, and this
branch's supervisor, taskkill tree stop, ABORT_AT abort hook, and naming. The
driver's after-stop hold moves to HOLD_UNTIL (the after-release file); no
HOLD_EXIT_MS remains. The win32 stop path and #57's release both stay in
stoppedRun. POSIX fixed-seed 20261105 'every outcome class' and 'an edit
sequence through the daemon' pass locally on the merged tree.

Co-authored-by: Isaac <no-reply@databricks.com>
… dead-pid recovery

Two constructed histories gate their reach states: two starts race for a stale claim
(exactly one claims, the other refuses), and a stale claim and mutex from a dead pid
are taken over (the run claims). The race is paused inside the takeover mutex's
creation (ORACLE_GAPS_TEST_PAUSE_AT). Placed in the e2e and Windows shards.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews and others added 2 commits November 15, 2026 01:55
win32 has no supervisor until #79, so the death state is not reached there and the law has no observation to judge. Comment only.

Co-authored-by: Isaac <no-reply@databricks.com>
… death law is stopping

A progress line's wall-clock duration ("in 0.2s") is live progress, not
outcome, so the shared stream normalizer names it `<t>`. Every other field
stays. The supervisor death violation is tagged with the stopping law, not
output namespace.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews and others added 8 commits November 15, 2026 12:59
…death state is platform-scoped

Windows CI showed the claim refusals' fix line printed a backslash path
(`delete <out>\run.pid`), where the owed line names the claim as
`<out>/run.pid`. The fix line now prints the claim in posix form.

The supervisor-death state exists only where a supervisor does, so it is
required and entered only off win32 (platform-scoped reach, register
"Platform-scoped reach (#73)"). On win32 the history runs without the death
witness and enters no state; that run is not judged by the death law.

Co-authored-by: Isaac <no-reply@databricks.com>
…un named

A run without --out names its output directory per call (args.mjs), so the
client's stream log and the daemon's results.json were in two different
directories. Windows CI showed exit 0 with results.json missing beside the
stream log (run 43778158734, job 133009093614: OBSERVER-DIAG names the client's
and the daemon's directories, one second and a random suffix apart).

The request now carries the directory the run named, unless the arguments
already name one.

RED: Windows CI at 8120cb8 (run 43725828219), the daemon units on shards 1, 7,
8 and 9, and the diagnostic run 43778158734. GREEN: local POSIX default-output
daemon unit (1 passed); Windows CI pending on this head.

Co-authored-by: Isaac <no-reply@databricks.com>
…ames no directory

On POSIX the supervisor appends `--out` to the child, so every daemon request
carries the directory the run named and the default-directory state is never
produced there. On win32 there is no supervisor, the request has no `--out`,
and the daemon names another directory than the stream log's.

A test-only hook (ORACLE_GAPS_TEST_UNSUPERVISED) runs a POSIX check unsupervised,
the path win32 takes. The driver sets it on the daemon runs that name no
directory. RED: the fix reverted (the request without `--out`) on POSIX fails the
default-output daemon unit with results.json missing beside its stream log, the
same observation as Windows CI. GREEN: the fixed head passes.

Co-authored-by: Isaac <no-reply@databricks.com>
Takes #115's stdout gap-line law (judged by id against results.json, with
stdoutGaps observed per run) alongside #57's stream-log observations. The
logNoteOf helper and stdoutGapBreach keep their own doc blocks.

Co-authored-by: Isaac <no-reply@databricks.com>
…nd the unsupervised hook is a constructed field

F2 (generator rule, 2026-11-14): outMode, logBlocked, overlap, stopWitness,
spawnStop, spawnSignal, spawnDelay and spawnOnStart were drawn with values
that change what a history runs. They are now constants with neutral values,
set only by constructed histories, and the take-back maps a constructed value
to the neutral one through one table (constructedNeutral). concurrentStart,
tornRows, pauseEngages and warmReplaced are main's and are exempt.

F1: ORACLE_GAPS_TEST_UNSUPERVISED is set only for a history whose
unsupervised field is true. The drawn record holds false. The new constructed
history "a daemon check with the default output directory, unsupervised" is
appended last. The supervised default-directory history runs sequential
checks, so the supervisor-drops-`--out` mutant is killed by it.

RED (forwarding reverted, POSIX, the unsupervised unit): "through the daemon at
start: the run completed, but <out>/results.json is missing". Mutant (supervisor
drops --out for daemon runs without one, the supervised unit): same
observation. GREEN: the six default-directory units pass.

Co-authored-by: Isaac <no-reply@databricks.com>
…n the partitions

Co-authored-by: Isaac <no-reply@databricks.com>
… set, not in streamed order

Determinism flake (pool runs r57c-det-6, job of the unsupervised default-directory
history): two runs of one history printed the same 43 gap lines in a different
order, so the cli observation's lead differed at its first gap line. The order
of streamed gap lines is not part of the contract (C, 2026-11-13; live progress,
results.json and the gap-line set are the record). The lead keeps every other
line in order, and stdoutGaps, which holds each gap line once, is sorted.

Co-authored-by: Isaac <no-reply@databricks.com>
Takes #103's testRoot and loadPlugin fields and its five constructed histories
first. #57's fields follow loadPlugin, and its 13 constructed histories follow
main's 35. The take-back uses one table of constructed-only neutral values,
which now covers tornRows, testRoot and loadPlugin too. Shard lists keep both
sides' names.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews and others added 2 commits November 16, 2026 00:01
F3: the declared limits say the supervisor-death state is required only off
win32 (win32 has no supervisor until #79; register C entry (e) of #58), and
name the scope rather than an OS gap.
F4: the declared limits no longer say a default --out is judged only by the
static oracle, or that a SIGKILL of the CLI is judged by inspection: a SIGKILL
of a supervisor is witnessed on POSIX by its constructed history.
F6: the changeset lists the run.pid refusals (live, stale, empty, unreadable)
and the default-directory refusal.
F7: the daemon request always carries the directory the run named (no
`--out=dir` special case); the claim refusals print the claim directory in
posix form on win32; the stranded optionsOf JSDoc sits with its function.

Co-authored-by: Isaac <no-reply@databricks.com>
… like stdout's

The determinism flake's full difference (pre-merge pool run r57f-det-1, observation
cli, first difference at stderrGaps): two runs of one history streamed the same gap
lines on stderr in a different order. stderrGaps is the streamed gap lines, which
the register counts as live progress (C, 2026-11-13); results.json is the record.
The list is now sorted, as stdoutGaps already is, and every line is kept.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews added a commit that referenced this pull request Nov 16, 2026
* fix(oracle-gaps): retire a batch's copies from Vitest's state

A check runs each mutant in a new copy of its test file. Vitest's state kept
every file and test task it ever ran (filesMap by path, idMap by task id), so
a check held every test of every copy: about 377k test cases on a four-file
suite, which exhausted a 2 GB heap. Once a batch's units are plain data, its
copies leave the state: their stale idMap entries go first (shape-guarded),
then clearFiles replaces each path's file entry.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): bounded-retention law after each batch

The gap CLI's e2e driver sets ORACLE_GAPS_TEST_RETENTION on each run and
records one line per batch: the count of Vitest state entries (filesMap,
pathsSet, idMap) and Vite module nodes that still name the batch's retired
copies. The law: each count is 0 after retirement. This commit adds the hook
and the law, not the fix, so CI records the RED on the parent code.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): retire a copy's Vitest and Vite state, not only its file entry

Vitest's clearFiles replaces a copy's file entry, and leaves its path in
pathsSet, one placeholder task in idMap, and Vite's module node and transform
for the copy. The retention law (bounded retention, after each batch) fails on
46dfd3e in CI: each count is nonzero.

retireCopies now removes the copy's filesMap key, pathsSet entry, and idMap
tasks. retireModules invalidates each copy's module through Vite's API and
removes it from every environment's graph maps. Both guard the shapes they
touch and throw if one changes, so a Vitest or Vite that changes them fails
loudly rather than leaking.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the incremental violation names a cold run's error log

When the cold run exits 3, its stack is in its error.log. The incremental
violation named only the exit code, so a failure printed no stack. It now
appends the error log the driver already reads for a run that exits 3.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the incremental observation carries a cold run's error log

ce46f4b appends cold.stderr to the incremental violation when the cold
run exits 3, but the incremental observation's cold run had no stderr,
so the message stayed empty. It now carries the run's stderr, with its
error.log, when it exits 3, and only then: a completed run's stderr holds
timings, which differ between two runs of one history.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): a replaced context leaves its maps; a cut-off run is not retired

A replaced context stayed reachable through indexOf and contextSpecs, which
were never cleared for it, so its Vitest and Vite state stayed too. replace now
drops both entries. A run cut off by a hang is not retired: its worker may still
send updates, and its context is replaced by the caller.

Also: the etag map is cleaned by node identity (Vite keys it by the etag), and
the retention observation is the count of batches left with a retired copy's
state, which is deterministic, not the per-batch lines.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the retention law compares every structure with its size before the batch

The hook now snapshots every structure a copy can leave state in (Vitest's
filesMap, pathsSet, idMap, errorsSet, leakSet, and each Vite environment's
url, id, etag and file maps and transformed nodes) before a batch, and the law
requires each to return to its size after the batch's retirement. The law was
tautological before: it counted the same predicate the deletion used.

The retention observation is observed from every run kind (cold, daemon,
stability, partial), and a run that computed a unit must have written a batch
line. A check that ran more than one batch reaches a declared state.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the retention law counts stale replaced contexts; a batch line is owed by mutant results

The totals now include the excess of indexOf and contextSpecs over the live
contexts, which must be zero before each batch: a context replaced between
batches is caught there, not by a single batch's before and after.

The missing-line expectation read evidence.computed, which counts single-file
runs that write no batch line, so it failed on ce6c93d. A run owes a batch
line when a mutant has owner files, since such a mutant's units ran in batches.
Without that check, a retirement that never runs writes no line and passes the
count law vacuously: the no-retire ablation exited 0.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): a cold check keeps no unit for reuse

The cold check's store kept every computed unit, with its rows, for the whole
run: 207 store entries and 103,585 row entries in the ce6c93d heap snapshot.
A cold run serves no lookup (evidence.reused is 0 on every klona run), so the
store now keeps nothing. The daemon's disk store is unchanged.

The retention totals include the store's size, which must match before and
after each batch. Paired identity runs (pre-change and this commit, both
cut 0) give the same 391 results, and the baseline matches both.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the retention law counts batches exactly; cut batches are logged

evidence.batches counts every batch run (cut or not). Each batch writes one
retention line, so each run's line count must equal batches: a run with no line
for a batch it ran (the no-retire mutant) fails the law. A cut batch writes its
before line, so the stale totals of a replaced context are checked there.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the retention law counts copy-owned Vite nodes, not every cached module

Vite's graph caches non-copy modules (a source or harness file, on first import),
which legitimately grow during a batch; the before-and-after equality was wrong
for Vite keys. The law now requires the copies' own module nodes to be zero
after each settled batch, and keeps the before-and-after equality for Vitest's
state, the store, and the stale context totals.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the retention law names Vite's totals and bounds non-copy nodes to one per file

Vite's totals are named vite.<environment>.<map>, so the law tells them from
Vitest's state by an explicit prefix the hook generates. After each settled
batch, the copies' own module nodes must be 0, and each non-copy file (query
stripped) has at most one node in each environment's graph: a file cached once
per batch under a fresh id fails the law.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the batch-line check defers a run with no report to the completion law; the multi-batch state is declared

A run with no report owes no batch line here: the completion law judges it, keyed on the
model's prediction (a report unless a refusal is predicted), and fails it with its exit
status and stderr. The multi-batch reach state is declared in the property's measured list.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the batch-line violation names the run that mismatched

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): a run's retention lines are its own: one hook file per package, counted as a delta

A daemon keeps the environment of the call that started it, so a later daemon
check wrote its retention lines to the hook file of the call that started the
daemon, and its own (new) hook file was empty: the exact batch-line count
failed on a correct run (retentionLines:daemon on the hang history). Counting
side: every call for a package writes to one file, and a run's lines are the
ones after its start. The production batch-line contract is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): each retention line names its check's output directory; a run keeps its own lines

Replaces the delta: a daemon serves many calls and keeps the first caller's environment,
so a line is attributed to the check that wrote it (its out directory, the test hook's
only addition), and the run keeps the lines that name its own out directory. Two daemon
checks at once against one hook file cannot mix. No production outcome changes.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): retention lines carry their batch index; a debug table names each run's batches and lines

Diagnostic for the daemon line mismatch (the test hook only; no production outcome changes).

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): each CLI call has its own output directory, so its retention lines are its own

The table showed the cause: a daemon serves several checks of one test, and two of them shared an
out directory, so a run kept lines written by an earlier check (batches 1, lines 4; a run with 0 batches
kept 1). Production wrote one line per batch in every run. The counting side is wrong: each call gets
its own directory, so the run filter sees only its lines. The debug table is removed (it was for this
diagnosis). No production change.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the namespace law allows the numbered output directories runCli gives each call

Each call's out directory is numbered (out-<n>, out-daemon-<n>, ...), so the outputs of a run are
its own. The law's list of own outputs names the fixed ones; the numbered ones match the same pattern
the driver creates (OWN_NUMBERED). Without it, a run's out-25 writes read as strays.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the namespace law allows exactly the --out a run was given

Repair, not widening (P7): the law listed fixed output names (out, out-daemon, out-stop, out-only), and
numbered names were a pattern. Now each run's allowed output is the one path the model predicts (its
--out, from cliArgs): runCli passes its numbered out, the stop law passes out-stop. A CLI that writes
under any other directory, such as out-<n>-next, is a stray. The lists are removed.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the observed text names a run's output directory without its call number

The determinism diagnostic found the first differing offset in the cli observation's lead text: one run named
<package>/out-9/results.json and the other out-13. The number counts every call in the process (runCli), so it
differs between two runs of one history. This was a test-side artifact of the per-call out directories, not a
wall-clock cut. The observation now names the directory without the number. No production change.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): output directories are numbered within each history, so two runs of one history name the same paths

Replaces the name normalisation: it hid a CLI that printed another run's results path. A call's number now counts
calls within its history (reset at the start of each driver run), so repeated runs of one history get identical
directories and the observation is exact. No production change.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): at-once runs carry their retention lines; the retention violation names the fields left behind

At-once daemon runs (runClisAtOnce) spawned the CLI without the test hook, so the exact line check read an undefined
retention. They now set the hook, keep their own lines (out numbered within the history, as runCli's), and are judged by
the same law. The retention violation names the leftover fields (copyNodes, nonCopyDup, the stale totals, Vitest's maps)
so a CI failure shows which law is hit. The keys are observed as a string and excluded from the count. No production change.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the retention hook names each non-copy file that has more than one node, and its node ids

Diagnostic for the nonCopyDup leftovers in CI (shards 1 and 2). The count is unchanged; the hook line now also carries
the duplicated files and their ids, so the cause (a file cached under two id spellings, or per-batch fresh ids) can be read.
The test hook only.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): a source file's plain node and its ?raw node are one measured pair, not a leftover

The non-copy bound failed on shards 1 and 2 of CI (270e6f4) on exactly this pair: sut.ts (plain) and sut.ts?raw, the
source-text import the oracle reads. Measured locally on shard 1's history: the same pair in every batch line (one per
file, not per batch). The allowance is that exact pair; any other duplicate is still counted. No production change.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the daemon, partial, and stability retention sites name their leftover fields

CI on 8e6801a: the cold run left nothing named, and the 1, 4, and 12 batches left behind were at the daemon, partial and
stability sites, which named no field. Each site now observes its leftover keys, the same as the cold site. Test-side only.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): a replaced context leaves the registry and joins it in one synchronous step

The registry (indexOf, contextSpecs) and the contexts array changed across awaits in replace: the old context left,
the new one registered in warmContext, then specs were read, then the array was assigned. Between those steps the
registry and the array disagreed, so a batch that measured the registry (the retention totals) read a negative stale
count (-1) during another slot's replacement. The swap is now one synchronous step after all awaits: the replaced
context leaves both maps, the new one joins both and the array, and warmContext and specsOf no longer register.

Production lookups are per slot (indexOf.get of the slot's current context), so no batch reads another slot's
window; the race was in the measurement. Stated as a finding: the -1 measurement was real (the registry was out of step
with the array between awaits), and the step is now atomic.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): closing the contexts for a config change clears the registry with the array

closeContexts emptied the contexts array but left indexOf and contextSpecs keyed by the closed contexts: after a config
change in a daemon edit sequence the registry held entries no live context owns (staleIndexed and staleSpecs on CI's
shard 3/3). The closed contexts now leave both maps with the array. A production leak, found by the stale totals.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the daemon pause watches the state file of its own call

The incremental driver waited for out-daemon/state.json before it paused the
daemon. 270e6f4 numbers each runClisAtOnce call's output directory
(out-daemon-<n>), as runCli already does, so that file never appears and the
pause never happens: the daemon held-then-died state is not entered
(r61-dm-branch-1 and -2: "did not enter a check whose daemon held it past the
CLI's wait, then died"). Main has no numbering there, so its path matched.

The driver now names the directory its call was given: runClisAtOnce records
each call's output directory before any call starts, and the watch reads that
directory's state file. The pause itself is unchanged, and the state is still
recorded only when the CLI reports after the daemon died.

Production is not changed. The driver's pause assumption was valid on main;
this branch's numbering broke it, so the driver is repaired.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): a crashed batch retires and logs; registry checks compare identities; stopped runs judge their batches

- runBatch: the race with the watchdog sits inside the try, so a rejected run (a crash, not a cut)
  still retires its copies and writes its retention line. A cut still writes the cut line.
  Found in the independent review (M2): the rejection skipped the finally.
- The retention hook names identities: staleIndexed counts registry entries that do not name the live
  context at their own slot; staleSpecs counts entries for no live context; staleOpen counts open
  (warmed, not closed) contexts beyond the live ones. Found in review (M4, M5).
- A stop sets the retention hook, and each stopped run's completed batches are judged by the same
  leftBehind law (M1).
- The retention line drops the unread nonCopyIds field and computes the duplicate list once (M6).

The law's authority is the register's C entry on bounded retention (2026-11-13). Test-side hook and
driver edits follow P7 (strengthening, no weakening).

Co-authored-by: Isaac <no-reply@databricks.com>

* docs(oracles): the retention test hook is documented in the package README

ORACLE_GAPS_TEST_RETENTION is inert unless set, observes only, and its line format is the one the
bounded-retention law reads. The register's test-only hooks entry requires it to be documented. #57's
test section is not merged yet, so this section stands on its own.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): the open-context identity counts a slot being replaced

The GREEN run of 79f1dea failed the retention law on staleOpen: a batch on one slot measured the open
contexts while another slot's replacement had closed its context and not yet opened the next, so
open was one short of the contexts array. That window is legal, so the identity now counts the slots
being replaced: open + replacing === contexts.length holds at every batch boundary (a window that
the registry swap already covers for indexOf and contextSpecs).

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): a batch whose run rejects is a constructed history with its own retention law

The crash path (79f1dea) had no reach: no constructed history made a batch's run reject. This adds a
test-only fault, ORACLE_GAPS_TEST_REJECT_BATCH=<n> (inert unless set): the n-th batch's run promise
rejects, as a crash in Vitest would, so the CLI's rejection path runs (register: test-only hooks).

Model (the constructed history's rejectBatch field): the run ends as an internal error, exit 3 with
its done error line (ending.mjs, index.mjs). Its batch's copies are retired and its retention line
is written with its state after retirement. The retention law is judged before the ending, so a
missing line or unretired copies fail on retention, not only on exit. The law 12 limits text names
this one constructed fault and nothing wider.

Law: the rejected batch's retention line exists and is retired (bounded retention, register C).
Authority: ending.mjs (an internal error exits 3 with a done error line), and P10.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected-batch state is declared in the required list

The constructed history names its state; the state was added to the separate list instead of required,
so the framework refused the history as naming undeclared states (its own check, before any run).

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected-batch state is in the required list, not the faults list

The previous commit placed the state in the faults array (the nearest list above separate), so the
framework generated a declaration-fault variant that named it. It is removed from faults and declared
in required.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected-batch history builds from the ordinary history's shape

Its build is the ordinary constructed history's (primitive leaves, judging() tests, the same fields),
plus rejectBatch: 1, so the framework can take it back for shrinking. The earlier build was refused as
not takeable back.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): rejectBatch is a generated field (0: no fault), appended to the history record

The constructed rejected-batch history carried a field the generated record did not declare, so the
framework refused it as outside the arbitrary's language. rejectBatch is now a generated constant
(0 is no fault), appended at the end of the record, so it draws nothing and fixed seeds keep their
histories (the generator rule). The driver and the model treat 0 as no fault.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): rejectBatch draws 0 or 1, appended last in the draw order

A constant of 0 admits only 0, so the constructed rejected-batch history (1) is outside the generated
language and the framework refuses it. The field now draws 1 with weight 1 in 200, appended last in the
draw order, which is the generator rule for a new history field.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the resolved plan carries rejectBatch

resolveHistory returns the plan from explicit fields, so the rejected-batch fault was dropped and the
constructed run never rejected: the history did not enter its state. The plan now carries it.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected batch's reach state is marked after its states set exists; its stream law is its own ending

The reach mark ran before the states set was declared (a ReferenceError). The internal error's lines are
not stream lines, so the stream law is skipped for a rejected batch, and its ending (exit 3 and the done
error line) is judged after retention.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): a rejected batch's run observes its exit, last line and the laws before retention

The determinism check found the two runs of the rejected-batch history differ at observation 0 (cli),
beyond the 2,000-character print (#81). Its stream lines before the batch come in no fixed order, which
is not part of the contract. The observation keeps what is judged: the exit, the last line, the config
lines, namespace strays and warnings. The ending check reads the last line.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected-batch state is separate, so the all-classes history does not enter it

The all-outcome-classes history enters every required state that is not separate. The rejected batch's
state needs its own history, so it is listed as separate (it stays required and declared). The fixed-seed
shard 2 failed on the all-classes history for this reason.

Co-authored-by: Isaac <no-reply@databricks.com>

* docs(oracles): the rejected-batch test hook is documented in the package README

ORACLE_GAPS_TEST_REJECT_BATCH is inert unless set and triggers the real rejection path. The register's
test-only hooks entry requires it to be documented with its effect on the ending.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected-batch history's three tests are in shard 3

The shard partition check found the fixed-seed, random-seed and determinism tests of the rejected-batch
history in no shard (CI's Test job failed on it). They are added to e2e-3, where the fixed-seed history
ran green.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected-batch history is in Windows fixed-seed shard 1

The PR shard check found the fixed-seed history in no Windows shard (CI's Test job: pr-shards check).
It is added to Windows shard 1 beside the other fixed-seed histories.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): rejectBatch is a constructed-only field, taken back through an unbuild mapping

The generator drew rejectBatch (1 in 200), which the generator rule forbids for a field that changes what
a history runs. It is now a constant (fc.constant(0)) in the drawn record, and only the constructed
history at the end of the campaign sets it (1). The constructed history gives the framework an unbuild
mapping (the optional unbuild on ConstructedHistory, passed to .map as its unmapper), which takes the
built history back to a generated one (rejectBatch 0), so fast-check can shrink it.

The framework change is additive: a construction without unbuild maps as before.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): a constructed history is taken back through its unbuild mapping

The registration check tested the built history against the raw generator's language. A constructed
fault whose value the generator does not draw (rejectBatch, a constant 0 in the record) is outside that
language by design, though its take-back is inside it. The check now tests the history taken back through
unbuild when the construction has one; a construction without unbuild is checked as before.

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracles): the unmapper is passed only when a construction has one (strict types)

The build failed (CI's Test jobs): fast-check types the unmapper's argument as unknown and does not accept
undefined. The mapping now passes an unmapper only when the construction has unbuild, and adapts it to
fast-check's signature. A construction without unbuild maps as before.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected batch skips main's internal-error and namespace checks; judged after retention

Main's #83 check fails any exit 3 at the start of the CLI law, before the rejected-batch branch, so the
constructed rejected batch failed on completion. Its internal error also leaves its session, which is
the symptom #83 names for the namespace law. For a rejected batch (the constructed fault only), both
checks are skipped; its ending (exit 3 and its done error line) and its retention are still judged, with
retention first. The Limits name the exemption.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): rejectBatch is recorded at the end of the generator fingerprint lists

The generator canary (gap-report-history-fingerprint) records each field's draws in draw order, and a
new field is recorded at the end of both lists. rejectBatch (the constant 0, drawn last) is appended in
drawn and histories; every earlier line is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected batch's run is judged by the output namespace law

The earlier exemption skipped the namespace law for the constructed rejected batch. Restored: the law judges
every write of that run. Whatever an internal error leaves behind is then either removed by the CLI or
predicted by the model, decided on the evidence of the run that follows.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected-batch history pins its config, so a random config cannot refuse it before its batch

The random-seed run of the constructed history drew a CommonJS package with a .js config, which the CLI refuses
before any batch, so no batch ran and no retention line was written (retentionLines:reject). The constructed
history now pins its package type and config file (ordinary values, so its take-back stays in the language),
and the fixed and determinism units were already unaffected.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the rejected-batch history pins its native and config placement

A random run drew a native addon and a config in the parent directory, which the CLI refused before its batch
(retentionLines:reject again). The history pins both to the values of the daemon history, so no random
scenario setting refuses it.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): retention lines are attributed to the process that wrote them

A line named its run's output directory only, so a daemon the CLI killed mid-check (its batches ran and wrote
lines to that directory) was counted against the run that reported, which ran no batch of its own
(retentionLines:daemon on the dieMidCheck step, shard 3 of the merged head). The hook line now carries the
writing process's pid (observation only). A run's retention is its child's lines; the lines a daemon it
killed wrote are judged as that daemon's: each complete and retired (retention:killed). A killed process
reports no batch count, so its count is not judged here; the batch it died in writes no line (a Limit).

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the check writes its pid under the test hook, and retention lines are attributed by it

The CLI runs its check in a supervised child, so the pid of the process the driver spawned is not the process
that writes the lines (the first attribution failed every cold run). Under ORACLE_GAPS_TEST_RETENTION the check
writes its own pid into its output directory (observation only), and the driver attributes a run's lines to
that pid. A daemon the CLI killed writes other pids, and its lines are judged as that daemon's (retention:killed).

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): rejectBatch is taken back in the model's mapping; the framework's unbuild is reverted

The constructed history "a batch whose run rejects" sets the constructed-only
field rejectBatch. Main's mechanism for such fields (register: generator rule,
extended) takes them back inside the model's histories mapping, as it does for
pauseEngages and warmReplaced, so the framework's membership check (F20) is
unchanged. This reverts the ConstructedHistory.unbuild addition (954a5f3,
cb25107): #61 no longer changes packages/oracles/src.

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the retention law reads real objects, judges every writer, and counts batches by their own index

The retention hook moves into retention-hook.mjs, which the CLI loads only
when a hook variable is set and which the package does not publish. Its
fields observe the real objects (review of #61, F6): staleOpen reads Vitest's
own close state of each context that left the live array, and the cold
store's law counts the entries given to put that a full collection leaves
reachable (held), in place of a size the store reported about itself. The
openContexts set, the replacing count, the memoryStore size and
evidence.batches, kept only for the hook, are deleted (F10), with the unread
retireModules count and the globSpecs wrapper.

Each line carries its batch's own index (F11). The law over one call's lines
(retentionBreaches) judges every line for the call's --out: a line from a pid
other than the check's is allowed only from a daemon the driver killed and
saw die, so two processes running one call's check, or a line with no pid,
is a breach (F4). A check that reached its report owns indices 0..n-1, each
once; a check that ended early, a stopped run and a killed daemon own each
index at most once. The warm and mid-run calls are judged too.

The rejected-batch fault now rejects after the batch's run completes, so its
copies are in Vitest's and Vite's state and their retirement is witnessed
(F5). Its run's done line is judged on both streams, and the Limits state the
actual check order. The README documents check.pid, pid, held and the new
batch index (F3).

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): law 9's first cold run keeps its retention lines and check pid

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): the killed daemon's retention lines are a declared reach state

Co-authored-by: Isaac <no-reply@databricks.com>

* test(oracle-gaps): a stopped run's retention lines are the ones it appended

Every stop of a history writes under out-stop, so an earlier stop's lines
named the same run and a pid other than this stop's check (found by the
shared-index mutant's run of "every outcome class").

Co-authored-by: Isaac <no-reply@databricks.com>

* fix(oracle-gaps): the retention hook ships, so the CLI cites only files its package ships

check.mjs imports retention-hook.mjs when a hook variable is set, and a
shipped file may cite only what its package ships (eslint-plugin
shipped-citations, maintainer finding F16). The CLI still loads the module
only when a hook variable is set.

Co-authored-by: Isaac <no-reply@databricks.com>

---------

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews and others added 7 commits November 16, 2026 13:42
#61's per-call output directories and retention hook meet #57's default
output directory: a run without --out keeps no suffix, and its check pid
and retention lines are read from the directory its note line names,
before the run's scratch directory is removed. main's constructed
history (a batch whose run rejects) and its rejectBatch field come first;
#57's follow.

Co-authored-by: Isaac <no-reply@databricks.com>
…the start holds, ps and a dangling claim

The oracle side of the review of #57 under the maintainer's decision
"Randomness wins for new fields" (2026-11-16):

- outMode, logBlocked, stopWitness, claimScenario, spawnSignal and
  spawnDelay are drawn. Fields that switch a test-only hook (overlap,
  spawnStop, spawnOnStart, logLost, supervisorDeath, unsupervised) stay
  constants that constructed histories set.
- A drawn stop no longer takes `after`, which switches
  ORACLE_GAPS_TEST_HOLD_UNTIL; only a constructed history sets it, and
  the take-back drops it.
- The done line of every win32 stop is judged again: each goes through
  the test stop hook. A new constructed history stops an unsupervised
  run, so POSIX reaches stopNow too.
- A spawn stop is sent only once the CLI is held at its start, then
  after its drawn delay: after the started marker until the CLI keeps
  the stop, or before the CLI's first statement through the driver's own
  preload (outcome a, now judged on stopped runs). New constructed
  histories: a stop before the CLI starts and a SIGTERM stop as the CLI
  starts (POSIX only). "A stop as the CLI starts" is entered only when
  the CLI kept the stop before its child started.
- A drawn and constructed run with no command on its PATH (no ps), and a
  claim scenario whose run.pid is a dangling link.

Co-authored-by: Isaac <no-reply@databricks.com>
… a drawn field never switches a hook

On POSIX an unsupervised run has no group to end, so a stop while the
witness's test spins leaves the test's own child (C 2026-11-13, Windows
(e)); the unsupervised witness now stops after its note instead, with
its stream log lost, the path every win32 stop takes. The history
grammar's canary also checks that no drawn history switches a test-only
hook, and that no drawn stop is the stop after the completed line.

Co-authored-by: Isaac <no-reply@databricks.com>
…'s note

A stream log lost after the note makes the unsupervised run refuse
before its stop is taken, so that history never reached stopNow. The
witness now holds the run at its note (ORACLE_GAPS_TEST_PAUSE_AT), sends
the stop, and releases the hold: a constructed-only stop kind, `note`,
which the take-back drops as it drops `after`.

Co-authored-by: Isaac <no-reply@databricks.com>
…gling claim reads as unreadable

- The test-only hold after the started marker
  (ORACLE_GAPS_TEST_PAUSE_AFTER_STARTED) is released by the stop the CLI
  keeps (or, on win32, by the test stop file), never by time: a 200 ms
  hold let a late stop land after the supervisor had started its child
  (register C 2026-11-14, "Determinism under load covers witnesses
  too").
- The supervised child tells that it leads its own process group by a
  signal 0 to the group its pid names, not through `ps -o pgid= -p`,
  which a slim container lacks and BusyBox's ps does not accept: every
  supervised check exited 3 there.
- A run.pid that the claim's link finds and no read does (a link to no
  file) refuses as an unreadable claim, without writing its report into
  the directory; the "keeps changing" refusal wrote results.json and
  summary.md beside another run's claim.

Co-authored-by: Isaac <no-reply@databricks.com>
…re the check

With logBlocked drawn again, a random seed (-118669542) drew a blocked log
beside a declaration fault: the driver claimed "refused <fault>", a
state the property does not declare, and the model owed the runtime
faults' refusal (brokenVitest, projects) before the log's and the log's
before an argument refusal (outsideSource). The CLI refuses its
arguments first, then a log it cannot write, then what the check finds
(P10 as amended in v21.2: an argument refusal owes the done line alone,
and once a check starts its first line is the note). The model's refusal
now follows those stages, and the driver claims a fault's refusal only
when the run reached its fault.

Co-authored-by: Isaac <no-reply@databricks.com>
…ass into two histories

On Windows the one history that held both stops took 557 s, and its job
10m16s, past P12's 10 minutes. Each stop now has its own constructed
history over the same base, appended last, and each sits in its own
Windows shard (4 and 5). The required states and the union of
"every outcome class" are unchanged; the output directory stays drawn.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews added a commit that referenced this pull request Nov 16, 2026
…he lazy state

From #57's findings: a drawn stop after the completed line holds the run's
exit (ORACLE_GAPS_TEST_HOLD_EXIT_MS), a drawn stop while the config warms
waits at the warm probe (ORACLE_GAPS_TEST_WARM_PROBE), and on win32 every
drawn stop goes through the test stop file (ORACLE_GAPS_TEST_STOP). Under
"Randomness wins" no drawn field switches a hook on, so the histories map
reads those stops as stops while the witness spins, and drops every stop on
win32; only the halves of "every outcome class" stop with a hook. The map
reads the same draws, so no field's draws move.

The canary gains a test: at three seeds, 500 histories each, every hook
field holds its neutral value and no stop switches a hook.

Two fixed-seed failures from spinData: a flaky test of file b spun while
the model leaves flaky tests out (the spin now skips flaky tests, as a hang
does), and "an edit to a module that only mutated runs load" drew spinData
and lost "edit lazy changed the cold result", which it gates; it now pins
spinData off.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews and others added 2 commits November 16, 2026 16:28
…p witness alone

Split over the first half's heavy base, each stop history cost that
base again: Linux fixed-seed 2/3 took 10m26s, and on Windows the abort
stop, which fails there on main's win32 witness (#79), shrank through
three heavy histories (592 s, job 12m41s). Each now runs over the stop
witness alone, the base of "a stop with the default output directory":
the same two states, cheaper histories (R7). Locally each passes in
under 15 s, and a mutant of the stopped line and one of the abort's
error line are each killed.

Co-authored-by: Isaac <no-reply@databricks.com>
Main's constructed history (a probe branch under a generated test's work
bound) comes before #57's, and its limits sentence joins #57's.

Co-authored-by: Isaac <no-reply@databricks.com>
KyleAMathews and others added 3 commits November 16, 2026 18:11
#128's internal-error line and its stricter stream reader join #57's
default output directory (a run with no --out keeps no suffix, and
outBreak applies to the --out the driver names) and #57's stop prose
and limits.

Co-authored-by: Isaac <no-reply@databricks.com>
After #128 the rejected-batch history's output directory holds a line
break, and the stream law judges that run. Its observation now carries
the stream log, and the note it owes spells the path as every line of
the stream does: a control character as its \uXXXX escape (C 2026-11-16
"The internal-error line"). RED: the note line splits in two.

Co-authored-by: Isaac <no-reply@databricks.com>
…g path

A --out whose name holds a line break printed the note on two lines, on
both streams; every other line of the stream names a path with its
control characters escaped (#128). The note now does too.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant