Open History to see the last commit
1# Oracle coverage and closeout
2
3Use [Writing reliable oracle tests](oracle-tests.md) when adding or reviewing a
4law. This map identifies existing owners, their judgment, and their limits. It
5is not a claim that every state or every test has been audited.
6
7The [project glossary](glossary.md) owns terms shared by these executable
8models and their production subsystems. A coverage owner may define narrower
9local terms, but it must not silently rename a production concept.
10
11## Scope of the oracle repair project
12
13[Issue #1808](https://github.com/TanStack/db/issues/1808) commissioned a bounded
14portfolio audit and repair. The September 11 inventory contained 329 tracked
15paths: 132 selected/support entries and 197 discovery-tier files. The latter
16received routing recommendations, not 197 full semantic reviews. Focused
17examples, type tests, and host-wiring tests remain useful; converting them all
18to generated tests is not a completion criterion.
19
20## Literate model audit
21
22The literate-model pass audits every primary executable owner in
23[Find an owner](#find-an-owner) and every repository file explicitly named
24`oracle` or `property`. Derive that strict inventory from the repository rather
25than copying a count into this document:
26
27```sh
28git ls-files -co --exclude-standard packages \
29 | rg '/[^/]*(oracle|property)[^/]*$' \
30 | sort -u
31```
32
33The command includes tracked and untracked package files so an in-progress
34audit cannot hide a new owner. A surface is complete only when each primary
35owner states its contract, model, history grammar, production driver, and
36refinement check—including its public observations and checkpoint—in the
37executable file. Focused regressions outside that inventory may remain short,
38but a file named `oracle` or `property` cannot use that allowance to omit the
39literate structure.
40
41The pass must not change product behavior. If clearer prose exposes a missing
42model rule or assertion, strengthen the oracle and run it against unchanged
43production first. Track any production failure as separate follow-up work.
44
45The same pass audits vocabulary. Shared concepts use the production names in
46the project glossary. The audit corrected model prose that collapsed a physical
47acquisition into a request or called an acquisition lease merely a lease.
48Model-only terms such as an appointment ledger or fault tape remain local and
49say what production facts they abstract. This is a semantic review, not a rule
50that test identifiers must copy production's private data structures.
51
52| Surface | Status | Completed or next owner |
53| ---------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
54| Ordered relations and BTree | Complete | The signed top-K relation, BTree/Map refinement model, and DBSP incrementalization laws are literate. |
55| D2 operator work | `packages/db-ivm/tests/d2-work-oracle.test.ts` | A finalized 65-branch graph receives one direct input at the first, middle, or last branch, then a second input on a different branch. The oracle compares exact forwarded messages and operator invocations after each `run()`: branches without queued input perform no operator work. A connected reversed-registration pair must drain in the same run, and an empty unfinalized graph rejects. The old unconditional loop fails with 64 idle calls per turn. This bounded work check does not establish elapsed latency, fused operators, arbitrary graph topologies, or provider-level live-query work. |
56| Includes and publication | Complete | The central recomputation model plus cross-formulation, temporal demand, layered publication, Collection facade lifecycle and space bounds, route-context transport, functional projection, query-shape, optimistic, and source-work owners are literate. They keep the architecture document as their contract source. |
57| Collection lifecycle | Complete | The shared logical-owner/acquisition-attempt/sync-run grammar plus mutation admission, lifecycle trace, publication, replay, disposal, and transaction-refinement boundaries are literate. |
58| Paced mutations | Partial | The virtual-clock owner checks queue order, bounded admission, cleanup draining in FIFO/LIFO order at the configured wait, admitted writes after separate Collection cleanup, post-cleanup queue rejection with a disposal reason, pending debounce drain at the last call's quiet edge, pending trailing throttle drain at its regular edge, debounce and throttle edge options including omitted options, immediate rejection of dropped leading-only calls and both-disabled calls, caller-option immutability, and settlement. New debounce/throttle admission after cleanup, failed persistence, and broader generated schedules remain open. |
59| Optimistic state | Complete | The independent base/intent/source-queue graph plus outcome, transaction-payload, and publication drivers are literate. |
60| Drafts and native values | Complete | Native differential behavior, draft change tracking, detachment and its class-instance exception, hostile keys, aliases, cycles, and Map/Set live iteration are literate. |
61| Query DB and observer | Complete | Query-scope row ownership, subset identity and cancellation, failure and recovery, and the per-listener eligibility ledger are literate. |
62| Query DB SSR dehydration | Fixed QueryClient/Seroval boundary | Successful on-demand entries with a compound predicate, a request signal, and an ordered cursor with a custom comparator retain their row and user metadata through Seroval's reconstructed stream payload and Query Core hydration; request options are absent from the stream, while query functions retain the original values. The TanStack Start router and browser Collection resume path still need a host witness. |
63| Ordered acquisition | Complete | Exact demand identity, applied settlement, independent pagination recomputation, request work, lifecycle products, replay authority, source-generation readiness, and transaction-refinement abort boundaries are literate. |
64| Indexed predicate filtering | Complete for bounded dotted-path collision | An independent row filter checks direct predicates and public callback predicates for a dotted scalar field beside a nested path, with and without an index. Selected-field ordering checks the same distinction through `$selected`. |
65| WHERE predicate publication | Complete for bounded predicate and sync-transaction grammar | The contract, Kleene reference evaluator, snapshot and change-history grammar, three subscriber consumers plus direct snapshot, and per-commit key-set refinement check are literate. A fixed same-key update checks live-row and direct-subscriber payloads; a focused descriptor boundary checks stored-row prefilter safety. Generated cleanup and restart histories for filtered subscribers remain open. |
66| Joined result keys | Complete for bounded two-source key grammar | The contract, nested-loop pair model, delimiter-, number-like, infinite, and `NaN` key grammar, public join driver, and per-checkpoint pair and key-count check are literate. Joins over subqueries, more than two sources, custom `getKey`, and optimistic mutations remain outside this owner. |
67| D2 Index storage | Complete for bounded prefix grammar | The contract, plain-`Map` multiset model, prefixed and unprefixed value grammar, `Index` driver, and per-addition `get`/`has` check are literate. Compaction, presence tracking, and structural payloads remain outside this owner. |
68| Pooled live queries | Complete for bounded eq-filter grammar | The contract, independent `eq` model, live-query Collection second formulation, sync/optimistic/mount/cleanup-restart grammar, observer driver, and per-step refinement check are literate. On-demand and persisted sources, `DbClient`, Suspense, and every clause beyond `eq` conjuncts keep the live-query Collection. |
69| Flat-row change tracking | Complete for bounded flat-row grammar | Flat and proxy trackers and an independent change model run the same generated callbacks. Nested values fall back to the proxy, which its own oracles own. |
70| Lazy target path identity | Focused compiler boundary | A same-source union/coalesce witness keeps dotted and nested demand paths distinct during target deduplication. |
71| Correlated include path identity | Focused public route-context witnesses | One-level and nested includes keep dotted and nested parent paths, including ancestor aliases, distinct. Conditional result paths receive separate routes. Fixed fixtures cover initial reads and selected source updates; other recursive source forms and arbitrary path segments remain outside this witness. |
72| Alias scope identity | Generated cross-scope alpha-renaming with an independent model | Optimizer copies, wraps, and collapses keep `SourceId`; compilation binds inputs by `SourceId` only; includes cannot shadow a parent subquery alias. Unreached forms and channels are listed in the owner row. |
73| Join equality and cold acquisition | Complete | Independent cold relational recomputation, acquisition evidence, established equality domains, replacements, and scan/index routes are literate. |
74| Opaque backend pagination | Complete | The full-relation value model plus opaque token, cache generation, publication, browser acquisition, and live-window integration owners are literate. |
75| Electric and TrailBase | Complete | Electric replica and recovery models, installed-SDK HTTP delivery, PostgreSQL serialization, and TrailBase's controlled RecordApi/native-stream lifecycle are literate with their real-provider limits intact. |
76| PowerSync | Complete | Patch conservation, effective-update receipts, metadata and falsey changes, declared-view keys, transformed schema output, logging, cleanup, and native SQLite reach are literate. |
77| SQLite persistence and native hosts | Complete | Persisted hydration/replay and ownership, shared-handle driver transaction laws, OPFS page and diagnostic state machines, and the 113-law native conformance manifest are literate. Native execution remains distinct from registration and shim evidence. |
78| Offline execution | Complete | FIFO retry, scheduler eligibility, leadership replay, transaction settlement, and typed wire serialization are literate. |
79| Frameworks | Complete | Shared live-query and infinite-query models are literate. Each framework keeps its own realm, ownership, and scheduling driver. |
80| Structural values and ordered primitives | Complete | Structural hashing, deep equality, comparison, cursor denotation, index refinement, and query-identity output equivalence are literate. |
81| Boundary refinements | Complete | Cleanup/restart admission, metadata publication, retained state, acquisition cells, D2 source reconciliation, top-K support windows, and nested Query work bounds are literate. |
82| Small structures and test mechanics | Complete | SortedMap, cleanup appointments, and guarded replay are literate. |
83
84### Guide-audit boundary handoffs
85
86The includes-space owner (`packages/db/tests/query/includes-space-oracle.test.ts`)
87now varies leaves per twig across 0, 1, and 10. Public leaf rows change from
880 to 10 to 100 while 13 Collection facades remain. This protects facade
89ownership for the fixture's fixed root/branch/twig topology; route churn, D2
90demand retention, and a heap bound need separate witnesses in the includes
91owners.
92
93The virtual-row-fields owner
94(`packages/db/tests/query/virtual-row-fields-oracle.test.ts`) checks presence
95of all four public virtual fields directly after implicit, expression, and
96functional root publication. Its fixed controlled-Collection cases do not
97establish every nested projection shape or framework receiving boundary.
98
99Three type-only owners check compile-time boundaries:
100`packages/db-sqlite-persistence-core/tests/persisted-options-type-oracle.test-d.ts`
101checks local and synced persisted option input/output and key types;
102`packages/db/tests/mutation-handler-type-oracle.test-d.ts` checks sibling
103Collection/key/utilities in mutation handlers; and
104`packages/db/tests/query/virtual-row-fields-oracle.test-d.ts` checks all four
105published virtual fields against an independently written public shape. Their
106passing type assertions do not prove runtime parsing, I/O, or publication.
107
108The shared-driver fairness owner now distinguishes K=1 from K=2 at the second
109hydrate and checks full logical persist FIFO order in its Node seam. The
110[Chromium OPFS receiving spec](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/e2e/shared-driver-fairness-oracle.opfs.spec.ts)
111checks a cold SQL read, the K=1 hydrate bound, public rows, the pending persist
112backlog at the second hydrate, and all five logical persist completion IDs in
113FIFO order during one held-BEGIN storm through the real worker. This closes the
114bounded real-OPFS handoff at logical adapter completion for that history. It
115does not establish durable write order after reopen, naturally occurring
116contention, a browser matrix, multi-context coordination, elapsed-time
117latency, or unbounded eventuality.
118
119The D2 source reconciliation owner checks its helper and controlled Effect and
120live-query consumers. Fixed truncate/replay and cleanup→preload graph-restart
121cuts run on both eager-index and scan-fallback routes. Its generated histories
122still do not cover arbitrary graph shapes or real provider event delivery;
123the Electric real-provider E2E owner must supply that external premise before
124a cross-boundary claim.
125
126PowerSync's correctness owner reaches native local SQLite and records an
127SDK-delivered watcher callback after a metadata-bearing `Collection.update`;
128registration is wrapped for observation while delivery uses the SDK callback.
129The oracle checks the public and SQLite rows and the exact queued CRUD patch.
130Its held watcher callbacks are a controlled delivery premise, and its trailing
131no-op and tracked metadata-only
132cases enter through the public transactor with synthetic mutations rather than
133`Collection.update`. Neither path establishes remote backend upload or that
134Collection updates can construct those zero-field mutations.
135
136The Query DB nested-shape work owner checks both an all-reachable finite tree
137and an on-demand irrelevant-branch variant. At preload, one or three
138disconnected branches leave the public tree and delivered rows unchanged and
139cause exactly one acquisition attempt and one Query provider call per child
140level. Provider scans, internal index traversal, facade allocations, and
141elapsed time remain outside this owner; DB includes-work counts source
142Collection reads and delivered changes, not internal index traversal.
143
144Three Ordered acquisition companions own distinct controlled cuts:
145`packages/db/tests/query/load-subset-replay-refinement-oracle.test.ts` checks
146held replay authority and public snapshots;
147`packages/db/tests/query/load-subset-source-readiness-refinement-oracle.test.ts`
148checks source-generation readiness, progressive old-child retention, and
149retired-route publication; and
150`packages/db/tests/query/load-subset-transaction-refinement-oracle.test.ts`
151checks before, during, and after-commit abort boundaries with applied receipts.
152These fixtures do not establish real-provider cancellation or framework timing.
153The core `load-subset-oracle.property.test.ts` now distinguishes each exact
154demand-key option through one-axis pairs; its derived-sync expected-failure
155guard and controlled-adapter scope remain explicit limits.
156
157The QueryRef owner checks DISTINCT support through source deletions,
158last-support removal, reinsertion, and person enable/disable. It checks nested
159and flat aggregate joins through source updates, and ordered joined
160`findOne()` through initial, singleton, empty, restored, and changed-join-key
161cuts. An unordered `findOne()` QueryRef used on either side of a join keeps
162one default-key row through deletion and reinsertion. The optimizer aggregate
163owner checks the initial public inner join of a global aggregate with
164accepting, rejecting, and absent outer predicates; a materialized-Collection
165formulation supplies matching and nonmatching controls. Other `singleResult`
166forms, join forms, and scheduling cuts remain outside these owners.
167
168The offline scheduler owner (`packages/offline-transactions/tests/KeyScheduler-oracle.property.test.ts`)
169checks FIFO eligibility and retry order at the scheduler boundary. It does not
170observe the executor's awaited outbox update between `updateTransaction` and
171`markFailed`, or public caller settlement. Those receiving cuts belong with
172`packages/offline-transactions/tests/transaction-settlement-oracle.property.test.ts`.
173The transaction serializer owner uses controlled Temporal constructors and fake
174storage; a claim about native Temporal or browser storage needs a receiving
175witness in those runtimes.
176The offline settlement owner follows the README's success boundary: the
177configured `mutationFn` has returned and the storage adapter has acknowledged
178outbox deletion. Its controlled storage histories hold and fail deletion,
179stop the executor and queued peers on a storage failure, reject new admission,
180and restart after a persisted `deletion-pending` phase. A marked row skips provider replay
181even when `beforeRetry` filters all ordinary pending work; an old unmarked row
182still replays. Adapter tests prove that IndexedDB transaction failure and
183localStorage `removeItem` failure reject rather than masquerade as deletion.
184When a caller removes an active row with `removeFromOutbox` or `clearOutbox`
185while its provider is held, the caller remains pending until that provider
186returns. The controlled witness then checks provider calls, public settlement,
187and the empty outbox. The leadership owner checks that an earlier
188`deletion-pending` row with the same persisted timestamp is deleted before its
189later peer reaches the provider. This restart witness uses storage insertion
190order to distinguish creation order; independent storage writers and native
191browser hosts remain outside its claim.
192These witnesses do not establish physical power-loss durability, a real
193provider's idempotency, or the crash window between provider completion and
194the phase write. The provider must honor the supplied idempotency key in that
195window. Older application versions that do not understand the phase can also
196replay a marked row. Native browser restart and multi-owner handoff of the
197marked phase remain receiving witnesses for this owner.
198
199The same owner also needs a captured failing seed-and-shrink-path replay for
200its generated settlement property. The
201[deletion-settlement review record](oracle-reviews/2026-09-30-offline-deletion-settlement.md)
202preserves its earlier executable revision. The
203[fail-stop follow-up](oracle-reviews/2026-09-30-offline-fail-stop-followup.md)
204records the revised storage-failure law, RED/GREEN witnesses, and limits.
205The guarded replay owner (`packages/db/tests/oracle-replay.test.ts`) now checks
206that named pagination and index campaigns execute only the requested replay
207lane. An unrelated failing fixed campaign no longer runs first. The
208[prep-PR review record](oracle-reviews/2026-09-30-prep-pr-followup.md) records
209these four review repairs at their exact executable revision.
210
211### Recent fix-wave authority inventory
212
213This inventory records the permanent authority for the September 17 fix wave. It
214distinguishes an executable oracle from a specialized real-provider authority and
215does not award oracle credit for a filename alone.
216
217| PR | Classification | Permanent authority and campaign |
218| ------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
219| [#1831](https://github.com/TanStack/db/pull/1831) | Explicit oracle | PowerSync's `packages/powersync-db-collection/tests/correctness-oracle.test.ts` crosses real PowerSync receipts and native SQLite behavior. It runs in the package test campaign and the focused `test:oracles` campaign; portable declarations retain compiler authority. |
220| [#1832](https://github.com/TanStack/db/pull/1832) | Equivalent specialized authority | `packages/electric-db-collection/e2e/sql-predicate-semantics-oracle.e2e.test.ts` and `packages/electric-db-collection/e2e/subset-sql-acceptance.e2e.test.ts` run through the package's real-provider `test:e2e` campaign. Compiler unit tests are collateral, not substitutes for either service boundary. |
221| [#1833](https://github.com/TanStack/db/pull/1833) | Explicit oracle | `packages/db/tests/query/pagination-oracle.property.test.ts` owns inherited collection collation, actual `item2`/`item10` order, exact request options, hostile lexical/numeric controls, and both scan and auto-index paths. It runs in `@tanstack/db`'s `test:oracles` campaign. |
222| [#1834](https://github.com/TanStack/db/pull/1834) | Explicit oracle | `packages/db/tests/query/cold-join-reconciliation-oracle.test.ts` owns join/predicate equality equivalence across the established value domains, binary/string and nullish controls, replacement histories, raw lazy demand, and scan/auto-index paths. It runs in `@tanstack/db`'s `test:oracles` campaign. |
223| [#1835](https://github.com/TanStack/db/pull/1835) | Explicit oracle | The existing `packages/db/tests/collection-state-retention-oracle.property.test.ts` and `packages/db/tests/optimistic-transaction-oracle.property.test.ts` owners cover separate collection-state and transaction-history laws. Both were already registered in `@tanstack/db`'s `test:oracles` campaign; focused storage/local-only tests remain collateral. |
224| [#1837](https://github.com/TanStack/db/pull/1837) | Explicit oracle | The offline scheduler, leadership replay, and serializer owners cover selective replay retirement, durable per-ID settlement, stale-read fencing, lifecycle recovery, native scalar encoding, and prior wire compatibility. They run in the package test campaign; generated owners expose `OFFLINE_ORACLE_{SEED,PATH,RUNS}` or the scheduler's `TANSTACK_DB_OFFLINE_ORACLE_*` replay interface. |
225| [#1842](https://github.com/TanStack/db/pull/1842) | No shipped-law case | The PR changed only focused observer tests and introduced no production behavior. `packages/db/tests/live-query-observer.test.ts` remains the correct evidence; no synthetic oracle or campaign claim is added. |
226
227[PR #1816](https://github.com/TanStack/db/pull/1816) preserves existing witnesses,
228repairs false-green assertions and drivers, adds missing histories, and includes
229narrow runtime fixes reproduced by the stronger tests. The later ten-area audit
230found 59 actionable findings or optional suggestions: 46 repaired, one partly
231repaired storage item, nine contract decisions, and three deferred suggestions.
232These are **not counts of production bugs**. The earlier 13-item review is a
233separate ledger, not another 13 unique defects.
234
235## Find an owner
236
237Paths below are relative to the repository root. Follow each suite's domain
238comment and the current API/architecture contract before extending its model.
239
240| Surface | Primary executable owners | Independent judgment and important limit |
241| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
242| Ordered relations and BTree | [top-K relation oracle](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/operators/topk-relation-oracle.test.ts), [fractional-index window moves](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/operators/topKWithFractionalIndex-oracle.test.ts), [BTree/Map](https://github.com/TanStack/db/blob/main/packages/db/tests/btree-map-oracle.test.ts), [incrementalization laws](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/incrementalization-law-oracle.property.test.ts) | Independent ordered relations and cumulative signed output. Top-K consolidation compares same-key values without hashing, including cyclic replacements and fresh transient cancellation. The fractional-index test checks an empty output message for a window move after all rows retract; it does not prove downstream lazy acquisition. Other hash-based operators retain hashing's declared domain. Algebra does not specify client readiness. The BTree/Map oracle checks point operations, neighbor pairs, and full, partial, boundary, exclusive-high, and empty range scans for integer keys and node sizes 4–8. It does not check balance or space, and it assumes consistent comparators ([code-weight BTree review](oracle-reviews/code-weight-btree-trim.md)). |
243| Includes and publication | [cross-formulation](https://github.com/TanStack/db/blob/main/packages/db/tests/query/includes-cross-formulation-oracle.property.test.ts), [temporal](https://github.com/TanStack/db/blob/main/packages/db/tests/query/includes-temporal-oracle.test.ts), [Collection includes](https://github.com/TanStack/db/blob/main/packages/db/tests/query/includes-collection-oracle.property.test.ts), [architecture and complete suite map](https://github.com/TanStack/db/blob/main/packages/db/src/query/live/ARCHITECTURE.md#executable-contracts) | Per-parent/flat-join/partition relations, callback-time rows, nested values, and route histories. Fragmented lazy-demand consolidation covers delta growth and successful, rejected/retried, and obsolete replacements at the Collection request boundary; it observes exact key unions and abort checkpoints. A compiled-includes fixture makes adapter unload evict owned child rows and proves a rejected union cannot remove established public child rows. Retry after that terminal live-query failure remains covered at the acquisition boundary; no automatic in-place recovery is claimed. Observe raw promised order; fresh queries do not establish continuous publication safety. |
244| Collection lifecycle | [mutation startup](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-mutation-startup-oracle.test.ts), [change-event history](https://github.com/TanStack/db/blob/main/packages/db/tests/change-event-history-oracle.test.ts), [sync publication reentrancy](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-sync-reentrancy-oracle.test.ts), [history](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-subscription-lifecycle-history-oracle.property.test.ts), [publication](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-subscription-lifecycle-publication-oracle.property.test.ts), [replay](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-subscription-replay-oracle.property.test.ts), [effect disposal](https://github.com/TanStack/db/blob/main/packages/db/tests/effect-disposal-oracle.test.ts), [PR #1902 review](oracle-reviews/pr-1902-change-event-history.md), [batch-order decision review](oracle-reviews/change-event-batch-order.md), [absent-key insert review](oracle-reviews/2026-10-02-insert-for-absent-key.md) | Core Collection `insert`/`update`/`delete` admission while `startSync:false` is idle; complete public-row/change-message agreement across bounded one- and two-key histories plus replayable four-key campaigns, where every message must be valid for a strict consumer (insert only for an absent key, update or delete only for a present one; [absent-key insert review](oracle-reviews/2026-10-02-insert-for-absent-key.md)); a two-key deferred sync history checks each key's causal insert/update/delete trace while allowing any cross-key interleaving. Reversing all deferred messages fails that check; reversing each sync transaction's distinct-key messages passes. Queued duplicate admission and cancellation, ownership and phase histories, exact caller/error/publication evidence, and late completion and restart have separate witnesses. Generated deferred histories with cancellation or reentrant callbacks need a witness in the change-event history owner before claiming general batch-shape coverage. Query write utilities and effect self-dependent disposal remain separate contracts. During a truncate, a ready callback can write to any key after a prior optimistic request. Each subscriber, with or without initial state or a filter, must receive valid messages after the Collection is ready and end at the Collection's rows. A throwing ready callback during sync entry surfaces once the sync function returns, whether it calls markReady or commits a truncate ([round 3 follow-ups](oracle-reviews/2026-10-05-round-3-followups.md)). Callback rollbacks, non-optimistic callback writes, and several writing callbacks remain open ([ready-callback truncate review](oracle-reviews/2026-10-05-truncate-ready-callback-delete.md)). |
245| Paced mutations | [virtual-clock oracle](https://github.com/TanStack/db/blob/main/packages/db/tests/paced-mutations-oracle.test.ts) | `createPacedMutations` with queue front/back options, bounded waiting capacity at zero and one, cleanup draining in FIFO/LIFO order after a held write, cleanup timing at the configured wait for immediate writes, admitted writes after separate Collection cleanup, debounce and throttle schedules with explicit and omitted options, and first-leading throttle execution at epoch zero. Finite histories compare optimistic rows, returned transaction identity and receipt outcome, execution order and virtual-clock time. Held writes verify queue serialization. Leading-only throttle and debounce witnesses reject skipped calls immediately with their named dropped-call errors, including omitted edges, both edges disabled, and same-row rollback while a prior write is held. Capacity witnesses cover overflow rejection, distinct-key optimistic rollback, same-key admitted-write survival, and in-flight versus waiting admission. Cleanup witnesses check repeated queue cleanup, eventual admitted receipt settlement, direct queue strategy rejection of new callbacks, public post-cleanup rollback with `QueueDisposedError`, pending debounce transactions that wait until the last call's quiet edge after separate Collection cleanup, and a trailing throttle timer that runs at its regular edge after separate Collection cleanup. Deferred custom queue and batch callbacks check compatibility with `void` and `false` execute results, respectively. Frozen options verify factory non-mutation; a mutable option witness checks that debounce uses its construction-time trailing setting. New debounce/throttle admission after cleanup, failed persistence, broader capacities and schedules remain outside this owner. |
246| Optimistic state | [history model](https://github.com/TanStack/db/blob/main/packages/db/tests/optimistic-history-oracle.ts), [generated histories](https://github.com/TanStack/db/blob/main/packages/db/tests/optimistic-transaction-oracle.property.test.ts), [outcomes](https://github.com/TanStack/db/blob/main/packages/db/tests/optimistic-history-outcomes-oracle.test.ts), [publication](https://github.com/TanStack/db/blob/main/packages/db/tests/optimistic-history-publication-oracle.test.ts) | Optimistic state drops at settlement and held sync transactions publish with it ([settlement-drop review](oracle-reviews/2026-10-03-settlement-drop.md)); whole-row active overlays, metadata and prior-value events. A raw subscriber without initial state checks that each truncate batch inserts a key once ([2026-10-02 review](oracle-reviews/2026-10-02-truncate-raw-subscriber.md)). Never rebase a pending snapshot merely to simplify the model. Generated histories also write source batches inside mutation handlers, before they return; the Collection must own the request by then ([handler source batch review](oracle-reviews/2026-10-01-handler-source-batch.md)). The same-key transaction lane also authors a delete followed by a reinsert, which must be visible optimistically and net to the truth-table request ([state mutation round 2](oracle-reviews/2026-10-02-state-mutation-round-2.md)). Source rows are written as `insert` for a key the source lacks, and batches may delete keys the source holds ([state-stack mutation gaps](oracle-reviews/2026-10-02-state-stack-mutant-gaps.md)). Batches may also delete a key the source never held. That delete leaves an active request in place ([absent-key source delete review](oracle-reviews/2026-10-02-absent-key-source-delete.md)). A separate partial campaign keeps the default partial row update mode, where source updates may omit a field and merge into the source row, not into an optimistic row ([round 3 review](oracle-reviews/2026-10-05-state-mutation-round-3.md)). |
247| Drafts and native values | [proxy](https://github.com/TanStack/db/blob/main/packages/db/tests/proxy-oracle.test.ts), [detachment](https://github.com/TanStack/db/blob/main/packages/db/tests/proxy-detachment-contract-oracle.test.ts), [iteration](https://github.com/TanStack/db/blob/main/packages/db/tests/proxy-iteration-contract-oracle.test.ts), [revert](https://github.com/TanStack/db/blob/main/packages/db/tests/proxy-revert-oracle.property.test.ts), [native methods](https://github.com/TanStack/db/blob/main/packages/db/tests/proxy-native-methods-oracle.property.test.ts) | Native-operation controls, exact patches and actual stored rows; alias/cycle/adversarial-key histories. Set and Map reorder histories check draft patches and stored iteration order after replacement and clear-and-readd; RegExp replacement/reversion histories check `lastIndex`. General native-mutator and symbol-write support is not established by a plain-object oracle. The revert owner generates assignment, revert, delete, nested, symbol-key, and `for...of` histories and checks `getChanges()` and the draft against an independent draft-equality model: ordered Map and Set contents (including Sets inside Map values), RegExp `lastIndex`, array holes, and symbol keys inside nested values. Mutator methods (`push`, `set`, `add`) and top-level symbol writes are outside its grammar. The proxy owner's stored-function law checks, against a native row, that a function stored as data reads back as stored by every read path and that a stored method sees the draft as `this`, so its writes are tracked. The detachment owner pins which key classes a draft copies: enumerable string keys and every symbol key. The revert owner also generates typed arrays (including a subclass that does not forward its constructor argument), URLs, and a class with only private state as written values, with a property that writes two of them over one field. The native-methods owner generates rows (holes, `undefined`, duplicates, nested arrays, empty rows, typed `-0` and `NaN`) and calls every method of `Array.prototype` and `TypedArray.prototype`, in fixed and random campaigns with replay; it compares the result, whether the method returned the array itself, the identity of each original object, and the published row with native values, and a new built-in method fails until it has arguments. The proxy owner's `defineProperty`, stored-function, and frozen-draft laws are bounded tables against native rows. Its `defineProperty` law compares result, value, descriptor, and changes, for values and accessors. The iteration owner checks that array iterators see a push, removal, index write, or length cut made while they are open. Open: a draft reads a class instance of the original row as a plain object, so private-field getters read `undefined`, and a built-in method called through `this` on a nested Map or Set draft rejects the Proxy receiver; a mutator that changes nothing publishes an equal value; reading an object under a frozen draft key counts that key as changed, writing back a keyless class instance of the original row is a change, and `DataView` setters are untracked ([draft proxy review](oracle-reviews/code-weight-draft-proxy.md)). |
248| Query DB and observer | [ownership](https://github.com/TanStack/db/blob/main/packages/query-db-collection/tests/ownership-lifecycle.oracle.test.ts), [load lifecycle](https://github.com/TanStack/db/blob/main/packages/query-db-collection/tests/load-subset-lifecycle-oracle.test.ts), [observer histories](https://github.com/TanStack/db/blob/main/packages/db/tests/live-query-observer-history-oracle.property.test.ts), [retained snapshots](https://github.com/TanStack/db/blob/main/packages/db/tests/live-query-observer-snapshot-oracle.property.test.ts) ([review](oracle-reviews/pr-2043-retained-observer-snapshots.md)) | Real QueryClient boundary, applied-settlement barriers for existing and cached demand, mutation-handler Collection identity, terminal fetch-record lifecycle, and a per-listener eligibility ledger, not a duplicate dispatch queue. The bounded handler grammar crosses insert, update, delete, parameter and mutation-alias access, refetch, and clearError. A held clearError retry retains the prior public error through initial, background, and Collection application failures; success clears it, failure advances the count, including a repeated error at clock time zero. An intermediate Query retry attempt does not recount the previous background error; a held final attempt can succeed or fail. A held application after successful Query fetch keeps the error visible until the applied result. A mocked persisted-baseline scan holds an older success while a newer terminal Query failure arrives; the newer public error and count survive application, including when the Error object and clock tick repeat. Native SQLite persistence, concurrent retries across multiple tracked Queries, mutation-handler fetch-boundary settlement, and deferred result application remain outside this witness. The mutation overlap grammar crosses both start orders. Check reentry, peer survival, FIFO and disposal independently of final rows. A retained observer snapshot shows its capture-time rows on a later first read of `data` or `state`. |
249| Query DB SSR dehydration | `packages/query-db-collection/tests/ssr-dehydration-oracle.test.ts`, [review record](oracle-reviews/issue-1950-ssr-dehydration.md) | A plain Query cache control, a live on-demand compound predicate, a signal-only request, and an ordered cursor with a custom comparator all retain their row through QueryClient dehydration, reconstruction of Seroval's emitted stream payload, and Query Core hydration from that payload. The on-demand query functions still receive the original IR, comparator, and signal; serialized metadata retains enumerable user metadata but excludes request options. The original implementation fails the compound and signal cases at the stream checkpoint. A serializable stream-only request-options leak passes the former chunk-count check but fails the current payload assertion. This owner covers successful Query cache entries at the installed Query Core 5.90.20 and Seroval 1.5.0 versions. A TanStack Start integration owner still needs the reporter's Router 1.171.33 and Seroval 1.6.8 path, browser Collection resume/refetch, and request cancellation across SSR. Query subset and pagination oracles remain owners of predicate/order/cursor meaning and supported value types. The issue's `shouldDehydrateQuery` workaround replaces Query Core's success-only default and admits pending/error queries; any documented workaround must preserve that default filter. |
250| Ordered acquisition | [pagination](https://github.com/TanStack/db/blob/main/packages/db/tests/query/pagination-oracle.property.test.ts), [ordered work](https://github.com/TanStack/db/blob/main/packages/db/tests/query/ordered-work-oracle.property.test.ts), [ordered lifecycle](https://github.com/TanStack/db/blob/main/packages/db/tests/query/ordered-lifecycle-oracle.property.test.ts), [ordered loader state](https://github.com/TanStack/db/blob/main/packages/db/tests/query/ordered-source-loader-state-oracle.test.ts), [graph scheduler](https://github.com/TanStack/db/blob/main/packages/db/tests/query/scheduler.test.ts), [issue #1880 ordered-repair review](oracle-reviews/issue-1880-ordered-repair.md), [issue #1882 custom local collation review](oracle-reviews/issue-1882-custom-local-collation.md), [issue #1898 relation-filter review](oracle-reviews/issue-1898-relation-filter.md), [PR #1909 external review](oracle-reviews/pr-1909-external-review.md) | Complete finite provider results, inherited locale and bounded/unbounded custom collation with exact request options, query-level inheritance across source aliases, real lexical/numeric disagreement, custom comparator ties, scan/index paths, pending windows, ties/nulls, lease ownership, Effect callback gates, including an indexed source update during Effect startup, and documented repair timing. Direct LEFT-joined filters cover local finite prefixes, pending child demand, child removal, and anti-join publication with custom full-source and unindexed fallback loading; unrelated include demand cannot stall the root continuation, and an empty joined replay wakes held Effect callbacks; remote relation hints remain outside this owner. Graph scheduler checks coalescing, dependency order, synchronous loader input, and repeated-alias failure ownership. The ordered-work oracle checks that a synchronous root refill reaches D2 before joined publication; a mutant that omitted the post-loader graph step failed at the second child demand. Custom collation proves local full-source acquisition only; it does not establish provider cursor capability or backend collation fidelity. Sibling-source input during a synchronous ordered continuation returns to graph work before another ordered acquisition. Request completion is not proof of unrequested source extent. A window move during existing joined demand waits for its root continuation, including an independently held root request; current demand failure rejects the move, while retirement and an obsolete rejection do not. A bounded ordered repair resumes its refill after joined demand settles. The ordered-source-loader state test checks that an explicit failed-request retry blocked by joined demand retains its generation until it can issue a request. Multiple simultaneously pending joined plans during a window move and a public-query failed-retry overlap still need dedicated witnesses. |
251| Indexed predicate filtering | `packages/db/tests/query/index-path-collision-oracle.test.ts` | A bounded cross product of numeric values checks exact public keys before and after adding a nested-field BTree index. Direct predicates vary argument order, bound inclusivity, reversed operands, and bound field. Public Collection subscription and live-query callbacks run with and without the index. Selected-field ordering compares a direct JavaScript sort with a public `$selected` callback; restoring the dotted-key proxy cache made that comparison fail. The original compound grouping failed four indexed cases while scan controls passed. The original callback proxy caches also failed both unindexed public routes. A hostile cleanup control preserves the primary mismatch and secondary release error. Arbitrary path segments, nullish values, custom collation, and incremental publication need separate witnesses if claimed. |
252| Lazy target path identity | `packages/db/tests/query/compiler/lazy-targets.test.ts` | A focused same-source `UnionFrom`/`coalesce` witness requires both [`a.b`] and [`a`, `b`] demand targets. Restoring dotted-string deduplication drops the second target at the compiler boundary. A public on-demand adapter and row-publication history still need a separate witness. |
253| Correlated include path identity | `packages/db/tests/query/includes-context-transport-oracle.test.ts` | A flat parent field and nested parent field reach one-level and nested `toArray` results independently; dotted ancestor aliases remain distinct through a grandchild route. Initial results and parent updates have exact public-value checks. A conditional projection gives [`a.b`] and [`a`, `b`] different include results and checks parent-key changes plus later child inserts. Removing the compiler's unique route-key allocator loses a public child result; restoring dotted-string deduplication at either builder site loses a distinct parent value. These fixed witnesses do not establish arbitrary path segments, every recursive source form, or every materialization form. |
254| Alias scope identity | `packages/db/tests/query/includes-oracle.property.test.ts` (`includes alpha-renaming across sibling scopes`), `packages/db/tests/query/includes-scope-identity-oracle.ts`, `packages/db/tests/query/validate-aliases.test.ts`, [issue #1975 review](oracle-reviews/issue-1975-scope-identity.md) | Four topologies place a source beside a same-named sibling source: a `from()` subquery with an include, a joined `unionAll()` branch with an include, a collapsed top-level pure wrapper with a join subquery, and an include directly on a joined `unionAll()`, which may reuse a branch alias. The grammar crosses zero to two joins, LEFT or INNER, zero to two predicates, plain, ordered-and-limited, or DISTINCT bodies, include forms, and eager or on-demand finite providers, after preload and after source writes. Includes read their source directly, through a join, through a `unionAll()` with an anchor join, or through a `from()` subquery that reads the parent row. One in four scenarios draws any naming and requires illegal ones to be rejected. Each checkpoint compares the canonical naming with plain recomputation, the generated naming with the canonical naming, and per-Collection `loadSubset` WHERE clauses. Every pinned witness and both campaigns fail on `18abceee4`; each of the four optimizer re-mint sites fails a witness when reverted. Nested includes, include-inside-subquery forms, join subqueries outside the wrapper topology, `groupBy`/`having`, outer RIGHT/FULL joins, publication events, unload, ordered windows and lazy join loading through the alias-merged `aliasRemapping`, and temporal demand remain outside this owner; they need witnesses before an alias-scope closure claim covers them. |
255| Join equality and cold acquisition | `packages/db/tests/query/cold-join-reconciliation-oracle.test.ts` | Independent recomputation for cold acquisition plus direct join/predicate equivalence across established equality domains. Binary/string and nullish classes, replacement histories, raw on-demand values, and both scan/auto-index paths are explicit; the compound lane also covers tuple equality, term order, all four join types, controlled cold sources, and keyed histories. Positive acquisition witnesses require a satisfiable tuple. |
256| Query optimizer semantics | `packages/db/tests/query/optimizer-semantics-oracle.test.ts`, [aggregate review](oracle-reviews/2026-09-28-optimizer-aggregate-pushdown.md), [QueryRef repair](oracle-reviews/2026-09-30-queryref-publication-repair.md), [residual review](oracle-reviews/2026-10-01-pr-1977-residual-convergence.md) | Independent sum recomputation and a materialized-Collection formulation check the first public snapshot of a nested aggregate under a left join. Direct, arithmetic-wrapped, and conditional aggregates distinguish safe from unsafe pushdown; a grouped-key control covers the grouped boundary. Matching and nonmatching global aggregates also cross a nested QueryRef inner join with absent, accepting, and rejecting outer predicates. The matching initial cases fail on the pre-repair revision and pass after the computed-projection lookup repair. A separate fixed residual-convergence grammar checks exact predicate and outer WHERE clause counts at `optimizeQuery` return and after re-optimization: LEFT, RIGHT, INNER, and FULL joins; equality, greater-than, nullable-field `isUndefined`, same-source OR, cross-source equality, clause order, separate/AND form, two active predicates, two residual sources, and an existing residual marker. Plain-array LEFT/RIGHT and three-source join models check first public rows, including unmatched rows. Arbitrary expressions, more complex join chains, and incremental optimizer/publication histories remain outside this owner. |
257| QueryRef operators and user-value boundaries | `packages/db/tests/query/subquery-user-value-oracle.test.ts`, `packages/db/tests/transactions.test.ts`, [repair record](oracle-reviews/2026-09-30-queryref-publication-repair.md) | A finite array/Set model checks the compiled output bag for a joined DISTINCT subquery with an outer WHERE. Live-query drivers check selected containers, no-select, functional, and predicate-literal user objects with IR-like fields, top-level and aggregate-subquery proxy-shaped fields, arrays of selected references, outer virtual-field filters on joined DISTINCT and nested aggregate QueryRefs, and a renamed no-select source. The transaction suite documents the existing development-browser duplicate-load guard. The bounded cases run in `test:oracles` or the full DB suite. Joined DISTINCT, nested and flat aggregate source-update histories pass. Ordered joined `findOne()` checks initial, singleton, empty, restored, and changed-join-key cuts; an unordered `findOne()` QueryRef on either side of a join checks default-key candidate deletion and reinsertion. A materialized joined `findOne()` supplies a separate receiving formulation. Other `singleResult` forms, join forms, schedules, and cross-copy value handling outside the duplicate-load guard remain unproved. |
258| Opaque backend pagination | [window oracle](https://github.com/TanStack/db/blob/main/packages/query-db-collection/tests/cursor-pagination.oracle.test.ts), [cache histories](https://github.com/TanStack/db/blob/main/packages/query-db-collection/tests/cursor-pagination.cache-oracle.test.ts), [cache publication](https://github.com/TanStack/db/blob/main/packages/query-db-collection/tests/cursor-pagination.publication-oracle.test.ts), [browser acquisition boundaries](https://github.com/TanStack/db/blob/main/packages/query-db-collection/tests/cursor-pagination.boundary-oracle.test.ts), [QueryCollection integration](https://github.com/TanStack/db/blob/main/packages/query-db-collection/tests/cursor-pagination-oracle.integration.test.ts) | Full filter/sort/slice reference, opaque token transport, actual Query cache expiry/invalidation/GC, forced refresh during growth, protocol failure publication/recovery, bounded slice work, nested cancellation/replacement, reader abort, browser retry defaults, manual-write cache isolation, and production window publications. Stable backend sequences; not snapshot guarantees for changing endpoints. Peek-ahead remains enabled. |
259| Electric and TrailBase | [Electric histories](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/tests/electric-oracle.property.test.ts), [recovery histories](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/tests/electric-recovery-oracle.test.ts), [held resume snapshots](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/tests/electric-resume-snapshot-races.test.ts), [PostgreSQL semantics](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/e2e/sql-predicate-semantics-oracle.e2e.test.ts), [TrailBase contract](https://github.com/TanStack/db/blob/main/packages/trailbase-db-collection/tests/ORACLE.md) | Installed SDK delivery/framing, independent predicates, exact subscription arguments, restart/reset lineage, held certification and durability races, source-order publication before durability, and late errors. The queued-presence property runs identical fixed/random generators plus isolated seed-and-path replay across insert, update, delete, and truncate callbacks. The recovery fixtures use a mocked ShapeStream; they do not establish live Electric-service framing or native persistence-host behavior. |
260| PowerSync | [tests](https://github.com/TanStack/db/tree/main/packages/powersync-db-collection/tests), `tests/correctness-oracle.test.ts` | Applied receipt positions crossed with held peers, native SQLite/SDK and cleanup evidence. A metadata-bearing `Collection.update` passes through an observed SDK watcher callback to the public and SQLite rows and an exact queued CRUD patch. Held callback ordering and synthetic zero-field cases remain controlled-only, and remote upload has no receiving fixture here. Run the focused owner with the package's `test:oracles` command. A timeout mutant proves a progress failure, not every value assertion. |
261| SQLite persistence and native hosts | [persisted histories](https://github.com/TanStack/db/blob/main/packages/db-sqlite-persistence-core/tests/persisted-oracle.test.ts), [reset/resume histories](https://github.com/TanStack/db/blob/main/packages/db-sqlite-persistence-core/tests/sqlite-core-adapter-oracle.test.ts), [dual-adapter resume snapshots](https://github.com/TanStack/db/blob/main/packages/db-sqlite-persistence-core/tests/sqlite-resume-snapshot-oracle.test.ts), [Browser composed-owner histories](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/tests/per-collection-coordinator-oracle.test.ts), [Browser coordinator RPC](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/tests/browser-coordinator-oracle.test.ts), [shared-driver fairness](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/tests/shared-driver-fairness-oracle.test.ts), [driver contracts](https://github.com/TanStack/db/blob/main/packages/db-sqlite-persistence-core/tests/contracts/sqlite-driver-contract.ts), [Node shared-handle scheduling](https://github.com/TanStack/db/blob/main/packages/node-db-sqlite-persistence/tests/node-driver.test.ts), [OP-SQLite shared-handle scheduling](https://github.com/TanStack/db/blob/main/packages/react-native-db-sqlite-persistence/tests/op-sqlite-driver-oracle.test.ts), [browser OPFS lifecycle](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/tests/opfs-page-lifecycle-oracle.test.ts), [worker diagnostics](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/tests/opfs-worker-diagnostics-oracle.test.ts), [Electron IPC and composed owner](https://github.com/TanStack/db/blob/main/packages/electron-db-sqlite-persistence/tests/electron-ipc.test.ts), [113-law manifest](https://github.com/TanStack/db/blob/main/packages/db-collection-e2e/src/fixtures/persisted-conformance-manifest.ts) | Core cache/remote rejection/peer/reopen histories, atomic reset/resume lineage, key-set evidence, dual-adapter races, queued coordinator reload/gap notifications during startup, unscheduled startup/reset overlap, and exact driver results. The shared core-adapter contract checks custom local comparator dispatch for ascending, descending, and comparator-equal public-key ordering at `loadSubset` completion. Host packages register this contract, but the local sqlite3 CLI run does not prove native host execution. Browser composes public source commits with per-collection elected-owner routing and covers the complete committed-transaction wire partition through deterministic Node transport seams. Remote-subset histories distinguish logical demand, physical acquisitions, exact acquisition leases, and released replay tombstones. Electron composes source commits with a per-collection renderer owner, IPC adapter, real SQLite, and reopen checks. The shared-driver fairness owner checks K=1 complete-logical-hydrate scheduling with identical fixed, random, and seed-plus-path campaigns. It records public rows, raw dequeue reach, and a persist-first FIFO hostile control. Its Chromium OPFS fixture refines the provider boundary but does not establish a browser matrix, elapsed-time latency, unbounded eventuality, or multi-process coordination. Same-handle Node and OP-SQLite tests cover transaction admission. Controlled OPFS page/worker histories cover ownership and diagnostic-cause retention. The reset/resume owners use sqlite3 CLI and in-memory node:sqlite seams; they do not prove multi-process WAL, mobile/Tauri, or other native-device execution. Distinct database handles rely on SQLite lock admission rather than one in-process queue. React Native hosts without async-context propagation must use the transaction driver supplied to the callback for nested work. Fake workers and synthetic page events do not prove native handle release or real bfcache admission. The Browser composed seams are not real multi-context/OPFS-worker execution; the Electron harness is not an actual Electron process unless its explicit runtime-bridge mode runs. An ownerless elected node suppresses core routing, while a follower may route demand to the elected owner; host coordinators retry only classified transport or admission failures while demand remains retained. The manifest excludes progressive and move suites; registration and shim runs are not device execution. |
262| SQLite expression-index planning | [Node expression-index oracle](https://github.com/TanStack/db/blob/main/packages/node-db-sqlite-persistence/tests/expression-index-oracle.test.ts) | RFC #1659 invariant 8 owns identical persisted-index and runtime-expression shapes. Independent expected keys are checked against direct captured SQL, adapter results, and named-index plans. Generated BigInts use SQLite's signed range; one fixed case checks legacy oversized-value reads. Other limits: bounded unqualified JSON paths/scalars, Node BetterSQLite, and no null, arbitrary raw SQL, or native-host planning. Run the package's `test:oracles` campaign. |
263| Offline execution | [scheduler](https://github.com/TanStack/db/blob/main/packages/offline-transactions/tests/KeyScheduler-oracle.property.test.ts), [leadership](https://github.com/TanStack/db/blob/main/packages/offline-transactions/tests/leadership-replay-oracle.property.test.ts), [settlement](https://github.com/TanStack/db/blob/main/packages/offline-transactions/tests/transaction-settlement-oracle.property.test.ts), [serialization](https://github.com/TanStack/db/blob/main/packages/offline-transactions/tests/transaction-serializer-oracle.property.test.ts), [web connectivity replay](https://github.com/TanStack/db/blob/main/packages/offline-transactions/tests/connectivity-replay-oracle.test.ts), [review record](oracle-reviews/pr-1879-visible-replay.md) | Declarative FIFO eligibility, per-transaction outcomes, durable state and typed wire trees. The web connectivity owner checks a persisted write under a false browser online hint, then visible replay by event or explicit retry, at provider-call, outbox, and caller-settlement cuts. It uses controlled browser globals and fake storage; it does not prove actual browser network detection, genuine offline retry timing, multi-tab leadership transfer, or React Native behavior. Issued work may finish after ownership loss, but new work must not start. Exactly-once network execution is not promised. |
264| Frameworks | [React conformance](https://github.com/TanStack/db/blob/main/packages/react-db/tests/conformance.test.tsx), [React pagination](https://github.com/TanStack/db/blob/main/packages/react-db/tests/infinite-query-conformance.test.tsx), [shared suites](https://github.com/TanStack/db/tree/main/packages/db-collection-e2e/src/suites), [Vue synchronous publication](https://github.com/TanStack/db/blob/main/packages/vue-db/tests/useLiveQuery-publication-oracle.test.ts) | Exact exposed rows/pages and each framework's own lifecycle cuts. Vue's synchronous watcher checks insert, update, and nonterminal delete through supplied Collection and identity query inputs; it does not cover an empty final result, multiple changes in one transaction, or query recompilation. A React witness does not prove Vue/Solid/Angular/Svelte scheduling. Preserve their receiving registrations. |
265| Window-controller overlap | [shared infinite-query conformance](https://github.com/TanStack/db/blob/main/packages/db/tests/conformance/infinite-suite-oracle.ts), [React driver](https://github.com/TanStack/db/blob/main/packages/react-db/tests/infinite-query-conformance.test.tsx), [Vue driver](https://github.com/TanStack/db/blob/main/packages/vue-db/tests/infinite-query-conformance.test.ts), [Svelte driver](https://github.com/TanStack/db/blob/main/packages/svelte-db/tests/infinite-query-conformance.svelte.test.ts), [review record](oracle-reviews/dec-03-window-overlap.md) | Four or five ordered source rows, two window-settlement orders, and public snapshots after each settlement, a subscribed observer update, a detached controller read, and explicit recovery. Insertion and removal of the fifth row distinguish both continuation directions while an earlier error remains visible. The detached read follows a source change with no controller subscriber; its preloaded Collection retains the five-row window. The exact overlap uses the exported DB controller in each package realm. Framework hooks expose no controller preload, so this cell does not establish a hook scheduling path; direct hook paging remains in the adjacent shared scenarios. An unsubscribed controller has no notification claim. |
266| Structural values and ordered primitives | [hash values](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/hash-oracle.property.test.ts), [hash identity](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/hash-identity-oracle.property.test.ts), [MultiSet consolidation](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/multiset-consolidate-oracle.property.test.ts), [hash graphs](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/hash-graph-oracle.property.test.ts), [mixed hash graphs](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/hash-mixed-graph-oracle.property.test.ts), [hash retry](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/hash-failure-retry-oracle.property.test.ts), [comparison](https://github.com/TanStack/db/blob/main/packages/db/tests/comparison-oracle.property.test.ts), [deep equality](https://github.com/TanStack/db/blob/main/packages/db/tests/utils-oracle.property.test.ts), [cursor](https://github.com/TanStack/db/blob/main/packages/db/tests/cursor-oracle.property.test.ts), [indexes](https://github.com/TanStack/db/blob/main/packages/db/tests/index-update-oracle.property.test.ts), [BTree Map](https://github.com/TanStack/db/blob/main/packages/db/tests/btree-map-oracle.test.ts), [query identity](https://github.com/TanStack/db/blob/main/packages/db/tests/query/identity-output-shape-oracle.test.ts), [LIKE semantics](https://github.com/TanStack/db/blob/main/packages/db/tests/query/compiler/evaluators-oracle.test.ts) | Independent flat values, graph topology, algebraic laws, Map/group/sort recomputation, expression denotation, custom comparator dispatch/reference identity/index compatibility, LIKE wildcard refinement, compiled output bags, declared value-pair agreement between D2 equality keys and IR equality operands, and Collection collation with exact public scan/index order and one-index reuse across repeated reads. The auto-index cells cross BasicIndex and BTreeIndex; scan cells omit indexes. Both paths cover lexical and numeric `en-US` locale defaults plus an explicit ordinary locale override of a numeric default. An unindexed six-row work cell bounds Collection collation resolution to at most two reads per ordered scan: one index-path check and one scan clause. Other locales and ordered histories are outside this owner. The identity pair grammar covers primitives, signed zero, NaN/invalid Date, valid Date/timestamp, binary/Buffer, Temporal, nested references, symbols, and functions; fixed and sampled pairs do not prove every JavaScript value or hash collision freedom. Ref proxies are expressions rather than literal values in this lane. The deep-equality owner also pins that `deepEquals` ignores Map and Set insertion order, RegExp `lastIndex`, array holes, and typed-array class, the rules draft equality keeps. It also pins that objects of another class differ, that plain and null-prototype objects are one class, that a class instance without enumerable keys equals only itself, that URLs compare by `href`, and that typed-array elements compare like numbers. The hash-values owner samples Set/object and Map/object type-marker distinctions in fixed and random campaigns with seed-and-path replay; collision freedom is not promised. The hash-identity owner checks `hash` and `equalHashValues` against one spec-level identity model: primitives with signed zero, NaN, and bigint; reference leaves (functions, registered handles, `File`, binary over 128 bytes); Date, binary, Temporal, and RegExp headers; array length and holes; Map and Set insertion order; and object keys in any order, for acyclic values and for cycles through arrays, Map values, Sets, and plain objects. Map/Set order sensitivity is pinned current behavior, not a promise. Arrays from another realm, RegExps with a `NaN` `lastIndex`, getters, proxies, other cycle carriers, and pairs that differ only in a back-edge target are outside its grammar; pinned cases keep equality's cross-realm length check and strict RegExp field comparison. `hash-work.test.ts` pins how visited values and array/RegExp headers count toward the structural work cap, and that equality copies a shared Map's entries once per distinct pair ([code-weight hash dispatch review](oracle-reviews/code-weight-hash-dispatch.md)). Custom string indexes do not optimize ordinary ranges, and custom cursors remain unsupported. The LIKE owner covers boolean string matching and bounded work, not nullish three-valued logic or a general Unicode collation contract. Unsupported composite cursors reject. The MultiSet consolidation owner checks keyed, single-type, and structural identity, signed zero and NaN in keyed and single-number data, the retained first record, zero-sum removal, and input record contents. It does not assert output order. Its keyed grammar includes cross-type key and value collisions, non-finite numeric keys, the `\|` delimiter, symbol and function identity, and a direct-object/object-tuple delimiter control from #1948. Eight named collision witnesses and both generated campaigns are RED on `c879ba6d` and GREEN with the repair ([#1948 review record](oracle-reviews/issue-1948-keyed-consolidation.md)); the [code-weight consolidation review](oracle-reviews/code-weight-multiset-consolidation.md) records the earlier exclusion. The keyed reference uses direct value/reference equality, including SameValueZero for numeric keys. The unkeyed fallback keeps its original key and value domains. The direct `MultiSet` owner does not prove which `@tanstack/db` query shapes produce primitive keyed values or mixed-type source keys; that needs a live-query production witness. The index owner enforces one invalid-comparator law across both BasicIndex and BTreeIndex: for each comparator, accepted numeric prefix (including the empty prefix), and probe operation (add, update, eq/range lookup, take, build), the operation throws exactly when it receives a `NaN` or non-number result and never when every comparison is valid. A `signed infinity` comparator is the valid control, and a custom collation `compare` supplied through `compareOptions` is checked the same way. Two BTree Map split histories check inserted-key reads, exact whole-range payloads/order, size, and extrema, proving split placement follows the insertion index without a post-mutation comparison. A rejected index add or remove leaves the index refining its accepted rows; update and build are not atomic. At the Collection boundary, both index types and both write paths (optimistic insert, sync commit) crash the collection: status becomes `error` and the next mutation throws, so a usable collection never holds rows its subscribers were not told about. Open: a sync source can still commit writes on a collection in `error` state, which stores unpublished rows; this is existing `markError` behavior and needs a lifecycle-owner witness. Comparator transitivity is outside this evidence. |
267| WHERE predicate publication | [WHERE predicate publication oracle](https://github.com/TanStack/db/blob/main/packages/db/tests/query/where-predicate-publication-oracle.property.test.ts) | An independent Kleene evaluator judges `eq`/`not`/`and`/`or` predicates over strings, a normalization-prefixed string, booleans, numbers, `NaN`, a valid Date, `null`, a missing field, and virtual fields. Snapshot histories with pending optimistic inserts compare a live query, direct subscribers with and without initial state, and `currentStateAsChanges`; change histories apply multi-key sync transactions, including reinsertion of a key deleted earlier, and compare every consumer's key set after each commit, on scan and `BasicIndex` paths. Peer subscribers share one field with different literals, plus one on a virtual field, so every published change must reach exactly the subscribers whose predicate it can satisfy; routing mutants that ignored the previous value, ignored the field, delivered a change twice, or routed while stale published rows awaited reconciliation fail here. Fixed witnesses cover a layout-only publication reaching a filtered subscriber as one empty batch, a filtered subscriber's empty Collection-readiness batch, retraction of a vanished row after eager cleanup and restart, and the new row plus exact subscriber update payload when a same-key row stays TRUE. A stale-live-value mutant survives the generated membership checks but fails the payload witness. A focused [property-visibility test](https://github.com/TanStack/db/blob/main/packages/db/tests/query/where-prefilter-property-visibility.test.ts) compares the public unindexed snapshot with the enriched-row contract for inherited, non-enumerable, enumerable-own, and nested getter paths; the pre-fix stored-row shortcut failed three of its four controls. Other property-descriptor and stateful-getter histories remain outside those fixed controls. Hostile mutants for FALSE-for-UNKNOWN `eq`, `or` or number-literal subscription prefilters, a prefilter that ignores the previous value, a skipped readiness batch, a skip while stale published rows await reconciliation, and an unindexed snapshot scan that reads only synced rows while an optimistic insert or delete changes visibility passed the prior `@tanstack/db` suite and fail here. Change routing withholds a dropped row from an `eq` subscription before its sent key could be recorded, so a mutant that records dropped rows as sent is equivalent for routed predicates in this oracle. A focused `collection-subscription.test.ts` witness checks that a dropped insert or update, alone or beside a matching change, cannot advance a limited subscription's page offset under a routed `eq` and an unrouted `or` predicate; the unrouted cases beside a matching change kill that mutant, and the unrouted `alone` case does not. A loose-equality prefilter is an equivalent mutant: it only skips less. Skipping during truncate replay also survives; the replay's baseline diff re-derives the same retraction, so the guard keeps the prior dataflow without its own witness. Generated cleanup and restart histories for filtered subscribers remain open for the lifecycle publication owner. No-op updates, other comparison operators, Temporal and binary operands, joins, ordering, optimistic updates, and truncate are outside this owner. It runs in `@tanstack/db`'s `test:oracles` campaign. The [2026-09-30 review](https://github.com/TanStack/db/blob/main/docs/contributing/oracle-reviews/2026-09-30-where-predicate-and-join-keys.md) records each ORC outcome. Change routing was later removed in favor of pooled live queries; the routing mutants above are historical, and the same peer laws now check plain subscription dispatch. The unindexed snapshot prefilter was restored for compiled queries as one stored-row `eq` test on a string or boolean literal. Its property-visibility test also covers the reverse direction: a stored row with an inherited or non-enumerable field must still match `isUndefined` on that field, which a scan that evaluated the full predicate on stored rows fails. |
268| Joined result keys | [Joined result key oracle](https://github.com/TanStack/db/blob/main/packages/db/tests/query/join-result-key-oracle.property.test.ts) | A nested-loop model recomputes the pair set of an inner, left, or full join over source keys drawn from plain, comma-bearing, bracket-bearing, and quoted strings, numbers beside the strings that print the same, both infinities, and `NaN`. After preload and each synced group change, the published rows must equal the model's pairs and the result key count must equal the row count. The comma-joined key encoding fails its two pinned histories and both campaigns; plain `JSON.stringify`, which prints infinities as the missing-side `null`, fails the pinned infinity history and both campaigns. A pinned history in which a `NaN`-keyed pair leaves and re-forms fails when the join index compares source-key prefixes with `===`. Joins over subqueries, more than two sources, custom `getKey`, and optimistic mutations are outside this owner. It runs in `@tanstack/db`'s `test:oracles` campaign. The [2026-09-30 review](https://github.com/TanStack/db/blob/main/docs/contributing/oracle-reviews/2026-09-30-where-predicate-and-join-keys.md) records each ORC outcome. |
269| D2 Index storage | [Index refinement oracle](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/index-refinement-oracle.property.test.ts) | A plain-`Map` model sums multiplicities under a type-and-value identity in which `NaN` equals `NaN` and `-0` equals `0`. Histories of up to twelve additions to two keys mix prefixed arrays with `NaN`, `0`, `-0`, `1`, `'1'`, `1n`, and `'a'` prefixes and unprefixed values, with cancellation and reappearance. After each addition, `get` and `has` must equal the model. Comparing prefixes with `===`, which disagrees with the `Map` that holds them, fails three pinned histories and both campaigns; the `-0` control passes under both. Compaction, presence tracking, and structural payloads are outside this owner; the join operator tests and incrementalization law own operator behavior. |
270| Pooled live queries | [pooled live query oracle](https://github.com/TanStack/db/blob/main/packages/db/tests/query/pooled-live-query-oracle.property.test.ts) | An independent `eq` model (nullish UNKNOWN, Date as timestamp, `NaN` equal to `NaN`, `-0` equal to `0`) gives membership; a live-query Collection compiled for the same query gives order, values, and status. Histories mix sync transactions, optimistic writes confirmed or rolled back, peer mounts and unmounts, and source cleanup and restart, including cleanup while a write is pending and a mount between cleanup and restart. Wholesale observers must match after every step, granular changes must match a reference observer by type, key, value, and previous value and replay to the model's rows, the layout revision must advance when keys reorder, and observing must never build the live-query Collection. Peers may add a residual `not(eq(...))` conjunct, which the model evaluates itself; a view that ignores it, reports an unfiltered `entries()`, or delivers a row entering or leaving it as an update fails it. Other residual operators use the same compiler evaluator but are not generated. Peers may also order their rows by `id` or by a `g` that can be null, with explicit `nulls`; order comes from the reference. A comparator that ignores direction or `nulls`, an order left out of the partition key, and key order instead of the query's order each fail the pinned reorder history and both campaigns. A partition that ignores a row's previous group, orders by arrival, skips normalization, skips the initial snapshot, follows the source's status after cleanup, or never terminates fails it. Two shared conformance scenarios (`eq-filter-rows`, `eq-filter-peers`) run the pooled path under React, Vue, Solid, Svelte, and Angular; a partition that ignores a row's previous group fails both under every adapter, and `eq-filter-peers` checks through `subscriberCount` that each adapter shares one source subscription per partition. A focused [release-timing test](https://github.com/TanStack/db/blob/main/packages/db/tests/query/pooled-live-query-gc-oracle.test.ts) compares when a pooled query and a live-query Collection release their sources across `gcTime` 1, 100, 0, and `Infinity`, with and without a subscriber, and with no `gcTime`, where both use the live-query Collection default, checks that a partition waits for its views' longest `gcTime`, checks that a view resubscribed after its partition released follows later source writes as its live-query Collection does, including a view with a residual conjunct, and checks that a partition that subscribes again still serves new mounts from one source subscription. Further focused witnesses check that a partition keeps groups only for values that have rows or watchers, that a detached reader never sees a dropped group's revision reused, keep a pooled query's public Collection live while the view is observed, accept it as a query source, and check that a pooled query turns terminal when source cleanup starts while the adapter's cleanup is still pending, as a live-query Collection does. A pinned oracle witness checks that an `eq` path whose getter throws excludes the row on both paths; a pooled path that rethrows fails it. The pooled oracle's grammar never releases a partition, so release and resubscribe histories rely on these fixed witnesses; a fixed delay, a missing unsubscribed floor, a last-`gcTime`-wins rule, and releasing at `gcTime` 0 each fail it. The [2026-10-01 review](oracle-reviews/2026-10-01-pooled-live-queries.md) records each ORC outcome. |
271| Flat-row change tracking | [flat change tracking oracle](https://github.com/TanStack/db/blob/main/packages/db/tests/flat-change-tracking-oracle.property.test.ts) | Generated callbacks over flat rows, frozen or not and with or without a non-enumerable field (assignments of `0`, `-0`, `NaN`, `undefined`, functions, and fresh objects; reverts; deletions; added fields; data and accessor `defineProperty`; stored drafts; throws), run through the flat tracker, the draft proxy, and an independent model, which must report the same change sets with `0` and `-0` equal, or throw the same error and leave the rows unchanged. Defining a field acts as assigning it, and a non-enumerable field is row data only once written; the proxy broke three of those laws on `main` and the flat tracker one. Diffs using `!==`, `Object.is` alone, or no deletions fail it. It found that the proxy dropped a field added as `undefined` when another field reverted; the pinned history and both campaigns fail without that fix. Non-flat rows must fall back. The [2026-10-01 review](oracle-reviews/2026-10-01-pooled-live-queries.md) records each ORC outcome. |
272| Virtual props cache | [cache laws](https://github.com/TanStack/db/blob/main/packages/db/tests/virtual-props-cache.test.ts) | Focused laws for the per-key cache of rows read with virtual props: a change's published value is the row later `get` and `toArray` reads return, for every subscriber, after sync and local writes, and a key that is deleted or rolled back leaves the cache. Enriching the value before the previous value fails the first two; skipping the drop on delete events fails the third. Rows read with virtual props through other paths, such as joins, are outside these laws. |
273| Local-only direct writes | [direct write witnesses](https://github.com/TanStack/db/blob/main/packages/db/tests/local-only-direct-write-oracle.test.ts) | Focused witnesses pin when a local-only direct write skips the optimistic stage: a completed transaction and one publication per write, and the fallbacks for a pending, persisting, or ambient transaction and a user handler, for insert, update, and delete. Each history also runs on a local-only Collection whose handlers resolve, which must match its rows, change batches, errors, and transaction states, across mixed multi-key batches, a batch that fails midway, schema rejection, and handler rollback. Mutants that drop each guard, write only the first mutation, or never complete the transaction fail them. The change-event history oracle drives the direct path through generated histories (about two thousand writes per run); removing the guard, or guarding only persisting transactions, fails these witnesses. |
274| Reused sync row objects | [reused row witness](https://github.com/TanStack/db/blob/main/packages/db/tests/sync-reused-row.test.ts) | Focused witnesses for a sync source that changes a stored row object in place: in development, writing it again as an update without `previousValue` throws, while the same write with `previousValue`, or with a new object, moves the row out of an `eq` live query. Production skips the check. The check compares a shallow snapshot taken when the object was written, so it misses changes to nested fields; a write that names `previousValue` and a row whose fields throw on read are not checked. |
275| Index suggestions | [collection-size suggestion oracle](https://github.com/TanStack/db/blob/main/packages/db/tests/index-suggestion-oracle.test.ts) | A public filtered live-query Collection checks manual/default, eager, threshold, matching-index, and unrelated-index cases against the documented collection-size suggestion policy. The original manual-silence/eager-noise implementation failed two expected observations. The owner does not judge repeated-query warning volume, slow-query timing, query work, production-build suppression, or every query shape. It runs in `@tanstack/db`'s `test:oracles` campaign. |
276| Minified DB public API | [consumer bundle check](https://github.com/TanStack/db/blob/main/scripts/test-minified-db.mjs) | CI builds `@tanstack/db`, then bundles its built `dist` entry with db-ivm inlined through esbuild `minify: true`. The build renames TypeScript-private members from `packages/db/mangle-cache.json`, so this lane runs against the renamed output that consumers install. It rejects a `dist` that is older than `src`, the cache, or the package's build configuration. `pnpm --filter @tanstack/db test:dist` also runs five db test files against the built `dist`, chosen for coverage of the modules with the most renamed members. `pnpm check:mangle` fails when a cached name is used other than as a private member in db src, is read by another package, appears as a string, or has a short name that collides with a source identifier ([private-member mangling review](oracle-reviews/code-weight-private-member-mangling.md)). It checks every exported error class's current public `name`, the built-in `BasicIndex` resolver name in index metadata and its event, complete query rows (after removing the four documented virtual fields) against an independent array filter/sort/projection, and one live update. The `new.target.name`, public-member mangle, and extra-output-field calibration modes fail at the intended observations. This fixed slice does not replace the unminified generated oracles, exercise framework adapters, or establish stable names for custom index resolvers. |
277| Boundary refinements | [cleanup/restart](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-cleanup-restart-oracle.test.ts), [idle cleanup](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-idle-cleanup.test.ts), [issue #1891 async-cleanup review](oracle-reviews/issue-1891-async-cleanup.md), [issue #1891 cleanup-start follow-up](oracle-reviews/issue-1891-cleanup-start-followup.md), [metadata publication](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-metadata-publication-oracle.property.test.ts), [row metadata composition](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-row-metadata-composition-oracle.test.ts), [state retention](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-state-retention-oracle.property.test.ts), [acquisition cells](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-subscription-lifecycle-oracle.test.ts), [D2 source reconciliation](https://github.com/TanStack/db/blob/main/packages/db/tests/d2-source-reconciliation-oracle.property.test.ts), [top-K support windows](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/operators/topk-support-window-oracle.test.ts), [nested Query work](https://github.com/TanStack/db/blob/main/packages/query-db-collection/tests/includes-work-counter-oracle.test.ts) | Explicit lifecycle products, independent source maps and weighted relations, exact publication cuts, support/multiplicity, and value-plus-work observations. These refine the larger subsystem models; they do not replace them. |
278| Small structures and test mechanics | [SortedMap](https://github.com/TanStack/db/blob/main/packages/db/tests/SortedMap-oracle.test.ts), [cleanup queue](https://github.com/TanStack/db/blob/main/packages/db/tests/cleanup-queue-oracle.property.test.ts), [live-query GC clock](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-gc-clock.test.ts), [guarded replay](https://github.com/TanStack/db/blob/main/packages/db/tests/oracle-replay.test.ts) | Map/full-sort and elapsed appointment-list models with executed target/seed/path checks. SortedMap also checks deferred bulk writes, array-movement work, scan reuse, live iterators, runtime `undefined` keys, and public single-transaction and queued-transaction Collection sync paths. It does not settle the contract for comparator-observed values mutated after publication or every legal iterator/mutation interleaving. Wall-clock steps do not move due times, and a focused public witness checks source subscription release. Callback-reentrant scheduling, OS suspend/resume, environments without `performance.now()`, and fake/real Performance clock replacement while GC is pending remain outside this coverage. Tests must drain or reset pending GC before switching timer providers. |
279
280The [React source ID reuse oracle](https://github.com/TanStack/db/blob/main/packages/react-db/tests/source-id-reuse-oracle.test.tsx) ([review](oracle-reviews/issue-1991-react-source-id.md))
281checks that a mounted derived-identity hook rejects a different same-ID
282source Collection directly, after an intervening ID and predicate, within one
283query, and after source cleanup. Stable sources, new IDs, a fresh hook after
284cleanup, and independent client scopes remain usable. Returning to a prior
285client scope retains that scope's binding, including through `DbProvider`.
286A suspended render that starts a source query also claims the ID until unmount.
287Separate client-scoped Suspense hooks and an initial suspended retry keep their
288same-ID sources distinct. A rejected collision render releases sync-start
289deferral for a different shared client descriptor; a later direct reader reaches
290`ready` and observes its row. The public rerender error, status, or row is the
291observation cut. A second controlled history makes two deferred sync starts
292throw and checks that a later shared source still starts and publishes its row.
293This distinguishes releasing every pending source from stopping at the first
294startup error. The first thrown error still reaches React's error boundary.
295This owner does not constrain explicit `queryKey`, direct Collection input,
296or legacy dependency-array identity, and it does not install a process-wide ID
297registry. Real persisted SQLite sources and DbClient SSR preload/streaming
298remain outside this controlled React driver. A space policy for a mounted hook
299that visits unbounded distinct source IDs remains open; this owner needs a
300bounded-navigation counter witness once that policy is chosen.
301
302The SQLite core binding-capacity oracle in
303`packages/db-sqlite-persistence-core/tests/sqlite-core-adapter-oracle.test.ts` is a
304bounded owner for issue #1993. The
305[review record](oracle-reviews/issue-1993-sqlite-binding-capacity.md) gives the
306exact executable revision and guide audit. It failed on the original 900-item
307chunking and passes with one JSON table binding per runtime `IN` list and a
308statement-total fallback. It compares independently filtered rows and typed
309values with
310`loadSubset` on real Node prepared SQLite statements. Node versions that expose
311the configured 999-parameter limit use that native cap. Older versions use a
312controlled driver that rejects over-cap bindings before SQLite preparation;
313the oracle tests that guard separately. Fixed and generated cases cover empty lists, 998/999/1000
314single lists, 499+500 and 500+500 statement totals, mixed scalar/list and
315nested predicates, root and distinct transaction-driver routes (including an
316omitted transaction cap at the 100/101 driver boundary), signed-64-bit BigInt edges,
317escaped strings, an ordered two-hit list across the old 900-item chunk, both
318cursor SELECTs, and a 1,000-scalar fallback. Both index-definition `IN`
319contexts must remain literal SQL. The existing CLI
320large-list test substitutes values into SQL and cannot witness parameter
321capacity. This new owner does not establish behavior for null, nonfinite,
322container, or structured values; 50,582-ID stress; JSON-function availability;
323the cost of a full-table fallback; concurrent writers; or browser, mobile,
324Tauri, and native-host execution. The core owner needs typed equivalence and
325row-read work witnesses before claiming class closure. Each host driver owns a
326receiving capacity witness for its real SQLite engine.
327
328The Query ownership oracle checks that a direct-write promise stays pending
329while a controlled persisted adapter holds its sync commit and settles after
330the adapter stores the row. It also checks that all five direct-write methods
331reject after cleanup starts and that a restarted sync run can persist a new
332write. Focused Query tests check a synchronous batch callback returning another
333Collection's write without losing either write, while an async callback still
334rejects. They also check two serialized updates: after each awaited response
335write and mutation settlement, the public row shows the server revision. These
336witnesses cover an eager Query Collection after initial load with a controlled
337adapter, not a direct write already in flight when cleanup starts, native
338SQLite, or overlapping Query revalidation. The Query ownership and
339optimistic-history owners still need a joint generated witness
340for competing source writes around mutation settlement.
341
342The hash-identity owner also runs every law in a second module copy whose
343initialization draws are all equal, so every type marker has the same hash
344number in any declaration order. There it checks equality verdicts, equal
345hashes for equal identities, cycle rejection, and a `topKBatch` Map-to-Set
346replacement; only the sampled distinct-hash control is skipped. This closes
347the equality type-separation witness for every generated carrier. It does not
348prove hash collision freedom. Generated Map keys include numbers, symbols,
349references, and containers, and the model merges keys under SameValueZero.
350
351The [NaN ranked-window review](oracle-reviews/2026-09-30-nan-ranked-window.md)
352records an eager direct-source refinement in the pagination owner. It covers
353initial ascending and descending windows, two NaN tie values, an offset move,
354and equal, changed, and deleted source ranks. On-demand NaN rank acquisition,
355joined queries, and null/NaN order combinations still need public witnesses in
356the pagination owner before they support a broader claim.
357
358The [Angular conformance driver](https://github.com/TanStack/db/blob/main/packages/angular-db/tests/conformance.test.ts)
359checks a required signal input on a real TestBed component. Angular assigns
360the input after field initialization, then the driver checks rendered data and
361exact selected IDs after initial change detection and one input change. The
362driver supplies the AOT-equivalent signal-input flag because this suite uses
363Angular's JIT test environment. It does not exercise Angular's AOT compiler,
364older Angular runtimes, or every scheduler cut. The same driver checks that an
365explicitly disabled query reports `disabled` and ready before effects run.
366
367The query identity owner generates both equal and unequal primitive string
368pairs. Its fixed pairs also check public `groupBy` rows after initial
369publication. End-to-end subset-demand reuse is still unproven: the demand-key
370check observes internal identity only. The identity owner needs a subscription
371witness that compares public rows and acquisition counts after equivalent and
372distinct predicate demands settle.
373
374The subscription callback-reentry companion kills eleven guard-deletion mutants
375at the named request, resource, status, replay, or retention checkpoint on the
376reviewed production head. It also checks that releasing a direct snapshot
377during an unoptimized callback or snapshot evaluation prevents publication.
378A combined-predicate loader case checks release by the original request
379predicate before the loader returns. Three
380guards remain for a separate code-weight review (SUBS-09): M1's generation
381check after `loadSubset` is followed by demand-membership and generation checks
382after cleanup removes a starting demand; M6's replaced-state check before
383restart setup is followed by detached-demand and replay-state checks; M8's
384`releaseAttempted` true branch was unreached in 538 focused tests and its callers
385remove or detach ownership before invoking adapter unload. These are bounded
386equivalence arguments, not permission to delete the guards without a separate
387review. The companion does not establish arbitrary provider callback behavior.
388
389Row canonicalization before the result boundary now runs only for DISTINCT,
390which tracks visibility by selected value; removing it fails the functional
391projection oracle. Ordering already consolidates each key's batch before top-K
392state changes, and materialized relations reduce by public key. Removing the
393former parent-route, non-Collection source, join, grouping, ordering, and
394includes conditions passed the whole `@tanstack/db` suite and a
395`TANSTACK_DB_ORACLE_RUNS_MULTIPLIER=10` oracle campaign. Without the keyed
396reduction, `live-query-result-multiplicity.test.ts` witnesses the output
397boundary rejecting a flush that changes one key by more than one row.
398
399The Collection lifecycle publication owner checks 32 bounded histories in which
400cleanup interrupts nested publication deferrals and a restarted sync run later
401publishes or discards one or two source rows. It compares the next subscriber's
402exact batch when the new deferral closes, including an old handle closed before
403or during that deferral. The includes publication owner still needs a
404compiled includes witness for cleanup during a discarded source deferral,
405followed by a parent or child publication at its callback boundary.
406
407The [Temporal group-key oracle](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/temporal-group-key-oracle.test.ts)
408owns the db-ivm `groupBy` value boundary for the eight Temporal kinds recognized
409by structural hashing. It compares public group counts with fixture-defined
410identity classes after one input batch, including distinct and matching fresh
411values and a plain object with its own spoofed Temporal tag. Nested
412serialization controls cover records, arrays, Maps, and Sets. Incremental
413retractions and unsupported symbols, cycles, and mutable RegExp state are outside
414this owner's bounded domain. The owner uses db-ivm's established kind-and-string
415Temporal key domain. Alternate representations remain separate: Durations such
416as `PT1H` and `PT60M` form different groups even when they compare equal. The
417supported inputs are ordinary native Temporal values or values from one
418polyfill copy. A custom prototype that impersonates Temporal can still merge a
419plain object with a genuine value. A genuine value with a replaced prototype
420can split from an equal value. Both altered-prototype cases and separately
421loaded polyfill copies are outside this contract. The oracle still protects a
422plain object's own spoofed tag without a custom prototype.
423
424The [includes publication oracle](https://github.com/TanStack/db/blob/main/packages/db/tests/query/includes-publication-oracle.test.ts)
425now checks one held ordered repair with two public parent rows and one inline
426child. Its bounded history crosses a single-step row move, a private value
427change that returns to the prior value, and a final value change. It compares
428root Collection reads and subscriber callbacks with an independent sorted
429source Map, and checks Effect callbacks against the last callback-visible row.
430Its optimistic rollback histories also require the callback to be reached and
431compare the restored public rows and callback trace after rejection. This
432rejects a final-row-only check that misses a torn callback publication.
433The [DEC-02 review record](oracle-reviews/2026-09-28-retracted-value-retention.md)
434retains the RED and mutant evidence. The receiving Collection-valued owner
435(`packages/db/tests/query/includes-collection-oracle.property.test.ts`) now
436checks a held finite ordered child repair request with A→A, A→B→A, and B→C histories,
437facade identity, silence during the hold, final child order, and subscriber
438delivery. The optimistic owner
439(`packages/db/tests/query/includes-optimistic-oracle.property.test.ts`) checks
440a same-root-row optimistic update during held ordered repair, comparing exact
441public snapshots and change events before release, after release, and after
442rollback. Both use controlled provider timing; real-provider ordering remains
443a separate receiving handoff.
444
445The ordinary committed-transaction companion in the SQLite resume-snapshot
446owner checks durable rows, row and collection metadata, expected-key evidence,
447tombstones, applied position, idempotent reapply, and replay threshold behavior
448for bounded insert, partial-update, delete, metadata-only, and repeated-key
449histories. Its fixed and random generated campaigns cover a two-row seed,
450ordered action prefixes, seven required action/metadata suffixes, optional
451dependent updates, and late-bookkeeping rollback, comparing durable state after
452each settlement. The generated grammar is bounded to two writable string keys,
453one absent metadata key, up to 60 prefix mutations sampled in short, middle,
454and long bands, three row-metadata and
455two collection-metadata prefix actions, and up to three committed positions;
456it does not claim arbitrary histories or concurrent owners. Every generated
457seed, candidate, dependent update, and late rollback must enter exactly one
458SQLite transaction; counters are captured before durable snapshot reads. A
459separate fixed/random generated work grammar covers 0–60 distinct keys, six
460insert/update/delete/row and collection metadata shapes, and 100/999 parameter
461caps. It checks
462durable values before applying the same proposed chunk-bound work law; all
463repeated-key histories now check a distinct-key work bound after both committed
464and rolled-back candidates. A fixed 205-update single-key case drops from 824
465to 8 query/run calls against a bound of 18. Truncate cases require overwritten
466invalid row and metadata values, including unbindable `undefined` collection
467metadata, to reject and roll back. Fixed 25/26 and
46810,000-row cases separately witness the independent-key work boundary. Both
469fixed and generated independent-key work laws were
470RED on `ef1e6a4` and are GREEN with ordinary batching: the 10,000-row insert
471plus metadata takes 505 query/run calls instead of 50,005. A later
472125-row-ceiling follow-up checks 124/125/126 rows under a 500-parameter host
473cap; the 10,000-row case now takes 405 calls. A temporary
474repeated-key classifier mutation fails the generated oracle at the candidate
475durable checkpoint, seed 1992, path `2:0:0:2:2:2:2`. A temporary chunk-limit
476mutation passes the Cloudflare 25-row case but fails at 26 rows under the
477100-parameter guard. A collection-metadata classifier mutation that ignores
478repeated keys fails at the durable checkpoint for a set/delete history. All
479mutations were restored. The Cloudflare receiving driver also persists ordinary
480writes with row and collection metadata at 25, 26, and 205 rows within that
481guard. Its Node SQLite storage seam does not establish Cloudflare
482Worker execution. The synthetic node:sqlite seam does not establish OPFS
483worker scheduling, browser latency, or native-device performance. Tagged-value
484serialization, unavailable key evidence after raw loss, concurrent schema
485migration, WAL across processes, and arbitrary longer transaction histories
486remain with their existing owners or need explicit future witnesses.
487
488The SQLite resume-snapshot owner also checks a cold, unique-key, non-delete
489full replacement with 205 rows. It compares exact durable rows, row metadata,
490key-set evidence, resume metadata, and applied position at transaction return;
491the driver query/run count is bounded, and a later-batch fault rolls back the
492whole transaction. Duplicate-key and delete histories keep their sequential
493semantics. This in-memory driver-call law does not measure Chromium OPFS
494latency, worker scheduling, or an end-to-end Electric snapshot.
495
496The Cloudflare Durable Object test applies 25-, 26-, and 205-row full
497replacements and ordinary writes with row and collection metadata through the
498actual Cloudflare driver. A storage seam enforces Cloudflare's documented
499100-bound-parameter query limit and checks durable keys and metadata after each
500transaction. Its subset receiving witness compares exact rows for 100 and 101
501equality or one-item `IN` clauses through both savepoint and native transaction
502drivers; the same seam rejects a statement above 100 bindings. The original
503transaction driver exceeded the cap at 101. This Node SQLite seam does not
504execute in Workers or prove native JSON-function support.
505
506The browser OPFS lifecycle owner also checks that a silent initialization
507rejects at the default or overridden open deadline, terminates its worker,
508ignores a late response, and releases the deadline and abort listener after a
509successful open. It also checks an abort during synchronous option evaluation,
510after the initial signal check but before listener registration. A Chromium
511fixture holds the VFS database Web Lock while a second tab times out. It checks
512that the queued request disappears, then reopens the database after releasing
513the lock. This controlled lock holder does not
514reproduce a frozen tab or establish behavior in other browsers.
515The [issue #1883 review record](oracle-reviews/issue-1883-opfs-open-deadline.md)
516preserves the exact-head unit and Chromium evidence and the queued-lock mutant.
517
518The ordered-work owner also checks that an Effect with `skipInitial` waits for
519joined demand before ending initial callback suppression. A deterministic work
520counter rejects an extra joined-filter graph schedule on root readiness while
521preserving the joined-source wake-up. Nonterminal per-demand failure recovery
522is outside this owner: `failDemand` enters terminal live-query error while its
523plan record remains unsettled until sync teardown. A future recovery contract
524must reconcile plan and subscription pending state before reopening publication.
525Its startup witness covers one synchronous rank update after an indexed page
526load and before the last source subscription returns. It does not cover every
527source ordering, multiple buffered mutations, or asynchronous startup changes.
528The [ordered Effect startup review](oracle-reviews/gap-06-ordered-effect-startup.md)
529records its baseline and hostile-mutant observations.
530
531The Collection lifecycle change-event history owner also checks eager auto-index
532equality buckets and fresh indexed `eq` live queries against its independent
533row Map. Its required same-turn delete/reinsert prefix reaches an already-built
534index for both BasicIndex and BTreeIndex. In the batched lane, public rows and
535equality buckets are checked after each mutation returns, before any transaction
536is awaited; the batched final state and each sequential settled prefix are also
537checked. Fresh indexed queries are checked at the final checkpoint.
538Fixed and random tails check nearby legal histories. One temporary mutant that
539skipped index updates failed the fixed batched final count: one indexed key
540versus two model rows. Another fault that preserved the final keys failed the
541new returned-mutation check. The direct index refinement owner does not prove
542this Collection mutation path. Callback-time index agreement,
543the reported insert-seeded string-key setup, adapter cancellation, and
544non-local-only persistence remain outside this lane.
545The [issue #1912 review record](oracle-reviews/issue-1912-eager-index-history.md)
546records the grammar controls, exact reviewed commit, and ORC audit.
547
548The [live Electric immediate-reload witness](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/e2e/electric-immediate-reload.opfs.spec.ts)
549checks one Chromium/OPFS history: an `onInsert` handler receives PostgreSQL
550transaction evidence, `awaitTxId` and the optimistic transaction settle while
551the source row's adapter write is held, and a hard page close is followed by
552an empty raw OPFS snapshot before the recovering Collection or Electric starts.
553After release, the witness checks the exact public and durable row from live
554Electric and records that the reopened page sent no user-insert request. Public
555rows are polled before durable snapshots to avoid a full OPFS read on every
556pre-publication tick. This bounded history does not prove Windows/Edge behavior,
557offline recovery, arbitrary later re-inserts, or a durable-acknowledgment
558contract for `awaitTxId`.
559
560The [PR #1914 follow-up review record](oracle-reviews/pr-1914-immediate-reload-follow-up.md)
561preserves the held-checkpoint and extra-POST mutant results at the exact
562reviewed executable commit.
563
564The [PR #1902 review record](oracle-reviews/pr-1902-change-event-history.md)
565also covers one-pass queued-sync cancellation, partial-update dependencies on
566queued source rows, and focused late-hydration cases in
567`packages/db/tests/db-client.test.ts`. Those cases cross queued adapter insert
568and delete with a held local mutation. The
569[DbClient hydration authority oracle](https://github.com/TanStack/db/blob/main/packages/db/tests/db-client-hydration-authority-oracle.test.ts)
570crosses applied adapter insert, update, delete, and truncate with hydration
571before and after the applied receipt. It includes delete/reinsert and
572truncate/reinsert controls. These owners do not establish arbitrary hydration
573stream order, a later authoritative hydration epoch, or unbounded retention.
574
575The [two-tab OPFS remote-subset oracle](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/e2e/remote-subset-two-tab.opfs.spec.ts)
576now exercises a real Chromium follower with a QueryClient-backed, filtered
577on-demand live query. It checks the function-bearing local request, clone-safe
578follower post, public row, and rejection of an invalid nested wire value before
579transport. A raw-options mutant fails with browser `DataCloneError`. The
580[review record](oracle-reviews/2026-09-27-remote-subset-two-tab.md) names the
581exact reviewed commit. The test does not run React, Firefox/Zen, or a live
582backend, and it does not settle exclusive OPFS ownership during leadership
583transfer.
584
585The [two-tab live Electric OPFS oracle](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/e2e/electric-resume-two-tab.opfs.spec.ts)
586crosses real Chromium tabs, Web Locks, OPFS workers, PostgreSQL, and the
587installed Electric SDK. It checks distinct per-Collection schema versions,
588unchanged public and durable rows when a follower opens, leadership transfer
589with later source rows, and recovery of partial-row loss or a fully empty
590pre-key-ledger baseline with a stale resume marker. A wrapped source-commit
591test in `packages/browser-db-sqlite-persistence/tests/browser-coordinator-oracle.test.ts`
592checks scheduler entry before the writer-lock request; the old bypass fails at
593that order assertion. The live recovery histories also guard the resulting
594progress. These bounded histories do not prove Firefox/Zen,
595React rendering, React Native, arbitrary large datasets, or an exclusive-OPFS
596ownership topology. Their
597[review record](oracle-reviews/issue-1589-live-electric-opfs.md) preserves the
598RED and GREEN host observations.
599
600The [live Electric hydration-straddle oracle](https://github.com/TanStack/db/blob/main/packages/browser-db-sqlite-persistence/e2e/electric-hydration-straddle.opfs.spec.ts)
601owns one #1754 host history: an on-demand Collection has an initial durable row;
602an OPFS subset hydration is held after its local read; a PostgreSQL update
603begins an Electric source transaction during that hold; and the row-bearing
604commit is released only after the hydration scope exits. It checks the old row
605before release and the exact new public and durable row afterward, then after
606follower takeover and reopen. A late-buffer mutant leaves the old row in both
607observations. The [core persistence tests](https://github.com/TanStack/db/blob/main/packages/db-sqlite-persistence-core/tests/persisted-oracle.test.ts)
608own the adjacent during/straddling/after settlement, FIFO, abort, and failure
609histories. The live oracle does not prove eager-startup overlap, other mutation
610shapes, arbitrary Electric fetch schedules, Firefox/Zen, React rendering, or
611exclusive OPFS ownership. The
612[review record](oracle-reviews/issue-1754-live-electric-hydration-straddle.md)
613preserves the live-host and mutant evidence.
614
615### SQLite boolean predicate arity and row work
616
617`packages/db-sqlite-persistence-core/tests/sqlite-boolean-arity-oracle.test.ts`
618is the primary executable owner for bounded `and`/`or` predicate arity at
619`SQLiteCorePersistenceAdapter.loadSubset` return. Its independent three-valued
620model compares public keys while a `node:sqlite` driver records SQL and raw row
621work. The 960-case matrix and paired fixed and unseeded campaigns cover root
622arity 0–3, one nested operator, boolean and nonboolean operands, safe selective
623predicates, and sound candidate supersets for unsafe predicates. Eight direct cases challenge Unicode `ilike`
624and `like` patterns, tagged `NaN` comparison, lone-surrogate equality, and
625null-vs-missing under `not`. Paired- and lone-surrogate equality controls
626retain SQL row-work reduction.
627An empty-IN control and two-SELECT cursor composition check zero-row work.
628
629The original compiler was RED for unary and empty boolean work and multioperand
630under-selection. The first repair was RED for unsafe SQL prefilters: Unicode
631case folding, an emoji spanning two JavaScript code units, tagged `NaN`, and
632null-vs-missing under negation. A later lone-surrogate equality witness was RED
633for public rows and SQL work. The compiler now applies SQLite JSON extraction
634to the matching binding; paired and lone surrogates both keep indexed equality.
635The current compiler passes the bounded oracle.
636A removed-WHERE mutant fails the raw-row work law and a blind-unary mutant
637fails public rows. For this grammar, SQL pushdown admits every row that the
638in-memory evaluator could retain; a statically false AND may read zero rows
639even with an unsafe sibling.
640Mixed-AND witnesses retain a certified equality while an unsafe range, NOT,
641or OR sibling stays with the row evaluator. They cover child order and one
642nested AND, measure one raw row instead of twenty, and reject a removed-WHERE
643mutant. The unsafe OR mutant loses a public row.
644A fixed 80-level nested AND witness bounds compiler argument reads to linear
645work. It was RED on the prior quadratic compiler and is GREEN after removing
646the repeated subtree compilation; elapsed latency and arbitrary depth remain
647outside this owner.
648TimFL's 50,582-string-ID `AND(OR(IN, IN))` scope was RED for SQL row work:
649the adapter returned the right public row but read all 20 stored rows. A fixed
650real-SQLite witness now checks the public result, exact candidate count, two
651bound JSON arrays, and use of both named expression indexes. It includes
652lone-surrogate, NUL, and paired-surrogate string members. Mixed-type lists,
653other SQLite hosts, and elapsed-time gains remain outside this witness.
654
655The Node expression-index oracle checks the receiving SQLite query, raw
656candidate keys, public keys, and named-index plan. Its generated indexed
657grammar uses string equality, BigInt membership, numeric range, and string
658conjunction. Focused Date-epoch witnesses keep numeric equality and numeric
659membership on the JavaScript fallback path: a stored `Date(1)` matches numeric
660`1` in the row evaluator but is ISO text in the SQLite expression index. Fixed
661lower-wrapped BigInt membership and lone-surrogate coalesce witnesses also
662retain fallback: SQLite converts the former to text and encodes the latter's
663inline fallback differently from a JSON-extracted binding. Integer-bound
664range cases include adjacent fractional values and tagged or mixed scalars;
665this is bounded evidence, not a proof over every persisted representation.
666Large Number versus BigInt range cases check both operand directions, four
667inequalities, and unary boolean wrappers. Unsafe BigInt bounds admit a wider
668candidate range over the indexed expression for potentially rounded Numbers; JavaScript still
669decides the public result. Numeric-key object and array cases check public
670rows and named-index use through three digit segments, including mixed
671carriers. Deeper numeric paths use an unbounded candidate read. Unicode
672lowercase cases place NUL before and after a fold and keep the matching row
673through either equality direction and unary wrapper.
674The receiving Node plan uses the named index for the selective BigInt range
675orientation in both operand orders. The opposite orientation can scan because
676its candidate union also admits text and rounded Numbers; this oracle makes no
677constant-index-use claim for that branch.
678Fixed `strftime`, `add`, and Date-range witnesses also use full reads for mixed
679stored types; direct SQL would exclude a matching numeric timestamp or string
680concatenation. A typed-field contract or a separate indexed representation is
681needed before those forms can gain a generally sound selective candidate.
682
683The owner does not establish arbitrary depth or arity, every equality or LIKE
684pattern, limit/offset after filtering, all cursor shapes, order or value/metadata
685semantics, index-expression compilation, native hosts, OPFS, or multi-process
686execution. The existing SQLite owners above retain their separate reset/resume,
687order, driver, and host contracts. Broader class closure needs witnesses at those
688remaining paths.
689
690## Acceptance map
691
692The post-merge review added three missing domains to existing owners:
693
694- [Top-K batch contracts](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/operators/topk-batch-contract-oracle.test.ts)
695 cross sparse-array length/holes and RegExp source/flags/position with equal
696 controls, replacement order, hash consolidation, and actual retained graph
697 output. Ordinary replacements also run without the global `File` constructor.
698- [Leadership replay](https://github.com/TanStack/db/blob/main/packages/offline-transactions/tests/leadership-replay-oracle.property.test.ts)
699 holds real storage-read delivery across successful and permanently rejected
700 durable removals, with bounded scans, concurrent loads, and unfinished peers.
701 This is distinct from exactly-once execution across independent owners.
702- Settlement-time drop of optimistic state is owned by the
703 [optimistic history model](https://github.com/TanStack/db/blob/main/packages/db/tests/optimistic-history-oracle.ts)
704 and [state retention](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-state-retention-oracle.property.test.ts).
705 A transaction's optimistic state drops when its mutation function settles.
706 Sync transactions committed while it persisted are held and publish with
707 that drop; `isPersisted` settles after that publication. Handler sync writes
708 are generated at every cut, with and without awaiting their acceptance.
709 Receipts stay pending until visible. A confirmation committed while the
710 transaction persists is `$origin: 'local'`; one committed after settlement
711 is `'remote'`. The earlier accepted-snapshot retention law and its
712 truncate-capture ownership refinement were retired with this contract; the
713 [PR #1907 review record](oracle-reviews/pr-1907-accepted-delete-ownership.md)
714 is historical; the [settlement-drop review record](oracle-reviews/2026-10-03-settlement-drop.md)
715 holds the RED/GREEN and mutant evidence. A handler that awaits a visibility receipt held by its own
716 transaction, such as an on-demand load of its own Collection, waits for
717 itself; that history is outside the generated grammar.
718
719| Issue obligation | Implemented evidence | Limit |
720| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
721| Metamorphic laws | Includes cross-formulation/partition, D2 independent-key commutation, DBSP incremental/full recomputation, pagination provider/UI boundaries, optimistic snapshot stability | Equivalence premises are explicit; not arbitrary query rewrites. |
722| Public observations | Reads, exact event payloads and reconstructed state, observer eligibility, downstream includes, lifecycle and ownership checks | Count/work budgets are separate from row truth and only pin established promises. |
723| Meaningful async histories | Applied receipts, truncate/replay, cleanup/restart, pending optimistic work, held provider completion, leadership loss | Control real causes; unsupported SDK traces receive no coverage credit. |
724| Checker sensitivity | Faulty output controls, missing/duplicate events, stale completion/ownership controls, forced collisions and pre-fix runtime witnesses | Setup failures and timeouts are recorded separately from assertion kills. |
725| Executed reach and replay | Named manifest with guarded replay, finite boundary products, pinned examples, fixed/random lanes and explicit stress runs | Root `test:oracles` is a selected core/Query DB campaign, not all repository oracles. |
726| Contract and scope records | Guide, companion case notes, this map, suite-local law/domain comments and architecture | This is an executable testing method, not a completeness proof or new product specification. |
727
728## Running and replaying
729
730Build workspace dependencies before testing consumers of package exports. Use
731the package's checked-in config; source aliases and native shims must be named
732when they replace that path.
733
734```sh
735pnpm --filter @tanstack/db-ivm build
736pnpm --filter @tanstack/db build
737pnpm --filter @tanstack/db test:oracles
738pnpm --filter @tanstack/powersync-db-collection test:oracles
739pnpm --filter @tanstack/db-sqlite-persistence-core build
740pnpm --filter @tanstack/node-db-sqlite-persistence test:oracles
741# Service-dependent: requires Electric and PostgreSQL to be running.
742pnpm --filter @tanstack/electric-db-collection test:e2e
743pnpm run typecheck:tests
744pnpm exec tsc --noEmit -p packages/db/tsconfig.json
745pnpm --dir packages/db exec vitest run --coverage.enabled=false --maxWorkers=2
746pnpm --dir packages/db-ivm exec vitest run --coverage.enabled=false --maxWorkers=2
747pnpm --dir packages/offline-transactions exec vitest run --maxWorkers=2
748```
749
750Core guarded replay is run from `packages/db`, for example:
751
752```sh
753TANSTACK_DB_ORACLE_SEED=1813 TANSTACK_DB_ORACLE_PATH=0 \
754TANSTACK_DB_ORACLE_PROPERTY=live-query-observer.granular-history \
755node --import tsx tests/oracle-replay.ts \
756 tests/live-query-observer-history-oracle.property.test.ts \
757 -t 'granular listeners follow the eligibility ledger with a random or replayed seed' \
758 --coverage.enabled=false --typecheck.enabled=false
759```
760
761Use the failure's actual seed/path for a reproduction. The example establishes
762target execution, not reproduction of a particular bug. Local IVM and offline
763properties have separate environment variables; inspect their test headers.
764Do not assume the core multiplier reaches them.
765
766The Node expression-index oracle runs matching fixed-seed and seedless-random
767campaigns by default. Supplying both replay values selects only the requested
768seed and shrink path:
769
770```sh
771TANSTACK_DB_WS5A_SEED=1659005 TANSTACK_DB_WS5A_PATH=0 \
772pnpm --filter @tanstack/node-db-sqlite-persistence test:oracles
773```
774
775Stress runs need an explicit file list, run budget, seed policy, runtime, exit
776status and cost. For long synchronous campaigns, yield **between complete
777histories**, never between an action and its synchronous observation. In this
778project, worker progress RPC starvation produced passing assertions with a
779nonzero process exit. Such a run is not green. Raising a test timeout alone
780does not let the worker process its progress messages.
781
782## Action enforcement example
783
784`examples/react/action-enforcement/eslint-rules/no-direct-collection-mutations-oracle.test.js`
785owns the example's file-local lint boundary. Its finite grammar covers 12 binding
786forms, six methods, six call forms, and two callback definition orders, plus
787lexical shadowing, sibling scopes, configurable imports/methods, and alias cycles.
788The independent model labels the constructed receiver as a Collection and
789predicts one diagnostic for writes and none for reads. The checkpoint is the
790complete diagnostic list from the real ESLint `Linter.verify` call. A receiving
791check runs the actual ESLint configuration on feature writes, feature reads,
792and action writes. The import-source dimension checks eight alias/relative/barrel
793spellings against four nearby unrelated paths, including the real configuration.
794Three TypeScript import-equals forms must preserve other diagnostics without
795crashing; static and escaped template members are paired with dynamic names.
796On `7d3a3e85b`, the expanded suite fails 21 of 32 groups: the parser-node witness
797throws while linting; the other failures are missing diagnostics. The repair
798passes all 32 groups. A path-prefix mutant that includes `collections-extra`
799fails three groups. A template-prefix mutant that treats interpolated names as
800static fails the dynamic-name assertion. Both failures reach diagnostic
801comparisons; neither is a setup failure.
802
803The original implementation (`3da274d8a`) failed 11 of the 18 test groups at
804that checkpoint:
805name-based scope pollution, declaration-order dependence, and missed destructuring.
806The repair passes all groups. The example README states the conservative rule
807for reassigned aliases. This oracle does not establish inter-module or type-based
808tracking, function argument/return propagation, new object/array containers,
809extracted mutation functions, or dynamic method names. Those are outside this
810example's declared static scope; expanding it requires new syntax witnesses here.
811
812Guide evidence: ORC-001–005 and ORC-009 are stated beside the finite grammar,
813model and driver. ORC-006 uses the original production rule as the rejected
814wrong design; failures are diagnostic assertion mismatches, not setup failures.
815ORC-013 pairs writes with reads and imported bindings with shadowing local values.
816ORC-007 does not apply to this bounded enumeration; ORC-008 has no stateful model,
817ORC-010 has no shrinking or resource cleanup, ORC-011 has no named shared semantic
818fault requiring a second formulation, and ORC-014 is witnessed at the real ESLint configuration boundary; no browser
819or backend-provider claim is made.
820These outcomes supply ORC-012 evidence; the executable suite contains the law
821and observations, rather than relying on this record for expected behavior.
822
823`examples/react/action-enforcement/tests/TodoApp.test.tsx` owns the example's
824application input and pending-write controls. Its focused component witnesses
825use real actions and the fake API with a virtual clock. They check unchanged,
826newer, and empty drafts after successful adds; unchanged and newer drafts after
827controlled create rejection; native form submission; and disabled toggles at
8280, 40, and 119 ms during creation. A settled row remains enabled while another
829row is pending, and a newly settled row can toggle and persist its change.
830The original component fails the newer-draft, form, and three pending-row checks.
831The fixed component passes these nine cases. The lint oracle above cannot observe
832these application behaviors, and the shared framework owners do not own form
833state.
834
835The component suite also owns add admission: one add may be pending per mounted
836form, the input stays editable, and settlement permits the next submission.
837Four controlled-create histories cross fulfillment/rejection with repeated
838submits before/after a React render. They assert one action and provider call,
839reject submissions of a newer draft while pending, then admit that draft after
840settlement and check exact persisted counts. A fifth witness checks admission
841after synchronous validation rejection. The original handler fails all four
842pending-add histories. A guard based only on React state fails the same-render
843histories; a mutant that omits guard cleanup fails subsequent admission.
844
845A controlled-toggle history also checks failure and retry in both completion
846directions. It observes pending disablement, optimistic state, rollback, visible
847error, retry error clearing, and final provider state. The original component
848rolls back but fails the error-message assertion. This provider rejection is
849injected at the component boundary; it does not claim a real backend emits it.
850The same-path rejection probe found no unhandled rejection: Collection cleanup
851already catches the persistence promise.
852
853Toggle tests select buttons by accessible role. A hidden-toggle mutant passes
854the original tag selector but fails the scoped role query before interaction.
855This checks exposure in the accessibility tree; it does not establish keyboard
856focus or screen-reader behavior.
857
858These 15 focused cases do not establish arbitrary-length form histories,
859remount behavior during pending writes, or browser-native Enter dispatch.
860This component suite owns the first two extensions; a browser form witness
861is needed for native keyboard dispatch.
862
863## Reusable-law backlog
864
865RFC #1659 reviews found several green oracles whose stated laws remained valid
866but whose fixtures, grammars, or observations did not cover a neighboring
867boundary. Track the generalized repairs here instead of accumulating isolated
868regressions. Completion requires an executable owner, a production-path witness,
869a hostile wrong-answer control, and an explicit statement of remaining limits.
870
871- [ ] **Accepted sync transactions across persistence reads (partial coverage).**
872 The persistence-history owner retains the original 24 histories:
873 insert/partial-update, one/two/three queued reads, unreserved/reserved
874 commit turns, and an absent/present dependent successor. They check applied
875 receipts, public/durable rows, metadata, cursor, and durable source order.
876 Eight adjacent histories begin during an owning persistence read and commit
877 after it finishes. They vary original key membership, commit-turn reservation,
878 and one/two later reads. Captured row metadata ownership survives acceptance.
879 The maintainer specified that persisted rows are an older baseline for
880 newer sync-adapter changes; an internal read cannot revoke an accepted
881 sync transaction. Ninety additional histories compare queued and completed
882 reads against the same independent snapshot algebra. They cross
883 insert/update/delete, no/before/after truncate replay, on-demand subset
884 demand, and coordinator reset/full-reload notifications in eager and
885 on-demand Collections. Exact settled rows, row metadata, opaque cursor
886 metadata, status, applied receipts, loaded rows and durable completion order
887 distinguish source precedence from truncate replay's ordered replacement.
888 The old guard fails all 45 queued cells; serial controls pass. Omitting
889 public truncate fails 60 cells; omitting public delete fails 10.
890 Owner: `packages/db-sqlite-persistence-core/tests/persisted-oracle.test.ts`.
891 The [original review](oracle-reviews/issue-2036-queued-hydration-publication.md)
892 and [admission follow-up](oracle-reviews/issue-2036-admission-follow-up.md)
893 preserve revision receipts, review dispositions and oracle-guide audits.
894 Further witnesses must compose these schedules with cancellation, cleanup,
895 or persistence-read failure. Existing rejection of still-open transactions
896 across persistence reads remains a characterized admission restriction;
897 its independent authority argument is not established by these tests.
898 The notification fixtures assume a compatible persisted baseline. They do
899 not establish behavior after schema changes or invalidated resume points,
900 or each intermediate publication during a multi-transaction truncate replay.
901 The same owner needs those histories before claiming those stronger laws.
902 A claimed leftover-replay/reset failure still needs a concrete schedule;
903 the bounded two-replay-then-reset probe drains replay before reset.
904 Live Electric/browser OPFS delivery needs the matching schedule in
905 `packages/browser-db-sqlite-persistence/e2e/electric-hydration-straddle.opfs.spec.ts`;
906 its current ordering does not establish this handoff.
907 These are bounded witnesses, not closure of arbitrary interleavings.
908
909- [ ] **Optimizer residual convergence beyond the checked paths.** The
910 optimizer-semantics owner now checks `sourceWhereClauses`, source-free
911 predicates, namespace-only predicates, later RIGHT/FULL join nullability,
912 and an ordered QueryRef refusal at structural checkpoints. It still needs
913 public-row witnesses for later RIGHT/FULL chains, residual checks for
914 aggregate, functional, and projection-remapped QueryRef refusals, a
915 separate UNION branch model, and incremental source/publication histories.
916 Owner: `packages/db/tests/query/optimizer-semantics-oracle.test.ts` and
917 its production compiler driver. Each extension needs a distinguishing
918 wrong-plan control at the relevant checkpoint.
919
920- [x] **Real-provider conformance fixtures.** Frozen 15.2.7 React Native and
921 Node receipts cover the supported peer version; 18.2.1 React Native, Node,
922 and browser receipts cover the known forward shapes. Exact-row checks and a
923 row-dropping hostile control prove the shim accepts those envelopes without
924 mutating them. Owner:
925 `packages/react-native-db-sqlite-persistence/tests/fixtures/op-sqlite-provider-results.ts`
926 and `packages/react-native-db-sqlite-persistence/tests/op-sqlite-driver-oracle.test.ts`.
927 Native device/host execution remains a separate runtime receipt.
928- [x] **Minimal ambiguity and name invariance.** Generate one-field and
929 otherwise minimally distinguishable results. Renaming a selected column to a
930 structural-looking alias must not turn a data row into a write envelope.
931 Owner: `packages/react-native-db-sqlite-persistence/tests/op-sqlite-driver-oracle.test.ts`.
932- [x] **Carrier coexistence and representation symmetry.** Cross `rows`,
933 `rawRows`, `columnNames`, and supported result containers, including legal
934 coexistence. Equivalent array and object forms must agree on rows or on the
935 documented rejection. Owner:
936 `packages/react-native-db-sqlite-persistence/tests/op-sqlite-driver-oracle.test.ts`
937 and the shared SQLite driver contract.
938- [x] **Shared-handle transaction admission.** Concurrent driver wrappers for
939 one provider database handle serialize root transactions. Nested work must
940 use the transaction driver supplied to the callback on hosts without async
941 context propagation. Owners:
942 `packages/node-db-sqlite-persistence/tests/node-driver.test.ts` and
943 `packages/react-native-db-sqlite-persistence/tests/op-sqlite-driver-oracle.test.ts`.
944- [x] **Transitions at every relevant await.** Hold each coordination boundary,
945 then change leadership, remote-subset ownership, abort state, cleanup, or
946 restart generation before release. Owners: browser/electron coordinator,
947 persisted-history, and collection cleanup/restart oracles.
948- [x] **Local-versus-transport refinement.** Compare local-leader and transported
949 remote-subset behavior for immutable values. Separately prove that local
950 `signal` and `subscription` references survive delivery and reach matching
951 unload cleanup. Owners: browser/electron coordinator and persisted-history
952 suites.
953- [x] **Partial-construction cleanup.** Fail database, driver, worker, and
954 subscription construction after each acquired resource. Preserve the primary
955 failure while proving all acquired resources are released exactly once.
956 Owners: OP-SQLite driver-contract construction and OPFS page/worker lifecycle
957 suites.
958- [x] **On-demand persistence after evidence changes.** Cross baseline versus
959 on-demand hydration with consistent, unknown, and incompatible key-set
960 evidence. A baseline certification failure must not silently erase valid
961 on-demand rows. `loadSubset` checks baseline visibility and on-demand rows;
962 the sync-absent `forceReloadSubset` route crosses the same startup evidence
963 states but records baseline visibility as unobserved because that API does
964 not expose baseline hydration. Owner:
965 `packages/db-sqlite-persistence-core/tests/persisted-oracle.test.ts`.
966- [x] **Deterministic value-and-work laws.** Pair row correctness with stable
967 statement, scan, trigger, or queue-cardinality observations where the
968 subsystem promises bounded work. Owners: SQLite resume snapshots, Electric
969 acquisition work, shared-driver scheduling suites, and the Node
970 same-database-handle admission law.
971- [x] **Startup generation interleavings.** Hold persisted startup between its
972 metadata and hydration snapshots, then cross no write, a managed mutation,
973 and hostile raw loss. Compare public rows with the atomic durable snapshot,
974 and require mutation persistence to wait until the prior stream position is
975 known. Owners: SQLite resume snapshots and Electric resume snapshot races.
976- [x] **Schema-generation fences on cached adapters.** Cross a newer-schema
977 reset with snapshot, row, metadata, delta, position, and index-lifecycle
978 operations from the cached older adapter. Every stale operation rejects;
979 the current adapter remains readable and its index registry remains intact.
980 Owners: SQLite resume snapshots plus browser/electron coordinator routing.
981- [x] **Explicit omission records.** Add a short `Known omissions` section to
982 each primary executable owner touched above and keep this map synchronized as
983 laws land. An omission record narrows evidence; it does not waive a product
984 obligation.
985- [ ] **Atomic active-subset full reload.** Load collection metadata and every
986 active subset from one adapter generation, including filtered and paginated
987 on-demand subsets. A sound implementation needs an atomic multi-subset API;
988 loading all rows or accepting a metadata/row torn pair is not equivalent.
989 RED evidence and the deferred executable placeholder live in
990 `packages/db-sqlite-persistence-core/tests/persisted-oracle.test.ts` under R5-007.
991
992- [x] **Joined aggregate and `singleResult` subquery histories.**
993 `packages/db/tests/query/subquery-user-value-oracle.test.ts` checks flat and
994 nested aggregate source changes and joined `findOne()` QueryRefs at initial
995 and later public checkpoints. The bounded histories and remaining forms are
996 recorded in the QueryRef owner row above.
997
998## Persisted readiness and network-first initial rendering
999
1000The persisted-readiness oracle in
1001`packages/db-sqlite-persistence-core/tests/persisted-readiness-oracle.test.ts`
1002owns the opted-in eager restore boundary through the persisted wrapper,
1003Collection, live query, and observer. A finite two-source model checks all 36
1004opt-in/outcome combinations independently of the observer classifier. Its
1005controlled persistence histories check nonempty
1006and empty restore while upstream remains pending, all-source conjunction,
1007mixed opt-out, nested live-query sources, exact failure, SSR seed handoff,
1008stale cleanup/restart work, an already-restored source, a network-first deadline,
1009early network success and failure, network failure before nonempty restore,
1010client query stream failure before or after empty and nonempty restore or before
1011observer construction,
1012joined-source deadline composition, and a derived-query error alone or alongside
1013a failed client stream that must not be mistaken for network failure. It checks a
1014separate initial-render wait that leaves network `preload()` unchanged. The
1015framework conformance suite checks the projected signals in React, Vue,
1016Svelte, Solid, and Angular, including exact identity for a plain-object restore
1017error after notification. The window-controller test checks infinite-query
1018projection, and focused React and Solid tests check Suspense gating. The React
1019tests check client-stream failure before and after completed empty and nonempty
1020restore, including a failed record already present before mount. They also
1021check error-boundary handling for derived-query failures with and without a
1022failed client stream. A replacement client record arriving during an
1023initial-render wait has no persisted-fallback witness yet.
1024This owner uses a controlled persistence adapter, not native SQLite or a real
1025network provider; it does not prove browser scheduling or arbitrary histories.
1026The framework identity scenario does not cover every possible rejection value
1027or an error already present before a hook mounts.
1028
1029## Deferred contracts and evidence
1030
1031The maintainer assigned offline policy work to
1032[RFC #1659](https://github.com/TanStack/db/issues/1659). It is not a merge blocker
1033for this oracle repair. Keep these scenarios and decisions with that owner:
1034
1035- **A10 R7/R13:** the executor holds caller success until deletion is
1036 acknowledged, and a persisted `deletion-pending` phase prevents provider
1037 replay after a known deletion failure. Controlled restart and adapter-failure
1038 witnesses cover that boundary. A crash before the phase write, old readers of
1039 marked rows, physical power loss after adapter acknowledgement, and native
1040 browser restart or multi-owner handoff remain open. Provider idempotency is
1041 required to avoid a repeated effect in the first two cases.
1042- **A10 R4:** [Issue #1939](https://github.com/TanStack/db/issues/1939)
1043 is owned by the leadership replay oracle. The action grammar crosses retained
1044 leadership, loss before invocation, and loss during or just after `onMutate`
1045 after offline selection; a manual transaction loses leadership after its
1046 optimistic mutation and before `commit()`. The original action path fulfilled
1047 with no outbox record or provider call. The repaired paths reject and roll
1048 back; retained-leader and before-invocation controls still fulfill. Later
1049 leadership changes and a held outbox write crossed with loss or regain remain
1050 for this leadership oracle, using controlled write settlement and caller
1051 checkpoints. The [IndexedDB write-settlement owner](https://github.com/TanStack/db/blob/main/packages/offline-transactions/tests/indexeddb-write-settlement.test.ts)
1052 still needs a browser-host composition with leadership loss across a write.
1053 These paths are outside this bounded repair. The [review record](oracle-reviews/issue-1939-offline-admission.md)
1054 preserves the RED/GREEN and checker-calibration evidence.
1055- **A10 R5/R9:** manual removal/clear outside the active-provider witnesses,
1056 restored optimistic lifetimes, and retry-hook failures remain open. The
1057 settlement owner checks terminal provider rejection with failed deletion, a
1058 halted executor with queued peers held, and restart without a second provider
1059 call or optimistic restore. The executor does not automatically retry a failed
1060 phase write or deletion. A failed terminal marker write followed by a crash
1061 remains an unmarked replay window. Broader offline retry and recovery policy
1062 remains with RFC #1659.
1063- **A10 R11/R12 and earlier R8:** metadata/native-value domain, old readers of
1064 new wire records, and unreadable/unknown-version outbox recovery. New readers
1065 accepting old records does not prove reverse compatibility. Do not delete
1066 unreadable work silently or invent exactly-once guarantees.
1067
1068Other explicit follow-up boundaries are owned by
1069[issue #1820](https://github.com/TanStack/db/issues/1820), not silently claimed
1070green:
1071
1072- **Effect disposal:** the existing external-disposal wait and synchronous
1073 in-handler cancellation are tested. Waiting for independent work returned by
1074 the initiating handler conflicts with supporting a handler that awaits its
1075 own disposal. The candidate implementation was removed pending a contract.
1076- **Proxy native mutators and symbol writes:** retain supported standard
1077 Map/Set behavior. Decide additional support versus a clear error before
1078 generalizing expectations; do not silently drop native edits.
1079- **Progressive/native execution:** eight progressive registrations lack valid
1080 phase/capability evidence. Electric's ready gate is after application, not a
1081 pre-swap source gate; TrailBase does not supply that capability. The 24 move
1082 cases and actual native hosts need separate execution receipts. A green
1083 registration helper or package job does not prove these cells ran.
1084- **Optional mechanics/performance:** separating the expensive replay-process
1085 campaign, sharing native runner code only with both host builds verified,
1086 optional cancellation calibration and proxy construction-work budgets.
1087 An earlier suggestion to merge unnamed cleanup helpers still lacks exact
1088 targets; do not perform a blind consolidation.
1089
1090## Final evidence record
1091
1092Verification receipts and follow-up issue links are recorded in the PR and
1093the issue closeout comment. Keep their exact revision/runtime boundaries;
1094historical counts in research notes do not certify later commits. Closing the
1095bounded repair means the acceptance map has evidence and each remaining
1096question has an owner—not that there can be no more bugs.
1097
1098## Compound joins
1099
1100[The replacement evidence record](oracle-reviews/2026-10-05-compound-joins.md)
1101records RED admission on main, GREEN refinement, and hostile-mutant failures.
1102The cold-join reconciliation owner now covers compound equality classes,
1103nullish operands, two/three terms, order/reversal/nesting, all four join types,
1104scan/index paths, controlled cold acquisition, and keyed replacement histories.
1105The identity-output-shape owner checks complete predicates through direct,
1106from-QueryRef and joined-QueryRef boundaries. The includes-context-transport
1107owner checks parent values used only in a later equality across both operand
1108sides and direct/joined-QueryRef sources, in all three materialization forms.
1109
1110The compiler demand oracle in
1111`packages/db/tests/query/compiler/lazy-demand.test.ts` independently recomputes
1112active first-key demand from satisfiable rows. Its finite histories cross
1113LEFT/RIGHT, two/three fields, both term orders, shared primary keys, nullish
1114components, and put/remove/restore. Nullish tuples contribute no keyed demand.
1115The controlled cold provider now applies direct-field IN requests using the
1116independent value-class labels. Four distinguishing numeric tuples reject
1117wrong-field demand that the former whole-table provider missed.
1118
1119The bounded claim excludes arbitrary expression trees and wider tuples. Real
1120provider acquisition, eviction/reentry, and exact lazy-demand minimality need
1121receiving witnesses in the cold-join and adapter owners. Compound async,
1122optimistic, paginated, and deeper nested include histories remain with the
1123includes-temporal, includes-optimistic, pagination, and includes owners. This
1124feature does not claim those cross-products are established by its finite
1125matrix. Consumer hook caches require framework conformance witnesses; the
1126identity owner proves the compiler identity boundary and fresh public rows.
1127
1128Review follow-ups remain bounded by the evidence above:
1129
1130- The cold-join owner must distinguish required acquisition from demand
1131 minimality. A nullish tuple contributes no keyed demand; a satisfiable tuple
1132 still needs a positive witness. Real-provider demand counts remain with
1133 the receiving adapter owner.
1134- A deterministic 10,000-row-per-side probe measured the new operand-array
1135 cost and the repair: single equality 20,000 to zero arrays, two equalities
1136 40,000 to 20,000. Whole-query runtime and heap impact remain unmeasured.
1137 The always-tuple alternative restores single-equality allocation, so its
1138 simplification remains a tradeoff for a future measured join benchmark.
1139- Builder admission checks Boolean join syntax, while the compiler binds
1140 sources and also accepts direct IR. A single-parse representation would need
1141 a design for these separate entry points and measured compile-work benefit.
1142 No parser state or cached validation is added for an unmeasured saving.
1143- The cold-join driver's cleanup callback unsubscribes before cleaning up its
1144 live query. No legal throwing-unsubscribe witness was found. The owner is
1145 `checkWithCleanup` in the cold-join oracle; any future cleanup change must
1146 demonstrate the throwing path and verify later cleanup plus primary-error
1147 preservation. This is an evidence gap, not a demonstrated production bug.
1148
1149### Compound-join planning and identity follow-ups
1150
1151The second high-effort review at `5bb211519` distinguishes semantic identity
1152from physical acquisition. A controlled React `useLiveQuery` rerender keeps
1153its Collection and region-first demand when only the equality order changes.
1154Freshly compiled controls use the supplied order. The guide now states that
1155ordering selects a plan when the Collection is created. This React witness
1156does not establish other frameworks' reuse behavior.
1157
1158- The compiler/lazy-targets and cold-acquisition owners retain the proposed
1159 first-eligible-equality optimization. A receiving witness must cross join
1160 direction, computed operands, direct and subquery sources, and index modes.
1161- The identity owner retains join-specific unary/duplicate equality
1162 normalization. Public `and()` requires two operands; direct unary AND IR and
1163 `and(eq(...), eq(...))` with duplicate terms currently differ from bare EQ.
1164 A change must preserve general Boolean coercion and test actual Collection
1165 reuse in the receiving framework. Making loading order part of identity is
1166 a separate design choice; current identity remains semantic.
1167- Exact compound acquisition needs a tuple-preserving demand model in the
1168 compiler/lazy-demand and cold-acquisition owners, plus adapter witnesses.
1169 Independent per-field IN sets admit cross-pairs from different parent tuples.
1170 Current first-field candidate supersets remain permitted by the architecture.