What β lib/services/migrations.js claims a migration as executed before up() completes; a hard process kill (OOM/SIGKILL) mid-up() leaves it permanently skipped on later boots.
Why β A partially-applied data migration then never finishes (surfaced reviewing #3990's backfill: an interrupted updateMany would strand a subset of docs outside the recreated unique index β narrow window, but the runner semantics are generic).
Scope β consider claim-with-status (running β done) + boot-time detection of stale "running" claims (re-run or abort loud), keeping idempotence requirements on migrations documented in MIGRATIONS.md.
Found during the #3990 review (pass-2 residual, medium).
Created via /dev:issue
Scope: validated 2026-07-28
What β
lib/services/migrations.jsclaims a migration as executed beforeup()completes; a hard process kill (OOM/SIGKILL) mid-up()leaves it permanently skipped on later boots.Why β A partially-applied data migration then never finishes (surfaced reviewing #3990's backfill: an interrupted
updateManywould strand a subset of docs outside the recreated unique index β narrow window, but the runner semantics are generic).Scope β consider claim-with-status (running β done) + boot-time detection of stale "running" claims (re-run or abort loud), keeping idempotence requirements on migrations documented in MIGRATIONS.md.
Found during the #3990 review (pass-2 residual, medium).
Created via /dev:issue
Scope: validated 2026-07-28