Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
d73e44b
chore: pin @tanstack/oracles and eslint-plugin-oracles at 84cd34a
Nov 11, 2026
3b8217f
test: drop the removed legacyCampaigns setting and its merge-base gate
Nov 11, 2026
499f257
test(query-db-collection): declare the failing-Query reach on the enu…
Nov 11, 2026
ee08da2
docs: delete the stale legacyCampaigns instructions
Nov 11, 2026
869019e
test: give each declareOracle conversion group its own property regis…
Nov 11, 2026
051c36d
style: format the conversion registry index
Nov 11, 2026
b854b35
test: split the query conversion group in two and fold indexed-db int…
Nov 11, 2026
e500ddf
test(db): delete redundant declareOracle calls in four query oracles
Nov 11, 2026
2f56997
test(db): drop declareOracle from includes companion modules and redu…
Nov 11, 2026
50ef696
test(sqlite): delete declareOracle calls whose files already register…
Nov 11, 2026
b2b2f09
test(frameworks-ivm): delete declareOracle calls and their dead parts
Nov 11, 2026
02ee633
test(db): delete declareOracle calls from db-core companion modules
Nov 11, 2026
d857a06
test(sqlite): rename the Playwright oracle specs to witnesses and del…
Nov 11, 2026
868c491
test(db): rename IndexedDB Playwright oracle specs to witnesses
Nov 11, 2026
49e43ad
test(db-ivm): register the Temporal group key cases through oraclePro…
Nov 11, 2026
29b0a04
test(db): register the includes space, outer-join route work, and IN …
Nov 11, 2026
0916176
test(adapters): remove declareOracle calls and pass owns through wrap…
Nov 11, 2026
0d913fa
test(sqlite): register the jsdom OPFS open outcome histories through …
Nov 11, 2026
688a47b
test(db): register functional projection oracle cells through oracleP…
Nov 11, 2026
8d0122e
test(db): register load-subset, join-key, and WHERE oracle tests thro…
Nov 11, 2026
55b6ecf
test(sqlite): register the Electron readiness and follower histories …
Nov 11, 2026
c3fc3d2
test(db): register proxy detachment cases through oracleProperty
Nov 11, 2026
7427425
test(db-ivm): register the hash identity witnesses through oracleProp…
Nov 11, 2026
651378e
test(db): register proxy iteration cases through oracleProperty
Nov 11, 2026
127c9f6
test(db): register pooled live-query oracle tests through oracleProperty
Nov 11, 2026
f916b39
test(db): register proxy native-method fixed rows through oracleProperty
Nov 11, 2026
d5c605e
test(sqlite): move the expression-index grammar calibrations out of t…
Nov 11, 2026
ba0e582
test(db): register proxy native-row cases through oracleProperty
Nov 11, 2026
1225f87
test(db): register optimistic includes witnesses through oracleProperty
Nov 11, 2026
cd6ff45
test(db): register loader, mixed-index, and derived-delete oracle tes…
Nov 11, 2026
d521c3e
test(db-ivm): register the incrementalization named cells through ora…
Nov 11, 2026
c3b8627
test(sqlite): make the dropped-cause diagnostic witness a calibration…
Nov 11, 2026
0f88805
test(db-collection-e2e): remove declareOracle from the shared e2e suites
Nov 11, 2026
48e6d27
test(db-ivm): register the structural identity witnesses through orac…
Nov 11, 2026
eb15c0f
test(sqlite): register the real Electron reload checkpoint through or…
Nov 11, 2026
e360ee9
test(db): register cross-formulation fixed histories and cases throug…
Nov 11, 2026
d32864e
test(db): register proxy revert fixed histories through oracleProperty
Nov 11, 2026
dd25652
test(db): register ordered replay regressions through oracleProperty
Nov 11, 2026
401c9c0
test(db-ivm): register the distinct replay through oracleProperty
Nov 11, 2026
aa50596
test(db): register flat change tracking pinned histories through orac…
Nov 11, 2026
ba1a08b
test(db): register layered publication cases through oracleProperty
Nov 11, 2026
d706e9b
test(sqlite): register the SQLite typed-value histories through oracl…
Nov 11, 2026
60aa401
test(db-ivm): register the Index refinement regressions through oracl…
Nov 11, 2026
722e847
test(db): register index-path and custom-index-order oracle tests thr…
Nov 11, 2026
03213dd
test(offline-transactions): register the plain oracle tests through o…
Nov 11, 2026
1d12edb
test(db-ivm): move the top-K window checker calibrations to an ordina…
Nov 11, 2026
774c258
test(react-db): register the plain-test sites through oracleProperty
Nov 11, 2026
95e5c00
test(db): register includes temporal fixed histories and cases throug…
Nov 11, 2026
45886e6
test(db): register aggregate select regressions through oracleProperty
Nov 11, 2026
49e3348
test(vue-db): register the publication cases through oracleProperty
Nov 11, 2026
cc9c556
test(db): register window-history fixed inputs through oracleProperty
Nov 11, 2026
3bf9cdf
test(db): register exact loadSubset demand tests through oracleProperty
Nov 11, 2026
4ec25c1
test(db): register includes query-shape fixed histories and calibrati…
Nov 11, 2026
1075a46
test(db): register optimizer semantics oracle tests through oraclePro…
Nov 11, 2026
e882f6a
test(db): register subquery user-value histories through oracleProperty
Nov 11, 2026
ab448b4
test(db): register cursor matrices and calibrations through oraclePro…
Nov 11, 2026
987e985
test(db): register Duration equality cases through oracleProperty
Nov 11, 2026
7c9965f
test(db): register query identity output-shape tests through oraclePr…
Nov 11, 2026
1751df4
test(db): register route-context transport cells through oracleProperty
Nov 11, 2026
f15a550
test(scripts): register the release-comment cases through oracleProperty
Nov 11, 2026
b67ff53
test(db): register ordered-work oracle tests through oracleProperty
Nov 11, 2026
42928b5
test(db): register index suggestion scenarios through oracleProperty
Nov 11, 2026
62b3d4e
test(sqlite): register the demand coverage storage-fault and release …
Nov 11, 2026
5e1e630
test(db): register IR identity output and operator-code tests through…
Nov 11, 2026
754b87e
test(db): register pagination oracle tests through oracleProperty
Nov 11, 2026
091a969
docs: oracle files register only through oracleProperty; owns goes on…
Nov 11, 2026
a700372
Merge the db-collection-e2e conversion into the declareOracle removal
Nov 11, 2026
f7fcf2c
test(db): register BTree Map cases and calibrations through oraclePro…
Nov 11, 2026
03ea3f6
test(db): register db-collection oracle tests only through oracleProp…
Nov 11, 2026
3a9cfc3
test(db): register Effect virtual-field histories through oracleProperty
Nov 11, 2026
1cff9ee
test(sqlite): register the persisted demand coverage cells and fixed …
Nov 11, 2026
bf07508
test(sqlite): register the shared-driver fairness fixed histories and…
Nov 11, 2026
b41a33b
test(db): register comparison witnesses and calibrations through orac…
Nov 11, 2026
964ca8a
test(db): register ordered-source loader state tests through oraclePr…
Nov 11, 2026
4c72805
test(db): turn the cross-formulation replay calibrations into native …
Nov 11, 2026
ed07208
Merge the db-collection conversion into the declareOracle removal
Nov 11, 2026
bc9860d
test(db): register virtual-field input and public-type cases through …
Nov 11, 2026
faa8a40
test(sqlite): restore the demand coverage storage-fault and release s…
Nov 11, 2026
5b66ac8
test(db): required lifecycle coverage is declared reach of its enumer…
Nov 11, 2026
0f9a2eb
test(db): register index-update cases and calibrations through oracle…
Nov 11, 2026
e99dfe0
test(db): make indexing-reuse calibrations ordinary tests
Nov 11, 2026
79d6d9b
test(db): register transaction and mutation oracle cases through orac…
Nov 11, 2026
5b6d829
test(db): register virtual-field publication histories through oracle…
Nov 11, 2026
971235c
test(db): register lifecycle, bucket-facade, and cold-join oracle tes…
Nov 11, 2026
30385c0
test(sqlite): register the multi-tab Electric storm and fixed histori…
Nov 11, 2026
5f07caf
test(sqlite): register the ordinary-transaction fixed histories and m…
Nov 11, 2026
90c5d72
test(db): register Collection-valued includes fixed histories, cases,…
Nov 11, 2026
cc41cb8
test(db): register IndexedDB and live-query observer cases through or…
Nov 11, 2026
41f0c58
test(db): register alias-shadowing oracle cells and fixed histories t…
Nov 11, 2026
8113fa8
test(sqlite): register the per-collection coordinator fixed histories…
Nov 11, 2026
47c777d
test(db): fix the type inference of converted calibrations and move t…
Nov 11, 2026
82e783a
test(db): register includes work-counter fixed histories and calibrat…
Nov 11, 2026
b6315eb
Merge the db-core conversion into the declareOracle removal
Nov 11, 2026
5657b6c
Merge the db-query-ordered conversion into the declareOracle removal
Nov 11, 2026
6aa5c8f
Merge the frameworks-ivm conversion into the declareOracle removal
Nov 11, 2026
d3069b4
test(db): type the work-counter window histories and calibration plans
Nov 11, 2026
bef1352
test(db): register includes recompute fixed histories and cases throu…
Nov 11, 2026
3a874db
test(db): the shared infinite-query suite is an ordinary module; its …
Nov 11, 2026
b1ff291
chore(eslint): apply the oracle rules other than no-unit-test to ever…
Nov 11, 2026
3c0899c
test(sqlite): register the persisted oracle's plain tests through ora…
Nov 11, 2026
0e1a173
style(db): format the includes space oracle
Nov 11, 2026
e8743d8
test(query, convex, conformance): register the plain oracle tests thr…
Nov 11, 2026
08f44a0
test(electric): register the plain oracle tests through oracleProperty
Nov 11, 2026
f716daf
docs: name the renamed witness and calibration files
Nov 11, 2026
2a8bef5
Merge the sqlite conversion into the declareOracle removal
Nov 11, 2026
da58029
test(db-sqlite-persistence-core): the storage-fault and release sweep…
Nov 11, 2026
1f2a036
test(browser-db-sqlite-persistence): adapter-bound RPC routing is a f…
Nov 11, 2026
aa6adf6
test(db-sqlite-persistence-core): each fixed ordinary-transaction cas…
Nov 11, 2026
51d0f54
docs: name the renamed browser witness specs; delete the unused descr…
Nov 11, 2026
3dc838c
Merge the db-query-includes conversion into the declareOracle removal
Nov 11, 2026
d44ec8d
test(db): drop the dead includes calibration hooks; enumerated replay…
Nov 11, 2026
2b4cf82
test(db): the replay manifest knows the converted enumerated sources …
Nov 11, 2026
2c2ed80
docs: name the #2139 known-defect witness file in the coverage map
Nov 11, 2026
955ccac
Merge the adapters conversion into the declareOracle removal
Nov 11, 2026
38faaca
test: drop the generated-construction guard that the native reach cal…
Nov 11, 2026
9b9f591
test: one calibration-rejection module for every package
Nov 11, 2026
5cfa0c7
docs: AGENTS.md and the oracle-authoring skill state D2, wrapper owns…
Nov 11, 2026
ce909f4
test(db): delete the oracle-declaration shim; the conversion registry…
Nov 11, 2026
472c787
docs: record the declareOracle conversion: moved tests, witnesses, kn…
Nov 11, 2026
e532187
chore(deps): pin @tanstack/oracles and its lint plugin to f8a58a3
Nov 11, 2026
976ea0f
Merge origin/main into oracle/remove-declare-oracle
Nov 11, 2026
f5aaf3e
chore(lint): a reviewed, exact, shrink-only exception list for the ei…
Nov 11, 2026
bce80f7
test: fix the f8a58a3 type checks, and register the merged sync-metad…
Nov 11, 2026
2a7eb94
test(convex-db-collection): give the public-pagination determinism te…
Nov 11, 2026
1250559
test: type the converted properties' plans, and the lint-scope oracle…
Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 19 additions & 6 deletions .agents/skills/oracle-authoring/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,28 @@ Follow the subsystem reading requirements in AGENTS.md.

Name the production code that the oracle judges in `owns` on each
`oracleProperty` call, as an inline literal array; the law has no owner field.
A file that registers through a wrapper passes the list in the wrapper call's
options literal, and the wrapper forwards it to `oracleProperty`.
The [oracle guide](../../../docs/contributing/oracle-rubric.md#name-oracle-files-consistently)
states the form that the gap report reads.

Keep unit tests and standalone concrete type assertions out of oracle files
(ORC-016). Fixed regressions are inputs to the same model, production driver,
and comparison as the broader campaign, without their own expected answers.
Compile-time oracles generate legal TypeScript inputs and compare public types
with a reusable independent law; a matrix of fixed assertions does not satisfy
this requirement. Supplemental examples belong in ordinary test files.
An oracle file registers its tests only through `oracleProperty`; the
`oracle/no-unit-test` rule reports any other registration. Keep unit tests and
standalone concrete type assertions out of oracle files (ORC-016). A fixed
regression is a `histories.fixed` entry, or a history of an enumerated
property with the same driver, model, and check, without its own expected
answer. A finite table of cases is an enumerated source; a check that rejects a
wrong answer is a `calibrations` entry; a reach check over fixed scenarios is
an enumerated source with declared `states`. Never register a list of closures
under one property. Compile-time oracles generate legal TypeScript inputs and
compare public types with a reusable independent law; a matrix of fixed
assertions does not satisfy this requirement. Supplemental examples, model-rule
expectations, and grammar-size checks belong in ordinary test files. An
`it.fails` witness of a known defect goes in an ordinary
`<subject>-known-defects.test.ts` that reuses the oracle's driver and check,
with the defect open in the coverage map. A spec for a runtime where
`oracleProperty` cannot load, such as Playwright or a bundled WebView suite, is
a receiving witness named `*-witness.*`.

Use the [instrument library](../../../docs/contributing/instruments/index.md)
when there is a material uncertainty. Select cards within the authorized task;
Expand Down
48 changes: 32 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,15 +747,20 @@ entry, contract comment, or table of fixtures does not turn examples into an
oracle.

Keep a fixed regression as input to the same model, production driver, and
comparison that the generated campaign uses. It must not carry a separate
expected answer or its own assertions. Checker calibration may supply a wrong
observation to that same comparison. Put supplemental unit tests in ordinary
test files; they do not discharge an oracle-owned coverage obligation.
comparison that the generated campaign uses: a fixed history
(`histories.fixed`) of that `oracleProperty`, or an enumerated property with
the same driver, model, and check when the grammar cannot produce it. It must
not carry a separate expected answer or its own assertions. A checker
calibration is a `calibrations` entry that supplies a wrong observation or a
mutant driver to that same comparison. Put supplemental unit tests, and
expectations that step only the model, in ordinary test files; they do not
discharge an oracle-owned coverage obligation.

For compile-time contracts, generate legal TypeScript inputs and check their
public types against a reusable independent type law. A list of
`expectTypeOf` calls or `@ts-expect-error` examples is not an oracle. Negative
checks derived by the shared law from generated inputs are permitted.
public types against a reusable independent type law, with an `oracleProperty`
whose driver runs the type checker. A list of `expectTypeOf` calls or
`@ts-expect-error` examples is not an oracle. Negative checks derived by the
shared law from generated inputs are permitted.

### Name Oracle Files for Discovery

Expand All @@ -765,17 +770,28 @@ Modules that define the model, checker, or its history grammar also qualify.
Identify the actual mechanism before renaming a file. A coverage-map entry,
contract comment, or collection of fixed assertions is not sufficient evidence.

An oracle file holds only oracle tests. It declares its check, model, and
history grammar with `declareOracle` from
`packages/db/tests/oracle-declaration.ts`. A type-level oracle names its model
types in `typeModel`. Each part is optional. Every test in the file must use a
declared part, directly or through a production driver, or run a generated
property that states its law inline. A test that compares production with a
hand-written value is a unit test: put it in an ordinary test file. The
`oracle/no-unit-test` lint rule reports a test that does neither.
An oracle file holds only oracle tests, and it registers them only through
`oracleProperty`, which takes the check, model, history grammar, and driver.
Its fixed regressions and cases are its histories, its calibrations are its
`calibrations`, and its reach checks are its declared states. Every other
test belongs in an ordinary test file, including a test that compares
production with a hand-written value and a test that steps only the model.
The `oracle/no-unit-test` lint rule reports every other registration in a file
whose name contains `oracle` (maintainer decision, 2026-11-11).

Two kinds of test files support an oracle without being oracle files. An
`it.fails` witness of a known defect goes in an ordinary
`<subject>-known-defects.test.ts` that reuses the oracle's driver and check;
the coverage map records the defect as open and names the file. A spec for a
runtime where `oracleProperty` cannot load, such as a Playwright spec or a
suite that a WebView app bundles, is a receiving witness named `*-witness.*`:
it compares production with its oracle owner's shared check, and every oracle
lint rule except `oracle/no-unit-test` applies to it.

Name the production code that an oracle file judges in the `owns` list of each
`oracleProperty` call, written inline as a literal array. A law has no owner
`oracleProperty` call, written inline as a literal array. A file that registers
through a wrapper passes the list in the wrapper call's options literal, and
the wrapper forwards it to `oracleProperty`. A law has no owner
field; code ownership belongs to CODEOWNERS. The oracle rubric's
[naming section](docs/contributing/oracle-rubric.md#name-oracle-files-consistently)
states the form that the gap report reads.
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ crossing subsystem boundaries; these comparisons are not interchangeable.
| differential law | A law that compares observations from two production paths at a checkpoint where the contract owes the same answer. It uses no reference model. |
| receiving path | A further production path, such as a real host, SDK, browser, or provider, that shares an oracle's reference model and refinement check. A receiving witness is the evidence that the path ran and was compared. |
| oracle owner | The file that owns a law's judgment, as listed in the coverage map. Always qualify it; owner alone is a product term. It is not a field of the law: an `OracleLaw` has no owner, and code ownership by people and teams belongs to CODEOWNERS. |
| owned code | The production code that an oracle file judges in the gap report, named by the `owns` list of its `oracleProperty` calls: a source file, or a function with its static call tree. A file with no inline `oracleProperty` call names it in `declareOracle({ owns })` during the migration. |
| owned code | The production code that an oracle file judges in the gap report, named by the `owns` lists that it passes to its calls: its `oracleProperty` calls, or a wrapper's call that forwards the list to `oracleProperty`. An entry is a source file, or a function with its static call tree. |
| decision record | A recorded maintainer decision with an id, date, scope, and text. A law or a limit cites it as its authority. Production output is never authority. |
| limit | A declared statement of what an oracle does not establish, such as a state, dimension, production path, or comparison that it does not cover. It names an oracle owner and a decision record and reports whether it was in effect. A tool-detected hole is a gap, not a limit. |
| gap | A hole that a tool or review detects, such as a declared state that was never reached or a mutant that survived. A reach gap closes when generated histories meet the declared state's enforced minimum under ORC-015. A mutant gap in a changed function closes with an oracle kill or an explicit maintainer allowance for its anchored gaps. Recording either as a limit does not close it. Qualify it; a sequence gap is a product term. |
Expand Down
64 changes: 42 additions & 22 deletions docs/contributing/oracle-coverage.md

Large diffs are not rendered by default.

Loading