test(data): assert DatabaseModule registered migrations == the declared set #312

Closed
opened 2026-07-04 06:52:50 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-04 06:52:50 +00:00 (Migrated from github.com)

Phase-3 review (LOW/safety net, high blast radius). MigrationTest reflectively discovers all Migration vals and replay-tests them, but NOTHING asserts DatabaseModule.addMigrations(...) registers all of them. Since there's (correctly) no destructive fallback, a future migration authored + schema-committed but forgotten in addMigrations passes every test yet crash-loops ALL upgrading users at DB open. Fix: a test asserting the Room builder's registered set equals allAppMigrations (or generate addMigrations from the same reflective source).

Phase-3 review (LOW/safety net, high blast radius). `MigrationTest` reflectively discovers all `Migration` vals and replay-tests them, but NOTHING asserts `DatabaseModule.addMigrations(...)` registers all of them. Since there's (correctly) no destructive fallback, a future migration authored + schema-committed but forgotten in `addMigrations` passes every test yet crash-loops ALL upgrading users at DB open. **Fix:** a test asserting the Room builder's registered set equals `allAppMigrations` (or generate `addMigrations` from the same reflective source).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#312