Skip to content

test: register every oracle test through oracleProperty and remove declareOracle - #2421

Draft
KyleAMathews wants to merge 125 commits into
mainfrom
oracle/remove-declare-oracle
Draft

KyleAMathews wants to merge 125 commits into
mainfrom
oracle/remove-declare-oracle

Conversation

@KyleAMathews

@KyleAMathews KyleAMathews commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Register every oracle test through oracleProperty, and remove declareOracle

Summary

@tanstack/oracles deletes declareOracle (maintainer decision, 2026-11-11; TanStack/oracles PR remove/declare-oracle). This PR converts TanStack DB to the two laws that replace it:

  • D2. An oracle file registers its tests only through oracleProperty. oracle/no-unit-test reports every other test registration in a file whose name contains oracle.
  • O1. The gap report reads owns from an object-literal argument of any call in a test file. A wrapper takes owns in its options and forwards it to oracleProperty.

This PR does not change production. git diff -- 'packages/*/src' is empty. It changes how about 1,320 test registrations in 338 oracle files are registered, and it does not change what they judge. Each converted registration keeps its production path, its inputs, its comparisons, and their checkpoints.

The pin of @tanstack/oracles and @tanstack/eslint-plugin-oracles to the merged oracles build is e532187 (see "Pin" below).

Changes

Eight package groups converted in parallel. Each group branched from the same base, and the groups were merged here.

Pattern What happened
Companion modules and redundant calls (about 145 files) The declareOracle call and its import are deleted.
Wrapper registrations registerPersistedStartupConformance, registerCapabilityConformance, registerBaselineLifecycle, registerEagerReloadConformance, registerTrailBaseEager, BrowserCampaign, serializerProp, and registerExecutorEnvironment take owns and forward it. Each caller passes the list that its declareOracle named.
Plain tests in oracle files Converted to oracleProperty forms, using the existing assertion adapter (recordAssertionJudgment / forwardAssertionJudgment). A fixed history is a histories.fixed entry, or a history of an enumerated property with the same driver, model, and check. A table of cases is an enumerated source. A calibration is a calibrations entry, and its mutant driver accepts exactly the rejections that the old matcher accepted. A reach check over fixed scenarios is an enumerated source with declared states.
Tests that run no production, or that compare production with written values Moved unchanged, minus oracleRoute, to ordinary files next to their oracle: 64 new ordinary test files.
it.fails known-defect witnesses Moved to persisted-known-defects.test.ts (#2139) and refetch-ordered-prefix-known-defects.test.ts, which reuse the oracles' drivers.
Specs that cannot load oracleProperty 15 Playwright specs and WebView-bundled suites are renamed *-witness.*. ESLint applies every oracle rule except no-unit-test to them (db/receiving-witnesses).
New property ids All are enumerated sources. They are listed by area in packages/db/tests/property-registry/; oracle-config.ts registers them and oracle-replay-manifest.ts maps their owners.
Removed packages/db/tests/oracle-declaration.ts, includes-calibration.ts, describeUnlessAnyOracleReplay, the replay-gated TANSTACK_DB_ORACLE_CALIBRATION hooks in the includes cross-formulation checks (nothing sets those values), and the generated-construction guard in the scope-omission oracles (the native calibrations cover it).
Docs AGENTS.md, the oracle rubric, the glossary, the coverage map, and the oracle-authoring skill state D2 and O1. They name the witness and known-defect files. The conversion record lists every moved test, witness, known-defect file, and open exception.

Integrator items from every group

Group Item Resolution
db-collection-e2e 3 move ids are enumerated; electric.e2e.test.ts replays under vitest.e2e.config.ts Added to enumeratedProperties and ownerReplayConfigs.
db-collection-e2e 4 suites renamed to *-witness.suite.ts Covered by the witness decision. ESLint block generalized.
db-collection-e2e Witnesses import oracleRoute from @tanstack/oracles/declaration Switched to /route in the pin commit.
db-collection 6 production-running censuses with count minimums Left as plain tests, pending F33 (enforced reach minimums). Listed in the record. They are 6 of the 8 remaining lint reports.
db-collection required-coverage and async-restart-regimes used the closure-runner shape Rewritten as enumerated scenarios with declared states. A mutant that drops one label fails the reach test.
db-collection collection-gc-retention-oracle.test.ts renamed to -calibration Docs updated.
db-core infinite-suite-oracle.ts registered 34 scenarios through it The suite moved unchanged to the ordinary infinite-suite.ts. Its model and publication law are in infinite-suite-laws-oracle.ts. The React, Vue, Svelte, and Preact suites pass.
db-core Docs named old files (value, indexing-reuse, documented-mutations, mutation-confirmation) Updated. Query and Electric still own their own documented-mutations-oracle.test.ts.
db-core P6 move list belongs in the coverage map The conversion record holds it, linked from the coverage map.
db-query-ordered pagination.limit-admission-fixed and 13 index-update.* enumerated ids broke two manifest tests The tests accept the literal id and the enumerated index-update properties beside the 20 generated matrix properties.
db-query-includes directReplayTestName named a random-seed campaign for enumerated includes-* and browser-coordinator.* ids enumeratedProperties is checked first. Replay proof: includes-collection.retired-held-facade replays with -t 'includes-collection\.retired-held-facade > ' and runs its 2 tests.
db-query-includes Dead includes-calibration.ts and calibration environment reads Deleted.
db-query-includes Lost shrink and path-replay assertions in the cross-formulation calibrations The framework self-oracle owns both laws (shrink and replay in oracle-property-self-oracle.test.ts). It does not pin one property's exact counterexample path. That gap is listed in Limits.
db-query-includes CI time (types determinism rerun; in-evaluator 17 → 518 tests) Measured below.
frameworks-ivm svelte descriptor-start-release was not run Run here: 86 passed. It needs a temporary alias of @tanstack/db in a symlinked worktree, and it fails the same way on the base worktree.
frameworks-ivm Duplicate SSR example properties kept Kept, as before (they were duplicates as plain tests too).
sqlite P5 guard at query-scope-omission:53 Removed. The native calibrations cover it (see Removed).
sqlite multi-tab-electric it.fails for #2267 and #2209 Open exception. The driver closes over describe state. Recorded with traces, for a maintainer decision. These are the other 2 lint reports.
sqlite Storage-fault and release sweeps Enumerated sources with declared states (exact reach sets). The fault sweep enumerates up to 16 calls per session, and its baseline history checks that bound. Each release step covers its own database.
sqlite per-collection-coordinator:1619 failed the determinism test The driver resets the controlled fixture in finally, with the functions that the hooks call.
sqlite sqlite-ordinary.fixed-cases: one history over all cases No bound relates two cases, so each case is its own enumerated history. A mutant cap value fails exactly its case.
sqlite describeUnlessAnyOracleReplay unused Deleted.
sqlite Old witness names in the docs and the conformance README Updated.
sqlite #2139 witness file Named in the coverage map.
sqlite Electron e2e owner config Added to ownerReplayConfigs.
adapters P5 guard at scope-omission-reacquisition:29 Removed, the same way as the sqlite one.
adapters Convex e2e owner configs Added.
adapters rejectsAs duplicated in convex and query Merged into packages/db/tests/calibration-rejection.ts.
adapters persisted-capability-conformance-oracle.test.ts owns nothing Kept as an oracle-named file: it registers through the capability oracle suite. The rxdb and powersync files own their adapters, and the conformance package has no adapter source of its own. Its baseline owned nothing too.
adapters Census hooks (refetch-ordered-prefix, electric-sdk-delivery, electric mutation-confirmation, sql-predicate e2e, transaction-settlement) Unchanged, pending F33. Listed under Census minimums.
adapters Refetch known-defect witnesses moved The coverage-map items name the new file.
main (#2418) Merged after the base; sync-metadata-session-persisted-oracle.test.ts (18 sites) and sync-metadata-session-sqlite-oracle.test.ts (1) still had plain fixed tests Each history now runs as an enumerated property through its production path's model, driver, and check from the generated campaigns.
adapters electric.design-witnesses flagged as possibly P6 Three of its four procedures compare production with the model, so they stay. The HTTP-transcript witness compares production with authored values, so it is a follow-up move to an ordinary file.

Evidence

  • Law: D2 and O1 above. Authority: AGENTS.md "Keep Unit Tests Out of Oracles"; the oracle-property-only decisions of 2026-11-09 and 2026-11-10; the maintainer decisions of 2026-11-11 (delete declareOracle; design options D2 and O1).
  • RED/GREEN for the rule and the CLI: in the oracles PR. On this branch, the D2 rule from that branch reports 1,319 sites on the base and 8 here: the 2 known-defect witnesses and the 6 censuses listed under Limits. ESLint with the pinned plugin over every changed file reports only those sites.
  • Ownership: owns-diff over all 299 baseline oracle test files: 282 unchanged and 17 changed, all as expected. 2 changes add the lists that modules held but no tool read: comparison-oracle gains src/utils/comparison.ts, and transaction-serializer gains 5 serializer and outbox entries. collection-metadata-publication already named its list. The other 15 are witness renames, P6-moved files, and the capability conformance caller, none of which is an oracle file any more. 4 of the Playwright witnesses and the opfs-open-outcome e2e witness had owns lists that the gap report could not read before, because Playwright is not its Vitest run.
  • Mutants on integration fixes: dropping a required label fails the required-coverage reach test. A wrong parameter-cap value fails exactly its fixed case. A build() with no obligation fails all six scope-omission calibrations.
  • Tests: each group ran its changed files against before counts from the base worktree, with Type Errors no errors. The counts are in the group reports and are never lower in runtime tests. Here I reran the files that integration changed: lifecycle 257, sweeps 100, resume snapshot 101, coordinator 41, infinite suites 89/47/47/44 and calibration 9, cross-formulation 38, convex lazy paging 34, query calibrations 96, scope-omission 34, solid 276, svelte 259 + 86. The manifest tests pass, except the one that spawns pnpm (see Limits).
  • CI time: the db package's default Vitest run, locally with 2 workers: base 572 s (407 files, 52,734 tests); after merging 7 of the 8 groups, 568 s (432 files, 54,074 tests). A rerun after the final fold (432 files, 54,074 tests, the same result) took 1,151 s. That number is not a comparison: it overlapped a second run of mine and other sessions' heavy oracle jobs on the same machine. Measure the db job in CI on this PR against the 10-minute limit. The virtual-row-fields type properties' raised timeouts (300 s and 120 s) come from the determinism rerun of TypeScript compiles. If CI shows that rerun costing minutes, a framework follow-up can let a property whose driver is a pure compile declare itself deterministic.

Run budgets that check-oracle-run-counts.mjs reports as removed

None is a lowered count. Each campaign moved, or was replaced by native calibrations:

  • load-subset-oracle fixed seed 1656 (200): the grammar-coverage sample runs no production, so it moved unchanged to load-subset-model.test.ts.
  • shared-driver-fairness-oracle fixed seed 165905 (12): the tail-order census moved unchanged to shared-driver-fairness-grammar.test.ts.
  • persisted-oracle fixed seed 2128 (12): the Persistence: a follower shows its leader's rows after a cache-claim rotation #2139 it.fails census moved unchanged to persisted-known-defects.test.ts.
  • sync-metadata-session-oracle fixed seed 2220100 (200): the grammar ablation census moved unchanged to sync-metadata-session.test.ts.
  • includes-oracle census seeds 1725, 1726, 1733, and 1727 (1 each), and includes-work-counter seed 2137 (60): grammar censuses moved unchanged to includes-history-grammar.test.ts and includes-work-counter.test.ts.
  • includes-cross-formulation fixed seeds 1658004 (8) and 1658005 (12) and includes-cross-formulation.equivalence (12): the raw calibration campaigns are replaced by native calibrations of the same properties. The native calibration search is the subject of the pending oracles proposal that binds calibrations to declared histories, so these will migrate again.
  • scope-omission-reacquisition-oracle.ts fixed seed 1313 (1): the removed generated-construction guard's one-sample input. The property still runs fixed seed 1313 with 30 runs.
  • scripts/legacy-campaign-baseline-oracle.property.test.js (20): reported on the base too. Commit 3b8217f on oracle/bump-oracles-84cd34a deleted it, together with the legacyCampaigns gate that it judged, after @tanstack/oracles 84cd34a removed that setting.

Census minimums (pending F33)

These run production and assert count minimums, which the framework's declared reach cannot express yet. They stay unchanged until F33 adds an enforced minimum to a measured state of a generated source with fixed seeds (maintainer decision, 2026-11-11):

  • As plain tests, reported by the lint rule:
    • collection-subscription-lifecycle-publication (at least 5 zero-sign writes, seed 1657005);
    • collection-subscription-replay (more than 0, seed 1756);
    • collection-state-retention ×3 (seeds 86103 and 86104);
    • d2-source-reconciliation (500 samples, seed 1780).
  • As hooks:
    • refetch-ordered-prefix (24, 3, and more than 0);
    • electric-sdk-delivery ×3;
    • electric-oracle mutation-confirmation;
    • the sql-predicate e2e executedCells check;
    • transaction-settlement's restored-history set.

Reviewed exception list (merge now, remove once F33 is in)

Maintainer decision, 2026-11-11: "merge sooner and then remove once F33 is in". registrationExceptions in scripts/oracle-lint-settings.mjs lists the five oracle files that still register plain tests, with exact counts:

File Reports Retired by
browser-db-sqlite-persistence/tests/multi-tab-electric-oracle.test.ts 2 (it.fails, #2267 and #2209) multi-tab driver extraction
db/tests/collection-state-retention-oracle.property.test.ts 3 F33
db/tests/collection-subscription-lifecycle-publication-oracle.property.test.ts 1 F33
db/tests/collection-subscription-replay-oracle.property.test.ts 1 F33
db/tests/d2-source-reconciliation-oracle.property.test.ts 1 F33

eslint.config.js and scripts/agent-lint-feedback.mjs turn oracle/no-unit-test off for these files only. scripts/check-registration-exceptions.mjs, which pnpm lint:oracles runs, lints each listed file with the rule on. It fails when a count differs from the record in either direction, or when the list gains a file or a count rises against the merge-base. Remove an entry when its retiring work lands. The coverage map records the list.

Limits

  • Remaining plain registrations (8): the two multi-tab it.fails witnesses (Electric resume check puts a lagging tab in error when a peer deleted the row it updates #2267, Persisted multi-tab: order source transactions by server position #2209), which need their 520-line driver extracted, and the 6 censuses above. They are on the exact exception list. The coverage map and the conversion record also record them.
  • Calibration shape: the native calibrations of the cross-formulation properties do not assert one property's exact shrunk counterexample or replay path. The framework self-oracle's shrink and replay laws cover those behaviors in general.
  • Witnesses: the renamed Playwright and WebView witness files are not oracle files, so their tests never close a gap.
  • Not run here: real-backend e2e (Convex, Electric with PostgreSQL, collection e2e), Electron, Neon, and browser runs. Each group lists its own. One test in oracle-replay.test.ts spawns pnpm, and in a symlinked worktree pnpm tries to reinstall, so it was not run. It also fails on the base worktree for the same reason.
  • Follow-ups: move the electric.design-witnesses HTTP-transcript procedure to an ordinary file; F33 and the census conversions; extract the multi-tab driver.

Pin

e532187 pins @tanstack/oracles and @tanstack/eslint-plugin-oracles to the pkg.pr.new build of TanStack/oracles f8a58a3 (#33). It changes the manifests and the two lockfile entries' URLs and integrity only; their dependencies are unchanged from 84cd34a. The 4 witness suites import @tanstack/oracles/route.

This pull request and its description were written by Isaac.

Test and others added 30 commits November 11, 2026 07:25
The lockfile changes only the two pkg.pr.new entries: their URLs and
integrity, the plugin's dropped @typescript-eslint/parser dependency, and
@tanstack/oracles' TypeScript alias (typescript-for-tanstack-oracles).

Co-authored-by: Isaac <no-reply@databricks.com>
@tanstack/oracles 84cd34a removed `settings.oracles.legacyCampaigns`
(TanStack/oracles #23): oracle/oracle-property-only reports any value
of it, `[]` included, at line 1 of every oracle file, and exempts no
file. Delete the empty list from scripts/oracle-lint-settings.mjs and
the override in scripts/oracle-campaign-inventory.mjs.

The list no longer exists, so delete the gate that kept it from
regrowing, scripts/check-legacy-oracle-campaigns.mjs, and its oracle,
scripts/legacy-campaign-baseline-oracle.property.test.js
(scripts.legacy-campaign-baseline, run budget 20), with its replay
manifest and property registry entries. `pnpm lint:oracles` now runs
only the oracle lint over every oracle file, which reports any raw
campaign or legacy import. Update the coverage map and the rubric.

Co-authored-by: Isaac <no-reply@databricks.com>
…merated source

query-db.failing-queries checked its aggregate reach, four
model-derived states over the 2592-history enumeration, with a grammar
calibration, because an enumerated source could not declare states.
@tanstack/oracles 84cd34a lets it (TanStack/oracles #19), so declare
them as `histories: { enumerated, states }` and read each history's
states from the model's reach classifier through `reached`. The
property's `reach` test now fails when no enumerated history enters a
declared state, so the calibration and the file's deprecated
declareOracle call are deleted. The law, enumeration, driver, model,
and check are unchanged.

The file now registers only through oracleProperty, so the type-test
collector excludes it, as it does reload-housekeeping-oracle.test.ts.

Co-authored-by: Isaac <no-reply@databricks.com>
legacyCampaigns, its merge-base gate, and the vendored campaign helpers are
gone, so AGENTS.md and the oracle-authoring skill no longer describe them.
Approved by the maintainer (2026-11-11).

Co-authored-by: Isaac <no-reply@databricks.com>
…try module

Parallel conversion branches add oracleProperty ids and replay owners.
Each group edits only its file under converted-properties/, so the
branches do not conflict in oracle-config.ts or the replay manifest.
Integration folds the lists back and deletes the directory.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…o db-core

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…ndant compiler oracles

Co-authored-by: Isaac <no-reply@databricks.com>
… through oracleProperty

M1 for the sqlite group's companion modules and redundant declarations.

Co-authored-by: Isaac <no-reply@databricks.com>
Removes every declareOracle call in the framework adapters, db-ivm, and
scripts groups (M1). The parts that only those calls named, and that
nothing else references, are deleted: expectCyclicPair,
expectDigestsMatchReference, and distinctBucketHistory. The owns lists
that the deleted calls named move to oracleProperty in later commits.

Co-authored-by: Isaac <no-reply@databricks.com>
M1 for the db-core group: remove each declareOracle call and its import
from companion modules and from test files whose owns already sit on
oracleProperty. Every declared part keeps another reference.

Co-authored-by: Isaac <no-reply@databricks.com>
…ete their declareOracle calls

Playwright and Chromium-driven specs cannot register through oracleProperty,
so they become *-witness.* files. Configs and comments name the new files.

Co-authored-by: Isaac <no-reply@databricks.com>
value-oracle.spec.ts and cross-tab-oracle.spec.ts are Playwright
receiving witnesses, so they become *-witness.spec.ts. The value
witness loses its declareOracle call; configs, the replay manifest
owner, and comments follow the new names.

Co-authored-by: Isaac <no-reply@databricks.com>
…perty

Converts the six plain-test sites in temporal-group-key-oracle.test.ts
(P2) into one enumerated property, ivm.temporal-group-key, whose 20
histories name the former cases. Each former body runs unchanged through
recordAssertionJudgment, and owns moves from the deleted declareOracle
call to the property (M2).

Co-authored-by: Isaac <no-reply@databricks.com>
…calibration tests through oracleProperty

Co-authored-by: Isaac <no-reply@databricks.com>
…per calls

Delete each declareOracle call and its import in the adapters group (M1).
Move each declared owns list to the wrapper call that registers the file's
properties, and give the five shared wrapper suites an owns option that
they forward to oracleProperty (M2). The executor-environment module now
exports its registration, which its test file calls with owns. Delete the
two persisted-startup arbitraries that only the deleted call named.

Co-authored-by: Isaac <no-reply@databricks.com>
…oracleProperty

P2: the it.each over open histories becomes the enumerated property
opfs.open-outcome. P6: the grammar reach check moves to
opfs-open-outcome-jsdom-grammar.test.ts, with jsdomReach in a test-free
companion module.

Co-authored-by: Isaac <no-reply@databricks.com>
…roperty

Move the cell-table size checks to the ordinary functional projection tests.

Co-authored-by: Isaac <no-reply@databricks.com>
…ugh oracleProperty

Convert the abort-phase and retired-demand cases to enumerated
properties, replay the join-key fixed histories as fixed histories of
join-result-key.pairs, and replay the WHERE named histories through a
where-predicate.publication-fixed enumerated property. The Kleene model
calibration runs no production, so it moves to an ordinary test beside
an extracted, test-free model module.

Co-authored-by: Isaac <no-reply@databricks.com>
…through oracleProperty

P2: each it.each becomes an enumerated property, electron.ipc-readiness and
electron.follower-settlement, with the same helpers, labels, and timeouts.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…erty

Converts the five plain-test sites in hash-identity-oracle.property.test.ts.
The fixed witnesses, the second-copy seeds, and the shared-subtree seeds
become ivm.hash-identity-fixed (P1b), one history per former seed pair,
with the same drivePair, expectedPair, and checkPair. The digest
collision case becomes ivm.hash-identity-digest-collision with a
digest-only calibration (P3). The fixed-seed census runs no production,
so it moves unchanged to hash-identity-grammar.test.ts (P6), and the
grammar and model that it reads move unchanged to
hash-identity-grammar-oracle.ts. expectPair has no use left and is
deleted.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Replay the getter and Date regressions through a
pooled-live-query.publication-fixed enumerated property, the gcTime
matrix through pooled-live-query.release-timing, and the rejected-cleanup
regression as a fixed history of pooled-live-query.cleanup-admission.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…he oracle file

P6: the grammar calibrations sample the grammar and check the grammar check,
with no production, so they move unchanged to expression-index-grammar.test.ts.
The grammar and its check move unchanged to the test-free companion
expression-index-grammar-oracle.ts, which both files import.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Forward owns from registerIncludesProperty callers to oracleProperty.

Co-authored-by: Isaac <no-reply@databricks.com>
…ts through oracleProperty

Convert the staged-window cells, the mixed-index public-order matrix, the
retained on-demand window, and the queued-batch matrix to enumerated
properties. Turn the driver-row mutation probes into calibrations of
derived-publication.membership-work-fixed. The staged-window grammar
check runs no production, so it moves to an ordinary test beside an
extracted, test-free grammar module.

Co-authored-by: Isaac <no-reply@databricks.com>
Test and others added 22 commits November 11, 2026 09:41
…cleProperty

M1: the five declareOracle calls are deleted. P2 and P1b: each inline case,
table, and fixed history becomes an enumerated property whose driver is the
unchanged body; the 12 non-rotated follower remote-demand rows join that
property's fixed histories (P1a). P6: the grammar reconstruction, named wrong
answers, append-only judgment, and evidence-coupled mutant calibrations run no
production, so they move unchanged to persisted-model-calibration.test.ts.
The it.fails witnesses of known limit #2139 move unchanged to
persisted-known-defects.test.ts. The models, checks, grammar, and follower
drivers they need move unchanged to the companions
persisted-durability-model-oracle.ts and persisted-follower-recovery-oracle.ts.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…ough oracleProperty

Convert the D2 sites in query-db-collection, convex-db-collection and
db-adapter-conformance. Fixed histories and cases become fixed or
enumerated oracleProperty histories that run the file's existing driver
and comparison; each calibration that ran production becomes a
calibration whose mutant counts only the rejections that its old matcher
accepted (calibration-rejection.ts). Model and checker calibrations,
grammar-size checks and unit tests that compare production with written
values move to ordinary test files, with the definitions they need in
test-free oracle-named companion modules. The refetch oracle's two it.fails
loader-defect witnesses move to refetch-ordered-prefix-known-defects.test.ts.
The scope-omission framework guard is left as it was.

Co-authored-by: Isaac <no-reply@databricks.com>
Convert the D2 sites in electric-db-collection. Fixed histories and cases
become fixed or enumerated oracleProperty histories through the file's
existing drivers and comparisons, and production calibrations become
calibrations that count only the rejections their old matchers accepted.
Grammar reconstructions, model rules and checker calibrations that run no
production move to ordinary test files, with their grammars and models in
test-free oracle-named companion modules. serializerProp forwards owns and
fixed histories to oracleProperty.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…s are enumerated sources with declared reach

Each sweep ran one plain test whose body looped over every case and then
asserted the exact reach set. Each case is now its own enumerated history
over a fresh database, and each reach fact is a declared state, so the
enumerated reach test requires every state and fails on any other, which
is the old exact-set equality.

- storage-fault-sweep: the baseline run counted the calls at run time, so
  the source enumerates up to FAULT_CALL_BOUND (16) calls per session and
  timing, and the baseline history fails when a session makes more. An
  index past a session's last call fails nothing and checks nothing, as the
  loop skipped it.
- release-sweep: steps 0 to 24. Each step now covers its own database
  online before the released session-2 load; before, the steps shared one
  covered database, and a released load writes no coverage.

Co-authored-by: Isaac <no-reply@databricks.com>
…ixed-history oracleProperty that resets its fixture

The routing witness ran as a plain test whose fixture the file's hooks
set up and tore down. As a one-history property, the framework's
determinism test runs it twice in one test, so its driver now resets the
controlled fixture after each run, with the same functions that the hooks
now call. The witness body and its comparisons are unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
…e is its own enumerated history

sqlite-ordinary.fixed-cases ran one history whose driver looped over every
size, parameter-cap, and semantic case and then checked the work bounds.
No bound relates two cases: each case's work bound, and the parameter-cap
call counts and largest parameter lists, belong to one case. Each case is
now its own enumerated history through its own adapter, which checks its
semantics first and then its own work, so a RED still names the semantic
failure first. The comparisons and their values are unchanged; a wrong
parameter-cap value fails exactly its case.

Co-authored-by: Isaac <no-reply@databricks.com>
…ibeUnlessAnyOracleReplay

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…s select their cases first

- includes-calibration.ts (runIncludesCalibration) has no caller, and
  nothing in the repository or CI sets TANSTACK_DB_ORACLE_CALIBRATION to
  missing-parent or extra-child, so the replay-gated observation mutations
  in the cross-formulation equivalence and ordered-window checks are
  removed. The native calibrations of those properties carry the same
  hostile observations.
- directReplayTestName checks enumeratedProperties before the prefix
  rules, which named a random-seed campaign that an enumerated source does
  not have (includes-*, browser-coordinator.*).
- local-storage.value-fidelity-fixed is written literally, so the
  manifest test finds its owner by name.

Co-authored-by: Isaac <no-reply@databricks.com>
…and e2e configs

Every property that the declareOracle removal added is an enumerated
source, so the manifest marks each one enumerated, and its direct replay
selects its cases. For example, includes-collection.retired-held-facade
replays as `-t 'includes-collection\.retired-held-facade > '` and runs its 2
tests. The electric move-suite owner and the Electron reload-class owner
replay under their packages' vitest.e2e.config.ts. The manifest tests
accept the literal pagination.limit-admission-fixed id, and the 13 new
enumerated index-update properties beside the 20 generated matrix
properties.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…ibrations cover

query.scope-omission-reacquisition (node hosts and Chromium) kept a plain
it.skipIf(oracleReplayRequested()) test that rebuilt every constructed
history from seed 1313, ran it, and required the check to reject it with
its reach fact removed. The property's fixed seed is 1313, every build()
records its obligations, and its native calibrations "omits state <s>"
remove exactly that reach fact from a constructed history under law
"constructed reach"; each constructed history also runs clean as an
example. So the guard and calibrateGeneratedConstructions are removed.
Mutant: a build() that records no obligation fails all six native
calibrations.

Co-authored-by: Isaac <no-reply@databricks.com>
convex and query each had a copy of rejectsAs. It moves into
packages/db/tests/calibration-rejection.ts beside rejection,
asyncRejection, and clean, and the importers use the path they use for
oracle-assertion-adapter. The replay manifest names the convex e2e
owners' configs.

Co-authored-by: Isaac <no-reply@databricks.com>
…, and witness and known-defect file naming

Co-authored-by: Isaac <no-reply@databricks.com>
… becomes property-registry/

Nothing imports packages/db/tests/oracle-declaration.ts any more. The
per-group registry modules that let the conversion branches work in
parallel stay as data modules by area, renamed to property-registry/: two
of them build their ids from driver tables, so folding them into
oracle-config.ts would duplicate those tables. Every id in them is an
enumerated source.

Co-authored-by: Isaac <no-reply@databricks.com>
…own defects, and open exceptions

Co-authored-by: Isaac <no-reply@databricks.com>
f8a58a3 is TanStack/oracles main after #33, which deletes declareOracle
and renames the ./declaration entry to ./route. The four witness suites
import ./route. The tarballs' dependencies and peers are unchanged from
84cd34a, so only the URLs and integrity hashes change in the lockfile.

Co-authored-by: Isaac <no-reply@databricks.com>
Keeps the f8a58a3 pin over main's 84cd34a. The lockfile is main's with the
pin and its two integrity hashes, because this branch changes no other
dependency.

Co-authored-by: Isaac <no-reply@databricks.com>
@changeset-bot

changeset-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1250559

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
Pre-merge checks: Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Description check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@github-actions

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 199 kB

ℹ️ View Unchanged
Filename Size
packages/db/dist/esm/_virtual/_rolldown/runtime.js 190 B
packages/db/dist/esm/client.js 4.98 kB
packages/db/dist/esm/collection-options-brand.js 215 B
packages/db/dist/esm/collection-options.js 248 B
packages/db/dist/esm/collection/change-events.js 1.64 kB
packages/db/dist/esm/collection/changes.js 2.15 kB
packages/db/dist/esm/collection/cleanup-queue.js 698 B
packages/db/dist/esm/collection/config-errors.js 561 B
packages/db/dist/esm/collection/events.js 441 B
packages/db/dist/esm/collection/health-tree.js 679 B
packages/db/dist/esm/collection/index.js 2.6 kB
packages/db/dist/esm/collection/indexes.js 1.9 kB
packages/db/dist/esm/collection/lifecycle.js 3.59 kB
packages/db/dist/esm/collection/mutations.js 2.29 kB
packages/db/dist/esm/collection/state.js 5.31 kB
packages/db/dist/esm/collection/subscription.js 6.29 kB
packages/db/dist/esm/collection/sync.js 4.94 kB
packages/db/dist/esm/collection/validate-config.js 1.11 kB
packages/db/dist/esm/collection/validate-indexing.js 371 B
packages/db/dist/esm/deferred.js 205 B
packages/db/dist/esm/error-message.js 627 B
packages/db/dist/esm/errors.js 7.14 kB
packages/db/dist/esm/event-emitter.js 698 B
packages/db/dist/esm/index.js 4.68 kB
packages/db/dist/esm/indexed-db-wrapper.js 1.71 kB
packages/db/dist/esm/indexed-db.js 3.55 kB
packages/db/dist/esm/indexes/auto-index.js 890 B
packages/db/dist/esm/indexes/base-index.js 1.69 kB
packages/db/dist/esm/indexes/basic-index.js 1.64 kB
packages/db/dist/esm/indexes/btree-index.js 1.57 kB
packages/db/dist/esm/indexes/index-registry.js 909 B
packages/db/dist/esm/indexes/reverse-index.js 635 B
packages/db/dist/esm/live-query-adapter.js 950 B
packages/db/dist/esm/live-query-observer-client.js 2.14 kB
packages/db/dist/esm/live-query-observer.js 2.85 kB
packages/db/dist/esm/live-query-options.js 2.4 kB
packages/db/dist/esm/live-query-primitives.js 401 B
packages/db/dist/esm/live-query-window-binding.js 1.5 kB
packages/db/dist/esm/live-query-window-controller.js 3.88 kB
packages/db/dist/esm/local-only.js 814 B
packages/db/dist/esm/local-storage.js 3.95 kB
packages/db/dist/esm/optimistic-action.js 320 B
packages/db/dist/esm/paced-mutations.js 1.07 kB
packages/db/dist/esm/proxy.js 3.07 kB
packages/db/dist/esm/query/builder/clone-query.js 845 B
packages/db/dist/esm/query/builder/functions.js 1.52 kB
packages/db/dist/esm/query/builder/group-keys.js 162 B
packages/db/dist/esm/query/builder/include-functions.js 222 B
packages/db/dist/esm/query/builder/index.js 4.83 kB
packages/db/dist/esm/query/builder/query-ir.js 318 B
packages/db/dist/esm/query/builder/ref-proxy-identity.js 284 B
packages/db/dist/esm/query/builder/ref-proxy.js 1.57 kB
packages/db/dist/esm/query/builder/wrapper-identity.js 212 B
packages/db/dist/esm/query/compiler/evaluators.js 2.33 kB
packages/db/dist/esm/query/compiler/expressions.js 582 B
packages/db/dist/esm/query/compiler/find-aggregate.js 313 B
packages/db/dist/esm/query/compiler/group-by.js 3.75 kB
packages/db/dist/esm/query/compiler/grouping.js 163 B
packages/db/dist/esm/query/compiler/index.js 8.85 kB
packages/db/dist/esm/query/compiler/joins.js 3 kB
packages/db/dist/esm/query/compiler/lazy-targets.js 1.05 kB
packages/db/dist/esm/query/compiler/order-by.js 2.55 kB
packages/db/dist/esm/query/compiler/parent-routes.js 313 B
packages/db/dist/esm/query/compiler/query-equivalence.js 554 B
packages/db/dist/esm/query/compiler/route-metadata.js 1.26 kB
packages/db/dist/esm/query/compiler/select.js 1.57 kB
packages/db/dist/esm/query/effect.js 4.42 kB
packages/db/dist/esm/query/equality-conjunct.js 483 B
packages/db/dist/esm/query/equality-value-identity.js 729 B
packages/db/dist/esm/query/expression-helpers.js 1.52 kB
packages/db/dist/esm/query/ir-stable-identity.js 3.71 kB
packages/db/dist/esm/query/ir.js 2.21 kB
packages/db/dist/esm/query/join-conditions.js 254 B
packages/db/dist/esm/query/live-query-collection.js 383 B
packages/db/dist/esm/query/live/bucket-facade-adapter.js 2.73 kB
packages/db/dist/esm/query/live/collection-config-builder.js 6.72 kB
packages/db/dist/esm/query/live/collection-registry.js 259 B
packages/db/dist/esm/query/live/collection-subscriber.js 2.25 kB
packages/db/dist/esm/query/live/graph-scheduler.js 300 B
packages/db/dist/esm/query/live/includes-runtime.js 213 B
packages/db/dist/esm/query/live/internal.js 142 B
packages/db/dist/esm/query/live/materialized-pipeline.js 2.17 kB
packages/db/dist/esm/query/live/ordered-source-loader.js 4.71 kB
packages/db/dist/esm/query/live/public-key-reduction.js 931 B
packages/db/dist/esm/query/live/subset-demand-controller.js 2.01 kB
packages/db/dist/esm/query/live/utils.js 1.35 kB
packages/db/dist/esm/query/optimizer.js 2.7 kB
packages/db/dist/esm/query/pooled-live-query.js 4.2 kB
packages/db/dist/esm/query/pooled-source.js 210 B
packages/db/dist/esm/query/query-once.js 317 B
packages/db/dist/esm/query/runtime-reference-identity.js 621 B
packages/db/dist/esm/query/subset-dedupe.js 489 B
packages/db/dist/esm/query/validate-limit.js 250 B
packages/db/dist/esm/scheduler.js 942 B
packages/db/dist/esm/SortedMap.js 861 B
packages/db/dist/esm/strategies/commit-completion.js 152 B
packages/db/dist/esm/strategies/debounceStrategy.js 625 B
packages/db/dist/esm/strategies/queueStrategy.js 492 B
packages/db/dist/esm/strategies/serial-pacer.js 457 B
packages/db/dist/esm/strategies/throttleStrategy.js 695 B
packages/db/dist/esm/sync-persistence.js 648 B
packages/db/dist/esm/sync-receipt.js 210 B
packages/db/dist/esm/transaction-commit-work.js 345 B
packages/db/dist/esm/transactions.js 2.58 kB
packages/db/dist/esm/utils.js 1.7 kB
packages/db/dist/esm/utils/array-utils.js 265 B
packages/db/dist/esm/utils/browser-polyfills.js 268 B
packages/db/dist/esm/utils/btree.js 1.66 kB
packages/db/dist/esm/utils/callbacks.js 209 B
packages/db/dist/esm/utils/comparison.js 1.88 kB
packages/db/dist/esm/utils/cursor.js 752 B
packages/db/dist/esm/utils/error.js 267 B
packages/db/dist/esm/utils/get-or-create.js 154 B
packages/db/dist/esm/utils/index-optimization.js 2.08 kB
packages/db/dist/esm/utils/source-record.js 141 B
packages/db/dist/esm/utils/type-guards.js 221 B
packages/db/dist/esm/utils/uuid.js 534 B
packages/db/dist/esm/virtual-props.js 383 B
packages/react-db/dist/esm/DbProvider.js 319 B
packages/react-db/dist/esm/development.js 200 B
packages/react-db/dist/esm/HydrationBoundary.js 273 B
packages/react-db/dist/esm/index.js 314 B
packages/react-db/dist/esm/source-id-bindings.js 335 B
packages/react-db/dist/esm/useLiveInfiniteQuery.js 1.3 kB
packages/react-db/dist/esm/useLiveQuery.js 2.54 kB
packages/react-db/dist/esm/useLiveQueryEffect.js 510 B
packages/react-db/dist/esm/useLiveSuspenseQuery.js 1.87 kB
packages/react-db/dist/esm/usePacedMutations.js 374 B

compressed-size-action::db-and-react-package-size

@pkg-pr-new

pkg-pr-new Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
More templates

@tanstack/angular-db

npm i https://pkg.pr.new/@tanstack/angular-db@2421

@tanstack/browser-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/browser-db-sqlite-persistence@2421

@tanstack/capacitor-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/capacitor-db-sqlite-persistence@2421

@tanstack/cloudflare-durable-objects-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/cloudflare-durable-objects-db-sqlite-persistence@2421

@tanstack/convex-db-collection

npm i https://pkg.pr.new/@tanstack/convex-db-collection@2421

@tanstack/db

npm i https://pkg.pr.new/@tanstack/db@2421

@tanstack/db-ivm

npm i https://pkg.pr.new/@tanstack/db-ivm@2421

@tanstack/db-sqlite-persistence-core

npm i https://pkg.pr.new/@tanstack/db-sqlite-persistence-core@2421

@tanstack/electric-db-collection

npm i https://pkg.pr.new/@tanstack/electric-db-collection@2421

@tanstack/electron-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/electron-db-sqlite-persistence@2421

@tanstack/expo-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/expo-db-sqlite-persistence@2421

@tanstack/node-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/node-db-sqlite-persistence@2421

@tanstack/offline-transactions

npm i https://pkg.pr.new/@tanstack/offline-transactions@2421

@tanstack/powersync-db-collection

npm i https://pkg.pr.new/@tanstack/powersync-db-collection@2421

@tanstack/preact-db

npm i https://pkg.pr.new/@tanstack/preact-db@2421

@tanstack/query-db-collection

npm i https://pkg.pr.new/@tanstack/query-db-collection@2421

@tanstack/react-db

npm i https://pkg.pr.new/@tanstack/react-db@2421

@tanstack/react-native-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/react-native-db-sqlite-persistence@2421

@tanstack/react-router-with-db

npm i https://pkg.pr.new/@tanstack/react-router-with-db@2421

@tanstack/rxdb-db-collection

npm i https://pkg.pr.new/@tanstack/rxdb-db-collection@2421

@tanstack/solid-db

npm i https://pkg.pr.new/@tanstack/solid-db@2421

@tanstack/svelte-db

npm i https://pkg.pr.new/@tanstack/svelte-db@2421

@tanstack/tauri-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/tauri-db-sqlite-persistence@2421

@tanstack/trailbase-db-collection

npm i https://pkg.pr.new/@tanstack/trailbase-db-collection@2421

@tanstack/vue-db

npm i https://pkg.pr.new/@tanstack/vue-db@2421

commit: 2a7eb94

Test and others added 4 commits November 11, 2026 16:15
…ght remaining plain registrations

The maintainer decided to "merge sooner and then remove once F33 is in"
(2026-11-11). registrationExceptions in scripts/oracle-lint-settings.mjs
lists the five oracle files that still register plain tests: the two
multi-tab it.fails witnesses (#2267, #2209; retired by extracting the
multi-tab driver) and the six production-running censuses (retired by
F33), each with its exact report count. eslint.config.js and
agent-lint-feedback.mjs turn oracle/no-unit-test off for those files only.
scripts/check-registration-exceptions.mjs, run by pnpm lint:oracles,
lints each listed file with the rule on and fails when its count differs
from the record in either direction, or when the list gains a file or a
count rises against the merge-base. The coverage map records the list and
its removal condition.

CI reported 6 of the 8 sites because pnpm's recursive lint stopped at
packages/db: the two multi-tab sites in browser-db-sqlite-persistence were
not linted, not conforming.

Co-authored-by: Isaac <no-reply@databricks.com>
…ata fixed histories through oracleProperty

- change-event-history, the lifecycle publication product module, and
  custom-index-order-selection import OpKind, DemandName, and
  MaterializedRow from the companion modules their definitions moved to;
  custom-index-order-selection keeps its cached! assertion.
- ivm.distinct-representatives-fixed names its history type: the shared
  check takes any plan, so the driver's plan was inferred as unknown.
- electron's default config leaves reload-class-oracle.electron.e2e.test.ts
  out of the typecheck collector, which finds no suite in an
  oracleProperty-only file.
- #2418 landed on main after this branch's base, with plain fixed tests in
  sync-metadata-session-persisted-oracle.test.ts (18 sites) and
  sync-metadata-session-sqlite-oracle.test.ts (1). Each history now runs
  as an enumerated property, through its production path's model, driver,
  and check from the generated campaigns: sync-metadata-session.persisted-fixed
  and sync-metadata-session.sqlite-seed-reinsert-reload-replay. Both files
  leave the typecheck collector, as the other oracleProperty-only files do.

Co-authored-by: Isaac <no-reply@databricks.com>
…st the time of its reruns

E2E (browser) failed on convex.public-pagination's framework determinism
test, which timed out at the property's 45 s. That test runs each of the six
histories twice in one test, against an append-only ledger that every run
extends by 21 rows with page size 3; each history's own test passed. The
timeout is now 180 s, as the other Convex backend properties use 60-120 s.

Co-authored-by: Isaac <no-reply@databricks.com>
… reads the D2 message

- tsc found 17 more errors in the db tests that the Vitest typecheck hid
  behind the earlier missing-type errors. Where a property's model is
  recordedAssertionJudgment, whose plan is `object`, the plan was inferred
  as `object`: the truncate-readiness, effect-disposal, subscription and
  sync reentrancy, btree history, and IndexedDB persistence properties name
  their history and plan types. Judges that returned a value now await it
  (state-retention, load-subset replay), mutantRejection takes any promise,
  the ordered-lifecycle reach coordinates may hold undefined as their
  producer does, and a mapped source-health history names its type.
- scripts/lint-scope-oracle.property.test.js marks the rule's message for its
  generated plain-test files. Under D2 that message is "An oracle file
  registers its tests only through oracleProperty.", not the removed
  "declares no oracle part."

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant