Cross-impl schema parity — structural diff + assertion over two
SchemaSnapshots captured via query_schema_snapshot.
Two live impls (TS fuz_app vs Rust spine) are each other's parity
reference. After both bootstrap, snapshot each, diff, fail loudly on
drift. The diff entries name the specific divergence (column type,
missing index, schema_version row absent on one side) so the error
message points at the source.
Consumer pattern (in zzz's integration runner or fuz_app's own
cross-backend tests):
const snapshot_a = await query_schema_snapshot(db_after_deno_bootstrap);
const snapshot_b = await query_schema_snapshot(db_after_rust_bootstrap);
assert_schema_snapshots_equal(snapshot_a, snapshot_b, {a: 'deno', b: 'rust'});Non-coverage — drift the gate does not detect:
- enum types (CREATE TYPE ... AS ENUM)
- regular triggers (pg_trigger); CONSTRAINT TRIGGER is captured via
pg_constraint, but standalone CREATE TRIGGER is not
- views, materialized views, functions, procedures
- table storage parameters (fillfactor, tablespace, autovacuum settings)
- column physical order — the snapshot keys columns by name, so two
impls with the same columns in different declaration order compare
equal (functional parity is preserved; SELECT * ordering is not)
- COMMENT ON ...
- the schema_version table's own structure (only its rows are
captured)
- permissions / GRANTs
None of these are used by the current fuz_app auth schema. Extend
query_schema_snapshot + SchemaDiff if a consumer's schema reaches
for them; omitting them today keeps the diff surface focused on what
fuz_app actually emits.