Skip to content

test(recovery): DR rehearsal must exercise every protected-main migration, not a frozen 0001-0009 list #299

Description

@seonghobae

Gap

The disaster-recovery restore rehearsal (.github/scripts/restore-rehearsal-postgres.sh) hardcoded migrations 00010009. Migrations 00100013— 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions