You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(stack): code-review round on #676 — validation parity and test hardening
Product fix: the WASM encryptQuery/encryptQueryBulk now run the same
pre-FFI guards as every other query path (assertValidNumericValue,
assertValueIndexCompatibility) — NaN/Infinity/out-of-int64 bigint and
numeric-on-match-index fail with the named errors the Node entry raises
instead of an opaque serde failure or a silently no-match term. Both
paths now share one toFfiQueryTerm() so the serde-omission and ope-swap
subtleties can't drift between single and bulk; the deliberate as-never
casts at the FFI seam carry biome-ignore reasons per AGENTS.md.
Test hardening from the same review:
- FFI stub gains encryptQuery/encryptQueryBulk so unmocked unit tests
fail with the stub's named error, not 'is not a function'
- query-types.test.ts gains roundtrip's ffi:false permissions pin
- wasm adapter expectRejected discriminates capability rejections from
infrastructure failures (mirrors the Supabase adapter's doctrine)
- empty in/notIn lists throw (parity with drizzle inArrayOp) instead of
rendering 'WHERE ()'
- independent ZeroKMS round-trips run concurrently (per-field encrypts,
bulk-insert rows, between lo/hi terms)
- dropped the redundant '| null' from encryptQuery's signature and the
gratuitous 'null as unknown as string' casts it appeared to justify
- fixed the nonexistent .env.example pointer in both Deno suites and
the stale skip-behavior comments in tests.yml/integration-drizzle.yml
- three new unit pins for the validation behavior (828 total green)
Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
0 commit comments