Skip to content
Source
Sign inSign up
TanStack/db

fix: preserve accepted snapshots and fence stale replay reads #1822

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

Showing 11 changed files with 45 additions and 1 deletion (loading 8).

x
0 of 11 viewed, 11 left
7 additions and 0 deletions.changeset/fix-retention-and-stale-replay.mdAdded
View file
@@ -0,0 +1,7 @@
+---
+'@tanstack/db': patch
+'@tanstack/db-ivm': patch
+'@tanstack/offline-transactions': patch
+---
+​
+Preserve only captured accepted local inserts across a truncate. Preserve sparse-array length and RegExp state through ordered-query hashing, including hosts without a global File constructor. Prevent delayed replay reads from rerunning any transaction removed while the read was in flight, without rescanning the outbox.
16 additions and 0 deletionsdocs/contributing/oracle-coverage.mdModified
View file
@@ -44,6 +44,22 @@
​
## Acceptance map
​
+The post-merge review added three missing domains to existing owners:
+​
+- [Top-K batch contracts](../../packages/db-ivm/tests/operators/topk-batch-contract.test.ts)
+ cross sparse-array length/holes and RegExp source/flags/position with equal
+ controls, replacement order, hash consolidation, and actual retained graph
+ output. Ordinary replacements also run without the global `File` constructor.
+- [Leadership replay](../../packages/offline-transactions/tests/leadership-replay.property.test.ts)
+ holds real storage-read delivery across successful and permanently rejected
+ durable removals, with bounded scans, concurrent loads, and unfinished peers.
+ This is distinct from exactly-once execution across independent owners.
+- [Accepted-snapshot retention](../../packages/db/tests/collection-state-retention-oracle.property.test.ts)