Repository navigation
fix(oracle-gaps): no wall-clock cut decides an outcome - #99
Draft
KyleAMathews wants to merge 197 commits into
Draft
KyleAMathews wants to merge 197 commits into
KyleAMathews wants to merge 197 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
🦋 Changeset detectedLatest commit: dc9a595 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
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>
Conflicts: - oracle-gaps/index.mjs: main's ask protocol (askEnding, exitWritten, the claimed-ending exits and the test seams) with #99's single ending function. Main's endWith body is now `end(endingOf)`, and both `endWith` and the unsupervised `stopNow` go through it, as #99 had them. - constructed-order.json and the property file: main's recorded order, #307's histories after "module data that only the failing owner's passing pair judges", stays the prefix. #99's histories follow it, and #307's blocks were moved to match. - The property's required and own-history state lists: both kept. - pr-shards.mjs: the Windows partition stays packed. The shards are repacked with #307's histories. Fixed seed goes to 6 jobs, random seed to 7 and determinism to 11 (the pr.yml matrices and the packer's floors), predicted 8 to 8.7 minutes each. Checks: both shard checks, the unit suite (124), the fast gap suites (33,995), and the fixed-seed stop, ask, ending and outcome-class histories (25 passed). Co-authored-by: Isaac <no-reply@databricks.com>
… call budget CI on dfd513c (run 46606711709, random seed 6/7): the constructed history "a verdict after a clocked count cut's budget throw does not kill" did not enter its state on seed -849955374. The generated base drew heavy 10000. Heavy calls run in every run, so they raise the file's call budget (100 times its most calls), and the history's 30,000 loops no longer passed it. The copy never spun, so no count cut happened. This is a builder leak, the same kind as the spinData pin in fe5a4a2. The three histories built on soloKill whose loop must pass the call budget now pin heavy: 0, as "an excluded owner's calls are not charged to the work budget" already did: - "a judging test's verdict before a clocked count cut kills" - "a flaky test's loop spins past the call budget as a gap" - "a verdict after a clocked count cut's budget throw does not kill" RED: the seed -849955374 replay on dfd513c ("did not enter"). GREEN: the same replay passes. Removing the pin is the RED. The three histories pass on fixed seed, random seed and determinism (9 passed), and the unit suite passes (124). Co-authored-by: Isaac <no-reply@databricks.com>
…and #311 are fixed The maintainer's decision (register M 2026-11-30, gate 5 BLK-6) makes the Windows end-to-end jobs blocking in #99 if they stay green on its final runs. They did not. "a capture row read while the worker wrote it" missed its torn-row witness (#211, which says it must be fixed before Windows blocks) on run 46615916675, and "a copy waiting on a pipe it opened" broke bounded retention once (#311) on run 46550313215. So `continue-on-error` is back, and the preview no longer waits on the job. It goes when #211 and #311 are fixed. Co-authored-by: Isaac <no-reply@databricks.com>
Gate 6 (P12, R55(a)): determinism 5/11 and 6/11 ran 11.8 and 11.3 min at dfd513c, against a predicted 8.7 min. The packer charges each test its longest measured time, but the determinism jobs ran about 35% over that (observed 689 s against a predicted 507 s with refetched durations), so the split carries that margin: 14 jobs at a predicted 400 s each. The durations are refetched from runs 46615916675, 46606711709 and 46479535603 (run 46550313215 returned HTTP 502). Co-authored-by: Isaac <no-reply@databricks.com>
Law: C 2026-11-24, "Every built-in cut by an excluded test ends the copy as a gap" (blocked by the failing law that caused it), and C 2026-11-23, "Count-cut label precedence", step 1. Reach: constructed history "a failing law's no-progress cut blocks the mutant" (appended last, constructed-order.json). Its failing law hangs with no timer where the mutant changes its output, so the copy is cut as no progress before file b's passing law runs. RED (090361b production, new model): `if-false#0: killed, owed blocked`. GREEN: the history passes. Its neighbours pass across fixed seed, random seed and determinism (15 units): the flaky no-progress history still owes indeterminate, and the spin witnesses still pass. Mutant: the indeterminate mapping (blockersOf's cut path disabled) gives `indeterminate, owed blocked`, and fails. Suites: unit 124/124; fast gap suite 33,995/33,995; e2e shard check passes. pr-shards check fails for the three new names until the gate-6 repack (ci-packed-shards.mjs is not regenerated here). Model: failingLawHangs (constructed only) in the grammar, plan, take-back, and fingerprint. Production: check.mjs's batch cut records spunBy for spin or no-progress cuts, and lawCut no longer requires cause spin. Limits: the authored-mutant path does not pass units to blockersOf, so an authored mutant's failing-law no-progress cut is not blocked yet (not witnessed by the model). Known-limits sentence "A failing law's no-progress cut is a gap (indeterminate), not blocked" removed. Co-authored-by: Isaac <no-reply@databricks.com>
The constructed history "an excluded owner's calls are not charged to the work budget" builds on soloKill and leaves spinData drawn. With spinData true, file b's verdict test spins where it would judge, so b's copy never records the kill the history names. The history then loses its state, and CI job 5/7 (random seed -44091856, path 0) failed on it. Pin spinData: false, as the other one-owner histories that need a verdict do (the lazy-gate history in the same list). Law: an excluded test's calls are not charged to the work budget (M, "An excluded test still runs", 2026-11-23), so b's kill is its own kill, not a bounded-work kill. Reach: the replay of seed -44091856, path 0 reaches the history. RED on the parent commit: the mutant delete-call#0 is indeterminate in the model and killed (bounded work) in production. GREEN with the pin: the replay passes, twice. Pin mutant: removing the pin restores the RED. Sweep: forcing spinData true on the 87 other unpinned constructed histories that build on soloKill or spread the generated base (with spinThrows false, and with spinThrows true) passes every one of them. Limits: one seed and one history. This pin does not resolve the open divergence between the model and production for a spinData spin that the loop before it cuts (the model's clock flag for that spin ignores position, C 2026-11-29). That divergence is reported separately and is unchanged here. Co-authored-by: Isaac <no-reply@databricks.com>
…ndomness wins) caughtVerdict, flakyHang and catchesBudget change what runs, so they are drawn (one in sixteen) and gated once the test record is drawn (gateCuts, applied where the tests array is drawn): flakyHang only on a flaky test, caughtVerdict and catchesBudget only on a judging test. callWork is drawn 0 (30), 2,000 (1) or 20,000 (1), with 20,000 only where the test has no loop, so a generated test makes at most its heavy calls (10,000) plus a few at about 20 us a call (under 0.25 s a run). takenBack passes the drawn fields through with no constant mapping. The fingerprint canary draws them, and history-fingerprint.json is recorded anew (the new fields shift every later field's draws; the canary's constructed-field list is now pendingIo only). Law: a field that changes what runs is drawn (M 2026-11-16, "Randomness wins for new fields"; R54). Only a field that switches a test-only hook stays a constant (pendingIo). Reach (the fixed-seed generated campaign, 2 histories, default seed 20261105): 83 states reached on main, 6 after this change: 79 lost, 2 gained (refused configNull; a refused run whose package lies inside the CLI's directory). The loss is a draw-order shift, not degeneration: - the new draws sit inside each test record, before witness and fault, so the two histories now have witness false (was capture) and fault configNull (was none) in one of them; - marginals over 500 draws, main / after: faultNone 0.288 / 0.284, witnessCapture 0.320 / 0.294, stepsNull 0.948 / 0.952, tests per history 2.94 / 2.94; new-field rates catchesBudget 3.9%, flakyHang 1.3%, callWork non-zero 6.5% (1 in 16 is 6.25%); - ablation: with the same draws and each new field forced to its neutral value after the gate, the reach is 6 for caughtVerdict, flakyHang, catchesBudget, callWork alone and for all four together, and the map is identical to this change's map. No single field or combination causes the drop. - the 79 lost states are all named in the oracle's required lists, which the constructed histories enter (registration fails otherwise). Fixed-seed units: 147 run on this change; 146 pass, and the one failure is "an excluded owner's calls are not charged to the work budget", whose base draws spinData: true after the shift (pinned on fix99-s44, e3b2567). Co-authored-by: Isaac <no-reply@databricks.com>
…tness (G6-B4) The witness "a copy at 99% of its call budget finishes, not a backstop gap" pinned hangMs but not `pair`. A drawn pair (one in five) adds the w_hangpair witness, which cuts the copy at the backstop, so the witness failed about one run in five on a natural draw. The witness now also pins pair: false, and witness, steps, slowStart and contexts, which a drawn base could also change (the same pins the one-owner histories use). Law: a legal copy at 99% of its call budget finishes and survives (C 2026-11-30, "The backstop's margin is 3x over the legal maximum"; M 2026-11-23, "Backstops are fine, set high"). Authority: the witness's own copy, judged by the backstop law. Evidence: - Reach: the constructed witness (one history, fixed seed 20261105 unit). - RED: with pair forced true, the fixed-seed unit fails (property failed; the counterexample's w_hangpair copy is cut at the backstop). - GREEN: with the pins, the same unit passes. - Mutant: pair forced true (the RED above) is the hostile base. - Limits: this pins the 110,000-site witness only. It does not shows the 1,000-100,000 site backstop (G6-B3, see the commit's report): a witness there does not fail on the parent within a few seconds (see below). Co-authored-by: Isaac <no-reply@databricks.com>
…the timer The model's spinData hang branch clocked every spin by its spinThrows timer. But the timer is scheduled after the test's own loop, so when that loop already passes the copy's call budget, the count cut falls inside the loop, before the timer. Production judges that cut unclocked and kills by bounded work; the model owed indeterminate. Law: a count cut is clocked only by what happened before it (C 2026-11-29, "A cut is clocked only by what happened before it"). The model now routes a spinData copy whose loop passes the budget through the same clockedAtCut rule that judges any count cut that spins (f43ee63). A copy whose loop stays within the budget is still cut by its spin, after the timer, and is clocked. Witness: "a spinning copy's loop passes the call budget before its spinThrows timer" (appended last; loops 40,000, spinData and spinThrows on, the base pinned as the one-owner histories pin it). Its companion "a spinThrows timer before a spinning copy's cut keeps the cut indeterminate" (loops 0) keeps the timer-before-cut side. RED (the position-blind rule, this parent): the first witness fails: model indeterminate, production killed (bounded work). The second passes. GREEN: both pass. Mutant: the position-blind rule is the RED above. Replay of excluded owner's history with its pin removed: no outcome mismatch (it fails only the state check, so the pin is still needed for that state). Neighbours (21 names, fixed seed 20261105, random seed -44091856, and determinism) pass. Unit suite 124 passed; fast oracle-gaps suite 33995 passed. Limits: the model keeps the position-blind readsClock and waited terms for the spin's cut. Those are not changed here. Only spinThrows and loop-cut position are in scope. Co-authored-by: Isaac <no-reply@databricks.com>
…eterministic-cuts-c
…ck at the cut Conflicts: the constructed order, the required states and the constructed histories, where both branches appended. Both are kept, fix99-lawcut's first. Co-authored-by: Isaac <no-reply@databricks.com>
…n the 99% witness Conflict: history-fingerprint.json. fix99-g6's regenerated fingerprints are kept, plus fix99-lawcut's failingLawHangs line. The fingerprint test passes. Co-authored-by: Isaac <no-reply@databricks.com>
…o known limits "every outcome class" required the two spinData and spinThrows states from fix99-s44, which only their own constructed histories set up. They are now in constructedOnly, next to the other own-history states. The fixed-seed "every outcome class" unit failed on the merge without this, and passes with it. The known limits now name two open items from the gate-6 fixes: - an authored mutant's failing-law no-progress cut is not yet blocked (fix99-lawcut, c4e5e59); - a spinData spin's readsClock and waited terms still count events after its cut (fix99-s44, b60eb6e). No history reaches either difference. Co-authored-by: Isaac <no-reply@databricks.com>
…nary The Test job's typecheck failed on d5adf79 (TS2365, '>' on unknown and number) in the canary that checks where the deterministic-cuts fields are drawn. Co-authored-by: Isaac <no-reply@databricks.com>
…time (C 2026-11-30) limitFor divided the file's call budget by max(its most calls, CALL_FLOOR), so a file of 1,000 to 100,000 sites had a scale below 100 (the scale is the most calls over CALL_FLOOR, as the budget is floored at 100,000). A legal copy at 99% of its budget takes about 99 times the file's time, and the old backstop was 3 times the scale (below 33 there), so it cut legal copies as backstop gaps (G6-B3). The limit is now the base plus 3000 ms times the file's seconds times 100, with no dependence on the calls: 300 times the file's time. The budget is at most 100 times the calls (at least CALL_FLOOR), so a legal copy's time is about 100 times its file's call time, which the new limit covers. Law: a legal copy finishes; a backstop cut is a gap and never a kill (M 2026-11-23, "Backstops are fine, set high"; C 2026-11-30, "The backstop's margin is 3x over the legal maximum", with the scale of 100 recorded in the register). Limit found: a file with under about 333 calls can have a legal copy beyond 300 times its time, which becomes a gap, never a kill. Witness (constructed, appended last, in the 1,000 to 100,000 site regime): an `if` function of three sites a call, WITNESS_HEAVY = 334 unmutated calls (1,002 sites), and a copy of 32,700 loop calls at 1.2 ms of work each, 99% of its budget. Its unmutated file takes about 0.4 s and the copy about 40 s. Pins: pair, spinData, witness, steps, slowStart, contexts, budget, stopRuns. takenBack maps a constructed heavy count and a callWork the draw does not hold to the neutral value (as loops does), so the constructed value is generatable. Evidence: - Law: as above. Authority: M 2026-11-23; C 2026-11-30 (register, edited). - Reach: the constructed witness (fixed seed 20261105, random seed and determinism routes listed in e2e-shards.mjs). - RED on the parent (the old divisor): the copy is "timeout, owed killed", cause backstop; the state "...in a file of 1,000 to 100,000 sites finishes, not a backstop gap" is not entered (run: 15 s, 1 failed). - GREEN: the witness passes with the new limit (31.6 s). - Mutant: the old divisor (the RED above) fails the witness. - Units: the 58 backstop, slow and hang units (fixed, random, determinism) pass (58 of 58); the unit suite passes 125 of 125; the fast gap suite passes 33,995 of 33,995; e2e-shards check passes. - Limits: scripts/pr-shards.mjs check fails until the CI packed shards are repacked after merge (the new names are in no packed shard; the repack places them, as instructed). The witness is one of about 40 s per route. The limit covers copies up to about 300 times the file's time; a legal copy of a file with under about 333 calls beyond that is cut as a gap. Co-authored-by: Isaac <no-reply@databricks.com>
…le's time Conflicts: the constructed order and the constructed histories, where both sides appended. Both are kept, and the 1,000-to-100,000-site witness goes last. Repacked with the new names. The typecheck, both shard checks, the unit suite (125) and the fixed-seed backstop and outcome-class units pass. Co-authored-by: Isaac <no-reply@databricks.com>
…w lengths CI on 30f438c (run 46643224408, determinism 9/14 and 10/14): two runs of "an internal error while the run's ending awaits its answer" and of "an internal error after the run's ending is written, before the supervisor has it" differed only in stderrLength (2197 against 2253, and 2190 against 2078). The slower run wrote more heartbeat lines (`oracle-gaps: busy …`, 56 characters each), and its progress durations differed. Law 11 makes heartbeats legal and driven by the wall clock, and the driver records relations, not clock readings (src/oracle-property.ts, determinism). So the observation was wrong, not the CLI. The stop observation now records each stream's shape length: the text without heartbeat lines, with durations written as `<s>`. It also records whether each stream is exactly empty, which the stop-before-start check uses. The stream law still judges every line. The model's comment that beats follow the history, not the load, is corrected. RED (30f438c, local): 2 of 3 runs of the ask units failed, and the dumps showed heartbeat-only differences. GREEN: the three ask determinism units pass 3 runs of 3. Mutant: dropping the child's `written` send fails 6 fixed-seed ask units, so the shape still sees a changed ending. The unit suite (125), the fast gap suites (33,995), both shard checks, tsc and eslint pass. Co-authored-by: Isaac <no-reply@databricks.com>
…ple as open, owned by #312 Mutant copies resolve bare imports from the config root (testRoot parent, vite.config.mjs, package-local dependencies), so every copy of file a is a setup error. This predates #99, which does not touch copy resolution. The maintainer ruled (register M 2026-12-01) that it stays open on #312, is named in the gap oracle's known limits, and is fixed in its own PR after #99. testRoot is not pinned, so the defect stays reachable. Co-authored-by: Isaac <no-reply@databricks.com>
…izes every number CI on 5ded600 (run 46667331764, determinism 13/14): two runs of "a stop after the config's service refused the run" still differed in stream shape, by 2 characters on each stream. Dumps show the cause. The `note log` line names the run's scratch directory, whose name is random. The duration rule (`\d+s` → `<s>`) changed its length whenever the random name held a digit followed by s. The shape now replaces the scratch paths with the names the other observations use (`<package>`, `<out>`, `<cli>`), longest first because one contains another. Then it writes every number as `<n>`: durations in s or ms, pids, and counts of time-driven events. The stream law still judges each line. The shape still sees a line added or dropped. Evidence, under a load average of 14 to 21: the five stop and ask determinism units fail 2 to 4 of 5 before the change and pass 3 runs of 3 after it. The stop, warm, ask, supervisor and abort family passes 109 of 109. Dropping the child's `written` send still fails 5 fixed-seed ask units. tsc and the unit suite (125) pass. Co-authored-by: Isaac <no-reply@databricks.com>
Law: a count cut is clocked only by what happened before it (C 2026-11-29, register). The emitter (gap-report-model-oracle.mjs, oracleTestFile's campaign) places every clock read, timer wait, and own I/O completion of a spinData verdict test before its spin loop (6616 to 6661 before the spin at 6701 to 6706), and the loop has no exit. So the position-blind readsClock, waited, waitsIn, and spinThrows terms of a spin cut equal the position-aware judgment there, and the model needs no change. The verdict's re-read after the loop runs only where the spin is not taken. Measure: 300 generated histories (seed 20261201) sampled from the drawn arbitrary, emitted tests/b. 30 have a spinData verdict, 316 spin copies, and none has a clock, timer, or I/O event after its spin. A planted clock read after the spin is flagged in 30 of 30, so the detector sees such an event. The scratch measurement is not committed. Behavior: none. The Known limits sentence "no history reaches that difference" is replaced by this reasoning and its citations. Constructed histories use the same emitter; their order is by structure, not sampled. If an emitter change moves an event after the spin, these terms need the position-aware judgment (clockedAtCut) again. Co-authored-by: Isaac <no-reply@databricks.com>
…m's shape Gate 7 of #99, B1: the stop observation stored each stream's shape length, so two runs whose streams differed by a word of the same length compared equal. It now stores a digest of the shape (sha1, 16 hex digits): the text with heartbeat lines dropped, scratch paths named, and numbers normalized. Exact emptiness stays a separate relation. RED: a CLI mutant that writes "note log" or "note lag" at random (same length) passed the length-based observation. With the digest, the determinism units for the stop histories fail at observation 4 whenever the twins draw different words. GREEN: the stop, warm, ask, supervisor and abort determinism units pass 33 of 33, twice. tsc and the unit suite (125) pass. Also from gate 7: - B4: limitFor's comment said the budget is at most 100 times the most calls; it is 100 times or CALL_FLOOR, whichever is larger. The comment and the known limits now name the band below about 333 calls, where a legal copy can pass the backstop and becomes a gap. The maintainer's words for backstops accept it ("set the timing high enough that if it does get hit it's a) rare and b) something is wrong"; C 2026-11-30). - N-2: the harness comment on --test-timeout no longer claims that Vitest is ordered against every copy's backstop. Co-authored-by: Isaac <no-reply@databricks.com>
Law: C 2026-11-23, "Count-cut label precedence", step 1 (applies to authored mutants too), and C 2026-11-24, "Every built-in cut by an excluded test ends the copy as a gap". A failing law's count or no-progress cut blocks the mutant by that law, and a kill in a later owner's copy does not decide it. Reach: two constructed histories, appended last: "an authored mutant's failing-law no-progress cut blocks it" and "an authored mutant's failing-law spin cut blocks it". File a's failing law cuts the authored copy at its start; file b's passing law would kill the patch. RED (4594f57 production, unshrunk): no-progress `killed`, owed `blocked`; spin `killed`, owed `blocked`. GREEN (this commit): both pass on fixed and random seeds, and the determinism pair; neighbours (57 selected: authored and failing-law tests, fixed, random, determinism) 48 passed, 0 failed. Mutant A (units passed to blockersOf, no cut truncation): both fixed-seed witnesses fail, `killed`, owed `blocked`. Passing units alone is not enough. Production: authored copies are stored in owner-file order (targets sorted); the units after the first failing-law cut are dropped before judging and blockersOf gets the units. judgeAuthored is unchanged: blockedOr maps its timeout to blocked, as judgeMutant does. Model: lawSpinsUnder(fnId, active) serves operator and authored mutants; the authored judgement passes the failing law's cut. Limits: the authored path runs every owner copy (the cut only truncates the judgement). Known-limits sentence on the authored no-progress cut removed. pr-shards check fails for the 8 new names until ci-packed-shards.mjs is repacked (not done here). Suites (from packages/oracles): tsc --noEmit clean; unit 125/125; fast gap suite 33,995/33,995; every outcome class (fixed seed) 3/3; e2e-shards check passes; eslint and prettier clean on changed files. Co-authored-by: Isaac <no-reply@databricks.com>
…ks it Conflict: the gap oracle's known limits. This branch's backstop-band sentence is kept, and fix99-authlaw's removal of the authored-mutant limit is applied. Co-authored-by: Isaac <no-reply@databricks.com>
…he cut Conflict: the gap oracle's known limits. fix99-spinclock's measured reasoning replaces the old spinData limit sentence, and the other sentences are kept. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…ile (#312) Law: a copy runs as its file does (check.mjs copy naming, "so that its imports resolve as the file's do"; G44 mutant copy). Vite falls back to the config root when a bare import's importer is not on disk, and a copy is memory-only, so its bare imports resolved from the root. Witness: random seed 1499477532 ("a declaration fault: noTypescript"), RED on the parent commit with setup-error, owed not-observed; GREEN after the fix, and seed -1166311135 GREEN too. The copy's origin file is recorded when a batch starts and its bare imports resolve from that file. Co-authored-by: Isaac <no-reply@databricks.com>
The model kept running owner copies after a behavioral kill. A later copy whose work passed the mutant's work budget then labelled the kill as bounded work. The CLI stops at the first kill, so the label is a behavioral law. Counterexample: random seed 741195771, a stale authored mutant and a reformat, mutant src/sut.ts:f0:31 value-undefined. Law: the first kill decides the mutant, and no later copy runs. Authority: register C 2026-11-14 "Deterministic cuts, outcome rule" (1); v21.2 C-38 (1) and R49 "the first kill decides"; M 2026-11-06 (the CLI runs no further file after a kill, check.mjs stopOnKill). Production is right, the model is wrong. Reach: a constructed history, "a behavioral kill decides before a later owner's copy passes the work budget" (owner a judges by verdict, owner b makes 30,000 extra calls), declared as required state "an earlier owner's kill decides before a later owner's copy passes the work budget". RED: the constructed history on the parent model fails in the fixed-seed and random-seed units with "killed by a behavioral law, owed bounded work". The seed replay fails with the same difference. GREEN: the constructed history passes in fixed, random and determinism units; the seed replay passes. Mutant: a temporary check.mjs that lets copies run past a kill (no stopOnKill break, no skip-on-kill) makes the fixed-seed unit fail with "killed by bounded work, owed a behavioral law". The random-seed unit passes under that mutant, so it is a weaker witness for this class. Limits: only the first kill is covered for an operator mutant. A kill from an early verdict of a hung copy is also treated as a decisive kill, but no constructed history pins that case. The constructed history draws other fields, so random units may not reach the same copy order. Shard lists: ci-packed-shards.mjs is a generated file. I hand-placed the four new names beside their neighbour and did not run pack, so the next repack from CI durations rebalances them. Co-authored-by: Isaac <no-reply@databricks.com>
…erministic-cuts-c
…the shards "every outcome class" required fix99-s741's new state, "an earlier owner's kill decides before a later owner's copy passes the work budget". Only its own constructed history reaches it, so it moves to constructedOnly, and the fixed-seed "every outcome class" unit passes. The shards are repacked with the new names, which fix99-s741 had placed by hand. 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.