Skip to content

Validate fork migration history gaps during startup #141

Open

Description

@chrisohearn

Normal startup only calls runForkMigrations() when the newest recorded fork migration is below the head. A history with a gap below the head (for example fork IDs 1–15 and 17 with 16 missing) can therefore start without running forkHistoryProblems, silently leaving the missing migration unapplied. Release preflight still catches the state, but ordinary startup should reject it as it did before.

Run the read-only fork-history integrity check unconditionally, including when no migration is pending, without taking an unnecessary write lock.

Acceptance:

  • A gapped fork migration history fails startup before applying later migrations.
  • A current, gap-free history remains read-only when there is no pending migration.
  • Focused tests cover both paths.

Reported as P3 in PR #140 review.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions