Skip to content
Source
Sign inSign up
TanStack/db

feat(oracles): require every oracle test to reach a declared part #2278

MergedKyleAMathews(GitHub profile, opens in a new tab)merged 250+ commits intomain fromrefs/pull/2278/headmerged by KyleAMathews(GitHub profile, opens in a new tab)

🎯 Changes

An oracle file now holds only oracle tests, and a lint rule enforces it. Each oracle file names its check, model, and grammar with declareOracle. The new oracle/no-unit-test rule reports every test in an oracle file that reaches none of them. Such a test compares production with a value that a person wrote down. It is a unit test, so it belongs in an ordinary test file. This is the next step of #2234, after #2237.

Before this PR, a file name was the only sign of oracle coverage. An agent could add pinned examples to an oracle file, and a reader would count them as oracle coverage. The rule makes that shortcut visible at the edit, in the pre-commit hook, and in CI.

The law

Every test in an oracle file must use a declared part, directly or through a driver. As an alternative, it can run a generated property that states its law inline:

import { declareOracle } from './oracle-declaration'

declareOracle({ check: [checkHistory], model: [modelHistory], grammar: [historyArbitrary] })

// Passes: a fixed regression replays the shared check.
it(`replays the reported history`, () => checkHistory(reportedHistory))

// Reported: the expected value has no independent source.
it(`keeps two rows`, () => {
  expect(collection.size).toBe(2)
})

The rule follows bindings through the file and through relative imports of other test modules. It does not follow imports of production src/. A generated property counts as its own check when one arbitrary generates values and its predicate reads its input. A type-level oracle names its model types in typeModel. The rule also reports a call to an imported helper that registers tests of its own, because those tests then appear under the oracle file.

Two maintainer decisions (2026-10-27) set the boundary:

  • A finite table of hand-written expected values, chosen by a test's parameters, is not a model. A test that compares with such a table is a unit test.
  • A run budget that leaves every tracked oracle file is reported as removed, the same as a lowered budget.

The migration

Every oracle file now declares its parts. 184 files contain a declaration. Each test that reaches no part moved unchanged to an ordinary sibling file, with the same title and body. The migration compared test titles per package before and after each move, and no title was lost. A file that had no check or model at all took an ordinary name. #2264 tracks each law that now has only fixed tests. The coverage map marks each of them as fixed tests with no oracle owner.

The branch merges origin/main after #2168. The tests that #2168 changed in oracle files carry those changes into the ordinary files that now hold them. The new oracle files from #2168 declare their parts too. For example, source-health-oracle.test.ts keeps 504 tests and moves 97 fixed tests to source-health.test.ts. The 601 titles equal the titles on main.

The branch also merges #2230, which adds Convex collections and their oracles. The Convex companion model modules now declare their models and checks. Tests that compare with written values move to pagination.test.ts, lazy-paging.test.ts, e2e/backend.test.ts, and e2e/backend-startup.test.ts. The 88 test registrations equal the registrations on main.

The tripwires

The rule is one of four checks that make an oracle shortcut visible:

  • Run budgets. scripts/check-oracle-run-counts.mjs reports each lowered or removed budget. It now follows imported and re-exported constants and campaigns, so a budget that moves into a support module stays attributed to its oracle file. It reads base files of any size, and it fails when it cannot read a file.
  • Lint scope. The edit hook, pnpm lint:changed, and the pre-commit hook now lint each oracle file that imports an edited test module. They follow imports transitively and include untracked files.
  • JavaScript oracle files. The rule, the lint selection, and the run-count script now include .js, .mjs, and .jsx oracle files.
  • Replay owners. oracle-replay.test.ts checks that each manifest owner's command finds its file from its working directory.

🔬 Oracle Coverage

The tooling has its own generated oracles. Each one follows the oracle-first order in AGENTS.md.

OwnerLaw
scripts/eslint-plugin-oracle/part-reach-oracle.property.test.js (lint.part-reach)Every registration in an oracle file reaches a declared part or a generated property, or the rule reports it. Reports are a pure function of the source files.
scripts/run-budget-oracle.property.test.js (scripts.run-budget)Every lowered or removed budget that an oracle uses is reported, wherever its count is defined.
scripts/lint-scope-oracle.property.test.js (scripts.lint-scope)After an edit, each oracle file whose lint result can change is linted again.
  • Law: the rule header contract in scripts/eslint-plugin-oracle/rules/no-unit-test.js. Also the oracle rubric section "Name oracle files consistently", AGENTS.md "How oracle work is scored", and the two decisions above.
  • Reach: the part-reach oracle declares 35 states, and generated histories entered each of them. The rarest are for-of-mixed-elements (5), member-callee-registration (10), and caller-body-wrapper-reaches-part (12). The run-budget oracle declares 16 states and the lint-scope oracle declares 15. Generated histories entered each of them.
  • RED: two xhigh reviews produced 30 findings. The extended oracles reproduced each behavioral finding on unchanged code. The part-reach oracle failed 29 of 37 tests at 66794a918, and 24 tests at 6f5510727. The run-budget oracle failed 8 of 8 campaigns, and the lint-scope oracle failed both campaigns. The replay check failed for exactly the two scripts/ owners.
  • GREEN: pnpm test:lint-rules passes 231 rule tests and 10 script-oracle tests. pnpm lint:oracles reports nothing.
  • Mutant: 21 rule mutants ran on copies of the plugin, and the oracle rejected each one by assertion. They include a last-argument body, some in place of every for a for...of loop, a default export through export *, and an unresolved .js companion. The script mutants include a script that crashes at startup, the default 1 MiB buffer, and no removal report. Both script oracles reject each of them.
  • Limits:
    • The part-reach grammar does not generate three forms. They are a let with two assignments, a for...of over a computed array, and a package predicate or arbitrary.
    • A fixed seed is not unique, so the run-count script cannot attribute a seed that another oracle file already had at base.
    • A budget that a helper computes at run time is not tracked. The op-sqlite alias campaigns build theirs in registerAliasOracle. On main the script counted literal oracleRandomParameters(50, …) calls in a unit test, and that unit test now lives in op-sqlite-driver.test.ts. So the run-count check reports op-sqlite.write-marker-aliases, op-sqlite.columnar-sql-aliases, and seed 271828 as removed, although both campaigns still run in the oracle file. The coverage map records this limit in its "Oracle tooling" section, with an owner and the witness it needs.
    • The aggregate select oracle on main can miss one declared reach state on an unlucky random seed. One full run missed it, and 15 reruns reached it. The coverage map records it.

✅ Checklist

  • I have tested this code locally with pnpm test.

A full run on 15a725e8c passed the build, lint:check (warnings only), typecheck:tests, and the tests of every package except db and TrailBase. Two db tests failed there. The replay manifest named the wrong owner for a moved campaign, which 668194543 fixes. The aggregate select reach miss in the limits above was the other failure. In TrailBase, all 149 tests passed, but the Vitest type check found a missing ListResponse import in a moved test. CI found it too, and 93a698a8e fixes it.

The final head 2d448f75c passes the build, typecheck:tests, test:lint-rules, lint:oracles, and the tests of the packages that later commits changed. That is db (15,472 tests), electric (1,132), browser persistence (552), and offline transactions (301). The OPFS Playwright suite passes 41 tests, the IndexedDB Playwright suite passes 247 tests, and the browser end-to-end suite passes 169 tests.

After the #2230 merge, 209242262 passes the build, typecheck:tests, and lint:oracles. The Convex unit tests (112), the React Convex oracle (4), the transaction-serializer tests (51), and the db replay and campaign tests (46) pass. The Convex end-to-end oracles need a Convex backend, so CI runs them.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

The only src/ changes are in the private db-collection-e2e package. The package manifests change only their test:oracles scripts.

Refs #2234. Follow-up: #2264.

This pull request and its description were written by Isaac.

    1. ⚠️ No Changeset found

      Latest commit: 93a698a8e45a26cd89de91c5c23926f2e423e45c

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

      This PR includes no changesets

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

      Click here to learn what changesets are, and how to add one.

      Click here if you're a maintainer who wants to add a changeset to this PR

    2. Important

      Review skipped

      Too many files!

      This PR contains 513 files, which is 213 over the limit of 300.

      To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch.

      Usage-priced reviews support at most 300 files.

      Run configuration
      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 10274685-27b5-4703-9ec4-96d842dc65b0
      Commits

      Reviewing files that changed from the base of the PR and between db476b8ed9755e0c0b10b833d187354b4c63585c and 93a698a8e45a26cd89de91c5c23926f2e423e45c.

      Files selected for processing: 513
      • .gitignore
      • AGENTS.md
      • docs/contributing/oracle-coverage.md
      • docs/contributing/oracle-rubric.md
      • examples/react/action-enforcement/eslint-rules/no-direct-collection-mutations.test.js
      • lint-staged.config.js
      • package.json
      • packages/browser-db-sqlite-persistence/e2e/hydration-commit.opfs.spec.ts
      • packages/browser-db-sqlite-persistence/e2e/install-layout-oracle.e2e.test.ts
      • packages/browser-db-sqlite-persistence/e2e/leader-close-oracle.opfs.spec.ts
      • packages/browser-db-sqlite-persistence/e2e/leader-close-probe.ts
      • packages/browser-db-sqlite-persistence/e2e/leader-close.opfs.spec.ts
      • packages/browser-db-sqlite-persistence/e2e/opfs-request-order-oracle.opfs.spec.ts
      • packages/browser-db-sqlite-persistence/e2e/reload-class-oracle.opfs.spec.ts
      • packages/browser-db-sqlite-persistence/e2e/shared-driver-fairness-oracle.opfs.spec.ts
      • packages/browser-db-sqlite-persistence/playwright.opfs.config.ts
      • packages/browser-db-sqlite-persistence/tests/browser-coordinator-oracle.test.ts
      • packages/browser-db-sqlite-persistence/tests/browser-coordinator-support.ts
      • packages/browser-db-sqlite-persistence/tests/browser-coordinator.test.ts
      • packages/browser-db-sqlite-persistence/tests/opfs-open-outcome-oracle.ts
      • packages/browser-db-sqlite-persistence/tests/opfs-page-lifecycle-harness.ts
      • packages/browser-db-sqlite-persistence/tests/opfs-page-lifecycle-oracle.test.ts
      • packages/browser-db-sqlite-persistence/tests/opfs-page-lifecycle.test.ts
      • packages/browser-db-sqlite-persistence/tests/opfs-request-order-oracle.ts
      • packages/browser-db-sqlite-persistence/tests/opfs-worker-diagnostics-oracle.test.ts
      • packages/browser-db-sqlite-persistence/tests/per-collection-coordinator-oracle.test.ts
      • packages/browser-db-sqlite-persistence/tests/per-collection-coordinator-support.ts
      • packages/browser-db-sqlite-persistence/tests/per-collection-coordinator.test.ts
      • packages/browser-db-sqlite-persistence/tests/shared-driver-fairness-config.ts
      • packages/browser-db-sqlite-persistence/tests/shared-driver-fairness-oracle.test.ts
      • packages/browser-db-sqlite-persistence/tests/shared-driver-fairness-oracle.ts
      • packages/browser-db-sqlite-persistence/tests/shared-driver-fairness.test.ts
      • packages/convex-db-collection/e2e/auth-app-oracle.test.ts
      • packages/convex-db-collection/e2e/backend-oracle.test.ts
      • packages/convex-db-collection/e2e/backend-startup.test.ts
      • packages/convex-db-collection/e2e/backend-support.ts
      • packages/convex-db-collection/e2e/backend.test.ts
      • packages/convex-db-collection/e2e/public-pagination-oracle.test.ts
      • packages/convex-db-collection/tests/lazy-paging-model-oracle.ts
      • packages/convex-db-collection/tests/lazy-paging-oracle.property.test.ts
      • packages/convex-db-collection/tests/lazy-paging-receipt-model.ts
      • packages/convex-db-collection/tests/lazy-paging-version-model-oracle.ts
      • packages/convex-db-collection/tests/lazy-paging-write-model-oracle.ts
      • packages/convex-db-collection/tests/lazy-paging.test.ts
      • packages/convex-db-collection/tests/pagination-oracle.property.test.ts
      • packages/convex-db-collection/tests/pagination-support.ts
      • packages/convex-db-collection/tests/pagination.test.ts
      • packages/db-collection-e2e/src/fixtures/persisted-conformance-manifest.ts
      • packages/db-collection-e2e/src/index.ts
      • packages/db-collection-e2e/src/suites/joins-oracle.suite.ts
      • packages/db-collection-e2e/src/suites/live-updates-oracle.suite.ts
      • packages/db-collection-e2e/src/suites/live-updates.suite.ts
      • packages/db-collection-e2e/src/suites/moves-oracle.suite.ts
      • packages/db-collection-e2e/src/suites/pagination-oracle.suite.ts
      • packages/db-collection-e2e/src/suites/predicates-oracle.suite.ts
      • packages/db-collection-e2e/src/utils/notification-laws-oracle.ts
      • packages/db-ivm/tests/d2-work.test.ts
      • packages/db-ivm/tests/hash-collision-support.ts
      • packages/db-ivm/tests/hash-failure-retry-oracle.property.test.ts
      • packages/db-ivm/tests/hash-failure-retry.test.ts
      • packages/db-ivm/tests/hash-graph-oracle.property.test.ts
      • packages/db-ivm/tests/hash-graph.test.ts
      • packages/db-ivm/tests/hash-identity-oracle.property.test.ts
      • packages/db-ivm/tests/hash-identity.test.ts
      • packages/db-ivm/tests/hash-mixed-graph-oracle.property.test.ts
      • packages/db-ivm/tests/hash-oracle.property.test.ts
      • packages/db-ivm/tests/hash-support.ts
      • packages/db-ivm/tests/hash.test.ts
      • packages/db-ivm/tests/incrementalization-law-oracle.property.test.ts
      • packages/db-ivm/tests/incrementalization-law-oracle.ts
      • packages/db-ivm/tests/index-refinement-oracle.property.test.ts
      • packages/db-ivm/tests/multiset-consolidate-oracle.property.test.ts
      • packages/db-ivm/tests/multiset-consolidate.test.ts
      • packages/db-ivm/tests/multiset-support.ts
      • packages/db-ivm/tests/murmur-stream-oracle.property.test.ts
      • packages/db-ivm/tests/murmur-stream-reference-oracle.ts
      • packages/db-ivm/tests/operators/topKWithFractionalIndex-oracle.test.ts
      • packages/db-ivm/tests/operators/topKWithFractionalIndex.test.ts
      • packages/db-ivm/tests/operators/topk-batch-contract-oracle.test.ts
      • packages/db-ivm/tests/operators/topk-batch.test.ts
      • packages/db-ivm/tests/operators/topk-relation-oracle.test.ts
      • packages/db-ivm/tests/operators/topk-relation-oracle.ts
      • packages/db-ivm/tests/operators/topk-support-window-oracle.test.ts
      • packages/db-ivm/tests/structural-identity-oracle.property.test.ts
      • packages/db-ivm/tests/structural-identity.test.ts
      • packages/db-ivm/tests/temporal-group-key-oracle.test.ts
      • packages/db-ivm/tests/temporal-group-key.test.ts
      • packages/db-sqlite-persistence-core/tests/collection-setup-reopen-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/contracts/persisted-collection-conformance-contract.ts
      • packages/db-sqlite-persistence-core/tests/contracts/sqlite-core-adapter-contract.ts
      • packages/db-sqlite-persistence-core/tests/ordinary-transaction-work-oracle.ts
      • packages/db-sqlite-persistence-core/tests/ordinary-transaction-work-support.ts
      • packages/db-sqlite-persistence-core/tests/ordinary-transaction-work.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-cache-claims.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-cleanup.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-demand.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-follower-indexes.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-hydration-queue.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-hydration-scope.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-readiness-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-readiness-support.ts
      • packages/db-sqlite-persistence-core/tests/persisted-readiness.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-real-adapter-lifecycle.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-reconciliation.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-reload-metadata.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-reload-replacement-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-reset-startup.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-source-receipts.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-startup.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-subset.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted-support.ts
      • packages/db-sqlite-persistence-core/tests/persisted-sync-problem-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/persisted.test.ts
      • packages/db-sqlite-persistence-core/tests/reload-class-oracle.ts
      • packages/db-sqlite-persistence-core/tests/shared-logical-scheduling-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/shared-logical-scheduling-support.ts
      • packages/db-sqlite-persistence-core/tests/shared-logical-scheduling.test.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-boolean-arity-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-boolean-arity-support.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-boolean-arity.test.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-core-adapter-binding-support.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-core-adapter-binding-units.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-core-adapter-cli-runtime.test.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-core-adapter-contract-suite.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-core-adapter-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-core-adapter-support.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-resume-snapshot-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-resume-snapshot-support.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-resume-snapshot.test.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-temporal-value-oracle.test.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-temporal-value-support.ts
      • packages/db-sqlite-persistence-core/tests/sqlite-temporal-value.test.ts
      • packages/db-sqlite-persistence-core/tests/temporal-value-oracle.ts
      • packages/db/e2e/indexed-db/browser-evidence-oracle.ts
      • packages/db/e2e/indexed-db/coverage-cleanup.ts
      • packages/db/e2e/indexed-db/cross-tab-oracle.spec.ts
      • packages/db/e2e/indexed-db/cross-tab-support.ts
      • packages/db/e2e/indexed-db/cross-tab.spec.ts
      • packages/db/e2e/indexed-db/host-driver.ts
      • packages/db/e2e/indexed-db/host.spec.ts
      • packages/db/e2e/indexed-db/value-oracle.spec.ts
      • packages/db/e2e/indexed-db/value.spec.ts
      • packages/db/package.json
      • packages/db/playwright.indexed-db.config.ts
      • packages/db/tests/SortedMap-oracle.test.ts
      • packages/db/tests/SortedMap.test.ts
      • packages/db/tests/btree-map-oracle.test.ts
      • packages/db/tests/change-event-history-fixture.ts
      • packages/db/tests/change-event-history-oracle.test.ts
      • packages/db/tests/change-event-history.test.ts
      • packages/db/tests/cleanup-queue-oracle.property.test.ts
      • packages/db/tests/collection-cleanup-restart-oracle.test.ts
      • packages/db/tests/collection-cleanup-restart-support.ts
      • packages/db/tests/collection-cleanup-restart.test.ts
      • packages/db/tests/collection-gc-retention-oracle.property.test.ts
      • packages/db/tests/collection-gc-retention-oracle.ts
      • packages/db/tests/collection-gc-retention.test.ts
      • packages/db/tests/collection-index-value-fixture.ts
      • packages/db/tests/collection-index-value-oracle.test.ts
      • packages/db/tests/collection-index-value.test.ts
      • packages/db/tests/collection-metadata-publication-oracle.property.test.ts
      • packages/db/tests/collection-metadata-publication.test.ts
      • packages/db/tests/collection-mutation-startup.test.ts
      • packages/db/tests/collection-row-metadata-composition-oracle.test.ts
      • packages/db/tests/collection-state-retention-fixture.ts
      • packages/db/tests/collection-state-retention-oracle.property.test.ts
      • packages/db/tests/collection-state-retention.test.ts
      • packages/db/tests/collection-subscription-lifecycle-cell-support.ts
      • packages/db/tests/collection-subscription-lifecycle-cells.test.ts
      • packages/db/tests/collection-subscription-lifecycle-grammar-oracle.ts
      • packages/db/tests/collection-subscription-lifecycle-oracle.test.ts
      • packages/db/tests/collection-subscription-lifecycle-publication-oracle.property.test.ts
      • packages/db/tests/collection-subscription-lifecycle-publication-support.ts
      • packages/db/tests/collection-subscription-lifecycle-publication.test.ts
      • packages/db/tests/collection-subscription-lifecycle.test.ts
      • packages/db/tests/collection-subscription-reentrancy-fixture.ts
      • packages/db/tests/collection-subscription-reentrancy-oracle.test.ts
      • packages/db/tests/collection-subscription-reentrancy.test.ts
      • packages/db/tests/collection-subscription-replay-oracle.property.test.ts
      • packages/db/tests/collection-subscription-replay-support.ts
      • packages/db/tests/collection-subscription-replay.test.ts
      • packages/db/tests/collection-sync-reentrancy-oracle.test.ts
      • packages/db/tests/collection-sync-reentrancy-support.ts
      • packages/db/tests/collection-sync-reentrancy.test.ts
      • packages/db/tests/comparison-options.ts
      • packages/db/tests/comparison-oracle.property.test.ts
      • packages/db/tests/comparison.test.ts
      • packages/db/tests/conformance-infinite-calibration.test.ts
      • packages/db/tests/conformance/infinite-suite-cases.ts
      • packages/db/tests/conformance/infinite-suite-harness.ts
      • packages/db/tests/conformance/infinite-suite-oracle.ts
      • packages/db/tests/conformance/page-laws-oracle.ts
      • packages/db/tests/cursor-oracle.property.test.ts
      • packages/db/tests/cursor-order-terms.ts
      • packages/db/tests/cursor.test.ts
      • packages/db/tests/d2-source-reconciliation-oracle.property.test.ts
      • packages/db/tests/d2-source-reconciliation-support.ts
      • packages/db/tests/d2-source-reconciliation.test.ts
      • packages/db/tests/db-client-hydration-authority-oracle.test.ts
      • packages/db/tests/db-client-preload-identity.test.ts
      • packages/db/tests/deep-equals-support.ts
      • packages/db/tests/duration-query-equality-oracle.test.ts
      • packages/db/tests/effect-disposal-oracle.test.ts
      • packages/db/tests/error-sites-oracle.ts
      • packages/db/tests/flat-change-tracking-fixture.ts
      • packages/db/tests/flat-change-tracking-oracle.property.test.ts
      • packages/db/tests/flat-change-tracking.test.ts
      • packages/db/tests/index-suggestion-oracle.test.ts
      • packages/db/tests/index-suggestion.test.ts
      • packages/db/tests/index-update-oracle.property.test.ts
      • packages/db/tests/index-update-support.ts
      • packages/db/tests/index-update.test.ts
      • packages/db/tests/indexed-db/ORACLE.md
      • packages/db/tests/indexed-db/compatibility.test.ts
      • packages/db/tests/indexed-db/cross-tab-oracle.ts
      • packages/db/tests/indexed-db/deletion-queue.test.ts
      • packages/db/tests/indexed-db/local-write-order-oracle.test.ts
      • packages/db/tests/indexed-db/local-write-order.test.ts
      • packages/db/tests/indexed-db/local-write-support.ts
      • packages/db/tests/indexed-db/persistence-oracle.test.ts
      • packages/db/tests/indexed-db/persistence.test.ts
      • packages/db/tests/indexed-db/retirement-oracle.test.ts
      • packages/db/tests/indexed-db/retirement-support.ts
      • packages/db/tests/indexed-db/retirement.test.ts
      • packages/db/tests/indexed-db/settlement.test.ts
      • packages/db/tests/indexed-db/structured-clone-oracle.ts
      • packages/db/tests/indexed-db/transport-oracle.test.ts
      • packages/db/tests/indexed-db/transport.test.ts
      • packages/db/tests/indexed-db/wrapper-settlement-oracle.test.ts
      • packages/db/tests/live-query-deferred-acquisition-oracle.test.ts
      • packages/db/tests/live-query-deferred-acquisition-support.ts
      • packages/db/tests/live-query-deferred-acquisition.test.ts
      • packages/db/tests/live-query-observer-history-oracle.property.test.ts
      • packages/db/tests/live-query-observer-history.test.ts
      • packages/db/tests/live-query-observer-hydration-oracle.property.test.ts
      • packages/db/tests/live-query-observer-snapshot-oracle.property.test.ts
      • packages/db/tests/live-query-observer-snapshot.test.ts
      • packages/db/tests/local-only-direct-write-fixture.ts
      • packages/db/tests/local-only-direct-write-oracle.test.ts
      • packages/db/tests/local-only-direct-write.test.ts
      • packages/db/tests/local-storage-fixtures.ts
      • packages/db/tests/local-storage-order-oracle.test.ts
      • packages/db/tests/local-storage-order.test.ts
      • packages/db/tests/local-storage-peer-fixtures.ts
      • packages/db/tests/local-storage-peer-history.test.ts
      • packages/db/tests/local-storage-peer.test.ts
      • packages/db/tests/local-storage-value-fidelity-oracle.property.test.ts
      • packages/db/tests/metadata-publication-worlds.ts
      • packages/db/tests/mutation-handler-type.test-d.ts
      • packages/db/tests/observer-history-cleanup.ts
      • packages/db/tests/optimistic-composition-fixture.ts
      • packages/db/tests/optimistic-composition-oracle.test.ts
      • packages/db/tests/optimistic-composition.test.ts
      • packages/db/tests/optimistic-history-oracle.ts
      • packages/db/tests/optimistic-history-outcomes-oracle.test.ts
      • packages/db/tests/optimistic-history-outcomes.test.ts
      • packages/db/tests/optimistic-transaction-oracle.property.test.ts
      • packages/db/tests/optimistic-transaction-support.ts
      • packages/db/tests/optimistic-transaction.test.ts
      • packages/db/tests/oracle-config.ts
      • packages/db/tests/oracle-declaration.ts
      • packages/db/tests/oracle-replay-manifest.ts
      • packages/db/tests/oracle-replay.test.ts
      • packages/db/tests/paced-mutations-oracle.test.ts
      • packages/db/tests/paced-mutations-scenarios.test.ts
      • packages/db/tests/paced-mutations-support.ts
      • packages/db/tests/production-error-messages-fixture.ts
      • packages/db/tests/production-error-messages-oracle.test.ts
      • packages/db/tests/production-error-messages.test.ts
      • packages/db/tests/proxy-detachment-contract-oracle.test.ts
      • packages/db/tests/proxy-detachment-contract.test.ts
      • packages/db/tests/proxy-detachment-fixture.ts
      • packages/db/tests/proxy-iteration-contract-oracle.test.ts
      • packages/db/tests/proxy-iteration-contract.test.ts
      • packages/db/tests/proxy-iteration-fixture.ts
      • packages/db/tests/proxy-native-methods-fixture.ts
      • packages/db/tests/proxy-native-methods-oracle.property.test.ts
      • packages/db/tests/proxy-native-methods.test.ts
      • packages/db/tests/proxy-native-rows.ts
      • packages/db/tests/proxy-oracle.test.ts
      • packages/db/tests/proxy-revert-oracle.property.test.ts
      • packages/db/tests/proxy-revert.test.ts
      • packages/db/tests/proxy.test.ts
      • packages/db/tests/query/aggregate-select-oracle.property.test.ts
      • packages/db/tests/query/aggregate-select.test.ts
      • packages/db/tests/query/bucket-facade-rollback-oracle.property.test.ts
      • packages/db/tests/query/bucket-facade-rollback-support.ts
      • packages/db/tests/query/bucket-facade-rollback.test.ts
      • packages/db/tests/query/cold-join-reconciliation-oracle.test.ts
      • packages/db/tests/query/cold-join-reconciliation.test.ts
      • packages/db/tests/query/cold-join-support.ts
      • packages/db/tests/query/compiler/evaluators-oracle.test.ts
      • packages/db/tests/query/compiler/evaluators.test.ts
      • packages/db/tests/query/compiler/in-evaluator-oracle.property.test.ts
      • packages/db/tests/query/custom-index-order-selection-oracle.test.ts
      • packages/db/tests/query/derived-delete-reconciliation-oracle.test.ts
      • packages/db/tests/query/derived-delete-reconciliation.test.ts
      • packages/db/tests/query/group-result-key-oracle.property.test.ts
      • packages/db/tests/query/identity-output-shape-oracle.test.ts
      • packages/db/tests/query/identity-output-shape-support.ts
      • packages/db/tests/query/identity-output-shape.test.ts
      • packages/db/tests/query/includes-alias-shadowing-oracle.test.ts
      • packages/db/tests/query/includes-alias-shadowing-support.ts
      • packages/db/tests/query/includes-alias-shadowing.test.ts
      • packages/db/tests/query/includes-collection-driver-oracle.ts
      • packages/db/tests/query/includes-collection-oracle.property.test.ts
      • packages/db/tests/query/includes-collection-support.ts
      • packages/db/tests/query/includes-collection.test.ts
      • packages/db/tests/query/includes-context-transport-helpers.ts
      • packages/db/tests/query/includes-context-transport-oracle.test.ts
      • packages/db/tests/query/includes-context-transport.test.ts
      • packages/db/tests/query/includes-cross-formulation-oracle.property.test.ts
      • packages/db/tests/query/includes-cross-formulation-support.ts
      • packages/db/tests/query/includes-cross-formulation.test.ts
      • packages/db/tests/query/includes-functional-projection-oracle.test.ts
      • packages/db/tests/query/includes-functional-projection-support.ts
      • packages/db/tests/query/includes-functional-projection.test.ts
      • packages/db/tests/query/includes-optimistic-oracle.property.test.ts
      • packages/db/tests/query/includes-optimistic-support.ts
      • packages/db/tests/query/includes-optimistic.test.ts
      • packages/db/tests/query/includes-oracle.property.test.ts
      • packages/db/tests/query/includes-outer-join-route-work-oracle.test.ts
      • packages/db/tests/query/includes-publication-oracle.test.ts
      • packages/db/tests/query/includes-query-shape-oracle.test.ts
      • packages/db/tests/query/includes-query-shape-support.ts
      • packages/db/tests/query/includes-query-shape.test.ts
      • packages/db/tests/query/includes-route-grammar-oracle.ts
      • packages/db/tests/query/includes-scope-identity-oracle.ts
      • packages/db/tests/query/includes-space-helpers.ts
      • packages/db/tests/query/includes-space-oracle.test.ts
      • packages/db/tests/query/includes-space.test.ts
      • packages/db/tests/query/includes-structural-support.ts
      • packages/db/tests/query/includes-temporal-oracle.test.ts
      • packages/db/tests/query/includes-temporal-support.ts
      • packages/db/tests/query/includes-temporal.test.ts
      • packages/db/tests/query/includes-work-counter-oracle.test.ts
      • packages/db/tests/query/includes-work-counter-support.ts
      • packages/db/tests/query/includes-work-counter.test.ts
      • packages/db/tests/query/includes.test.ts
      • packages/db/tests/query/index-path-collision-oracle.test.ts
      • packages/db/tests/query/index-path-collision-support.ts
      • packages/db/tests/query/index-path-collision.test.ts
      • packages/db/tests/query/ir-stable-identity-oracle.test.ts
      • packages/db/tests/query/ir-stable-identity-support.ts
      • packages/db/tests/query/ir-stable-identity.test.ts
      • packages/db/tests/query/join-result-key-oracle.property.test.ts
      • packages/db/tests/query/load-subset-oracle.property.test.ts
      • packages/db/tests/query/load-subset-replay-refinement-oracle.test.ts
      • packages/db/tests/query/load-subset-replay-refinement.test.ts
      • packages/db/tests/query/load-subset-source-readiness-refinement-oracle.test.ts
      • packages/db/tests/query/load-subset-source-readiness-support.ts
      • packages/db/tests/query/load-subset-source-readiness.test.ts
      • packages/db/tests/query/load-subset-support.ts
      • packages/db/tests/query/load-subset-transaction-refinement-oracle.test.ts
      • packages/db/tests/query/load-subset-transaction-refinement.test.ts
      • packages/db/tests/query/load-subset.test.ts
      • packages/db/tests/query/mixed-index-order-oracle.test.ts
      • packages/db/tests/query/optimizer-semantics-oracle.test.ts
      • packages/db/tests/query/optimizer-semantics-support.ts
      • packages/db/tests/query/optimizer-semantics.test.ts
      • packages/db/tests/query/ordered-lifecycle-oracle.property.test.ts
      • packages/db/tests/query/ordered-lifecycle-support.ts
      • packages/db/tests/query/ordered-lifecycle.test.ts
      • packages/db/tests/query/ordered-source-loader-oracle.test.ts
      • packages/db/tests/query/ordered-source-loader-state-oracle.test.ts
      • packages/db/tests/query/ordered-source-loader-state-support.ts
      • packages/db/tests/query/ordered-source-loader-state.test.ts
      • packages/db/tests/query/ordered-source-loader-support.ts
      • packages/db/tests/query/ordered-source-loader.test.ts
      • packages/db/tests/query/ordered-work-oracle.property.test.ts
      • packages/db/tests/query/ordered-work-support.ts
      • packages/db/tests/query/ordered-work.test.ts
      • packages/db/tests/query/pagination-oracle.property.test.ts
      • packages/db/tests/query/pagination-support.ts
      • packages/db/tests/query/pagination.test.ts
      • packages/db/tests/query/pooled-live-query-gc-oracle.test.ts
      • packages/db/tests/query/pooled-live-query-gc-support.ts
      • packages/db/tests/query/pooled-live-query-gc.test.ts
      • packages/db/tests/query/pooled-live-query-oracle.property.test.ts
      • packages/db/tests/query/subquery-user-value-oracle.test.ts
      • packages/db/tests/query/subquery-user-value.test.ts
      • packages/db/tests/query/virtual-row-fields-oracle.test-d.ts
      • packages/db/tests/query/virtual-row-fields-oracle.test.ts
      • packages/db/tests/query/virtual-row-fields-support.ts
      • packages/db/tests/query/virtual-row-fields-type-fixture.ts
      • packages/db/tests/query/virtual-row-fields.test-d.ts
      • packages/db/tests/query/virtual-row-fields.test.ts
      • packages/db/tests/query/where-predicate-publication-oracle.property.test.ts
      • packages/db/tests/query/where-predicate-publication.test.ts
      • packages/db/tests/query/where-predicate-support.ts
      • packages/db/tests/reference-expression-oracle.ts
      • packages/db/tests/reverse-index-oracle.property.test.ts
      • packages/db/tests/reverse-index.test.ts
      • packages/db/tests/sorted-map-support.ts
      • packages/db/tests/source-health-oracle.test.ts
      • packages/db/tests/source-health-support.ts
      • packages/db/tests/source-health.test.ts
      • packages/db/tests/ssr-snapshot-admission-oracle.ts
      • packages/db/tests/temporal-index-order.test.ts
      • packages/db/tests/transaction-ownership-oracle.property.test.ts
      • packages/db/tests/truncate-readiness-oracle.test.ts
      • packages/db/tests/truncate-readiness.test.ts
      • packages/db/tests/utils-oracle.property.test.ts
      • packages/db/tests/utils.test.ts
      • packages/db/vitest.dist.config.ts
      • packages/electric-db-collection/e2e/electric.e2e.test.ts
      • packages/electric-db-collection/e2e/sql-predicate-semantics-oracle.e2e.test.ts
      • packages/electric-db-collection/e2e/sql-predicate-semantics.e2e.test.ts
      • packages/electric-db-collection/package.json
      • packages/electric-db-collection/tests/electric-adapter-support.ts
      • packages/electric-db-collection/tests/electric-adapter.test.ts
      • packages/electric-db-collection/tests/electric-descriptor-fixture.ts
      • packages/electric-db-collection/tests/electric-descriptor-harness.ts
      • packages/electric-db-collection/tests/electric-descriptor-isolation-oracle.test.ts
      • packages/electric-db-collection/tests/electric-descriptor-isolation.test.ts
      • packages/electric-db-collection/tests/electric-lifecycle.test.ts
      • packages/electric-db-collection/tests/electric-oracle.property.test.ts
      • packages/electric-db-collection/tests/electric-persistence-fixture.ts
      • packages/electric-db-collection/tests/electric-recovery-oracle.test.ts
      • packages/electric-db-collection/tests/electric-recovery-support.ts
      • packages/electric-db-collection/tests/electric-recovery.test.ts
      • packages/electric-db-collection/tests/electric-sdk-delivery-oracle.property.test.ts
      • packages/electric-db-collection/tests/electric-sdk-delivery-support.ts
      • packages/electric-db-collection/tests/electric-sdk-delivery.test.ts
      • packages/electric-db-collection/tests/pg-serializer-finite-decoder.ts
      • packages/electric-db-collection/tests/pg-serializer-oracle.property.test.ts
      • packages/electric-db-collection/tests/pg-serializer-property-support.ts
      • packages/electric-db-collection/tests/pg-serializer.test.ts
      • packages/electron-db-sqlite-persistence/tests/electron-ipc-readiness-oracle.test.ts
      • packages/electron-db-sqlite-persistence/tests/reload-class-oracle.electron.e2e.test.ts
      • packages/node-db-sqlite-persistence/tests/expression-index-oracle.test.ts
      • packages/node-db-sqlite-persistence/tests/expression-index-support.ts
      • packages/node-db-sqlite-persistence/tests/expression-index.test.ts
      • packages/offline-transactions/tests/KeyScheduler-lifecycle.test.ts
      • packages/offline-transactions/tests/KeyScheduler-oracle.property.test.ts
      • packages/offline-transactions/tests/connectivity-replay-oracle.test.ts
      • packages/offline-transactions/tests/harness.ts
      • packages/offline-transactions/tests/interruption-settlement-oracle.property.test.ts
      • packages/offline-transactions/tests/key-scheduler-support.ts
      • packages/offline-transactions/tests/leadership-replay-oracle.property.test.ts
      • packages/offline-transactions/tests/leadership-replay-support.ts
      • packages/offline-transactions/tests/leadership-replay.test.ts
      • packages/offline-transactions/tests/transaction-serializer-oracle.property.test.ts
      • packages/offline-transactions/tests/transaction-serializer.test.ts
      • packages/offline-transactions/tests/transaction-settlement-oracle.property.test.ts
      • packages/offline-transactions/tests/transaction-settlement.test.ts
      • packages/powersync-db-collection/package.json
      • packages/powersync-db-collection/tests/correctness.test.ts
      • packages/preact-db/tests/infinite-query-conformance.test.ts
      • packages/query-db-collection/e2e/query.e2e.test.ts
      • packages/query-db-collection/package.json
      • packages/query-db-collection/tests/cursor-pagination-boundary-support.ts
      • packages/query-db-collection/tests/cursor-pagination-integration-fixture.ts
      • packages/query-db-collection/tests/cursor-pagination-oracle.integration.test.ts
      • packages/query-db-collection/tests/cursor-pagination.boundary-oracle.test.ts
      • packages/query-db-collection/tests/cursor-pagination.boundary.test.ts
      • packages/query-db-collection/tests/cursor-pagination.integration.test.ts
      • packages/query-db-collection/tests/cursor-pagination.oracle.test.ts
      • packages/query-db-collection/tests/cursor-pagination.test.ts
      • packages/query-db-collection/tests/cursor-pagination/model-oracle.ts
      • packages/query-db-collection/tests/load-subset-lifecycle.test.ts
      • packages/query-db-collection/tests/optimistic-ordered-refetch-oracle.test.ts
      • packages/query-db-collection/tests/optimistic-ordered-refetch-probe.ts
      • packages/query-db-collection/tests/optimistic-ordered-refetch.test.ts
      • packages/query-db-collection/tests/ownership-lifecycle-support.ts
      • packages/query-db-collection/tests/ownership-lifecycle.oracle.test.ts
      • packages/query-db-collection/tests/ownership-lifecycle.test.ts
      • packages/query-db-collection/tests/persisted-direct-write-support.ts
      • packages/query-db-collection/tests/persisted-direct-write-window.oracle.test.ts
      • packages/query-db-collection/tests/persisted-direct-write.test.ts
      • packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts
      • packages/query-db-collection/tests/refetch-ordered-prefix-support.ts
      • packages/query-db-collection/tests/refetch-ordered-prefix.test.ts
      • packages/query-db-collection/tests/ssr-dehydration-oracle.test.ts
      • packages/react-db/tests/descriptor-query-binding-oracle.test.tsx
      • packages/react-db/tests/descriptor-query-binding-support.tsx
      • packages/react-db/tests/descriptor-query-binding.test.tsx
      • packages/react-db/tests/infinite-query-conformance.test.tsx
      • packages/react-db/tests/infinite-query-render-cuts-oracle.test.tsx
      • packages/react-db/tests/infinite-query-render-cuts-support.tsx
      • packages/react-db/tests/infinite-query-render-cuts.test.tsx
      • packages/react-db/tests/source-id-reuse-oracle.test.tsx
      • packages/react-db/tests/source-id-reuse-support.tsx
      • packages/react-db/tests/source-id-reuse.test.tsx
      • packages/react-db/tests/ssr-runtime-error-handoff-oracle.test.tsx
      • packages/react-db/tests/usePacedMutations-render-cuts-oracle.test.tsx
      • packages/react-native-db-sqlite-persistence/tests/op-sqlite-driver-oracle.test.ts
      • packages/react-native-db-sqlite-persistence/tests/op-sqlite-driver-support.ts
      • packages/react-native-db-sqlite-persistence/tests/op-sqlite-driver.test.ts
      • packages/svelte-db/tests/descriptor-query-release.svelte.test.ts
      • packages/svelte-db/tests/infinite-query-conformance.svelte.test.ts
      • packages/svelte-db/tests/ssr-runtime-error-oracle.svelte.test.ts
      • packages/trailbase-db-collection/e2e/trailbase.e2e.test.ts
      • packages/trailbase-db-collection/tests/ORACLE.md
      • packages/trailbase-db-collection/tests/lifecycle-oracle.property.test.ts
      • packages/trailbase-db-collection/tests/lifecycle-support.ts
      • packages/trailbase-db-collection/tests/lifecycle.test.ts
      • packages/vue-db/tests/infinite-query-conformance.test.ts
      • packages/vue-db/tests/useLiveQuery-publication-oracle.test.ts
      • scripts/agent-lint-feedback.mjs
      • scripts/check-oracle-run-counts.mjs
      • scripts/eslint-plugin-oracle/index.js
      • scripts/eslint-plugin-oracle/no-disabled.test.js
      • scripts/eslint-plugin-oracle/no-unit-test.test.js
      • scripts/eslint-plugin-oracle/part-reach-oracle.property.test.js
      • scripts/eslint-plugin-oracle/registration.js
      • scripts/eslint-plugin-oracle/rules/no-disabled.js
      • scripts/eslint-plugin-oracle/rules/no-unit-test.js
      • scripts/eslint-plugin-oracle/vitest.config.mjs
      • scripts/lint-scope-oracle.property.test.js
      • scripts/oracle-scripts.vitest.config.mjs
      • scripts/run-budget-oracle.property.test.js

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    3. Incremental update benchmark

      Comparing 3b35bc2df (this PR) against db476b8ed (base). Write times are per-write medians over 100 iterations (20 warmup writes). Cold hydrate is one timed first load of each query.

      Overall median write time vs base: 0.97× · cold hydrate time: 0.96× (geometric mean of per-case ratios; lower is faster).

      Writes: 1 regression(s), 3 improvement(s) (threshold: ±20% and >0.05ms).

      Cold hydrate: 1 regression(s), 2 improvement(s) (threshold: ±50% and >5ms).

      Per-case flags are noisy on shared runners. Read the geometric means first.

      Writes

      QueryΔ median write time (geomean)Best caseWorst caseFlags
      list: newest 50 open-1.3%-55.6%+64.4%1 🔴 1 🟢
      list + author-2.5%-33.3%+9.9%1 🟢
      list + comment count-1.0%-14.8%+14.1%—
      list + 3 recent comments-3.2%-17.6%+26.7%—
      issue detail + comments-5.7%-43.8%+14.7%1 🟢

      Cold hydrate

      QueryΔ cold hydrate time (geomean)Best caseWorst caseFlags
      list: newest 50 open-2.1%-38.4%+75.3%—
      list + author-11.6%-69.6%+26.9%1 🟢
      list + comment count-4.1%-64.2%+46.2%1 🟢
      list + 3 recent comments-1.6%-27.7%+173.3%1 🔴
      issue detail + comments-5.2%-24.4%+10.1%—

      Each row aggregates the 14.4 scale/index/write-mode configurations of that query; per-configuration tables below.

      100 rows/collection | source indexes: none | synced writes — geomean 0.97×, cold 0.98×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.168ms0.180ms+6.7%0.302ms0.294ms-2.8%12.505ms12.607ms+0.8%
      list: newest 50 open0.457ms0.446ms-2.4%0.744ms0.793ms+6.6%3.106ms2.786ms-10.3%
      list + author0.173ms0.166ms-4.0%0.298ms0.295ms-1.0%8.958ms9.637ms+7.6%
      list + comment count0.347ms0.313ms-9.9%0.619ms0.505ms-18.4%12.487ms11.442ms-8.4%
      list + 3 recent comments0.211ms0.196ms-6.8%0.354ms0.351ms-0.7%10.080ms10.902ms+8.2%
      issue detail + comments0.132ms0.135ms+2.2%0.218ms0.272ms+24.5%1.998ms1.786ms-10.6%
      100 rows/collection | source indexes: none | optimistic writes — geomean 1.05×, cold 0.91×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.112ms0.110ms-2.2%0.200ms0.174ms-12.8%3.334ms2.601ms-22.0%
      list: newest 50 open0.072ms0.073ms+1.0%0.146ms0.165ms+13.1%1.620ms1.866ms+15.2%
      list + author0.131ms0.131ms-0.6%0.232ms0.259ms+11.2%4.859ms3.435ms-29.3%
      list + comment count0.219ms0.209ms-4.6%0.383ms0.377ms-1.5%4.487ms5.856ms+30.5%
      list + 3 recent comments0.116ms0.147ms+26.7%0.234ms0.245ms+4.6%9.113ms6.592ms-27.7%
      issue detail + comments0.109ms0.125ms+14.7%0.181ms0.220ms+21.8%1.087ms0.998ms-8.2%
      100 rows/collection | source indexes: manual | synced writes — geomean 1.00×, cold 1.06×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.110ms0.096ms-12.3%0.220ms0.194ms-11.9%3.006ms2.828ms-5.9%
      list: newest 50 open0.383ms0.415ms+8.1%0.703ms0.719ms+2.3%1.291ms1.411ms+9.3%
      list + author0.103ms0.105ms+2.0%0.209ms0.242ms+15.7%3.025ms3.839ms+26.9%
      list + comment count0.226ms0.224ms-0.9%0.459ms0.404ms-11.9%3.184ms3.297ms+3.6%
      list + 3 recent comments0.141ms0.144ms+2.2%0.218ms0.289ms+32.8%4.612ms4.803ms+4.1%
      issue detail + comments0.102ms0.104ms+2.3%0.209ms0.193ms-7.8%0.597ms0.588ms-1.6%
      100 rows/collection | source indexes: manual | optimistic writes — geomean 1.07×, cold 0.85×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.086ms0.086ms-0.0%0.179ms0.162ms-9.4%1.655ms1.193ms-27.9%
      list: newest 50 open0.069ms0.079ms+14.7%0.165ms0.146ms-11.9%1.058ms0.889ms-15.9%
      list + author0.111ms0.120ms+8.3%0.166ms0.226ms+35.7%2.736ms2.489ms-9.0%
      list + comment count0.178ms0.194ms+9.0%0.328ms0.337ms+2.9%2.928ms3.654ms+24.8%
      list + 3 recent comments0.110ms0.107ms-2.6%0.213ms0.207ms-3.0%6.075ms4.469ms-26.4%
      issue detail + comments0.086ms0.095ms+10.7%0.131ms0.244ms+86.6%0.609ms0.461ms-24.4%
      1,000 rows/collection | source indexes: none | synced writes — geomean 0.96×, cold 1.17×, 1 change(s)
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.065ms0.076ms+16.7%0.125ms0.150ms+20.6%6.707ms7.713ms+15.0%
      list: newest 50 open1.005ms1.043ms+3.8%1.998ms1.708ms-14.5%6.066ms10.636ms+75.3%
      list + author0.084ms0.092ms+9.9%0.107ms0.195ms+83.1%17.438ms19.587ms+12.3%
      list + comment count0.183ms0.197ms+8.1%0.331ms0.371ms+12.3%9.469ms9.963ms+5.2%
      list + 3 recent comments0.170ms0.163ms-4.6%0.299ms0.282ms-5.8%12.597ms12.239ms-2.8%
      issue detail + comments0.149ms0.084ms-43.8%0.200ms0.147ms-26.6%🟢1.241ms1.366ms+10.1%
      1,000 rows/collection | source indexes: none | optimistic writes — geomean 0.84×, cold 1.01×, 1 change(s)
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.097ms0.108ms+11.0%0.191ms0.204ms+6.5%5.849ms6.475ms+10.7%
      list: newest 50 open0.112ms0.050ms-55.6%0.169ms0.086ms-48.7%🟢6.187ms6.998ms+13.1%
      list + author0.103ms0.101ms-1.3%0.206ms0.134ms-35.0%19.495ms15.888ms-18.5%
      list + comment count0.166ms0.154ms-7.3%0.211ms0.177ms-16.1%8.990ms11.396ms+26.8%
      list + 3 recent comments0.096ms0.085ms-11.8%0.133ms0.106ms-20.5%9.968ms9.168ms-8.0%
      issue detail + comments0.086ms0.075ms-12.7%0.151ms0.092ms-39.0%1.426ms1.265ms-11.3%
      1,000 rows/collection | source indexes: manual | synced writes — geomean 0.97×, cold 0.97×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.059ms0.062ms+4.1%0.075ms0.080ms+7.4%1.156ms1.055ms-8.8%
      list: newest 50 open0.322ms0.299ms-7.1%0.568ms0.565ms-0.6%0.875ms0.860ms-1.7%
      list + author0.084ms0.084ms+0.4%0.110ms0.104ms-5.5%1.800ms1.817ms+1.0%
      list + comment count0.203ms0.193ms-4.9%0.384ms0.244ms-36.4%3.355ms2.959ms-11.8%
      list + 3 recent comments0.128ms0.125ms-3.1%0.155ms0.237ms+53.2%5.983ms5.615ms-6.1%
      issue detail + comments0.085ms0.080ms-6.1%0.104ms0.106ms+1.5%0.437ms0.477ms+9.2%
      1,000 rows/collection | source indexes: manual | optimistic writes — geomean 0.99×, cold 0.80×, 1 change(s)
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.073ms0.075ms+2.5%0.150ms0.163ms+8.9%0.817ms0.828ms+1.4%
      list: newest 50 open0.058ms0.057ms-0.7%0.091ms0.089ms-2.3%0.907ms0.863ms-4.8%
      list + author0.098ms0.096ms-2.4%0.147ms0.116ms-21.1%1.877ms1.886ms+0.5%
      list + comment count0.178ms0.204ms+14.1%0.332ms0.336ms+1.1%7.829ms2.800ms-64.2%🟢
      list + 3 recent comments0.105ms0.099ms-6.2%0.204ms0.137ms-33.1%4.699ms3.931ms-16.4%
      issue detail + comments0.087ms0.079ms-9.3%0.119ms0.103ms-13.7%0.433ms0.406ms-6.3%
      10,000 rows/collection | source indexes: none | synced writes — geomean 0.90×, cold 0.95×, 1 change(s)
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.059ms0.059ms-0.5%0.080ms0.075ms-5.5%71.512ms65.603ms-8.3%
      list: newest 50 open10.343ms10.349ms+0.1%11.186ms11.269ms+0.7%68.312ms71.861ms+5.2%
      list + author0.159ms0.106ms-33.3%0.213ms0.182ms-14.9%🟢198.992ms212.061ms+6.6%
      list + comment count0.175ms0.182ms+4.2%0.223ms0.332ms+49.0%73.052ms74.981ms+2.6%
      list + 3 recent comments0.132ms0.109ms-17.6%0.256ms0.141ms-44.8%86.672ms68.390ms-21.1%
      issue detail + comments0.085ms0.081ms-5.4%0.125ms0.103ms-17.7%5.910ms5.291ms-10.5%
      10,000 rows/collection | source indexes: none | optimistic writes — geomean 0.98×, cold 1.04×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.079ms0.074ms-6.2%0.151ms0.118ms-21.9%59.096ms60.721ms+2.7%
      list: newest 50 open0.051ms0.053ms+3.6%0.103ms0.108ms+5.0%59.095ms59.765ms+1.1%
      list + author0.099ms0.101ms+2.0%0.154ms0.191ms+24.3%197.180ms186.980ms-5.2%
      list + comment count0.205ms0.201ms-1.9%0.265ms0.258ms-2.5%73.602ms107.612ms+46.2%
      list + 3 recent comments0.101ms0.096ms-5.4%0.133ms0.136ms+2.1%89.427ms75.620ms-15.4%
      issue detail + comments0.091ms0.086ms-5.3%0.120ms0.115ms-4.2%5.216ms5.329ms+2.2%
      10,000 rows/collection | source indexes: manual | synced writes — geomean 0.94×, cold 1.07×, 1 change(s)
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.070ms0.063ms-9.9%0.132ms0.083ms-37.1%1.885ms1.909ms+1.3%
      list: newest 50 open0.930ms0.917ms-1.4%1.474ms1.471ms-0.2%1.865ms1.810ms-2.9%
      list + author0.084ms0.079ms-5.9%0.112ms0.101ms-10.1%2.774ms2.542ms-8.4%
      list + comment count0.215ms0.184ms-14.8%0.265ms0.222ms-16.3%6.090ms3.744ms-38.5%
      list + 3 recent comments0.134ms0.132ms-2.1%0.190ms0.224ms+18.0%5.290ms14.456ms+173.3%🔴
      issue detail + comments0.090ms0.091ms+1.4%0.149ms0.133ms-11.2%0.605ms0.590ms-2.6%
      10,000 rows/collection | source indexes: manual | optimistic writes — geomean 1.05×, cold 0.75×, 2 change(s)
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.079ms0.131ms+64.4%0.130ms0.178ms+36.5%🔴1.802ms1.633ms-9.4%
      list: newest 50 open0.072ms0.056ms-22.2%0.106ms0.091ms-13.8%2.687ms1.654ms-38.4%
      list + author0.105ms0.109ms+3.6%0.208ms0.141ms-32.1%15.625ms4.744ms-69.6%🟢
      list + comment count0.221ms0.223ms+0.9%0.271ms0.411ms+51.9%3.686ms3.738ms+1.4%
      list + 3 recent comments0.111ms0.110ms-1.0%0.197ms0.139ms-29.6%4.813ms5.156ms+7.1%
      issue detail + comments0.096ms0.094ms-1.4%0.132ms0.119ms-9.5%0.605ms0.587ms-3.0%
      Runner: node v24.8.0, linux 6.17.0-1022-azure, Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz. Timings on shared CI runners are noisy; treat small deltas as indicative only.
    4. Size Change: 0 B

      Total Size: 236 kB

      ℹ️ View Unchanged
      FilenameSize
      packages/db/dist/esm/client.js5.02 kB
      packages/db/dist/esm/collection-options-brand.js219 B
      packages/db/dist/esm/collection-options.js258 B
      packages/db/dist/esm/collection/change-events.js1.76 kB
      packages/db/dist/esm/collection/changes.js3.06 kB
      packages/db/dist/esm/collection/cleanup-queue.js828 B
      packages/db/dist/esm/collection/config-errors.js547 B
      packages/db/dist/esm/collection/events.js504 B
      packages/db/dist/esm/collection/health-tree.js698 B
      packages/db/dist/esm/collection/index.js6.39 kB
      packages/db/dist/esm/collection/indexes.js2.3 kB
      packages/db/dist/esm/collection/lifecycle.js5.59 kB
      packages/db/dist/esm/collection/mutations.js2.95 kB
      packages/db/dist/esm/collection/state.js7.27 kB
      packages/db/dist/esm/collection/subscription.js9.54 kB
      packages/db/dist/esm/collection/sync.js6.23 kB
      packages/db/dist/esm/collection/validate-config.js1.17 kB
      packages/db/dist/esm/deferred.js207 B
      packages/db/dist/esm/error-message.js642 B
      packages/db/dist/esm/errors.js7.27 kB
      packages/db/dist/esm/event-emitter.js1.06 kB
      packages/db/dist/esm/index.js4.76 kB
      packages/db/dist/esm/indexed-db-wrapper.js1.91 kB
      packages/db/dist/esm/indexed-db.js3.81 kB
      packages/db/dist/esm/indexes/auto-index.js924 B
      packages/db/dist/esm/indexes/base-index.js1.92 kB
      packages/db/dist/esm/indexes/basic-index.js1.93 kB
      packages/db/dist/esm/indexes/btree-index.js1.62 kB
      packages/db/dist/esm/indexes/index-registry.js916 B
      packages/db/dist/esm/indexes/reverse-index.js1.01 kB
      packages/db/dist/esm/live-query-adapter.js845 B
      packages/db/dist/esm/live-query-observer-client.js2.17 kB
      packages/db/dist/esm/live-query-observer.js3.3 kB
      packages/db/dist/esm/live-query-options.js2.02 kB
      packages/db/dist/esm/live-query-primitives.js406 B
      packages/db/dist/esm/live-query-window-binding.js1.56 kB
      packages/db/dist/esm/live-query-window-controller.js4.02 kB
      packages/db/dist/esm/local-only.js1.02 kB
      packages/db/dist/esm/local-storage.js4.58 kB
      packages/db/dist/esm/optimistic-action.js359 B
      packages/db/dist/esm/paced-mutations.js1.11 kB
      packages/db/dist/esm/proxy.js3.51 kB
      packages/db/dist/esm/query/builder/clone-query.js854 B
      packages/db/dist/esm/query/builder/functions.js1.61 kB
      packages/db/dist/esm/query/builder/group-keys.js157 B
      packages/db/dist/esm/query/builder/include-functions.js229 B
      packages/db/dist/esm/query/builder/index.js7.72 kB
      packages/db/dist/esm/query/builder/query-ir.js312 B
      packages/db/dist/esm/query/builder/ref-proxy-identity.js292 B
      packages/db/dist/esm/query/builder/ref-proxy.js1.67 kB
      packages/db/dist/esm/query/builder/wrapper-identity.js221 B
      packages/db/dist/esm/query/compiler/evaluators.js2.51 kB
      packages/db/dist/esm/query/compiler/expressions.js603 B
      packages/db/dist/esm/query/compiler/find-aggregate.js328 B
      packages/db/dist/esm/query/compiler/group-by.js4.42 kB
      packages/db/dist/esm/query/compiler/grouping.js161 B
      packages/db/dist/esm/query/compiler/index.js10.4 kB
      packages/db/dist/esm/query/compiler/joins.js3.42 kB
      packages/db/dist/esm/query/compiler/lazy-targets.js1.11 kB
      packages/db/dist/esm/query/compiler/order-by.js2.8 kB
      packages/db/dist/esm/query/compiler/parent-routes.js319 B
      packages/db/dist/esm/query/compiler/query-equivalence.js568 B
      packages/db/dist/esm/query/compiler/route-metadata.js1.24 kB
      packages/db/dist/esm/query/compiler/select.js1.5 kB
      packages/db/dist/esm/query/effect.js5.79 kB
      packages/db/dist/esm/query/equality-conjunct.js486 B
      packages/db/dist/esm/query/equality-value-identity.js736 B
      packages/db/dist/esm/query/expression-helpers.js1.61 kB
      packages/db/dist/esm/query/ir-stable-identity.js4.29 kB
      packages/db/dist/esm/query/ir.js2.26 kB
      packages/db/dist/esm/query/join-conditions.js257 B
      packages/db/dist/esm/query/live-query-collection.js391 B
      packages/db/dist/esm/query/live/bucket-facade-adapter.js3.17 kB
      packages/db/dist/esm/query/live/collection-config-builder.js8.24 kB
      packages/db/dist/esm/query/live/collection-registry.js264 B
      packages/db/dist/esm/query/live/collection-subscriber.js2.64 kB
      packages/db/dist/esm/query/live/graph-scheduler.js305 B
      packages/db/dist/esm/query/live/includes-runtime.js212 B
      packages/db/dist/esm/query/live/internal.js145 B
      packages/db/dist/esm/query/live/materialized-pipeline.js1.94 kB
      packages/db/dist/esm/query/live/ordered-source-loader.js6.47 kB
      packages/db/dist/esm/query/live/public-key-reduction.js970 B
      packages/db/dist/esm/query/live/subset-demand-controller.js2.44 kB
      packages/db/dist/esm/query/live/utils.js1.35 kB
      packages/db/dist/esm/query/optimizer.js2.95 kB
      packages/db/dist/esm/query/pooled-live-query.js5.14 kB
      packages/db/dist/esm/query/pooled-source.js219 B
      packages/db/dist/esm/query/query-once.js359 B
      packages/db/dist/esm/query/runtime-reference-identity.js630 B
      packages/db/dist/esm/query/subset-dedupe.js493 B
      packages/db/dist/esm/scheduler.js1.23 kB
      packages/db/dist/esm/SortedMap.js1.77 kB
      packages/db/dist/esm/strategies/commit-completion.js156 B
      packages/db/dist/esm/strategies/debounceStrategy.js658 B
      packages/db/dist/esm/strategies/queueStrategy.js523 B
      packages/db/dist/esm/strategies/serial-pacer.js486 B
      packages/db/dist/esm/strategies/throttleStrategy.js738 B
      packages/db/dist/esm/sync-persistence.js626 B
      packages/db/dist/esm/sync-receipt.js211 B
      packages/db/dist/esm/transaction-commit-work.js351 B
      packages/db/dist/esm/transactions.js4.57 kB
      packages/db/dist/esm/utils.js1.77 kB
      packages/db/dist/esm/utils/array-utils.js270 B
      packages/db/dist/esm/utils/browser-polyfills.js304 B
      packages/db/dist/esm/utils/btree.js3.02 kB
      packages/db/dist/esm/utils/callbacks.js219 B
      packages/db/dist/esm/utils/comparison.js1.95 kB
      packages/db/dist/esm/utils/cursor.js753 B
      packages/db/dist/esm/utils/error.js262 B
      packages/db/dist/esm/utils/get-or-create.js155 B
      packages/db/dist/esm/utils/index-optimization.js2.58 kB
      packages/db/dist/esm/utils/source-record.js140 B
      packages/db/dist/esm/utils/type-guards.js230 B
      packages/db/dist/esm/utils/uuid.js530 B
      packages/db/dist/esm/virtual-props.js413 B
      packages/react-db/dist/esm/DbProvider.js317 B
      packages/react-db/dist/esm/development.js190 B
      packages/react-db/dist/esm/HydrationBoundary.js263 B
      packages/react-db/dist/esm/index.js330 B
      packages/react-db/dist/esm/live-query-internals.js282 B
      packages/react-db/dist/esm/source-id-bindings.js339 B
      packages/react-db/dist/esm/useLiveInfiniteQuery.js1.52 kB
      packages/react-db/dist/esm/useLiveQuery.js3.41 kB
      packages/react-db/dist/esm/useLiveQueryEffect.js504 B
      packages/react-db/dist/esm/useLiveSuspenseQuery.js1.37 kB
      packages/react-db/dist/esm/usePacedMutations.js429 B
      compressed-size-action::db-and-react-package-size
    5. More templates

      @tanstack/angular-db

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

      @tanstack/browser-db-sqlite-persistence

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

      @tanstack/capacitor-db-sqlite-persistence

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

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

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

      @tanstack/convex-db-collection

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

      @tanstack/db

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

      @tanstack/db-ivm

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

      @tanstack/db-sqlite-persistence-core

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

      @tanstack/electric-db-collection

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

      @tanstack/electron-db-sqlite-persistence

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

      @tanstack/expo-db-sqlite-persistence

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

      @tanstack/node-db-sqlite-persistence

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

      @tanstack/offline-transactions

      npm i https://pkg.pr.new/TanStack/db/@tanstack/offline-transactions@2278

      @tanstack/powersync-db-collection

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

      @tanstack/preact-db

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

      @tanstack/query-db-collection

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

      @tanstack/react-db

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

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

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

      @tanstack/react-router-with-db

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

      @tanstack/rxdb-db-collection

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

      @tanstack/solid-db

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

      @tanstack/svelte-db

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

      @tanstack/tauri-db-sqlite-persistence

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

      @tanstack/trailbase-db-collection

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

      @tanstack/vue-db

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

      commit: 93a698a

Sign in to join this conversation.