Repository navigation
fix(oracle-gaps): no wall-clock cut decides an outcome - #99
Draft
KyleAMathews wants to merge 150 commits into
Draft
KyleAMathews wants to merge 150 commits into
KyleAMathews wants to merge 150 commits into
Conversation
…s not wait Determinism under load (2026-11-13): a run's outcome must not depend on how long a run took. A constructed history, "a slow owner's kill and another owner's kill", has one mutant that file a's random-route test and file b's fixed-seed test both kill. Its driver also runs the slow twin: the same package, where a's test waits 3 s past its first budget wherever the output differs and then judges as before. The law compares the two reports, `randomAlso` included. On main, a's slow copy is cut at its first budget and queued for a confirmation, b's kill decides the mutant first, and a's random failure is never recorded: the twin reports `randomAlso: false` where the package reports `true`. `slowTwin` is constructed-only (no generated history draws it; `histories` takes it back without it). Co-authored-by: Isaac <no-reply@databricks.com>
…t, and a timer under load Deterministic cuts, option A (register M, 2026-11-14): no wall-clock cut decides an outcome, so a mutant's copies are judged by count, not by time. Three laws are added to the end-to-end oracle, each RED on the parent commit before any production change. - The budget witness w_slowpair becomes a work-budget witness: its two owners' tests call the function PAIR_LOOPS times where their output differs. Each copy stays inside its call budget, the two together pass the mutant's work budget (WORK_FLOOR), so the mutant is a timeout by count, whatever the clock says. The model judges the budget in owner order, a kill before the budget runs out still deciding. - A slow kill whose test waits 16 s, past Vitest's 15 s per-test limit, is killed: no limit that the CLI leaves to Vitest decides the outcome. - A copy whose test starts a timer, spins under load, then waits for the timer, is killed and never cut as idle (the idle law is state, not time). Constructed-only test fields (slowMs, loops, busy) are held by the drawn test record at neutral constants and taken back to them by the histories' map, so no generated history draws them (generator rule, 2026-11-14). The constructed histories are appended at the end of the list, and the slow owner's history moved there from the middle of it. Co-authored-by: Isaac <no-reply@databricks.com>
…he work budget The first RED (9412eac) lets each copy of w_slowpair make 37,500 calls beyond its first. At three site evaluations a call that is 112,500 per copy, past the 100,000 call budget, so main cuts each copy by count and the mutant is a timeout on either side; the work law is not reached. At 30,000 calls a copy makes 60,000 to 90,000 site evaluations, inside its budget, and the two copies together pass the work budget, so main must report survived. Co-authored-by: Isaac <no-reply@databricks.com>
…-clock budget Register M entry "Deterministic cuts, option A" (2026-11-14): no wall-clock cut decides an outcome; a mutant's budget is a work count, and the wall-clock budget is only a backstop that reports a gap. The model's wall-clock clause (two budgets: a slow owner file's confirmations past --mutant-limit predict a timeout) is removed as the repair the M entry requires. This is not a model change to match production: the clause's authority is the retired confirmation path, and the M entry retires it. Consequence, a RED on main: the constructed history "a slow kill past Vitest's 15 s limit" (a 16 s wait where its output differs) now predicts `killed`, and main reports `timeout` for it, because main's confirmation is cut by the mutant budget at 15 s (diagnostic on a scratch branch: the copy's outcome is "run time limit", not Vitest's "Test timed out"). Also: a test that awaits its busy witness is async (the emitter marks it so), so the baseline loads. Co-authored-by: Isaac <no-reply@databricks.com>
…states are listed apart
Register M entry "Deterministic cuts, option A" (2026-11-14), with the
coordinator's ruling 3 (fallback): a test that Vitest's own limit ends
("Test timed out") is reported as a backstop gap, like a timed-out run. It
is `timeout` after any kill, and it never keeps a kill from deciding. The
previous rule read a Vitest timeout only when every failing test had one,
so a timed-out test beside a verdict-less failure was `crashed`, and a
timed-out test beside an unregistered kill was not a timeout at all. The
`every` branch and the `!timeout` filter are now redundant and removed.
Law: a run's outcome does not depend on how long a test took (determinism
under load); a clock limit may only report a gap.
RED: the classify oracle on the parent classify.mjs (HEAD before this commit,
built from the same fixtures) fails with "mutant m0: unregistered-kill, owed
timeout", and the parent's crashed/timeout split fails the same law.
Mutant: timeout checked before the kills (scratch copy): the classify oracle
fails, "mutant m0: timeout, owed killed"; the mutant is rejected.
GREEN: the classify oracle passes (276 tests). The model counts a timeout
message only in a file that loaded, as production does (a file that fails to
load gives no tests).
The e2e oracle's states "a slow owner's kill reported as when it did not
wait", "a slow kill past fifteen seconds killed" and "a copy waiting on a
timer under load killed" are listed as separate: they have their own
histories, so "every outcome class" must not enter them.
Co-authored-by: Isaac <no-reply@databricks.com>
Register M entry "Deterministic cuts, option A" (2026-11-14). A copy runs until it finishes, goes idle, or spins; the only wall-clock limit is a backstop that reports a gap and never decides a kill. - No first budget and no confirmation: a copy runs once, to its end, under the backstop limit (hang-limit plus three seconds per second of the file's unmutated time). The cut marking and the confirming run are removed. - G1 becomes a work budget: a mutant's copies, summed in their owner files' report order, may do at most max(WORK_FLOOR, 10 x the owners' unmutated calls) site evaluations (WORK_FLOOR = CALL_FLOOR, 100,000). Past it, the copy that crosses and every later copy is a timeout, so a kill among them does not count. This is deterministic because the work is a count; the owner order is the report's, not the completion order. - The wall-clock mutant budget (--mutant-limit) is a backstop checked after all copies: no kill and elapsed over budget is a timeout; it never decides a kill. - Defaults (coordinator rulings, 2026-11-14): --hang-limit 60 s, --mutant-limit 180 s, --test-timeout 65 s (hang-limit plus 5 s). Cost to state: an unmutated hang that no CLI limit cuts now fails after 65 s, not 15 s; under option A an idle hang is cut by `no progress` in about 500 ms, so only a busy hang with no instrumented site waits for the backstop. - --first-limit is validated and retired: it prints a note and changes nothing. - A test that Vitest's own limit ends is a backstop gap (classify.mjs; its RED and mutant are in the prior commit, 4b063c8). Correction to 4b063c8's message: that message said the parent's crashed/timeout split fails the classify oracle. I did not run that case. The verified RED is the one in 4b063c8's body: the parent gives "unregistered-kill" where the model owes "timeout". Co-authored-by: Isaac <no-reply@databricks.com>
… in the test The counter-witness (register, 2026-11-13 "Determinism under load"; the 2026-11-14 entry "Deterministic cuts, option A") was a copy whose test spun for 600 ms and then waited 2 s on a timer. Its spin kept event-loop utilization above 5%, which alone keeps a copy from looking idle, so the timer check never mattered: mutant 2 (elapsed-only idle, the timer checks disabled) passed the witness. The witness now waits on one timer due 3 s out, inside the horizon, with nothing else in the test. A copy with its timer pending is never idle; only that check stands between it and an idle cut. A loaded variant, if wanted, is a CPU hog outside the worker. The state is "a copy waiting on a timer killed"; the constructed field is timerWait (a constructed-only test field, taken back to null; no generated test draws it). Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com> # Conflicts: # packages/oracles/oracle-gaps/gap-report-model-oracle.mjs # packages/oracles/oracle-gaps/gap-report-oracle.property.test.mjs # packages/oracles/scripts/pr-shards.mjs
|
| Name | Type |
|---|---|
| @tanstack/oracles | Minor |
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
… copies Register C entry "Deterministic cuts, outcome rule (under M option A)", 2026-11-14: a copy cut by a clock or by its call count ends the mutant's copies; no later copy runs. The model now predicts that: a copy that spins (a count) stops the owner files after it, so a later owner's kill does not count and the outcome is a timeout. Witness: a constructed history whose one function spins in the mutant (the until loop of w_spin) with two owners, a and b. Owner a's copy spins first; owner b's judging test would kill. Production (main at this commit) runs b's copy after a's spin and reports killed. The model owes timeout. RED: on this commit, the new witness fails (the CLI reports killed where the model owes timeout; pool run dc-rule-red-*). Limits: the model's rule covers copies cut by a count; a wall-clock cut (the backstop and Vitest's limit) is a backstop gap under the same rule, and its own witness is pending (finding 4, the H1 witness). Co-authored-by: Isaac <no-reply@databricks.com>
…ant, uncharged Register C entry "Deterministic cuts, outcome rule (under M option A)", 2026-11-14: only counts and states decide a mutant's outcome. - A copy cut by a clock or by its call count (its own timeout, or Vitest's "Test timed out") is never charged, and it ends the mutant's copies: no later copy runs, and a kill among later copies does not count (review B2). - A copy's work is the calls of its deterministic, unclocked tests (`baseline.work`, classify.mjs), and the owner files' most-working tests set the budget and the call budget (review B3). - The mutant-level elapsed-seconds backstop is removed: it summed cached units' stored seconds, so a daemon reuse could differ from a cold run (review finding 3). Each copy's own wall cut remains the backstop. Whether --mutant-limit still has a role is open (it now only affects identity). - Model: a copy cut by a count or a clock ends the owner files (no later file runs), so the model owes the same outcome. Witness: a constructed history with two owners, each making 30,000 extra calls; owner a's copy is under the budget, owner b's would kill but passes the budget, so the mutant is a timeout by count. The reversed-sum mutant (review H2, 968bfd7) is the mutant it must fail. Not witnessed here: a spin in an earlier owner ahead of a kill in a later one. A spin witness was tried first and removed: the later owner runs the same spinning function, so it spins too and never kills, and the witness passed on the parent. Finding 4's backstop witness (H1) is pending. Co-authored-by: Isaac <no-reply@databricks.com>
…r copy, wall cuts end the mutant Register C entry "Deterministic cuts, outcome rule (under M option A)", as refined by the coordinator: a copy ending in "no progress" (a state) or a spin past its call budget (a count) is a deterministic timeout for that copy. It is charged nothing (the rows of a cut copy are not kept, and the per-copy call budget already bounds it), and the next owner's copy still runs, so a later kill decides. Only a wall-clock cut (the CLI backstop, or Vitest's "Test timed out") ends the remaining copies, as a backstop gap that is never charged. - Model: runsOf tags each cut with its kind (wall, count, state); judge ends the owner files only on a wall cut. - Check: spin and idle copies settle with spin or idle set; cutByTime covers wall cuts only. - --mutant-limit is retired (validated, noted, changes nothing); the driver no longer passes it. - Constructed history "a backstop cut ends the copies ahead of a later kill": owner a's copy waits past a 2 s backstop; owner b would kill, and does not run. The state "a backstop cut ends the copies ahead of a later kill" is entered. Open: "a declaration fault: noTypescript" (shard 3) streams 161 gap lines where the model expects 159; a per-mutant check is pending. It is a model and CLI disagreement, not a duplicate line (the scratch diagnostic found no repeated line). Co-authored-by: Isaac <no-reply@databricks.com>
…ot in scope there) Co-authored-by: Isaac <no-reply@databricks.com>
…p, never a silent one Review finding 5 (register L8). The 10 s close waits in closeContexts and in replace continued silently after a close was still pending. Now each close waits up to the 60 s backstop; a close still pending is an error that names the backstop gap, and no replacement is warmed while the old context is still closing. Closes that finish are unchanged. Witness: none. A pending close needs a context whose close never settles, which costs 60 s per run; it is a limit of this change (the coverage is by inspection of closeWithin and its two callers). Co-authored-by: Isaac <no-reply@databricks.com>
…oes idle Owner a's copy now awaits a promise that never resolves, while a repeating timer stays due inside its horizon, so the copy is never idle and no site spins. Only the backstop cuts it, on every machine. The witness no longer depends on whether a 12 s wait lands inside the backstop band (register 2026-11-14, outcome rule item 5). Co-authored-by: Isaac <no-reply@databricks.com>
…ress, or work budget A copy's cut is now recorded as its cause and carried into the mutant's timeout detail, results.json, and the gap line (cause: ...). The model predicts the cause of each timeout: a backstop cut (a wall-clock limit), a spin past the copy's call budget (a count, outcome rule item 4), no progress (a state), or the mutant's work budget. The model had no per-copy call budget, so the work-budget history's 4-sites-per-call mutant was a spin and not a work-budget timeout; the model now predicts that. ORACLE_GAPS_PROFILE rows carry each copy's cause, its file's measured time, its limit and its duration. RED: the e2e oracle, with the cause predicted and production unchanged, fails on the backstop history (its timeout is cut by run time limit). Co-authored-by: Isaac <no-reply@databricks.com>
…s as constants The deterministic-cuts constructed fields are constants in every drawn record, so no draw changes: the tests line hashes the records without them and is main's (e9029433a23d1f10). slowMs, loops, timerWait and pulse each get a line after the others, with its neutral value checked on every generated test, and hangMs is a drawn constant (null where generated) with its own line. The constructed histories #99 adds are appended after main's 26, by name and index. Co-authored-by: Isaac <no-reply@databricks.com>
…e current cuts --help and the index header give the defaults (--test-timeout 65000, --hang-limit 60000) and mark --first-limit and --mutant-limit retired. The README, the changeset and the e2e law 4 text describe the backstop, the call and work counts, and the cause each timeout names. Stale states and names are renamed (confirmations, the first budget, the 15 s limit): a slow kill after a 16 s wait, and a mutant's copies past its work budget. MUTANT_LIMIT_MS, unused, is removed. The determinism twin is described as a determinism check: it passes on its parent, so the outcome rule's RED is the classify oracle's. Co-authored-by: Isaac <no-reply@databricks.com>
… and counts The README's gap section and the changeset's bullet describe the counts and the backstop, the cause each timeout names (on the gap line too), and the retired options, in place of the confirmation budget. The classify oracle's gap-line law (in bfca29a) accepts a timeout's cause suffix. Co-authored-by: Isaac <no-reply@databricks.com>
Resolves the constructed list (main's 29 histories first, then the five #99 histories at 29 to 33), the drawn record (main's pauseEngages and warmReplaced, then hangMs), the take-back, the limits text (main's Windows notes, with #99's work-budget wording), and the shard lists (#99's histories in shard 4, main's test.projects line in shard 5). The fingerprint canary passes. Co-authored-by: Isaac <no-reply@databricks.com>
…; the Windows shards list the new histories The constructed backstop (hangMs) is a drawn constant now, so its take-back returns the drawn value (null), which the arbitrary can take back. The fixed-seed shards of main are kept as they are: the new histories fall into the Linux rest shard, and the Windows partition, which is exact, lists them in shard 10. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…n the CLI arguments Co-authored-by: Isaac <no-reply@databricks.com>
…'d timer An unref'd timer is not among the process's active resources, so only the copy's own pending-timer record keeps it busy (the idle rule, held state, M 2026-11-15). The witness is a constructed history of its own; the reach state is recorded. Co-authored-by: Isaac <no-reply@databricks.com>
…dition A copy is idle when no counted timer is due within its horizon, no timer is listed beyond its test's base, and no I/O handle is open (M entry 2026-11-15). Sample lateness and the event loop's utilization no longer reset the window: a busy synchronous or microtask loop blocks the sampler, so it cannot look idle. The held-state witnesses (a copy waiting on a timer, ref'd or unref'd) keep the copy busy, and the mutants that ignore a due timer are killed. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…ef'd timer history The e2e shard check named the removed history 'a slow kill past Vitest's 15 s limit' and had no shard for the unref'd timer history, so CI's test:oracle-gaps:shards failed. The check now partitions the e2e tests exactly. Co-authored-by: Isaac <no-reply@databricks.com>
commit: |
… wall-clock cut With the idle rule decided by state (M entry, 2026-11-15), a timer due beyond the copy's horizon does not keep it busy, so it is idle and cut as no progress. The model's wall-clock cut for such a wait was stale; the load experiment's 12 s copies gave the same outcome on three repeats under a concurrent run (the model owed a backstop cut). Co-authored-by: Isaac <no-reply@databricks.com>
…opy early Law: M "An excluded test still runs" (its calls count toward the copy's call budget, its timers count toward idle) and the fixture emitter, which gates the hang on `!flaky`: a flaky test never hangs, so its later parts run. The model returned at the first hang row of any test, flaky or not, so a flaky test's second part (its 19,999-call loop) was never counted. Seed -880625410 (RED on 50a2641: `f0:34:if-false#0: indeterminate, owed killed`): production counts 2 x 19,999 x 3 calls, past the 100,000 budget, and cuts the copy by spin at the second part; the model predicted a kill by a later deterministic test. RED: seed -880625410 on 50a2641 (r99h-cap880-1, scratch with the caps lifted, same production and model). Co-authored-by: Isaac <no-reply@databricks.com>
…ever hang or loop Law: the state "a failing law left its file's other laws judging" must be entered by the constructed brokenOwner history (P4, constructed reach). A kept test that hangs or loops (drawn, flaky or not) cuts the copy before file b's verdict test judges. The override is per test (tests.map), so take-back still holds. Reach: 5f75a4a made the model count a flaky test's later parts (the seed -880625410 repair), which exposed this builder's reliance on the base's hang fields; with the override the constructed history enters the state again. Co-authored-by: Isaac <no-reply@databricks.com>
Law (register C 2026-11-24, "A verdict before a cut still kills"): a law verdict from a judging test on a reproducible route, recorded before any cut, is a kill. A later cut, the backstop included, ends the copy but never erases it, because the first kill decides (P3). Soft verdicts (expect.soft, unnamed assertions) count too. Before: a verdict was kept only on its test's row, written at the test's end, so a copy cut mid-test (the backstop, or a loop whose budget throw the test swallows) lost it and was a timeout. Seed 311266498 (noTypescript, reportAndPush:20:delete-call#0): test t1 takes an expect.soft verdict in its first positive run, then a 30,000-call loop runs on into shrinking and the backstop. After: each verdict is also written at once as an `early` row (capture-setup recordVerdict). A cut copy reads its early rows (check.mjs earlyVerdictsOf) and classify counts them as failures on their routes, so a reproducible one kills. The rowsOf map skips early rows, so completed copies are unchanged. Limits: a backstop cut still stays a gap when nothing was observed before it (Backstops are fine, set high). Co-authored-by: Isaac <no-reply@databricks.com>
…not only the broken owner's Law 3 (the failing owner's replay runs exactly its failing test) with stream.mjs, which prints a replay line for every failing oracle file, its first failed test, in path order. The model gave a failing-law file a replay only when it was the broken owner, so it owed the broken owner's replay where the baseline printed the earlier file's failing law. RED: seed 311266498, path 1 (random seed: generated) on 5d17f35: "the replay command ... ran [a law that fails with no mutant active], owed only [broken (b.*) ... fixed seed 999]". Co-authored-by: Isaac <no-reply@databricks.com>
…t that spins
Law: register C 2026-11-24 ("Every built-in cut by an excluded test ends the copy
as a gap") and M "An excluded test still runs" (its calls count toward the copy's
budget). A flaky test with a 19,999-call loop in each of two parts makes about
120,000 calls under the mutant, past the 100,000 budget, so the copy is cut by
count inside the flaky test and the kill test after it never runs: `indeterminate`.
Reach: the constructed history (appended last, constructed-order.json) and the
state "a flaky test's later part spins past the call budget", declared required
and entered when an indeterminate mutant comes from a flaky test with a later part.
The shard partitions list the three new units (fixed seed, random, determinism).
Co-authored-by: Isaac <no-reply@databricks.com>
…ns a function The previous replay rule (37af89f) gave every failing law's file a replay line. Fixed-seed shard 5 showed that a failing file owning no function prints none (five units: "replay command undefined ran undefined"). The replay line is the failing owner's (law 3), so the model now expects it only for a file that owns a function. Seed 311266498 path 1 keeps its expected replay. Co-authored-by: Isaac <no-reply@databricks.com>
This was referenced Nov 25, 2026
… enters its state Its state moved out of `required` (which every constructed history enters) into the states declaration, so "every outcome class" no longer has to reach it. The history's flaky test is in file b: file a's loops are gated on seed 1, so under a fixed seed they never run, which is why the copy did not spin. Co-authored-by: Isaac <no-reply@databricks.com>
…seed -880625410 A hand-built history did not reach its state (its flaky loop never spun under the fixed seed). The constructed history is now the captured counterexample of seed -880625410, kept whole as a constant: its flaky test "t0 > check 0" in file b runs a 19,999-call loop and its wait in each of two parts, so the copy of mutant f0:34 is cut by count in the second part and is `indeterminate`. Co-authored-by: Isaac <no-reply@databricks.com>
…t be taken back The captured history of seed -880625410 cannot be kept as a constructed or a fixed history: the arbitrary cannot take it back (canShrinkWithoutContext is false, #185). The state "a flaky test's later part spins past the call budget" is therefore measured, not required, and the limit is recorded in the e2e limits. Its constructed entry, constant and shard names are removed. Co-authored-by: Isaac <no-reply@databricks.com>
…and a failing law in an ownerless file owes none Law 3 (the failing owner's replay runs exactly its failing test) with the replay rule of 37af89f and 76a925c: a failing oracle file prints a replay only when it owns a function, and the baseline's replay is the first such file's. The driver observed the baseline's replay only for brokenOwner plans, so a failing law's replay was never compared. That is why the five fixed-seed 20261105 units read "replay command undefined ran undefined": the observation was absent, not production silent. With the observation on, those five pass on 2e73987, and the baseline prints the owner's replay. The comparison now runs both ways for plans with a failing law or a broken owner: the replay that ran must equal the model's owed replay, and when the model owes none, no replay may be printed. Law: a failing law's file that owns no function prints no replay (law 3, "the failing owner's replay"; the rule in the brief for 76a925c). Reach: state "a failing law whose file owns no function prints no replay", declared in the required list and entered by the constructed history "a failing law in a file that owns no function prints no replay" (file a owns nothing, file b owns and judges the one function). RED: local vitest on 2e73987 production with this commit: `-t 'fixed seed 20261105: a (failing law|heavy failing law)'` -> "the replay command ... ran [a law that fails with no mutant active], owed none" on the new history (1 failed, 5 passed). Limits: the replay check covers only plans with a failing law or a broken owner; outside-tests and load-failure replays are not modelled. Co-authored-by: Isaac <no-reply@databricks.com>
…owns a function The baseline printed a replay for every failing test file, and the model (law 3, "the failing owner's replay") owes one only for a failing oracle file that owns a function. A failing law in an owner-less file therefore got a replay line the model did not owe (RED: the constructed history "a failing law in a file that owns no function prints no replay" on 285c7a7). The CLI now tells the printer which failing files may replay (owners.mjs ownsFunction, check.mjs replays), so both sides apply one rule. The baseline's first replay is the first failing owner's, as before. Ordinary files and the outside-tests branch are unchanged. Law: a failing oracle file prints a replay only when it owns a function (law 3; the replay rule of 37af89f and 76a925c). Reach: "a failing law whose file owns no function prints no replay" (the constructed history above; 1 of 438 tests in the fixed-seed suite). RED: 285c7a7 on 2e73987's production, the constructed history fails with "the replay command ... ran [a law that fails with no mutant active], owed none". GREEN: this commit; the six failing-law units pass locally (6 passed). Mutant: replays forced to false for every file (no replay for any failing law) fails the owner units ("owed only [a law that fails with no mutant active]"), see the mutant run in the pull request body. Limits: the outside-tests and load-failure replays keep printing for any oracle file; a whole-file owns entry counts as owning a function only when its source has functions. Co-authored-by: Isaac <no-reply@databricks.com>
…stic-cuts-c main's path gates (#246) take pr.yml; the branch's shard counts are reapplied: fixed seed 5/5, random 5/5, determinism 9/9, gap oracles fast 4/4, windows fixed seed 11/11, with the gated jobs unchanged. The new replay history is added to the fixed seed, random seed, determinism, and windows partitions and to e2e-shards.mjs, since no `rest` shard takes it. Co-authored-by: Isaac <no-reply@databricks.com>
…-file replay, and none if it owns nothing A describe's failing hook fails its file outside its tests, so the baseline replays the whole file (`vitest run <file>`), which runs every test that ran. The replay check now runs for every failing-law plan (285c7a7), so these hook plans were checked for the first time, and the model owed no replay for them: the RED on 0f97bf7's shard 5 was "the replay command \"vitest run tests/a.test.ts\" ran [...], owed none" for "a failing beforeAll around a law" and "a failing afterAll around a law that calls production", whose file owns a function. The model now owes the whole-file replay for such a file (replayedFile: the count of its tests the baseline ran, which the whole file runs again), and owes none for a file that owns no function. The driver compares a whole-file replay by its command (no `-t`) and its count. Law: the first failing owner's replay (law 3). A failing law's file that owns a function replays the failing test, or, when it fails outside its tests, the whole file; one that owns no function replays nothing. Reach: the owner-less afterAll history enters the state "a failing law whose file owns no function prints no replay" (its build is appended at the end). RED: local `-t 'fixed seed 20261105: a (failing|heavy failing)'` on 23fb026's production: "a failing afterAll in a file that owns no function prints no replay": the replay ran [hooked a law..., writes to the console streams], owed none (1 failed, 10 passed). The owner hook cases pass (GREEN here). Limits: the whole-file count is the baseline's, not an independent count of the file's tests. Co-authored-by: Isaac <no-reply@databricks.com>
…no replay outside its tests either The baseline's file-level replay (a file that fails outside its tests, such as a describe's failing hook) printed for every oracle file, whether or not it owns a function. The failing-law rule (law 3) covers that file too: it is a failing law's file, so one that owns no function prints none, as the test-level replay already does (0f97bf7). Ordinary files are unchanged. Law: the first failing owner's replay (law 3); a failing law's file that owns no function prints none. Reach: "a failing afterAll in a file that owns no function prints no replay" (constructed; enters the state "a failing law whose file owns no function prints no replay"). RED: ea622e9 on 23fb026's production: "the replay command \"vitest run tests/a.test.ts\" ran [hooked a law..., writes to the console streams], owed none". GREEN: this commit; local `-t 'fixed seed 20261105: a (failing|heavy failing)'` 11 passed, 430 skipped. Mutant: scratch branch scratch/r99z-mut-noreplay (a failing law prints no replay at all); the pool result is in the pull request body. Co-authored-by: Isaac <no-reply@databricks.com>
…w, and the ownerless state is not every-outcome Two faults in the replay check I added (ea622e9, 0f97bf7's test pair): 1. The gate was `plan.failingLaw !== undefined`, but a plan's `failingLaw` is `none` by default, so every plan was checked. RED: fixed seed 20261105 "a declaration fault: setupThrows" on ee04980: "the replay command \"vitest run tests/a.test.ts\" ran [], owed none". 2. The state "a failing law whose file owns no function prints no replay" was in `required`, so `every outcome class` must enter it, and it cannot. RED: fixed seed 20261105 "every outcome class" on ee04980: "did not enter a failing law whose file owns no function prints no replay". It is now in `constructedOnly`, which keeps it out of the every-outcome history and stays declared in `required` for its own constructed histories. The gate is now `failsALaw(plan)`: a plan with a failing law, or a broken owner. Law: the replay check is for the plans that have a failing law or a broken owner (law 3); other plans owe nothing here. GREEN: local `-t 'fixed seed 20261105: (a declaration fault: setupThrows|every outcome class|a failing (law|heavy|afterAll|beforeAll))'`: 13 passed, 428 skipped. Limits: the other fault plans (setupThrows, did-not-load) are not checked for the replay rule; their replays are the outside-tests branch of 1b? (see the pull request body). Co-authored-by: Isaac <no-reply@databricks.com>
…ne owner file" is appended, not inserted 914823c placed this constructed history before recorded ones (after "a failing law that spins under a mutant before a passing law"), so every later history's base (seed + index) moved. The fingerprint canary requires new constructed histories at the end (C-6), and it failed on 2e73987 as well. RED: CI run 46248551785 on 16085b5, job "Test" (141301218745) and "Windows unit suites" (141301255660): "appends new constructed histories, and never inserts one before a recorded one", the listing has "a failing law's spin in one owner file blocks a passing kill in another" at index 98. GREEN: this commit moves the block to the end of the constructed list; local `pnpm exec vitest --run tests/gap-report-history-fingerprint.test.ts` 4 passed. The recorded names (oracle-gaps/constructed-order.json, main's list) are unchanged. The moved history's own base changes; its shard names are unchanged. Limits: the moved history's evidence (random seed 1675767311) is re-drawn. Co-authored-by: Isaac <no-reply@databricks.com>
…owns a unit CI run 46251491827 on 7eec5eb, random seed 4/5, seed -1191141657 path 0 ("random seed: a failing owner under its parent's config"): the baseline printed no replay for the broken owner file b, and the model owed "broken (b.*) $x it's fixed seed 999". b owns no function here, so under the rule (a failing law's file that owns nothing prints no replay) the model was wrong. The model's broken-owner branch had no ownership check. Law: law 3, as the rule of this branch: a failing law's file that owns a unit replays; one that owns none prints none. Authority: the maintainer's rule as stated for this change (a failing law's file that owns no function prints no replay); "function" is read as "function or module data", the CLI's owned unit, so an owner of module data replays too (flagged for the maintainer). Fixes in the same commit: - model: the broken owner's replay is owed only when the file owns a unit (ownsAnyFunction); ownsAnyFunction counts module data owned by the file (plan.history.dataOwners). - constructed history "a failing owner under its parent's config": the failing owner now owns the function (owners [b], judging in b), so its replay is owed; its state was unreached on the random base (no replay printed). RED: CI 46251491827 random 4/5 (job 141312295066) and local repro of the same seed; the model owed the replay, production printed none. GREEN: local repro passes; `-t 'failing owner'` 9 passed; `-t 'fixed seed 20261105: a (failing|heavy failing)'` 11 passed; fingerprint canary, pr-shards and e2e-shards checks pass. Mutant: a production gate that prints every broken owner (no ownership) fails the owned broken-owner units (r99z-mut3 kills the replay family; the brokenOwner cases in the fixed seeds). Limits: the random seed's replay is one draw; the module-data reading of "function" is a maintainer decision and is recorded in the away-log. Co-authored-by: Isaac <no-reply@databricks.com>
Determinism 4/9 took 10.7 minutes on CI run 46255225033 (7bd7237), over the 10-minute job limit. The shard lists were balanced by earlier weights. Each test's measured duration comes from the verbose logs of the nine determinism shards on the pool (16085b5, 119 tests that ran; 15 skipped on Linux have no time and are spread by count). Longest-first assignment gives nine bins of 275 to 276 s each. The CI per-job times were not per-test, so the check is the next CI run's per-job times. Partitions: pr-shards and e2e-shards checks pass. Co-authored-by: Isaac <no-reply@databricks.com>
…ns x 1.65 CI run 46261301537 (14f1d34) had determinism 9/9 at 11.6 min and 8/9 at 10.2 min on nine shards. CI per-test times are not in the job logs, so the repack uses the pool's per-test durations scaled by the measured CI factor (~1.65): ten bins of ~6.8 min estimated CI weight. The matrix and the job name move to /10; both shard checks pass. Co-authored-by: Isaac <no-reply@databricks.com>
Determinism 9/10 took 10.0 min on run 46265370483 (a845b55). One unit (the first half of "an edit sequence over the witness module", 92 s of pool time) moves from shard 9 to the lightest shard, 7. Both shard checks pass. Co-authored-by: Isaac <no-reply@databricks.com>
The shards of the random, determinism, and Windows fixed-seed jobs were packed from Arclet timings scaled by an estimate. CI disagreed: determinism 9/10 ran 11.5 min on 985b804. scripts/pack-shards-from-ci.mjs fetch reads the verbose logs of recent runs into scripts/ci-durations.json, with the run ids. pack takes each test's longest passing time across the runs, adds each job's measured setup, packs longest-first into the shard counts, and writes scripts/ci-packed-shards.mjs, which pr-shards.mjs reads. A failing test's time is charged only when no run passed it: Windows fixed seed 3/11 "every outcome class" failed in run 46268858514 at 616 s, against 215 s and 219 s in the passing runs. A test with no printed time is charged 300 ms. Predicted per job: determinism 10 shards at about 7:44; random 5 shards at about 8:41; Windows fixed seed 11 shards at 5:11 to 5:17. No shard count changed, and the pr.yml matrices are unchanged. The Linux fixed-seed job ran without the verbose reporter, so its log had no test times. It keeps its hand-written shards (slowest measured job 8:03) and now runs with --reporter=verbose, so a later pack can measure it. Durations from runs 46268858514 (985b804), 46265370483 (a845b55), and 46261301537 (14f1d34). Co-authored-by: Isaac <no-reply@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch makes a gap-CLI count cut decide its outcome from the cut itself, not from which tests happened to run, and it bounds every history's wall-clock backstop. It also carries the merged work of the side branches fix99-attr, fix99-b4 and main (through #176, #195 and #206). The branch is a draft and is not ready for review yet: one known random-seed failure is open (below), and the precedence constructed histories are not yet in the oracle.
What changed
backstopOf(model) andlimitFor(check) give each history a backstop of three times its longest legal wait, at least 10 s. A mutant's hang that keeps a test-owned timer alive ends at that backstop as a gap. No legal history reaches it (M 2026-11-23, "Backstops are fine, set high").judgeMutant,judgeAuthored) and the e2e model (kindOf,judgedKind) label a count cut that a clock can reach asindeterminate, whichever sibling tests ran before it. An unclocked count cut is a kill by the built-in law (bounded work or no progress), not atimeout(M-24:timeoutis only the backstop).blockedby that law (cutin the model'sjudge,spunByandblockersOfin check and classify, from feat(oracle-gaps): block per law: a failing law judges nothing, and its file's passing laws still judge #176); (2) a clocked cut isindeterminate; (3) an unclocked cut is a kill. Step 1 is implemented on the merged branch. Steps 2 and 3 are the existing rules above.pairfield. main through b3dbde0 (feat(oracle-gaps): block per law: a failing law judges nothing, and its file's passing laws still judge #176, fix(oracles): use NoInfer in oracleProperty options for contextual typing #195, ci: docs-only PRs skip the heavy jobs #206), resolved by hand in 7915274, aa39b43 and 7038156 (see the commit messages for each resolution, including the re-recorded fingerprint lines).needs/ifon every heavy job.Fixes
a reset check after its warm daemon was replaced:delete-calltimeout, owed indeterminate). Evidence: the count-cut rule above; the GREEN units in the Arca runs r99-green-fixed-1..4, r99-green-det-1..7, r99-green-random-1..4 (0 failed), and the merged-head CI run 45376762468 (60 of 60 jobs succeeded).a drawn base of 'a declaration fault: apiLessTypescript' judges a mutant as timeout, owed indeterminate). Evidence: the same rule, since the model now owesindeterminatefor a clocked cut in the same way; the fixed-seed shards of run 45376762468 pass.w_hangkill if-false killed by no progress, owed bounded work). Evidence: thew_hangpairwitness (fix99-b4, f52c9c4) and the timing-independent rule; the fixed-seed shards of run 45376762468 pass. Not reproduced here as a dedicated RED.Attributions and open items
fix99-stop. It reproduces only on fix(oracle-gaps): no wall-clock cut decides an outcome #99: 4 of 20 replays fail on the fix(oracle-gaps): no wall-clock cut decides an outcome #99 head (3d73de4), and 0 of 20 on main (fbb99aa). The fault is in the stop path:--stop-daemonreturns success while a daemon holds the lock but does not answer (daemon.mjs is unchanged from main; fix(oracle-gaps): no wall-clock cut decides an outcome #99's timing exposes it). A harness-side repeat of the stop was tried and reverted (15 of 40 failed). The fix will be merged fromfix99-stopwhen ready. Not blocking until then, but it blocks readiness.Per-job times (merged head 7038156, run 45376762468, 60 jobs)
Every other job is under 10 minutes. The table lists the jobs above 6 minutes, the random and determinism shards, and every job over 10; the run page has all 60.
Limits
judgeAuthored, model's authored branch) uses the same clocked-cut label; a failing law's spin on an authored mutant is not covered by a constructed history.limitsstring follows main's rewrite, with a sentence for fix(oracle-gaps): no wall-clock cut decides an outcome #99. The fuller list is here.fix99-stopmerge.This pull request and its description were written by Isaac.