Repository navigation
fix(oracle-gaps): infect nullish ?. receivers and classify swallowed throws - #60
KyleAMathews wants to merge 5 commits into
Conversation
A plain read in place of ?. changes its completion (a TypeError where the original returned undefined), but the capture never recorded it, so the mutant was skipped as unchanged and reported not-distinguished in 0 s. Law: a mutant is judged without a run only when every owner's unmutated run completes its site as the original does. Witnesses w_absent and w_absentNull (undefined and null receivers) declare the crashed reach states. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
The model gets a caught witness (w_swallow): its owner catches the TypeError a mutated ?. throws and writes nothing, so the test passes. Law: a survivor of an optional-chain site whose owner test threw at the site is swallowed-throw (never a skip, never an exit). Reach state: a plain read whose throw the owner swallowed. Oracle-only commit; production follows. Co-authored-by: Isaac <no-reply@databricks.com>
|
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. |
|
…ixture contains A caught optional read is rendered without its out.push, so it has no delete-call site on that push. The model still emitted one, expecting a gap the CLI cannot produce (126 expected, 125 printed), and every static enumeration unit with a caught witness failed and shrank for 41 minutes in CI (gap report oracles 2/3). This corrects the model's internal consistency to its own rendered fixture. It is not a model change toward production output: no expected class or outcome changed, only the set of sites the fixture contains. Co-authored-by: Isaac <no-reply@databricks.com>
…ment The CLI anchors the site in the statement that holds it, which for a caught read is its own expression statement (void oN ?. v ;), not the try line. The model named the try line, so the static generated units failed on the key. This changes only the model's rendered anchor text, to match the fixture it renders; no expected class or outcome changed. Co-authored-by: Isaac <no-reply@databricks.com>
Summary
The gap CLI skipped a mutant of an optional read (
?.) as "changes nothing" and reported itnot-distinguishedin 0 s, although the mutant throws wherever the receiver is nullish. The capture never recorded that completion change, socheck.mjschangesNothingtook the skip path. Reported on quick-lrupeek(this.#node(key)?.value).This PR: (1) makes the capture infect a
?.site whose receiver is nullish, (2) adds aswallowed-throwsurvivor class for a mutant whose owner test caught the thrown error and went on (no skip, no accept-as-equivalent exit), and (3) extends the e2e oracle with the witnesses and reach states that show both.Decisions
Register entries (
~/.cache/oracle-grammar/decisions-register.md) this change touches:swallowed-throwandcrashedare gaps, never kills. A bare throw stayscrashed.fixed seed 20261105: every outcome class; the random seeds are unchanged.swallowed-throwhas one directive that offers no exit ("observe the completion of that read, its value or its error"). "Unchanged" means an equal completion (value or thrown error): the capture now infects a nullish?.receiver, so the mutant runs.absent,caught) are fixed witness fields, not generator draws. Nofcarbitrary changes, so no existing seed's history changes.Evidence
swallowed-throw: it is never skipped and has no accept-as-equivalent exit.fixed seed 20261105: every outcome classdeclares the reach statesa plain read of an absent object crashed,a plain read of a null object crashed, anda plain read whose throw the owner swallowed. Witnesses:w_absent,w_absentNull,w_swallow.?.restored (--only index.js:M66):not-distinguished L119 index.js:M66 ?. → ., 1 gap, 0 killed, 0 s. Local log.w_absentnot-distinguished, owedcrashed. Local log.chain()fix (commit 53966e9). Local log. CI at the production commit: pending.nullwitness), (c) a classifier that labelsswallowed-throwasnot-distinguished. Verdicts: pending.greppable streamlaw ("125 gap lines for 126 gaps") for a generated history. Replays of that history on this branch and on cleanorigin/mainare being run to tell whether the bug predates this PR. Verdict: pending. If it reproduces on main, it goes to its own PR.?.sites can throw under a mutant, so it is?.in practice, by construction. The fixed witnesses are one caught read each (undefined and null receivers), not generated histories. The quick-lru peek mutant is reported from its driver's observed error; a bare throw without observation iscrashed, not a kill. Full gap-oracle run and the pr-shards and e2e-shards checks are not complete locally; CI runs them.This pull request and its description were written by Isaac.