testing/schema_parity.ts view source
(a: { entries: { namespace: string; name: string; sequence: number; }[]; }, b: { entries: { namespace: string; name: string; sequence: number; }[]; }, labels?: SchemaDiffLabels): void import {assert_migration_trackers_equal} from '@fuzdev/fuz_app/testing/schema_parity.js'; Throw if the two spines' schema_version trackers disagree — the gate for
the swap-freely invariant (any consumer can swap TS↔Rust over one DB without
re-bootstrapping). This catches what assert_schema_snapshots_equal is blind
to by design: the snapshot excludes the tracker, so a migration-name or
partitioning divergence that yields an identical *schema* (e.g. cell_v0 vs
full_cell_schema, or cell_history bundled vs isolated) passes schema
parity but breaks the runner's positional name-prefix check at boot
(name-divergence-at-N). The error names the impls and lists every diff.
a
{ entries: { namespace: string; name: string; sequence: number; }[]; }b
{ entries: { namespace: string; name: string; sequence: number; }[]; }labels
{}returns
void