Repository navigation
feat(oracles): module-level data is ownable; an owned function that reads it owns it - #21
Merged
Merged
Conversation
…ariable (F10) A top-level variable whose initializer is not a function is its own unit: a function that reads it brings it, and what its initializer refers to, into its reference tree; an owns entry may name it; a whole-file entry owns it. Its mutants were always unowned before. Co-authored-by: Isaac <no-reply@databricks.com>
…uished Law 4 classes a surviving logical-operator mutant as not-distinguished. The model applied that only to the old probe form's &&, so a probe in another shape (the former form, or a guard of another name, let, or initializer) was owed not-observed. The F10 grammar's fixed seed reached it: src/sut.ts:f0:34:binary-swap#0: not-distinguished, owed not-observed. Co-authored-by: Isaac <no-reply@databricks.com>
No hook is installed under the gap CLI, so `?.()` never evaluates the condition it is passed, and `process` is defined, so a guard's `false` is never read. The model reached both. The F10 grammar's fixed seed reached it: src/sut.ts:f0:34:binary-swap#2: unreached, owed not-observed. Co-authored-by: Isaac <no-reply@databricks.com>
…ement (F10 review) A function that module data's initializer holds, such as an object literal's method, is a unit of its own, owned where something refers to it: reading one member no longer owns every function inside the object, and the initializer's references are read outside the functions it holds. A top-level for loop's variable is no unit. (The F10 commit said data mutants were always unowned before: a whole-file entry owned them.) 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
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
commit: |
Co-authored-by: Isaac <no-reply@databricks.com> # Conflicts: # packages/oracles/oracle-gaps/gap-report-model-oracle.mjs
This was referenced Nov 11, 2026
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
A mutant inside module-level data had no owner. An ownership unit was a function only, so the report classed such a mutant
unownedand never judged it. Two field reports show the gap: the table thatparsereads in vercel/ms (31 field-drop mutants), andDEFAULT_DELIMITERin path-to-regexp.This change makes module-level data an ownership unit:
src/x.ts#UNIT_MS).devBuildin[devBuild].T.a()ownsa, not the other methods ofT.ownsentry may name the declaration directly.Decisions for the maintainer
ownsentry may name a data unit (src/x.ts#TABLE), as it names a function. The refusal message now says so. A refusal would reject a name that the report prints in keys.api.run()onconst api = { run() {}, other() {} }bringsapiandrun, notother.src/x.ts#<module>:...tosrc/x.ts#NAME:..., so saved keys move once. Before, these mutants had no owner unless a whole-file entry owned them.const h = memo(() => …)now belongs to unith, not<module>. The grammar does not generate this form.Review round
The review of head 8d5187e found three problems. This PR corrects all three.
for (let i …)loop variable became a data unit. Now its code stays in<module>.Changes
owners.mjs:functionsInlists module-level data as units, andreferencesOfreads a unit's initializer as a function body. The production change is 20 lines.analysis.mjs: the bad-entry refusal names module-level variables too.gap-report-model-oracle.mjs: a grammar dimension for module data, with areadDatastatement and adataOwnersfield. The model gives each declaration its sites and owners, and treats data sites as code that runs at load. The model's refusal and both drivers shareownsNothing.Model corrections
The new grammar changes the generated histories. On its first run, the pinned seed of the end-to-end oracle found two reachable counterexamples. Commits 8cb57a0 and 8d5187e correct them. Both were older model defects, not production defects. Authority: law 4's class list and its unreached rule.
nearProbe) has a logical&&. Law 4 classes itnot-distinguished, but the model classed itnot-observed(src/sut.ts:f0:34:binary-swap#0).falsenever run. Law 4 classes themunreached, but the model reached them (src/sut.ts:f0:34:binary-swap#2).Merge note
The merge with main had one conflict, in the model's
refusal(). The resolution keepswithheld: declareOraclefrom #17 andownsNothingfrom this PR.Evidence
owners.mjs, maintainer decisions of 2026-11-05 and 2026-11-08). This change applies the law to module-level data. Authority for the extension: the coordinator's F10 brief, from the field reports.usedread, fails at lawownership:src/sut.ts:spare:31:arithmetic-swap#1: owned, owed unowned.npx vitest --run --config oracle-gaps/vitest.config.mjs gap-report-static-oraclefails at lawenumeration. The CLI namessrc/sut.ts:<module>:30:field-drop#0, but the model owessrc/sut.ts:D_OBJ:30:field-drop#0.ownership,src/sut.ts:spare:31:arithmetic-swap#1: owned, owed unowned.enumeration.ownership,src/sut.ts:D_OBJ:30:field-drop#0: unowned, owed owned.ownership,src/sut.ts:devBuild:4:binary-swap#0: unowned, owed owned.constshapes, read in place, and one top-levelforloop. It does not generate these forms:<module>const h = memo(() => …), which is now unithletdata, enums,export defaultobjects, andmodule.exports = { ... }This pull request and its description were written by Isaac.