test(browser-sqlite): cover two-tab remote subset transport #1905
Merged
KyleAMathews(GitHub profile, opens in a new tab)merged 4 commits into
main fromrefs/pull/1905/head·merged by KyleAMathews(GitHub profile, opens in a new tab) Showing 10 changed files with 35 additions and 0 deletions (loading 6).
x
@@ -119,6 +119,8 @@
| Boundary refinements | [cleanup/restart](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-cleanup-restart-oracle.test.ts), [issue #1891 async-cleanup review](oracle-reviews/issue-1891-async-cleanup.md), [issue #1891 cleanup-start follow-up](oracle-reviews/issue-1891-cleanup-start-followup.md), [metadata publication](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-metadata-publication-oracle.property.test.ts), [state retention](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-state-retention-oracle.property.test.ts), [acquisition cells](https://github.com/TanStack/db/blob/main/packages/db/tests/collection-subscription-lifecycle-oracle.test.ts), [D2 source reconciliation](https://github.com/TanStack/db/blob/main/packages/db/tests/d2-source-reconciliation-oracle.property.test.ts), [top-K support windows](https://github.com/TanStack/db/blob/main/packages/db-ivm/tests/operators/topk-support-window-oracle.test.ts), [nested Query work](https://github.com/TanStack/db/blob/main/packages/query-db-collection/tests/includes-work-counter-oracle.test.ts) | Explicit lifecycle products, independent source maps and weighted relations, exact publication cuts, support/multiplicity, and value-plus-work observations. These refine the larger subsystem models; they do not replace them. |
| Small structures and test mechanics | [SortedMap](https://github.com/TanStack/db/blob/main/packages/db/tests/SortedMap.test.ts), [cleanup queue](https://github.com/TanStack/db/blob/main/packages/db/tests/cleanup-queue.property.test.ts), [guarded replay](https://github.com/TanStack/db/blob/main/packages/db/tests/oracle-replay.test.ts) | Map/full-sort and appointment-list models with executed target/seed/path checks. Callback-reentrant scheduling is outside the initial cleanup-queue domain. |
+The [two-tab OPFS remote-subset oracle](../../packages/browser-db-sqlite-persistence/e2e/remote-subset-two-tab.opfs.spec.ts) now exercises a real Chromium follower with a QueryClient-backed, filtered on-demand live query. It checks the function-bearing local request, clone-safe follower post, public row, and rejection of an invalid nested wire value before transport. A raw-options mutant fails with browser `DataCloneError`. The [review record](oracle-reviews/2026-09-27-remote-subset-two-tab.md) names the exact reviewed commit. The test does not run React, Firefox/Zen, or a live backend, and it does not settle exclusive OPFS ownership during leadership transfer.
+
23 additions and 0 deletions+23-0docs/contributing/oracle-reviews/2026-09-27-remote-subset-two-tab.mdAddedView file
@@ -0,0 +1,23 @@
+# Two-tab remote-subset browser oracle
+
+- Reviewed oracle commit: `15301fd409fdebdc84eebbbf0ae9e1f095b3b26c`
+- Comparison main: `d3c38c8f4e83cef4545e8011dc3419be1fcf527a`
+- Owner: `packages/browser-db-sqlite-persistence/e2e/remote-subset-two-tab.opfs.spec.ts`
+- Runtime: real Chromium, two same-origin pages, one OPFS database, QueryClient-backed on-demand source, filtered live-query Collection
+
+| Requirement | Outcome |
+| --- | --- |
+| ORC-001 | Pass within the stated scope. The browser coordinator's documented remote-subset contract keeps live `signal` and `subscription` references local while it transports clone-safe request data. Issue #1498 supplies the two-tab failure history. The test does not run React, Firefox/Zen, or a live backend. |
+| ORC-002 | Pass. The fixed query input independently specifies the one expected public row and label. Neither the coordinator's transport projection nor its response computes that expectation. |
+| ORC-003 | Pass for a fixed history. The test header states the law, model, history, driver, checkpoint, and limits. The adjacent fixture drives the real QueryClient, Collection, coordinator, BroadcastChannel, and OPFS path. |