Skip to content

test(zero-rust): replay the restored zql vectors - #191

Merged
tmm merged 1 commit into
mainfrom
test/rust-restored-ivm
Nov 13, 2026
Merged

tmm merged 1 commit into
mainfrom
test/rust-restored-ivm

Conversation

@tmm

@tmm tmm commented Nov 13, 2026

Copy link
Copy Markdown
Member

Replaces #189, which closed when #188 merged and deleted its base branch. The Rust conformance runner now replays both sets of restored zql vectors, the same way Swift's RestoredIVMTests does.

  • vectors/restored-ivm.json: 112 cases. Each has its own schema, data, and builder settings (enableNotExists, disableCorrelatedPredicatePushdown).
  • generated/restored-chinook-decpush.json: the chinook fuzzer's decorated push lane over its mini data. Pull requests replay the one-row lane through the existing --require-generated conformance step. Rust Nightly sets RESTORED_CHINOOK_PUSH_ROWS=1,2, as Swift Nightly does, and adds a restored-chinook comparison.

Each case builds the pipeline from JS's AST and compares the view and the changes it received after hydration and after each push. That replay is now shared with the existing ivm suite.

doctored_restored_vectors_fail writes a copy of each file and cuts three cases: a row from one case's initial view, a change from another's changes after a push, and a row from a third's view after a push. It then checks that exactly those three cases fail, each with the matching message, and that the rest pass. With the view-after-push comparison removed from the runner, the test fails (2 failed instead of 3).

Rust matches JS on every case: 112 of 112 restored cases, 2,474 of 2,474 in the one-row lane, and 4,948 of 4,948 with both lanes. No zero-client change was needed, so there's no changeset.

The Rust conformance runner replays `vectors/restored-ivm.json` and
`generated/restored-chinook-decpush.json`, as Swift's `RestoredIVMTests`
does: JS's AST and format over the case's own sources (or the chinook
fuzzer's mini data), with its builder settings, comparing the view and its
changes after hydration and each push. Pull requests replay the one-row
chinook lane; Rust Nightly adds the two-row lane. A test fails a doctored
copy of each file in exactly the cases it cut.

Amp-Thread-ID: https://ampcode.com/threads/T-054867f5-7416-49fc-ba71-3883f430a9fb
Co-authored-by: tmm <tmm@tmm.dev>
@tmm
tmm merged commit ec06579 into main Nov 13, 2026
17 checks passed
@tmm
tmm deleted the test/rust-restored-ivm branch November 13, 2026 06:17
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.

2 participants