Skip to content
Source
Sign inSign up
TanStack/db

fix(persistence): preserve run-only metadata on peer reloads #2303

MergedKyleAMathewsmerged 14 commits intomain fromrefs/pull/2303/headmerged by KyleAMathews

KyleAMathewscommented

🎯 Changes

This PR fixes metadata loss after a named peer notice reloads an on-demand persisted Collection. It also strengthens the session oracle and its native receiving fixtures.

An inner transaction can delete a row, then write metadata M while the row is missing. An enclosing update can later recreate that row without a metadata write. Decision 16 requires the sync run to retain M, while decisions 9 and 18 keep M nondurable. Previously, an unrelated peer notice reloaded the row and replaced M with absent stored metadata.

The wrapper now distinguishes local metadata from a named peer replacement. Known reloads retain local metadata. Same-key peer writes replace it, unknown-write reloads follow decision 15, and source deletes or truncates clear it. The storage format and public API stay compatible.

The failing CI campaign also exposed a reference-model error. The model incorrectly revived nondurable metadata when a keeping update recreated its row. The model now separates durable row existence from source metadata retained in the run. This correction follows the accepted decisions and leaves the comparisons intact.

Instrument improvements

The oracle checks source reads and durable metadata at completed action cuts. The controlled adapter records durable snapshots between queued commits, so later fix cannot hide an earlier wrong write. Recovery facts become available only after their storage read and successful application.

The native fixture serializes unrelated SQL calls, supports savepoints and active transaction reentry, and revokes reentry when the transaction ends. Its reusable conformance suite exposed and fixed a detached callback that retained an ended transaction's privileges.

Permanent controls challenge intermediate durable corruption, wrong reload reads, stale reads after cleanup, missing recovery application and empty replays. A shared recovery grammar constructs all 18 response/read/application × seed/peer/cleanup × bare/non-bare schedules. Both receiving drivers use the same independent session model and comparison.

The earlier materialization diagnosis under #2281 stays withdrawn. This new retention defect has its own failing history and fix. It does not establish a common cause with #2281's broader row-loss reports, #2317/P8 or #2298. The native witness contributes bounded evidence toward #2272. This PR closes none of those issues.

🔬 Oracle Coverage

Primary owner: packages/db/tests/sync-metadata-session-oracle.ts. The companion recovery grammar is packages/db/tests/sync-metadata-recovery-oracle.ts.

The fix record binds the final sources, both CI findings and the ORC-001–016 audit. The instrument audit preserves the earlier fixture work. The original evaluation preserves the previous review dispositions.

  • Law: Decisions 9/18 distinguish keeping metadata from writing it. Decision 16 retains missing-row metadata in the run. Decisions 11/15 govern named replacements and unknown-write observations. Authority: the accepted session decisions. No product law changes.
  • Reach: The new grammar constructs twelve cases across partial/full/on-demand lanes on both controlled storage and native SQLite. All 36 states per host reach eight times in each fixed/random campaign. Cases include keeping/explicit writes, core holds, a prior source truncate, named replacements, unknown writes and clears. Existing 108-state receiving, 18-state recovery and 40-run campaigns retain their budgets and guards.
  • RED: Before the production edit, all four receiving campaigns fail at the intended source-metadata comparison. Four on-demand keeping states fail, while the other 32 states pass in the reached batches. The original CI seed/path separately reproduces the model's false durable expectation.
  • GREEN: 1,443 relevant tests pass across the scoped commands, with 49 existing expected failures and one todo in the broad persisted owner. Both guarded seed/path replays pass with one nonzero selected execution each. Source-mapped types, formatting, scoped ESLint, changed-file oracle lint and run-budget checks pass. Scoped ESLint reports zero errors and zero warnings across the seven changed TypeScript files.
  • Mutant: Three isolated retention policies fail the shared source-read assertions on both hosts: original policy, retaining after named replacement, and retaining after unknown writes. The restored isolated baseline passes. Native seed 2220037/path 0 reproduces the original-policy mismatch and passes with the fix. Earlier seven fixture/checker mutations remain documented as historical calibration evidence.
  • Limits: One sync run, serialized authored actions, one-process native SQLite, two Browser coordinators and Node BroadcastChannel/Web Locks. Recovery schedules contain one recovery each. Arbitrary overlap, claim expiry/generation rotation, leadership/transport loss, restart, Chromium OPFS and Electron IPC remain outside the evidence. Read-hold/abandonment lacks the peer/store-held lanes' direct durable trace. The coverage map retains the owner and needed witness.

Run the new receiving campaigns from packages/db-sqlite-persistence-core:

pnpm exec vitest run tests/sync-metadata-missing-row.test.ts \
  --maxWorkers=1 --coverage.enabled=false --typecheck.enabled=false

Replay the native sibling directly:

TANSTACK_DB_ORACLE_PROPERTY=sync-metadata-session.sqlite-missing-row-metadata \
TANSTACK_DB_ORACLE_SEED=2220037 TANSTACK_DB_ORACLE_PATH=0 \
node --import tsx ../db/tests/oracle-replay.ts \
  tests/sync-metadata-missing-row.test.ts \
  --maxWorkers=1 --coverage.enabled=false --typecheck.enabled=false

The fix record includes the original CI replay and the broader verification commands. The retained instrument suites cover controlled/native sessions, recovery, calibrations, recorder guards, native SQL conformance and deterministic write work.

✅ Checklist

  • I have tested this code locally with pnpm test.
  • Focused campaigns, guarded replays, calibrations, isolated mutations, types, formatting and lint pass.

The full workspace command was not run locally. The earlier 253/279-test totals and 12/8-warning totals refer to earlier revisions and scopes. The current fix results appear above.

Formal reviews cover 9eef6525d and adf6a07f9. The mutable CodeRabbit summary last covers ef5c66ed2, and automatic review remains paused. Those reviews do not cover semantic instrument commit 60ace06b or this production fix. The maintainer authorized merge with that known review limit. Final publication-head CI remains a separate merge requirement.

🚀 Release Impact

  • This change affects published code and includes a patch changeset for @tanstack/db-sqlite-persistence-core.
  • This change is docs/CI/dev-only (no release).

No protocol, stored-format, package-manifest or lockfile change accompanies this fix. Local verification uses this branch. Current-head CI must supply integration evidence against the PR base.

    1. changeset-bot[bot](GitHub profile, opens in a new tab)commented

      🦋 Changeset detected

      Latest commit: 6d799479a9ec9a26d1c53b5a4ab56e2003fc5417

      The changes in this PR will be included in the next version bump.

      This PR includes changesets to release 12 packages
      NameType
      @tanstack/db-sqlite-persistence-corePatch
      @tanstack/browser-db-sqlite-persistencePatch
      @tanstack/capacitor-db-sqlite-persistencePatch
      @tanstack/cloudflare-durable-objects-db-sqlite-persistencePatch
      @tanstack/electron-db-sqlite-persistencePatch
      @tanstack/expo-db-sqlite-persistencePatch
      @tanstack/node-db-sqlite-persistencePatch
      @tanstack/react-native-db-sqlite-persistencePatch
      @tanstack/tauri-db-sqlite-persistencePatch
      @tanstack/capacitor-db-sqlite-persistence-e2e-appPatch
      @tanstack/expo-db-sqlite-persistence-e2e-appPatch
      @tanstack/tauri-db-sqlite-persistence-e2e-appPatch

      Not sure what this means? Click here to learn what changesets are.

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

    2. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      Note

      Reviews paused

      It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

      • Last reviewed commit: ef5c66ed2d19841823b0a47de37ba047f2c16827
      • Latest commit, not reviewed: 6d799479a9ec9a26d1c53b5a4ab56e2003fc5417

      Use the following commands to manage reviews:

      • @coderabbitai resume to resume automatic reviews.
      • @coderabbitai review to trigger a single review.

      Use the checkboxes below for quick actions:

      • Resume reviews
      • Trigger review

      No actionable comments were generated in the recent review.

      Recent review info
      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: a68b22e2-1ecd-45a0-a3eb-a7daf5e1e346
      Commits

      Reviewing files that changed from the base of the PR and between adf6a07f97b26116933ad68e3d5e1b2f6fe5093f and ef5c66ed2d19841823b0a47de37ba047f2c16827.

      Files selected for processing: 1
      • docs/contributing/oracle-reviews/2026-11-02-p6-metadata-closeout.md
      Files skipped from review as they are similar to previous changes: 1
      • docs/contributing/oracle-reviews/2026-11-02-p6-metadata-closeout.md

      Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.

      Walkthrough

      This change revises the sync-metadata session oracle and adds generated histories for metadata durability, seed re-insertion, reload, and queued repairs. It adds persisted-adapter and SQLite/coordinator test coverage, and updates documentation with verification results and coverage limits.

      Changes: Sync Metadata Oracle and Receiving Coverage

      Layer / File(s)Summary
      Define metadata rules and session histories
      packages/db/tests/sync-metadata-session-oracle.ts, packages/db/tests/sync-metadata-session.test.ts
      The oracle distinguishes metadata retained locally from metadata written durably. It records unknown-storage observations and recovery inputs, compares durable metadata, and adds generated histories for seed reload, durability, and queued repairs. A runner test verifies that recovery input is consumed before an authored action.
      Exercise persisted peer lanes
      packages/db-sqlite-persistence-core/tests/sync-metadata-session-persisted.test.ts, packages/db-sqlite-persistence-core/tests/sync-metadata-session-campaign.ts, packages/db-sqlite-persistence-core/tests/sync-metadata-write-work.test.ts, packages/db/tests/oracle-config.ts, packages/db/tests/oracle-replay-manifest.ts
      Persisted-adapter campaigns cover seed re-insertion, reload, metadata durability, and queued repairs across peer lanes. The registry and replay manifest include the new properties. Write-work tests check generated-history reachability and metadata mutations after repeated refreshes.
      Run SQLite-backed coordinator histories
      packages/db-sqlite-persistence-core/tests/sync-metadata-sqlite-driver.ts, packages/db-sqlite-persistence-core/tests/sync-metadata-sqlite-driver.test.ts, packages/db-sqlite-persistence-core/tests/sync-metadata-session-sqlite.test.ts
      A SQLite driver serializes root operations and scopes nested transactions. Session tests run histories through two coordinators and compare notices, recovery inputs, and durable metadata with the oracle.
      Record evidence and coverage boundaries
      docs/contributing/oracle-coverage.md, docs/contributing/oracle-reviews/*
      The coverage guide and review records document metadata rules, campaign results, bounded receiving schedules, and excluded scenarios. They state that the earlier production diagnosis was withdrawn.

      Estimated code review effort: 4 (Complex) | ~45 minutes

      Change: Other

      Possibly related issues

      • TanStack/db#2317 — The change updates the oracle’s metadata model and adds SQLite receiving coverage, but does not diagnose or fix the reported remaining root cause.
      • TanStack/db#2272 — The change adds a two-Collection, two-coordinator SQLite receiver within the documented Node scope; broader environments remain outside this change.
      • TanStack/db#2289 — The campaigns report reach and calibration checks for selected sync-metadata properties; other oracle properties remain outside this change.
      Merge Risk: Minimal · up to ef5c6

      No merge-blocking issue is established for this wording update; normal checks can proceed.

      Pre-merge checks: Passed 4 · Failed 1
      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Title checkWarningThe title claims a production fix, but the supplied summaries and objectives describe test, oracle, and documentation changes with no production-source change. It does not accurately summarize the mai…Retitle the pull request to describe the actual test, oracle, and documentation changes, or include the production implementation that the current title claims.
      Passed Passed checks: 4 passed
      Check nameStatusExplanation
      Docstring CoveragePassedDocstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Description checkPassedThe description includes all required template sections and provides detailed change context, oracle coverage, verification results, known limits, checklist status, and release impact.
      Full details: Docstring Coverage

      Explanation

      Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 9 functions across 10 files. (1 skipped: 1 unsupported.)

      Full details: Title check

      Explanation

      The title claims a production fix, but the supplied summaries and objectives describe test, oracle, and documentation changes with no production-source change. It does not accurately summarize the main changeset.

      Resolution

      Retitle the pull request to describe the actual test, oracle, and documentation changes, or include the production implementation that the current title claims.

      Finishing Touches
      Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • 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
    3. github-actions[bot](GitHub profile, opens in a new tab)commented

      Incremental update benchmark

      Comparing 3af8447cb (this PR) against 9be51e037 (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: 1.02× · cold hydrate time: 1.07× (geometric mean of per-case ratios; lower is faster).

      Writes: No significant changes (threshold: ±20% and >0.05ms).

      Cold hydrate: 3 regression(s), 1 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+2.4%-5.8%+13.0%—
      list + author-0.1%-22.9%+9.8%—
      list + comment count+2.8%-4.4%+18.0%—
      list + 3 recent comments+2.9%-1.1%+11.0%—
      issue detail + comments+1.6%-10.7%+6.5%—

      Cold hydrate

      QueryΔ cold hydrate time (geomean)Best caseWorst caseFlags
      list: newest 50 open+12.3%-27.9%+476.1%1 🔴
      list + author+2.7%-25.0%+147.4%1 🔴
      list + comment count+6.1%-52.4%+117.9%1 🔴 1 🟢
      list + 3 recent comments+1.3%-30.4%+49.2%—
      issue detail + comments+9.4%-23.6%+31.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 1.03×, cold 1.00×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.255ms0.253ms-1.0%0.397ms0.515ms+29.9%15.141ms15.788ms+4.3%
      list: newest 50 open0.522ms0.590ms+13.0%0.991ms1.113ms+12.3%4.338ms3.772ms-13.0%
      list + author0.247ms0.252ms+2.1%0.439ms0.391ms-10.9%16.733ms14.150ms-15.4%
      list + comment count0.410ms0.403ms-1.6%0.637ms0.655ms+2.8%14.386ms16.572ms+15.2%
      list + 3 recent comments0.264ms0.265ms+0.6%0.350ms0.422ms+20.3%14.278ms14.218ms-0.4%
      issue detail + comments0.183ms0.189ms+2.8%0.347ms0.349ms+0.6%2.067ms2.295ms+11.0%
      100 rows/collection | source indexes: none | optimistic writes — geomean 1.01×, cold 1.08×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.199ms0.187ms-5.8%0.316ms0.320ms+1.1%2.906ms3.363ms+15.7%
      list: newest 50 open0.123ms0.123ms+0.1%0.186ms0.179ms-3.4%3.007ms2.656ms-11.7%
      list + author0.192ms0.203ms+5.8%0.317ms0.345ms+8.8%8.552ms7.903ms-7.6%
      list + comment count0.248ms0.257ms+3.7%0.426ms0.390ms-8.6%5.314ms6.446ms+21.3%
      list + 3 recent comments0.219ms0.220ms+0.5%0.371ms0.373ms+0.7%11.854ms15.323ms+29.3%
      issue detail + comments0.202ms0.211ms+4.4%0.280ms0.270ms-3.5%1.486ms1.596ms+7.4%
      100 rows/collection | source indexes: manual | synced writes — geomean 1.00×, cold 1.00×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.189ms0.197ms+3.9%0.292ms0.274ms-6.1%5.407ms5.023ms-7.1%
      list: newest 50 open0.412ms0.403ms-2.2%0.699ms0.654ms-6.3%1.961ms2.048ms+4.4%
      list + author0.163ms0.158ms-2.9%0.304ms0.258ms-15.1%6.793ms5.095ms-25.0%
      list + comment count0.293ms0.290ms-1.0%0.466ms0.496ms+6.5%7.160ms6.634ms-7.4%
      list + 3 recent comments0.188ms0.194ms+3.4%0.307ms0.335ms+9.1%6.236ms7.092ms+13.7%
      issue detail + comments0.141ms0.142ms+1.1%0.280ms0.273ms-2.7%0.645ms0.846ms+31.1%
      100 rows/collection | source indexes: manual | optimistic writes — geomean 1.02×, cold 1.25×, 1 change(s)
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.135ms0.133ms-1.5%0.199ms0.185ms-7.3%2.603ms2.417ms-7.1%
      list: newest 50 open0.116ms0.115ms-1.0%0.215ms0.182ms-15.2%2.468ms2.349ms-4.8%
      list + author0.183ms0.172ms-5.7%0.306ms0.292ms-4.5%5.164ms5.285ms+2.3%
      list + comment count0.228ms0.252ms+10.7%0.384ms0.398ms+3.7%4.830ms10.524ms+117.9%🔴
      list + 3 recent comments0.146ms0.155ms+6.3%0.201ms0.233ms+15.9%5.882ms8.775ms+49.2%
      issue detail + comments0.129ms0.137ms+6.5%0.178ms0.215ms+20.8%0.548ms0.697ms+27.2%
      1,000 rows/collection | source indexes: none | synced writes — geomean 1.01×, cold 0.86×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.106ms0.116ms+9.6%0.216ms0.217ms+0.6%7.958ms12.348ms+55.2%
      list: newest 50 open1.485ms1.625ms+9.4%2.181ms2.254ms+3.3%12.559ms9.049ms-27.9%
      list + author0.135ms0.145ms+7.6%0.265ms0.179ms-32.6%49.192ms46.802ms-4.9%
      list + comment count0.253ms0.242ms-4.4%0.459ms0.433ms-5.8%27.569ms14.083ms-48.9%
      list + 3 recent comments0.166ms0.164ms-1.1%0.238ms0.264ms+11.3%18.492ms12.864ms-30.4%
      issue detail + comments0.139ms0.124ms-10.7%0.248ms0.220ms-11.5%1.610ms1.676ms+4.1%
      1,000 rows/collection | source indexes: none | optimistic writes — geomean 1.01×, cold 1.02×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.129ms0.126ms-2.3%0.251ms0.240ms-4.2%6.492ms6.277ms-3.3%
      list: newest 50 open0.092ms0.092ms-0.1%0.136ms0.128ms-6.1%8.214ms7.677ms-6.5%
      list + author0.155ms0.158ms+1.8%0.203ms0.274ms+35.1%43.012ms50.462ms+17.3%
      list + comment count0.200ms0.198ms-1.0%0.244ms0.238ms-2.5%10.649ms14.701ms+38.0%
      list + 3 recent comments0.129ms0.136ms+5.9%0.161ms0.220ms+37.2%15.789ms12.532ms-20.6%
      issue detail + comments0.122ms0.124ms+1.3%0.152ms0.160ms+5.2%1.468ms1.429ms-2.7%
      1,000 rows/collection | source indexes: manual | synced writes — geomean 1.01×, cold 1.21×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.106ms0.103ms-2.6%0.139ms0.129ms-6.9%1.685ms1.805ms+7.1%
      list: newest 50 open0.365ms0.385ms+5.5%0.662ms0.655ms-0.9%1.372ms2.611ms+90.3%
      list + author0.137ms0.145ms+5.7%0.242ms0.195ms-19.5%4.076ms4.363ms+7.1%
      list + comment count0.243ms0.241ms-1.0%0.407ms0.360ms-11.6%3.810ms4.361ms+14.5%
      list + 3 recent comments0.163ms0.164ms+0.5%0.196ms0.199ms+1.4%7.667ms7.746ms+1.0%
      issue detail + comments0.123ms0.121ms-1.7%0.169ms0.180ms+6.9%0.546ms0.671ms+22.8%
      1,000 rows/collection | source indexes: manual | optimistic writes — geomean 1.04×, cold 1.70×, 2 change(s)
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.124ms0.124ms+0.2%0.214ms0.188ms-12.1%1.380ms7.948ms+476.1%🔴
      list: newest 50 open0.100ms0.101ms+1.3%0.138ms0.138ms+0.2%1.407ms1.515ms+7.6%
      list + author0.154ms0.152ms-1.0%0.183ms0.225ms+23.1%4.225ms10.454ms+147.4%🔴
      list + comment count0.200ms0.237ms+18.0%0.235ms0.376ms+60.2%3.888ms4.036ms+3.8%
      list + 3 recent comments0.140ms0.144ms+3.0%0.186ms0.185ms-0.3%6.358ms7.366ms+15.9%
      issue detail + comments0.126ms0.130ms+2.9%0.184ms0.225ms+22.1%0.527ms0.679ms+28.8%
      10,000 rows/collection | source indexes: none | synced writes — geomean 0.98×, cold 1.04×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.100ms0.100ms+0.4%0.133ms0.168ms+25.7%80.021ms80.891ms+1.1%
      list: newest 50 open11.461ms11.980ms+4.5%13.811ms13.727ms-0.6%73.967ms81.101ms+9.6%
      list + author0.214ms0.165ms-22.9%0.272ms0.264ms-2.9%349.991ms381.804ms+9.1%
      list + comment count0.248ms0.242ms-2.5%0.342ms0.399ms+16.8%93.385ms86.032ms-7.9%
      list + 3 recent comments0.174ms0.194ms+11.0%0.308ms0.311ms+0.8%91.563ms87.825ms-4.1%
      issue detail + comments0.113ms0.117ms+3.4%0.145ms0.150ms+3.3%6.682ms7.999ms+19.7%
      10,000 rows/collection | source indexes: none | optimistic writes — geomean 1.04×, cold 1.11×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.122ms0.127ms+4.6%0.225ms0.231ms+2.8%63.986ms82.091ms+28.3%
      list: newest 50 open0.085ms0.094ms+10.1%0.136ms0.164ms+20.1%66.553ms85.378ms+28.3%
      list + author0.157ms0.158ms+0.5%0.206ms0.249ms+20.9%343.885ms347.893ms+1.2%
      list + comment count0.260ms0.264ms+1.6%0.645ms0.333ms-48.4%85.082ms99.853ms+17.4%
      list + 3 recent comments0.136ms0.141ms+3.8%0.178ms0.192ms+7.6%90.949ms97.303ms+7.0%
      issue detail + comments0.128ms0.134ms+5.3%0.167ms0.212ms+27.3%6.763ms5.904ms-12.7%
      10,000 rows/collection | source indexes: manual | synced writes — geomean 1.03×, cold 1.00×
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.096ms0.100ms+3.7%0.134ms0.131ms-2.4%2.472ms2.321ms-6.1%
      list: newest 50 open1.010ms1.039ms+2.9%1.177ms1.581ms+34.3%2.342ms2.318ms-1.0%
      list + author0.131ms0.135ms+2.9%0.161ms0.168ms+4.1%5.624ms5.106ms-9.2%
      list + comment count0.243ms0.257ms+5.6%0.292ms0.313ms+7.4%5.213ms8.698ms+66.9%
      list + 3 recent comments0.183ms0.183ms+0.1%0.232ms0.224ms-3.7%8.672ms7.864ms-9.3%
      issue detail + comments0.131ms0.132ms+0.5%0.168ms0.163ms-3.0%1.010ms0.772ms-23.6%
      10,000 rows/collection | source indexes: manual | optimistic writes — geomean 1.05×, cold 0.84×, 1 change(s)
      QueryBase medianPR medianΔ medianBase p95PR p95Δ p95Base coldPR coldΔ cold
      list: newest 50 open0.131ms0.131ms+0.3%0.239ms0.186ms-22.3%2.284ms2.236ms-2.1%
      list: newest 50 open0.103ms0.109ms+6.5%0.173ms0.139ms-19.4%2.299ms2.222ms-3.4%
      list + author0.151ms0.166ms+9.8%0.193ms0.297ms+53.6%7.014ms5.414ms-22.8%
      list + comment count0.278ms0.298ms+7.1%0.449ms0.520ms+15.9%10.994ms5.229ms-52.4%🟢
      list + 3 recent comments0.151ms0.153ms+1.7%0.202ms0.186ms-7.7%7.290ms6.448ms-11.6%
      issue detail + comments0.136ms0.142ms+4.5%0.166ms0.177ms+6.5%0.721ms0.830ms+15.1%
      Runner: node v24.8.0, linux 7.0.0-1017-azure, AMD EPYC 7763 64-Core Processor. Timings on shared CI runners are noisy; treat small deltas as indicative only.
    4. github-actions[bot](GitHub profile, opens in a new tab)commented

      Size Change: 0 B

      Total Size: 239 kB

      ℹ️ View Unchanged
      FilenameSize
      packages/db/dist/esm/client.js5.51 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.23 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.94 kB
      packages/db/dist/esm/collection/state.js7.69 kB
      packages/db/dist/esm/collection/subscription.js9.86 kB
      packages/db/dist/esm/collection/sync.js6.51 kB
      packages/db/dist/esm/collection/validate-config.js1.17 kB
      packages/db/dist/esm/collection/validate-indexing.js366 B
      packages/db/dist/esm/deferred.js207 B
      packages/db/dist/esm/error-message.js642 B
      packages/db/dist/esm/errors.js7.15 kB
      packages/db/dist/esm/event-emitter.js1.06 kB
      packages/db/dist/esm/index.js4.75 kB
      packages/db/dist/esm/indexed-db-wrapper.js1.91 kB
      packages/db/dist/esm/indexed-db.js3.8 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.21 kB
      packages/db/dist/esm/live-query-observer.js3.3 kB
      packages/db/dist/esm/live-query-options.js2.65 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 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.67 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.38 kB
      packages/db/dist/esm/query/compiler/grouping.js161 B
      packages/db/dist/esm/query/compiler/index.js10.3 kB
      packages/db/dist/esm/query/compiler/joins.js3.29 kB
      packages/db/dist/esm/query/compiler/lazy-targets.js1.11 kB
      packages/db/dist/esm/query/compiler/order-by.js2.87 kB
      packages/db/dist/esm/query/compiler/parent-routes.js325 B
      packages/db/dist/esm/query/compiler/query-equivalence.js568 B
      packages/db/dist/esm/query/compiler/route-metadata.js1.45 kB
      packages/db/dist/esm/query/compiler/select.js1.66 kB
      packages/db/dist/esm/query/effect.js5.81 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.57 kB
      packages/db/dist/esm/query/live/collection-registry.js264 B
      packages/db/dist/esm/query/live/collection-subscriber.js2.69 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.53 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/query/validate-limit.js247 B
      packages/db/dist/esm/scheduler.js1.23 kB
      packages/db/dist/esm/SortedMap.js1.77 kB
      packages/db/dist/esm/strategies/commit-completion.js154 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.js669 B
      packages/db/dist/esm/sync-receipt.js211 B
      packages/db/dist/esm/transaction-commit-work.js351 B
      packages/db/dist/esm/transactions.js4.66 kB
      packages/db/dist/esm/utils.js1.7 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.js400 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/source-id-bindings.js339 B
      packages/react-db/dist/esm/useLiveInfiniteQuery.js1.45 kB
      packages/react-db/dist/esm/useLiveQuery.js3.08 kB
      packages/react-db/dist/esm/useLiveQueryEffect.js504 B
      packages/react-db/dist/esm/useLiveSuspenseQuery.js1.27 kB
      packages/react-db/dist/esm/usePacedMutations.js429 B
      compressed-size-action::db-and-react-package-size
    5. pkg-pr-new[bot](GitHub profile, opens in a new tab)commented
      More templates

      @tanstack/angular-db

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

      @tanstack/browser-db-sqlite-persistence

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

      @tanstack/capacitor-db-sqlite-persistence

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

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

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

      @tanstack/convex-db-collection

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

      @tanstack/db

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

      @tanstack/db-ivm

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

      @tanstack/db-sqlite-persistence-core

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

      @tanstack/electric-db-collection

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

      @tanstack/electron-db-sqlite-persistence

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

      @tanstack/expo-db-sqlite-persistence

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

      @tanstack/node-db-sqlite-persistence

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

      @tanstack/offline-transactions

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

      @tanstack/powersync-db-collection

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

      @tanstack/preact-db

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

      @tanstack/query-db-collection

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

      @tanstack/react-db

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

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

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

      @tanstack/react-router-with-db

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

      @tanstack/rxdb-db-collection

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

      @tanstack/solid-db

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

      @tanstack/svelte-db

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

      @tanstack/tauri-db-sqlite-persistence

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

      @tanstack/trailbase-db-collection

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

      @tanstack/vue-db

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

      commit: 6d79947

    6. KyleAMathews changed the title

    7. Additional comments: 1
      docs/contributing/oracle-reviews/2026-10-30-kept-metadata-durability.md-32-32: 1

      32-32: Minor · Maintainability & Code Quality · Quick win

      **Unverified finding** Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

      Use precise wording for the pullSince(0) result.

      real successful uses real as an adverb and makes the evidence sentence informal. Replace it with A successful \pullSince(0)` response returned row version 2 without transaction replay details.` (raw.githubusercontent.com)

      Source: Linters/SAST tools


      Review info
      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: 3ed59fa4-c60c-44d6-b630-04d05cc92c4b
      Commits

      Reviewing files that changed from the base of the PR and between ea769ec8d3b4c1bffc286e1d88b1b0c553c5cc5f and 9eef6525d663a3ca586f1e0c5e8af4bab1c29dbb.

      Files selected for processing: 12
      • docs/contributing/oracle-coverage.md
      • docs/contributing/oracle-reviews/2026-10-30-kept-metadata-durability.md
      • docs/contributing/oracle-reviews/2026-11-02-p6-metadata-closeout.md
      • packages/db-sqlite-persistence-core/tests/sync-metadata-session-campaign.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-session-persisted.test.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-session-sqlite.test.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-sqlite-driver.test.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-sqlite-driver.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-write-work.test.ts
      • packages/db/tests/oracle-config.ts
      • packages/db/tests/oracle-replay-manifest.ts
      • packages/db/tests/sync-metadata-session-oracle.ts

      Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

    8. Additional comments: 1
      docs/contributing/oracle-reviews/2026-11-02-p6-metadata-closeout.md-335-335: 1

      335-335: Minor · Maintainability & Code Quality · Quick win

      **Unverified finding** Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

      Clarify the transaction modifier.

      The phrase two open authored transactions is ambiguous. Rewrite it as while two authored transactions remained open or use two open-authored transactions if that is the intended term.

      Source: Linters/SAST tools


      Review info
      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: a6979e72-dc82-4552-81c8-435843a70315
      Commits

      Reviewing files that changed from the base of the PR and between d0c4d0dde04208f9aaa66a03dcb7bada9c4f7cdb and adf6a07f97b26116933ad68e3d5e1b2f6fe5093f.

      Files selected for processing: 12
      • docs/contributing/oracle-coverage.md
      • docs/contributing/oracle-reviews/2026-11-02-p6-metadata-closeout.md
      • packages/db-sqlite-persistence-core/tests/sync-metadata-session-campaign.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-session-persisted.test.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-session-sqlite.test.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-sqlite-driver.test.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-sqlite-driver.ts
      • packages/db-sqlite-persistence-core/tests/sync-metadata-write-work.test.ts
      • packages/db/tests/oracle-config.ts
      • packages/db/tests/oracle-replay-manifest.ts
      • packages/db/tests/sync-metadata-session-oracle.ts
      • packages/db/tests/sync-metadata-session.test.ts
      Files skipped from review as they are similar to previous changes: 1
      • docs/contributing/oracle-coverage.md

      Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

    9. KyleAMathews changed the title

    10. KyleAMathews merged thisb190945

    11. KyleAMathews closed this

    12. 🎉 This PR has been released!

      Backfilled notification for published release candidates.

Sign in to join this conversation.