Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"changesets": [
"bright-cups-infer",
"browser-sqlite-separate-wasm",
"cleanup-discarded-rows-stay-cleared",
"convex-collection",
"convex-failed-load-release",
"db-query-identity-laws",
Expand All @@ -59,23 +60,27 @@
"fix-distinct-hash-collisions",
"fix-effect-left-join-startup",
"fix-held-query-page-end",
"fix-persisted-query-startup",
"fix-restarted-subscription-rows",
"fix-solid-query-input-tracking",
"gc-waits-for-persisting-transactions",
"keep-live-query-through-failed-replay",
"live-query-output-indexing",
"observer-restart-rewrite",
"observer-row-container-sharing",
"on-demand-network-first",
"opt-in-operators",
"ordered-loader-superseded-failure",
"persisted-reload-keeps-status",
"powersync-failed-load-release",
"preact-db-adapter",
"preserve-executor-handoff-callers",
"preserve-reentrant-ordering-repair",
"quiet-documents-return",
"react-db-strip-dev-warnings",
"react-db-unhashable-throws",
"recover-interleaved-electric-source-commits",
"refresh-compatible-dependencies",
"reject-negative-limits",
"reserved-commit-defers-every-hydration",
"resume-independent-subscription-demand",
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
matrix:
group: [browser, adapter-browser, desktop, cloud-mobile]
runs-on: ubuntu-latest
timeout-minutes: 35
# Browser runs provider, IndexedDB, OPFS and SSR suites sequentially.
# Allow the full suite to finish on slower runners.
timeout-minutes: ${{ matrix.group == 'browser' && 60 || 35 }}
steps:
- name: Checkout code
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
Expand Down
8 changes: 7 additions & 1 deletion docs/contributing/oracle-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8252,7 +8252,13 @@ prefetch attempt counts toward the outage threshold, as any failed
shape-log request does; no driver response spans several chunks, so no
history prefetches. It declares reach
for a subset request's five retried attempts, five live pauses, a live
outage, and that restart. The retry-decision model
outage, and that restart. Each snapshot campaign now constructs a fresh
randomized history that reaches all seven declared states, including outages
led and crossed by a synchronous throw. Per-history checks enforce the
construction obligations for generated outputs as well as campaign examples;
seven missing-state calibrations reject an omitted reach observation. The
40-run budget, fixed seed, unconstrained arbitrary, and product comparisons
remain. See [the reach repair evidence](oracle-reviews/2026-11-10-electric-snapshot-reach.md). The retry-decision model
(`electric-retry-decision-model.ts`, shared by the controlled lane of
`electric-oracle.property.test.ts` and the installed-client lane) now
observes an `awaitTxId` and an `awaitMatch` that reject when the run fails
Expand Down
133 changes: 133 additions & 0 deletions docs/contributing/oracle-reviews/2026-11-10-electric-snapshot-reach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Electric snapshot campaign reach repair

Subject: PR #2380, parent `7838a1c8d73e820e8f56383a90624fa28a6ca67b`.
The initially tested oracle blob was `116ecabd33bcd503c120c78e2b7f270a5924f316`;
pre-commit sorted its imports. Initial implementation commit:
`9bdb61b9248c99f1e5b17ce04555ee2ae25c146d`.
The refresh entry below identifies the current reviewed test.

## Evidence

- **Law:** Installed-SDK subset delivery preserves the overlapping source
snapshots. Retried subset requests and live pauses do not report a source
outage. Five failed shape-log attempts report the fifth failure. Retired
evidence becomes usable when the restarted run is ready. Authority: HEALTH-4,
EVID-2, META-1 and the existing maintainer decisions of 2026-10-30 and
2026-11-02, cited beside `checkSnapshots` and in the coverage map.
- **RED:** On the parent, the command below failed the campaign census with
`live-outage-crossed-by-throw` missing. The semantic comparisons passed.
This was a sampled reach gap, not a demonstrated production defect.
- **GREEN:** The same command passes after the repair. The full changed file,
with coverage and typechecking enabled, passes 130 tests with no type errors.
`pnpm lint:changed` and the changed file's ESLint check pass.
- **Mutant:** Seven native calibrations remove one reach observation each.
Every removal fails the per-history check with law `constructed reach`.
A direct replay with `TANSTACK_DB_ELECTRIC_SDK_DELIVERY_FAULT=snapshot-rows`
fails the unchanged product comparison at `snapshot 0 applied rows`.
This is an assertion failure, not a timeout or setup failure.
- **Limits:** Controlled HTTP through the installed SDK; no live Electric
service or native-host claim. The original finite predicates, retry bounds,
row checks and run budget remain. No production or product-model change.

RED / reseeded GREEN command (from the repository root):

```sh
TANSTACK_DB_ORACLE_SEED=361651584 pnpm --config.verifyDepsBeforeRun=false \
--filter @tanstack/electric-db-collection exec vitest run \
tests/electric-sdk-delivery-oracle.property.test.ts --maxWorkers=1 \
--fsModuleCache=false --typecheck.enabled=false --coverage.enabled=false \
-t 'electric.sdk-snapshot-delivery > random seed'
```

The repaired property was also run with `-t 'electric.sdk-snapshot-delivery'`
so its determinism and missing-state calibrations executed. The normal full-file
run omitted the seed, name filter and typecheck/coverage overrides.
The dropped-row replay uses the same file with seed `361651584`, path `0`,
property `electric.sdk-snapshot-delivery` and the fault switch above.

Reach counts in the repaired fixed / reseeded campaigns (40 generated runs plus
one seed-derived construction in each):

| Declared state | Fixed 20260917 | Reseeded 361651584 |
| --- | ---: | ---: |
| subset-attempts-past-threshold | 34 | 30 |
| live-pauses-past-threshold | 31 | 25 |
| live-outage | 24 | 21 |
| live-outage-with-synchronous-throws | 24 | 21 |
| live-outage-led-by-throw | 24 | 15 |
| live-outage-crossed-by-throw | 23 | 17 |
| retired-evidence-after-restart | 41 | 41 |

The minimum is one for each state, enforced on each seed-derived construction
and on every fresh generated construction. The builder preserves generated
width, name, middle live failure kinds, retry suffixes and optional extra loads.
It splices five subset retries, at least five actual snapshot requests, and a
live sequence led and crossed by a throw. Removing the splice loses guaranteed
reach. The original arbitrary still explores zero-to-four failures and other
orders; every constructed tuple remains within its bounds. Invalid payloads
outside the requested predicate remain excluded by the original driver.

## Self-review against the rubric

ORC-001/002/003: Product authority, independent source Map and health judgment,
public observation cuts, literate contract and limits remain unchanged.
ORC-004: The original grammar remains available; the constructed subset is
within its bounds and preserves the known throw-crossing witness. The preceding
paragraph records reconstruction, ablation, ranges and exclusion.
ORC-005: Reach is recorded after actual requests/retries and completed restart
comparisons, rather than inferred from the intended input. No concrete missing
source-information hypothesis arose in this generator repair.
ORC-006/007: Missing-state controls and dropped-row replay reject their intended
wrong answers. Fixed/random campaigns use the same 40-run budget and driver;
the checked direct replay reaches the original product checkpoint.
ORC-008/009: No product reference-model state or vocabulary changes; the new
WeakMaps track test construction obligations and observations only.
ORC-010: The existing assertion transport, same-violation shrinking and cleanup
controls remain; all pass in the full-file run. Product failures precede reach
failures in the new comparison.
ORC-011: No shared semantic fault hypothesis was identified; a second product
formulation is not triggered by this reach-only repair.
ORC-012: This versioned record bounds the claim to this oracle's reach gap.
ORC-013: The original threshold comparisons and unconstrained histories remain;
this repair adds no new reusable product-boundary claim.
ORC-014: No transfer from controlled HTTP to a live service is claimed.
ORC-015: All seven states are declared, constructed and counted; missing-state
calibrations exercise the per-history enforcement used for generated outputs.
ORC-016: New tests are checker calibrations through the shared comparison.

## Revalidation after the release bot refresh

Main merged the oracle API migration #2407 as
`e332f6134eb26b241cc5025da63ffef9bf0b0519`. The release bot replaced its
branch with `4888c630b7cab8f61f1e72ae57396716732c6a91`, dropping the repair.
The repair was reapplied to that parent without reverting the migration:
`owns` stays on every `oracleProperty`, and `law.owner` stays removed.
Current reviewed oracle blob: `7b76acc6902f4e8778d29b04fd9e117c49d6cbd9`.

With the new locked framework `d1b508a`, the RED command above again fails
for the missing `live-outage-crossed-by-throw` state on the refreshed parent.
The repaired fixed and reseeded campaigns and all seven missing-state controls
pass (10 tests). Their reach counts match the table above. The full file with
normal fixed/random campaigns and typechecking passes 130 tests with no type
errors. The same direct replay mutant fails `snapshot 0 applied rows`.
Changed-file lint passes with the migrated ESLint plugin. No installation
overrides were needed. The law, grammar bounds, product comparisons and limits
in the original review remain unchanged.

## Browser CI execution budget

At head `03bb74d426b3d1fc4154e9c8d6fe6b3e5b820c08`, PR workflow
42967741843 passed in full. Browser E2E job 130348956406 was cancelled by
the workflow's 35-minute outer deadline while completing live Electric prefix
comparisons. Every preceding step passed, including IndexedDB, OPFS fairness
and packaged-consumer checks. Its log contains no assertion failure.

The prior green browser run spent 5.2 minutes in IndexedDB and 11.3 in OPFS
fairness; the cancelled run spent 6.7 and 14.4. Other builds and provider
suites also took roughly 25–30% longer. One retry on the identical head
again took 6.8 minutes in IndexedDB before entering OPFS. The 35-minute
limit has insufficient headroom for this sequential group on slower runners.
The browser job now gets 60 minutes; other groups keep 35. Test commands,
individual test timeouts, oracle run budgets and comparisons are unchanged.
The repaired oracle blob above is unchanged. Final-head CI must validate this
workflow change as well as the oracle repair before merge.
4 changes: 2 additions & 2 deletions examples/angular/todos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"@angular/forms": "^20.3.35",
"@angular/platform-browser": "^20.3.35",
"@angular/router": "^20.3.35",
"@tanstack/angular-db": "^1.0.0-rc.1.4",
"@tanstack/db": "^1.0.0-rc.1.4",
"@tanstack/angular-db": "^1.0.0-rc.1.5",
"@tanstack/db": "^1.0.0-rc.1.5",
"rxjs": "^7.8.2",
"tslib": "^2.9.1",
"zone.js": "~0.15.0"
Expand Down
10 changes: 5 additions & 5 deletions examples/electron/offline-first/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"rebuild:electron": "node scripts/rebuild-electron.mjs"
},
"dependencies": {
"@tanstack/electron-db-sqlite-persistence": "^1.0.0-rc.1.4",
"@tanstack/node-db-sqlite-persistence": "^1.0.0-rc.1.4",
"@tanstack/offline-transactions": "^1.2.0",
"@tanstack/query-db-collection": "^1.5.1",
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/electron-db-sqlite-persistence": "^1.0.0-rc.1.5",
"@tanstack/node-db-sqlite-persistence": "^1.0.0-rc.1.5",
"@tanstack/offline-transactions": "^1.2.1",
"@tanstack/query-db-collection": "^1.5.2",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"@tanstack/react-query": "^5.107.1",
"better-sqlite3": "^12.11.1",
"react": "^19.3.1",
Expand Down
10 changes: 5 additions & 5 deletions examples/react-native/offline-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"@op-engineering/op-sqlite": "^15.2.14",
"@react-native-async-storage/async-storage": "2.1.2",
"@react-native-community/netinfo": "11.4.1",
"@tanstack/db": "^1.0.0-rc.1.4",
"@tanstack/offline-transactions": "^1.2.0",
"@tanstack/query-db-collection": "^1.5.1",
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/react-native-db-sqlite-persistence": "^1.0.0-rc.1.4",
"@tanstack/db": "^1.0.0-rc.1.5",
"@tanstack/offline-transactions": "^1.2.1",
"@tanstack/query-db-collection": "^1.5.2",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"@tanstack/react-native-db-sqlite-persistence": "^1.0.0-rc.1.5",
"@tanstack/react-query": "^5.107.1",
"expo": "~53.0.26",
"expo-constants": "~17.1.0",
Expand Down
10 changes: 5 additions & 5 deletions examples/react-native/shopping-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"@op-engineering/op-sqlite": "^15.2.14",
"@react-native-async-storage/async-storage": "2.1.2",
"@react-native-community/netinfo": "11.4.1",
"@tanstack/db": "^1.0.0-rc.1.4",
"@tanstack/electric-db-collection": "^1.0.0-rc.1.4",
"@tanstack/offline-transactions": "^1.2.0",
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/react-native-db-sqlite-persistence": "^1.0.0-rc.1.4",
"@tanstack/db": "^1.0.0-rc.1.5",
"@tanstack/electric-db-collection": "^1.0.0-rc.1.5",
"@tanstack/offline-transactions": "^1.2.1",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"@tanstack/react-native-db-sqlite-persistence": "^1.0.0-rc.1.5",
"@tanstack/react-query": "^5.107.1",
"expo": "~53.0.26",
"expo-constants": "~17.1.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/action-enforcement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@tanstack/query-core": "^5.107.1",
"@tanstack/query-db-collection": "^1.5.1",
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/query-db-collection": "^1.5.2",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"react": "^19.3.1",
"react-dom": "^19.3.1"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/next-ssr-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"test:e2e": "pnpm --filter @tanstack/db build && pnpm --filter @tanstack/react-db build && playwright test"
},
"dependencies": {
"@tanstack/db": "^1.0.0-rc.1.4",
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/db": "^1.0.0-rc.1.5",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"next": "^16.4.5",
"react": "^19.3.1",
"react-dom": "^19.3.1"
Expand Down
10 changes: 5 additions & 5 deletions examples/react/offline-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"build": "vite build && tsc --noEmit"
},
"dependencies": {
"@tanstack/browser-db-sqlite-persistence": "^1.0.0-rc.1.4",
"@tanstack/db": "^1.0.0-rc.1.4",
"@tanstack/offline-transactions": "^1.2.0",
"@tanstack/query-db-collection": "^1.5.1",
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/browser-db-sqlite-persistence": "^1.0.0-rc.1.5",
"@tanstack/db": "^1.0.0-rc.1.5",
"@tanstack/offline-transactions": "^1.2.1",
"@tanstack/query-db-collection": "^1.5.2",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"@tanstack/react-query": "^5.107.1",
"@tanstack/react-router": "^1.170.46",
"@tanstack/react-router-devtools": "^1.167.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/paced-mutations-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/db": "^1.0.0-rc.1.4",
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/db": "^1.0.0-rc.1.5",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"mitt": "^3.0.1",
"react": "^19.3.1",
"react-dom": "^19.3.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/react/projects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@tailwindcss/vite": "^4.3.5",
"@tanstack/query-core": "^5.107.1",
"@tanstack/query-db-collection": "^1.5.1",
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/query-db-collection": "^1.5.2",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"@tanstack/react-router": "^1.170.46",
"@tanstack/react-router-devtools": "^1.167.3",
"@tanstack/react-router-with-query": "^1.130.17",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/start-ssr-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test:e2e:hosted": "playwright test"
},
"dependencies": {
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"@tanstack/react-router": "^1.170.46",
"@tanstack/react-router-with-db": "^1.0.0-rc.1",
"@tanstack/react-start": "^1.169.5",
Expand Down
8 changes: 4 additions & 4 deletions examples/react/todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"private": true,
"version": "0.1.31",
"dependencies": {
"@tanstack/electric-db-collection": "^1.0.0-rc.1.4",
"@tanstack/electric-db-collection": "^1.0.0-rc.1.5",
"@tanstack/query-core": "^5.107.1",
"@tanstack/query-db-collection": "^1.5.1",
"@tanstack/react-db": "^1.0.0-rc.1.4",
"@tanstack/query-db-collection": "^1.5.2",
"@tanstack/react-db": "^1.0.0-rc.1.5",
"@tanstack/react-router": "^1.170.46",
"@tanstack/react-start": "^1.169.5",
"@tanstack/trailbase-db-collection": "^1.0.0-rc.1.4",
"@tanstack/trailbase-db-collection": "^1.0.0-rc.1.5",
"cors": "^2.8.6",
"drizzle-orm": "^0.45.1",
"drizzle-zod": "^0.8.3",
Expand Down
8 changes: 4 additions & 4 deletions examples/solid/todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"private": true,
"version": "0.0.39",
"dependencies": {
"@tanstack/electric-db-collection": "^1.0.0-rc.1.4",
"@tanstack/electric-db-collection": "^1.0.0-rc.1.5",
"@tanstack/query-core": "^5.107.1",
"@tanstack/query-db-collection": "^1.5.1",
"@tanstack/solid-db": "^1.0.0-rc.1.4",
"@tanstack/query-db-collection": "^1.5.2",
"@tanstack/solid-db": "^1.0.0-rc.1.5",
"@tanstack/solid-router": "^1.170.43",
"@tanstack/solid-start": "^1.169.5",
"@tanstack/trailbase-db-collection": "^1.0.0-rc.1.4",
"@tanstack/trailbase-db-collection": "^1.0.0-rc.1.5",
"cors": "^2.8.6",
"drizzle-orm": "^0.45.1",
"drizzle-zod": "^0.8.3",
Expand Down
7 changes: 7 additions & 0 deletions packages/angular-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/angular-db

## 1.0.0-rc.1.5

### Patch Changes

- Updated dependencies [[`522f657`](https://github.com/TanStack/db/commit/522f65777a42673a1befcb8169854002894d15c0), [`a86aa43`](https://github.com/TanStack/db/commit/a86aa430418572a4834972aa60b7d6a18e2e08ba), [`6ec538e`](https://github.com/TanStack/db/commit/6ec538ecd3c8a966e6a1e93d88b82023021a47a4)]:
- @tanstack/db@1.0.0-rc.1.5

## 1.0.0-rc.1.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/angular-db",
"version": "1.0.0-rc.1.4",
"version": "1.0.0-rc.1.5",
"description": "Angular integration for @tanstack/db",
"author": "Ethan McDaniel",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/browser-db-sqlite-persistence/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/browser-db-sqlite-persistence

## 1.0.0-rc.1.5

### Patch Changes

- Updated dependencies []:
- @tanstack/db-sqlite-persistence-core@1.0.0-rc.1.5

## 1.0.0-rc.1.4

### Patch Changes
Expand Down
Loading
Loading