Examples Search docs

Migration fixtures

Migrations are product features — test them as such.

Classes

ClassProve
Journal schemav1 → v2 user_version; integrity checks; fail closed
Event upcastOld body bytes → current fold state
Identity continuousDual principal fixtures offline
Trail recipescan-trail, plan evidence, golden oracles
Infra re-placeSame Gatekeeper path as deploy

Fail closed

FailureExpected
Noncontiguous seq after migrateSTREAM_INTEGRITY / migrate fail
Opening newer DB with older codeUNSUPPORTED_SCHEMA_VERSION
Snapshot ahead of headSNAPSHOT_AHEAD
Trail gate failNo partial cutover mute

Dual window tests

While dual is open, both old and new projections must answer consistently for in-window subjects. Cutover tests assert the gate and the terminal single-path state.

Trail golden

Trails package golden oracles pin plan/run verdicts for recipe shapes — treat like contract tests for migration recipes.

Schema · Trails · Continuous migration · Dual fixtures