Skip to content

test(db-ivm): pin what min and max promise after a delete - #2093

Open
KyleAMathews wants to merge 6 commits into
mainfrom
test-db-ivm-minmax-multiplicity
Open

KyleAMathews wants to merge 6 commits into
mainfrom
test-db-ivm-minmax-multiplicity

Conversation

@KyleAMathews

@KyleAMathews KyleAMathews commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

🎯 Changes

This PR is test-only. It records what db-ivm min and max promise after a delete.

groupBy consolidates values by their hash. The hash treats -0 as 0, and it treats two Dates with the same time as one value. So after a delete, min and max return a value that is hash-equal to a remaining member, but not always the remaining instance:

Members (either insertion order) Delete min and max return
-0, 0 -0 -0 (the deleted value)
new Date(5), new Date(5) the first Date the first Date (the deleted instance)
1, 2 1 2

The query compiler needs the exact remaining value for group representatives (#2081). So it keeps its own exact inputs, and does not use these results. This was the recommended decision: keep that workaround in the compiler, and record the db-ivm contract in a test.

groupBy.test.ts has two new tests:

  • The contract test checks that each result is hash-equal to the remaining value, in both insertion orders. It also checks that a distinct value comes back as is. When an aggregate input differs for each row, as the compiler's exact-value keys do, the remaining instance comes back. A db-ivm that always returns the remaining instance passes this test. For -0/0 and equal Dates, the contract promises only hash equality. The distinct and per-row cases are the ones that a wrong value fails.
  • A second test pins the current behavior: the deleted instance comes back in either insertion order. A shared hash entry keeps the instance that it gets last, and the delete's retraction comes last. This test is not a promise. If a db-ivm change makes it fail, the compiler owner can decide whether the workaround is still necessary.

Both tests read the group's row by adding up the output multiplicities. A comment in compiler/group-by.ts points to these tests.

✅ Checklist

  • I have tested this code locally with pnpm test.

🚀 Release Impact

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

This pull request and its description were written by Isaac.

Summary by CodeRabbit

  • Documentation
    • Clarified that grouped min and max results after a deletion are hash-equal to a remaining value, but may not be the same instance.
    • Documented that certain hash-equal values, including -0 and 0 or equal dates, can retain the deleted instance as the result.
  • Tests
    • Added coverage for insertion order, hash-equal values, and per-row aggregate inputs after deletion.

groupBy consolidates by hash, which merges -0 with 0 and equal Dates.
After a delete, min and max return a hash-equal value, not necessarily
the remaining instance. The query compiler keeps its own exact inputs
for that reason; this test records the contract it relies on.

Co-authored-by: Isaac <no-reply@databricks.com>
@changeset-bot

changeset-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 770f94f

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

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Incremental update benchmark

Comparing 3191e78e (this PR) against fd13e3cc (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.01× · cold hydrate time: 1.03× (geometric mean of per-case ratios; lower is faster).

Writes: 2 regression(s), 2 improvement(s) (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 case Worst case Flags
list: newest 50 open -6.7% -49.8% +81.3% —
list + author +13.4% -15.9% +91.3% 1 🔴
list + comment count -4.4% -26.5% +8.4% 2 🟢
list + 3 recent comments +2.2% -8.5% +13.7% —
issue detail + comments +10.5% -19.6% +146.9% 1 🔴

Cold hydrate

Query Δ cold hydrate time (geomean) Best case Worst case Flags
list: newest 50 open +4.7% -50.9% +234.8% 2 🔴
list + author +8.9% -9.3% +51.3% —
list + comment count +1.3% -22.7% +47.3% —
list + 3 recent comments +5.2% -32.5% +233.9% 1 🔴
issue detail + comments -8.7% -67.2% +45.1% 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.93×, 1 change(s)
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.114ms 0.130ms +14.3% 0.228ms 0.243ms +6.8% 11.256ms 10.714ms -4.8%
list: newest 50 open 0.391ms 0.323ms -17.4% 0.603ms 0.580ms -3.9% 2.360ms 2.760ms +17.0%
list + author 0.132ms 0.166ms +26.1% 0.282ms 0.327ms +15.7% 7.731ms 7.014ms -9.3%
list + comment count 0.346ms 0.274ms -20.9% 0.652ms 0.535ms -18.0% 🟢 14.278ms 12.840ms -10.1%
list + 3 recent comments 0.142ms 0.132ms -7.0% 0.339ms 0.331ms -2.3% 12.286ms 9.779ms -20.4%
issue detail + comments 0.094ms 0.087ms -7.6% 0.256ms 0.201ms -21.4% 1.266ms 1.100ms -13.1%
100 rows/collection | source indexes: none | optimistic writes — geomean 0.94×, cold 1.02×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.063ms 0.065ms +3.1% 0.157ms 0.163ms +3.3% 1.502ms 1.768ms +17.7%
list: newest 50 open 0.285ms 0.279ms -2.0% 0.528ms 0.514ms -2.6% 1.372ms 1.311ms -4.5%
list + author 0.094ms 0.081ms -14.1% 0.208ms 0.208ms +0.2% 3.270ms 4.282ms +31.0%
list + comment count 0.186ms 0.177ms -4.8% 0.356ms 0.345ms -3.2% 5.961ms 4.610ms -22.7%
list + 3 recent comments 0.067ms 0.069ms +3.5% 0.198ms 0.197ms -0.6% 6.457ms 5.401ms -16.4%
issue detail + comments 0.099ms 0.080ms -19.6% 0.134ms 0.155ms +15.7% 0.586ms 0.694ms +18.4%
100 rows/collection | source indexes: manual | synced writes — geomean 0.95×, cold 1.09×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.074ms 0.048ms -35.1% 0.105ms 0.107ms +2.4% 2.866ms 3.781ms +31.9%
list: newest 50 open 0.245ms 0.269ms +9.6% 0.533ms 0.561ms +5.1% 1.027ms 1.015ms -1.2%
list + author 0.059ms 0.059ms -0.8% 0.123ms 0.093ms -24.0% 2.137ms 3.234ms +51.3%
list + comment count 0.146ms 0.147ms +0.2% 0.248ms 0.272ms +9.4% 3.865ms 3.392ms -12.3%
list + 3 recent comments 0.084ms 0.085ms +1.2% 0.180ms 0.171ms -5.0% 5.422ms 5.683ms +4.8%
issue detail + comments 0.064ms 0.067ms +4.3% 0.140ms 0.169ms +20.3% 0.487ms 0.456ms -6.4%
100 rows/collection | source indexes: manual | optimistic writes — geomean 1.22×, cold 1.42×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.045ms 0.081ms +81.3% 0.111ms 0.129ms +16.6% 0.847ms 2.836ms +234.8%
list: newest 50 open 0.163ms 0.170ms +4.2% 0.317ms 0.374ms +17.9% 0.768ms 0.796ms +3.7%
list + author 0.065ms 0.106ms +63.1% 0.165ms 0.173ms +5.1% 2.418ms 2.611ms +8.0%
list + comment count 0.101ms 0.105ms +4.6% 0.147ms 0.223ms +51.1% 2.612ms 3.384ms +29.6%
list + 3 recent comments 0.061ms 0.059ms -2.8% 0.137ms 0.159ms +15.9% 3.782ms 4.338ms +14.7%
issue detail + comments 0.049ms 0.052ms +4.9% 0.096ms 0.121ms +25.1% 0.308ms 0.447ms +45.1%
1,000 rows/collection | source indexes: none | synced writes — geomean 0.99×, cold 0.87×, 2 change(s)
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.082ms 0.041ms -49.8% 0.101ms 0.056ms -44.5% 9.243ms 5.920ms -35.9%
list: newest 50 open 0.826ms 0.843ms +2.0% 1.119ms 2.073ms +85.3% 8.080ms 5.500ms -31.9%
list + author 0.058ms 0.110ms +91.3% 0.084ms 0.179ms +113.1% 🔴 18.419ms 20.934ms +13.7%
list + comment count 0.195ms 0.143ms -26.5% 0.262ms 0.183ms -30.0% 🟢 27.749ms 33.759ms +21.7%
list + 3 recent comments 0.078ms 0.086ms +10.9% 0.137ms 0.179ms +30.8% 32.279ms 21.788ms -32.5%
issue detail + comments 0.104ms 0.125ms +20.4% 0.144ms 0.199ms +38.3% 1.292ms 1.354ms +4.8%
1,000 rows/collection | source indexes: none | optimistic writes — geomean 0.90×, cold 0.81×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.086ms 0.048ms -45.0% 0.115ms 0.117ms +1.8% 8.906ms 4.372ms -50.9%
list: newest 50 open 0.916ms 0.922ms +0.7% 1.076ms 1.146ms +6.5% 7.019ms 4.844ms -31.0%
list + author 0.075ms 0.063ms -15.9% 0.144ms 0.128ms -10.7% 21.160ms 19.618ms -7.3%
list + comment count 0.106ms 0.111ms +4.1% 0.225ms 0.142ms -36.8% 30.673ms 27.798ms -9.4%
list + 3 recent comments 0.057ms 0.059ms +4.0% 0.084ms 0.115ms +37.3% 17.427ms 21.007ms +20.5%
issue detail + comments 0.045ms 0.048ms +8.5% 0.061ms 0.113ms +86.0% 0.880ms 0.751ms -14.7%
1,000 rows/collection | source indexes: manual | synced writes — geomean 1.06×, cold 1.03×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.039ms 0.038ms -0.7% 0.050ms 0.051ms +0.5% 0.872ms 0.856ms -1.9%
list: newest 50 open 0.183ms 0.174ms -4.6% 0.359ms 0.361ms +0.5% 0.968ms 1.217ms +25.8%
list + author 0.055ms 0.055ms +0.1% 0.102ms 0.090ms -11.8% 1.668ms 1.662ms -0.3%
list + comment count 0.142ms 0.154ms +8.4% 0.307ms 0.341ms +10.8% 2.859ms 2.821ms -1.3%
list + 3 recent comments 0.077ms 0.087ms +13.7% 0.172ms 0.184ms +6.9% 4.997ms 4.822ms -3.5%
issue detail + comments 0.054ms 0.065ms +21.3% 0.070ms 0.084ms +20.7% 0.292ms 0.300ms +2.7%
1,000 rows/collection | source indexes: manual | optimistic writes — geomean 1.08×, cold 1.20×, 1 change(s)
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.041ms 0.041ms -0.0% 0.054ms 0.056ms +3.6% 0.630ms 0.596ms -5.3%
list: newest 50 open 0.174ms 0.161ms -7.1% 0.380ms 0.333ms -12.4% 0.679ms 0.673ms -0.9%
list + author 0.058ms 0.095ms +65.4% 0.083ms 0.144ms +74.5% 1.661ms 1.626ms -2.1%
list + comment count 0.134ms 0.116ms -13.9% 0.257ms 0.247ms -3.8% 2.526ms 2.627ms +4.0%
list + 3 recent comments 0.056ms 0.062ms +11.8% 0.120ms 0.135ms +12.0% 3.496ms 11.675ms +233.9% 🔴
issue detail + comments 0.049ms 0.053ms +7.6% 0.113ms 0.133ms +17.6% 0.359ms 0.329ms -8.3%
10,000 rows/collection | source indexes: none | synced writes — geomean 0.91×, cold 1.06×, 1 change(s)
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.074ms 0.044ms -40.9% 0.104ms 0.050ms -51.5% 49.793ms 61.160ms +22.8%
list: newest 50 open 8.315ms 8.240ms -0.9% 8.971ms 8.897ms -0.8% 56.272ms 91.152ms +62.0% 🔴
list + author 0.061ms 0.060ms -0.8% 0.098ms 0.092ms -6.5% 176.408ms 184.246ms +4.4%
list + comment count 0.136ms 0.136ms +0.6% 0.245ms 0.277ms +12.9% 267.278ms 241.262ms -9.7%
list + 3 recent comments 0.079ms 0.080ms +0.7% 0.198ms 0.162ms -18.4% 195.764ms 175.062ms -10.6%
issue detail + comments 0.058ms 0.057ms -1.3% 0.073ms 0.074ms +1.3% 5.183ms 4.314ms -16.8%
10,000 rows/collection | source indexes: none | optimistic writes — geomean 0.99×, cold 0.87×, 2 change(s)
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.047ms 0.048ms +1.5% 0.100ms 0.076ms -24.1% 56.466ms 54.802ms -2.9%
list: newest 50 open 9.297ms 9.117ms -1.9% 10.463ms 9.748ms -6.8% 55.798ms 85.585ms +53.4% 🔴
list + author 0.066ms 0.066ms +1.4% 0.107ms 0.108ms +1.0% 171.415ms 169.243ms -1.3%
list + comment count 0.143ms 0.150ms +4.3% 0.192ms 0.182ms -4.7% 225.602ms 239.376ms +6.1%
list + 3 recent comments 0.064ms 0.059ms -8.5% 0.089ms 0.073ms -18.1% 200.910ms 169.468ms -15.6%
issue detail + comments 0.054ms 0.051ms -5.1% 0.081ms 0.077ms -4.7% 12.414ms 4.070ms -67.2% 🟢
10,000 rows/collection | source indexes: manual | synced writes — geomean 1.16×, cold 1.18×, 1 change(s)
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.039ms 0.037ms -5.1% 0.075ms 0.046ms -38.9% 1.538ms 1.484ms -3.5%
list: newest 50 open 0.624ms 0.624ms -0.0% 1.010ms 0.988ms -2.1% 1.331ms 1.830ms +37.5%
list + author 0.056ms 0.058ms +3.1% 0.073ms 0.099ms +36.9% 2.653ms 3.190ms +20.3%
list + comment count 0.142ms 0.144ms +1.1% 0.333ms 0.203ms -38.8% 3.916ms 5.767ms +47.3%
list + 3 recent comments 0.086ms 0.086ms -0.0% 0.126ms 0.133ms +5.8% 4.615ms 5.342ms +15.8%
issue detail + comments 0.066ms 0.162ms +146.9% 0.145ms 0.197ms +35.3% 🔴 0.631ms 0.638ms +1.0%
10,000 rows/collection | source indexes: manual | optimistic writes — geomean 1.00×, cold 0.97×
Query Base median PR median Δ median Base p95 PR p95 Δ p95 Base cold PR cold Δ cold
list: newest 50 open 0.044ms 0.047ms +6.7% 0.063ms 0.098ms +56.2% 1.303ms 2.088ms +60.2%
list: newest 50 open 0.619ms 0.622ms +0.4% 1.005ms 0.699ms -30.5% 2.727ms 1.353ms -50.4%
list + author 0.063ms 0.059ms -6.4% 0.092ms 0.098ms +6.5% 2.814ms 3.174ms +12.8%
list + comment count 0.162ms 0.159ms -1.9% 0.253ms 0.196ms -22.4% 3.482ms 3.220ms -7.5%
list + 3 recent comments 0.069ms 0.069ms +1.0% 0.104ms 0.103ms -0.5% 4.095ms 4.082ms -0.3%
issue detail + comments 0.060ms 0.062ms +3.3% 0.082ms 0.128ms +55.9% 0.594ms 0.616ms +3.7%

Runner: node v24.8.0, linux 6.17.0-1022-azure, INTEL(R) XEON(R) PLATINUM 8573C. Timings on shared CI runners are noisy; treat small deltas as indicative only.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

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.

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
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a1cdc25b-de27-42d4-ab15-661ee7e6e7bf




📥 Commits

Reviewing files that changed from the base of the PR and between 9fd81b1 and d86af31.





📒 Files selected for processing (2)
  • docs/contributing/oracle-coverage.md
  • packages/db-ivm/tests/operators/groupBy.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; 7 remain after this review.






📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

Adds groupBy tests for min and max after a deletion. The tests cover signed zero, equal Date values, distinct values, insertion order, and per-row aggregate inputs. Supporting documentation describes hash-based consolidation and the limits of generated histories for value identity.

Changes

groupBy extrema after deletion

Layer / File(s) Summary
Test extrema after deletion
packages/db-ivm/tests/operators/groupBy.test.ts, docs/contributing/oracle-coverage.md, packages/db/src/query/compiler/group-by.ts
Adds tests for extrema after deletion, including hash-equal inputs, distinct values, per-row aggregate inputs, and insertion-order effects. The coverage map documents limits of generated histories for value identity. The compiler comment clarifies D2’s hash-based consolidation and points to the test.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other








Merge Risk: ⚪ Minimal · up to d86af

This PR adds tests and coverage notes for groupBy extrema after deletion; the current deleted-instance behavior is documented separately from the hash-equality contract. No actionable merge risk remains.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is complete and follows the repository template. It explains the changes, records the test command, and identifies the change as docs/CI/dev-only with no release impact.
Title check Passed The title clearly and concisely identifies the main change: documenting the promised behavior of db-ivm min and max after deletion.



✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR










🧪 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

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 214 kB

ℹ️ View Unchanged
Filename Size
packages/db/dist/esm/client.js 4.21 kB
packages/db/dist/esm/collection-options-brand.js 219 B
packages/db/dist/esm/collection-options.js 258 B
packages/db/dist/esm/collection/change-events.js 1.74 kB
packages/db/dist/esm/collection/changes.js 2.99 kB
packages/db/dist/esm/collection/cleanup-queue.js 901 B
packages/db/dist/esm/collection/config-errors.js 547 B
packages/db/dist/esm/collection/events.js 481 B
packages/db/dist/esm/collection/index.js 5.11 kB
packages/db/dist/esm/collection/indexes.js 2.3 kB
packages/db/dist/esm/collection/lifecycle.js 2.94 kB
packages/db/dist/esm/collection/mutations.js 2.91 kB
packages/db/dist/esm/collection/state.js 7.09 kB
packages/db/dist/esm/collection/subscription.js 8.8 kB
packages/db/dist/esm/collection/sync.js 5.32 kB
packages/db/dist/esm/collection/validate-config.js 1.17 kB
packages/db/dist/esm/deferred.js 207 B
packages/db/dist/esm/error-message.js 642 B
packages/db/dist/esm/errors.js 6.49 kB
packages/db/dist/esm/event-emitter.js 1.06 kB
packages/db/dist/esm/index.js 4.47 kB
packages/db/dist/esm/indexed-db-wrapper.js 1.91 kB
packages/db/dist/esm/indexed-db.js 3.7 kB
packages/db/dist/esm/indexes/auto-index.js 929 B
packages/db/dist/esm/indexes/base-index.js 1.52 kB
packages/db/dist/esm/indexes/basic-index.js 2.02 kB
packages/db/dist/esm/indexes/btree-index.js 2.34 kB
packages/db/dist/esm/indexes/index-registry.js 916 B
packages/db/dist/esm/indexes/reverse-index.js 1 kB
packages/db/dist/esm/live-query-adapter.js 338 B
packages/db/dist/esm/live-query-observer.js 4.81 kB
packages/db/dist/esm/live-query-options.js 1.4 kB
packages/db/dist/esm/live-query-window-controller.js 4.27 kB
packages/db/dist/esm/local-only.js 1.08 kB
packages/db/dist/esm/local-storage.js 3.8 kB
packages/db/dist/esm/optimistic-action.js 359 B
packages/db/dist/esm/paced-mutations.js 1.13 kB
packages/db/dist/esm/persisted-readiness.js 195 B
packages/db/dist/esm/proxy.js 3.51 kB
packages/db/dist/esm/query/builder/clone-query.js 849 B
packages/db/dist/esm/query/builder/functions.js 1.54 kB
packages/db/dist/esm/query/builder/index.js 7.49 kB
packages/db/dist/esm/query/builder/query-ir.js 312 B
packages/db/dist/esm/query/builder/ref-proxy-identity.js 292 B
packages/db/dist/esm/query/builder/ref-proxy.js 1.67 kB
packages/db/dist/esm/query/builder/wrapper-identity.js 221 B
packages/db/dist/esm/query/compiler/evaluators.js 2.51 kB
packages/db/dist/esm/query/compiler/expressions.js 603 B
packages/db/dist/esm/query/compiler/group-by.js 4.48 kB
packages/db/dist/esm/query/compiler/index.js 10 kB
packages/db/dist/esm/query/compiler/joins.js 3.42 kB
packages/db/dist/esm/query/compiler/lazy-targets.js 1.11 kB
packages/db/dist/esm/query/compiler/order-by.js 2.09 kB
packages/db/dist/esm/query/compiler/parent-routes.js 319 B
packages/db/dist/esm/query/compiler/query-equivalence.js 568 B
packages/db/dist/esm/query/compiler/route-metadata.js 1.24 kB
packages/db/dist/esm/query/compiler/select.js 1.59 kB
packages/db/dist/esm/query/effect.js 5 kB
packages/db/dist/esm/query/equality-conjunct.js 486 B
packages/db/dist/esm/query/equality-value-identity.js 735 B
packages/db/dist/esm/query/expression-helpers.js 1.61 kB
packages/db/dist/esm/query/ir-stable-identity.js 4.2 kB
packages/db/dist/esm/query/ir.js 2.2 kB
packages/db/dist/esm/query/join-conditions.js 257 B
packages/db/dist/esm/query/live-query-collection.js 391 B
packages/db/dist/esm/query/live/bucket-facade-adapter.js 3.17 kB
packages/db/dist/esm/query/live/collection-config-builder.js 6.83 kB
packages/db/dist/esm/query/live/collection-registry.js 264 B
packages/db/dist/esm/query/live/collection-subscriber.js 2.15 kB
packages/db/dist/esm/query/live/graph-scheduler.js 305 B
packages/db/dist/esm/query/live/internal.js 145 B
packages/db/dist/esm/query/live/materialized-pipeline.js 2.42 kB
packages/db/dist/esm/query/live/ordered-source-loader.js 4.38 kB
packages/db/dist/esm/query/live/subset-demand-controller.js 1.73 kB
packages/db/dist/esm/query/live/utils.js 1.29 kB
packages/db/dist/esm/query/optimizer.js 2.95 kB
packages/db/dist/esm/query/pooled-live-query.js 4.13 kB
packages/db/dist/esm/query/query-once.js 359 B
packages/db/dist/esm/query/runtime-reference-identity.js 630 B
packages/db/dist/esm/query/subset-dedupe.js 493 B
packages/db/dist/esm/scheduler.js 1.23 kB
packages/db/dist/esm/SortedMap.js 1.6 kB
packages/db/dist/esm/strategies/commit-completion.js 156 B
packages/db/dist/esm/strategies/debounceStrategy.js 658 B
packages/db/dist/esm/strategies/queueStrategy.js 523 B
packages/db/dist/esm/strategies/serial-pacer.js 486 B
packages/db/dist/esm/strategies/throttleStrategy.js 738 B
packages/db/dist/esm/sync-persistence.js 626 B
packages/db/dist/esm/sync-receipt.js 211 B
packages/db/dist/esm/transaction-commit-work.js 351 B
packages/db/dist/esm/transactions.js 4.61 kB
packages/db/dist/esm/utils.js 1.57 kB
packages/db/dist/esm/utils/array-utils.js 270 B
packages/db/dist/esm/utils/browser-polyfills.js 304 B
packages/db/dist/esm/utils/btree.js 3.02 kB
packages/db/dist/esm/utils/callbacks.js 174 B
packages/db/dist/esm/utils/comparison.js 1.7 kB
packages/db/dist/esm/utils/cursor.js 753 B
packages/db/dist/esm/utils/error.js 262 B
packages/db/dist/esm/utils/get-or-create.js 155 B
packages/db/dist/esm/utils/index-optimization.js 2.43 kB
packages/db/dist/esm/utils/source-record.js 140 B
packages/db/dist/esm/utils/type-guards.js 230 B
packages/db/dist/esm/utils/uuid.js 530 B
packages/db/dist/esm/virtual-props.js 413 B
packages/react-db/dist/esm/DbProvider.js 317 B
packages/react-db/dist/esm/development.js 190 B
packages/react-db/dist/esm/HydrationBoundary.js 263 B
packages/react-db/dist/esm/index.js 330 B
packages/react-db/dist/esm/live-query-internals.js 282 B
packages/react-db/dist/esm/source-id-bindings.js 746 B
packages/react-db/dist/esm/useLiveInfiniteQuery.js 2.15 kB
packages/react-db/dist/esm/useLiveQuery.js 3.34 kB
packages/react-db/dist/esm/useLiveQueryEffect.js 504 B
packages/react-db/dist/esm/useLiveSuspenseQuery.js 1.33 kB
packages/react-db/dist/esm/usePacedMutations.js 401 B

compressed-size-action::db-and-react-package-size

@pkg-pr-new

pkg-pr-new Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
More templates

@tanstack/angular-db

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

@tanstack/browser-db-sqlite-persistence

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

@tanstack/capacitor-db-sqlite-persistence

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

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

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

@tanstack/db

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

@tanstack/db-ivm

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

@tanstack/db-sqlite-persistence-core

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

@tanstack/electric-db-collection

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

@tanstack/electron-db-sqlite-persistence

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

@tanstack/expo-db-sqlite-persistence

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

@tanstack/node-db-sqlite-persistence

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

@tanstack/offline-transactions

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

@tanstack/powersync-db-collection

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

@tanstack/query-db-collection

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

@tanstack/react-db

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

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

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

@tanstack/react-router-with-db

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

@tanstack/rxdb-db-collection

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

@tanstack/solid-db

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

@tanstack/svelte-db

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

@tanstack/tauri-db-sqlite-persistence

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

@tanstack/trailbase-db-collection

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

@tanstack/vue-db

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

commit: 770f94f

Isaac and others added 5 commits October 9, 2026 14:16
The contract test now clears its result before the delete and requires
the delete to publish the group again, checks that a distinct remaining
Date is returned as is, types its values, and no longer sits under the
replay-witness header. The coverage map records the contract and why the
query compiler keeps its own exact inputs.

Co-authored-by: Isaac <no-reply@databricks.com>
The review showed the contract test could not fail on what it
documented: it checked only a hash-equal bound with serializeValue. It
now checks that bound with the hash the Index merges by, in both delete
orders, and separately pins the current behavior that the deleted
instance comes back, so a db-ivm change alerts the compiler owner. The
group's row is read from the consolidated output, so republication is
not part of the contract. The prose says the merge is over the whole
aggregate input tuple. The compiler's exact-input comment points to the
test, and the coverage map names the value-identity policy that would
generalize it.

Co-authored-by: Isaac <no-reply@databricks.com>
Split the contract from the pinned current behavior, read the group's row by
integrating output multiplicities, check the max's hash for Dates, and show
that a per-row aggregate input returns the remaining instance.

Co-authored-by: Isaac <no-reply@databricks.com>
The deleted instance comes back whichever row was added first: a shared
hash entry keeps the instance it was last given, and the delete's retraction
is last. The pinned test now covers both orders, the prose names that
mechanism and states which contract cases a wrong value can fail, and the
hash import uses the hashing entry point.

Co-authored-by: Isaac <no-reply@databricks.com>
…directions

Mirror cases now delete the maximum, and the per-row cases check -0/0 in
both directions for min and max. The contract comment states the positive
multiplicity condition and what the compiler's exact-value keys separate,
and the compiler comment names the contract instead of a test path.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant