Skip to content

hidane 0.3.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 21:37
· 85 commits to main since this release
ad8b177

hidane 0.3.0 completes Web support. firebase-js-sdk's own Firestore browser test suite passes on hidane as it does on the official emulator (v1.22.0), Flutter Web was verified in 0.2.4, and a parity table now counts what the test suite compares with the official emulator.

firebase-js-sdk's browser suite (#74)

tools/js-sdk-browser/ runs the SDK's test:browser:emulator integration tests (Vitest in Playwright's Chromium, over WebChannel and REST) at a pinned commit against an emulator. Against the official emulator and against hidane alike, 1,183 tests pass and 739 skip themselves (pipelines, BSON types, cases marked as not for the emulator); none fail. A new workflow runs the suite against hidane on every change to the server and weekly, and fails on a test that passes on the official emulator but not on hidane.

The suite is not green on either emulator unchanged: some tests leave Firestore instances running, each holding HTTP/1.1 connections for its Listen and Write streams, and Chromium opens at most six connections to one host and port. The runner adds a setup file that terminates the instances each test leaves; the tests themselves are unchanged.

Two differences it found are fixed, each recorded from the official emulator first and replayed by the test suite:

  • A commit that writes one document more than once is refused before any write is applied, as the official emulator refuses it, with its INVALID_ARGUMENT messages: an insert (exists: false) after anything but a delete, an update after a delete (Cannot delete then update an entity in the same request.), a delete with exists: true after a delete, and an update_time precondition that differs from the first write's (tools/oracle/same_document_writes.py, 131 cases).
  • An equality on __name__ next to an inequality on another field is refused unless __name__ has an inequality too (Equality on key is not allowed if there are other inequality fields and key does not appear in inequalities.), checked in the official emulator's order; past 60 disjunctions a query gets the official emulator's other message (Too many disjunctions after normalization, the maximum is 30).

Parity table (#43)

tools/parity/table.py reads every recording the test suite replays and counts, per area and transport, the official answers its test compares with hidane's, and how: in full, as a Security Rules decision and its reasons, in part, or on the status. It also compares each pair of SDK transcripts. The result is docs/parity.md, the table on hidane.dev and the README badge; CI fails when they fall behind the recordings. Today: 15,427 recorded answers in 39 recordings, 7,328 of them compared in full, 3,912 as a decision and its reasons, 731 in part and 3,401 on the status; 20 pairs of SDK transcripts, 13 identical and 7 with a documented difference; 60 intentional differences in parity exceptions.

Install

curl -fsSL https://hidane.dev/install.sh | sh
brew install hidane-dev/tap/hidane
npm install --save-dev hidane
cargo binstall hidane   # or cargo install hidane
dart pub global activate hidane
docker run --rm -p 8080:8080 ghcr.io/hidane-dev/hidane:0.3.0

Full changelog: v0.2.4...v0.3.0