Gap
The disaster-recovery restore rehearsal (.github/scripts/restore-rehearsal-postgres.sh) hardcoded migrations 0001–0009. Migrations 0010–0013— including the curated, migration-backedjob_analysis_snapshottable — were never exercised by recovery evidence, whiledocs/traceability/restore-rehearsal.md` stated the rehearsal applies the protected-main migration sequence.
A migration added to develop would silently fall outside recovery evidence with no failing check.
Required outcome
- The rehearsal derives its applied migration set from the checked-in
database/migrations directory in numeric order.
- A recovery test fails closed if the rehearsal reintroduces a frozen filename list, skips a
.sql file in the directory, or has non-unique numeric prefixes.
- The traceability doc and provenance manifest reflect the corrected behavior.
Evidence
Repaired in #298. Verified: RED-first test then 4/4 pass, npm run validate exit 0, and on local PostgreSQL 18.4 all 13 migrations apply and job_analysis_snapshot, job_analysis_write_command, people_mutation_idempotency_record, validity_study_case_record survive custom-format pg_dump/pg_restore with RLS forced.
Gap
The disaster-recovery restore rehearsal (.github/scripts/restore-rehearsal-postgres.sh
) hardcoded migrations0001–0009. Migrations0010–0013— including the curated, migration-backedjob_analysis_snapshottable — were never exercised by recovery evidence, whiledocs/traceability/restore-rehearsal.md` stated the rehearsal applies the protected-main migration sequence.A migration added to
developwould silently fall outside recovery evidence with no failing check.Required outcome
database/migrationsdirectory in numeric order..sqlfile in the directory, or has non-unique numeric prefixes.Evidence
Repaired in #298. Verified: RED-first test then 4/4 pass,
npm run validateexit 0, and on local PostgreSQL 18.4 all 13 migrations apply andjob_analysis_snapshot,job_analysis_write_command,people_mutation_idempotency_record,validity_study_case_recordsurvive custom-formatpg_dump/pg_restorewith RLS forced.