Repository navigation
test(zql): run the snapshot-only restored zql tests as re-baselined copies - #195
Merged
Merged
Conversation
…pshots, as mono published them Ten zql test files from rocicorp/mono 7ebeb21 fail against today's zql only on inline snapshots of internals: operator traces, operator storage and AST shape. The originals stay out; these copies are named *.rebaselined.test.ts and carry a header naming the original, the source commit and the upstream commits that changed the internals. Below the header each copy is byte-identical to the original, so the next commit's diff is exactly the re-baseline. query-gen's copy needs query-gen.ts and zql-integration-tests' helpers/data-gen.ts, restored unchanged and pinned in verbatim.txt. Co-authored-by: tmm <tmm@tmm.dev>
Regenerated with vitest --update=all against today's zql, then put back at each snapshot's original indentation (vitest ignores it). Only toMatchInlineSnapshot bodies change, and only those of operator traces, operator storage and ASTs; every view, push and other assertion is as mono published it. The changes come from upstream: - fd30e64: Cap and Take storage keys are cap:s<value> and take:s<value>. - 8702aea: Cap's fetch passes countOnly. - 5c2a12e: :join-index trace steps; the join index holds only the result. - c9d1b15, effd2da: ASTs carry aggregate and groupBy keys. Co-authored-by: tmm <tmm@tmm.dev>
The restored-tests README lists the ten copies, the snapshots each re-baseline changed and the upstream commits behind them, how much they duplicate, how to re-baseline one again, and what they mean for upstream syncs. Files that now run as copies, and query-gen's restored helpers, come out of the left-out table; the AST row names effd2da, which added the groupBy key, instead of 5493ba5. Amp-Thread-ID: https://ampcode.com/threads/T-472dde83-243c-421c-b41d-4e7aaf375188 Co-authored-by: tmm <tmm@tmm.dev>
tmm
added a commit
that referenced
this pull request
Nov 13, 2026
…sh tests (#198) restored-ivm.test.ts now also runs the re-baselined copies of cap.push, flipped-join.push, flipped-join.more-fetch and take.push from #195, with their own assertions, and records the cases they build. Their 125 cases, less one the chunked flipped-join test builds twice, go to the new vectors/restored-ivm-rebaselined.json: 124 cases, none of which restored-ivm.json has. restored-ivm.json and every other vector file are unchanged. Swift's RestoredIVMTests replays the new file case by case, like restored-ivm.json, and so does Rust's restored suite. Amp-Thread-ID: https://ampcode.com/threads/T-472dde83-243c-421c-b41d-4e7aaf375188 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs ten more of the zql tests restored from rocicorp/mono
7ebeb2172, as re-baselined copies. Each original fails against today's zql only on inline snapshots of internals: operator traces, operator storage and AST shape. Test-only, so there's no changeset.No restored file is edited. The originals stay out, as before. Each runs as
<original>.rebaselined.test.tsin the original's directory, with a header naming the original, the source commit and the upstream commits that changed the internals. zql's suite andzqlite-zql-test(both modes) pick them up.packages/zql/src/)ivm/cap.pushcountOnlyfetch)ivm/take.fetch,ivm/take.pushivm/flipped-join.push,ivm/flipped-join.more-fetch:join-indexsteps; the index holds only the result)query/complete-ordering,named,query-impl.interning,query-impl.query-kitchen-sink,test/query-genaggregate,groupBykeys)Commits
query-gen.tsandzql-integration-tests/src/helpers/data-gen.ts. The helpers are restored unchanged and pinned inverbatim.txt(now 174 files). The copies' snapshots fail at this commit by design.toMatchInlineSnapshotbodies changed. It also undid the five upstream changes above on each new snapshot, and the result matched the old snapshot. The two exceptions are twoactualStoragesnapshots inflipped-join.push. There, the in-memory join index from 5c2a12e no longer keeps a stale entry. No view, push or other assertion changed. Vitest re-indented 6 snapshots, which I put back.flipped-join.*contain NUL bytes in storage-key snapshots, as upstream's do, so GitHub shows them as binary;git diff --textshows them.groupBy.Left out
These still fail on real results, fail
tsc, or depend on removed code:query-impl.ast: 7 assertions compare AST keys.join-utils,join.push: they call removed helpers.connection-index: its module is gone.exists.fetch,yield.fetch,join.fetch: only snapshots fail, but they also failtsc.Duplication
The copies hold 28,553 lines (710 KB): 78 header lines, 1,437 added by the re-baseline, and 27,038 as published. They duplicate only mono's published files, which aren't in this repo.
Upstream syncs
mainat 13bbb08 (15 commits ahead) gives no conflicts.align-manifests.mjshas nothing to change,pnpm install --frozen-lockfilepasses,verbatim.txtmatches, zql passes 1,313 tests, zqlite-zql-test passes 2,434, and tsc passes.*.rebaselined.test.tspaths, so a merge can't conflict on them unless mono adds a file at the same path.Checks run locally
CI=true): 1,313 pass, 2 skipped upstream.check-typesfor zql, zql-integration-tests, zqlite-zql-test and zero-conformance.pnpm run lint,oxfmt --checkandsyncpack lint.zero-conformancegenerateleaves the vectors byte-identical.