Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate. (Closest: [Bug]: Desktop fails to start when state DB migration ids collide with a different build (auth_sessions missing scopes) #21106, closed as an unshipped-build DB. Here the conflicting row was written by an official release.)
- I included enough detail to reproduce or investigate the problem.
Area
Server: persistence / migrations / self-update
Steps to reproduce
- Run the official build
0.0.46-preview.20261010.2909(tagv0.0.46-preview.20261010.2909, commit01cd49f65d2c) on Linux as the managed server. It applies061_PeerLinks, soeffect_sql_migrationsrecords(61, 'PeerLinks'). - Update to any newer 0.1.1 build. Tried:
0.1.1-nightly.20261016.3190,0.1.1-nightly.20261016.3203,0.1.1-preview.20261017.3254and0.1.1-preview.20261018.3300.3327contains no migration changes relative to3300.
Expected behavior
There is an upgrade path from an official build's migration history. Newer builds renumbered the migrations: on main, 61 is PullRequestReviewGuides, and the 3300 binary has 64_PeerLinks. The migrator should recognise that 61/PeerLinks was already applied and run the missing migrations 61–63.
Actual behavior
The candidate exits with code 1 on startup, and the service launcher rolls back to 2909 (status: rolled-back, reason: candidate-exited:1). This has happened on every update since 2026-10-16:
MigrationError: This database's migration history would skip required schema migrations: 61_PullRequestReviewGuides (recorded: PeerLinks). The migrator skips every id up to the highest recorded id (61), regardless of name. It was probably written by a different build. Start the build that wrote it, or report this migration history so an upgrade path can be added.
at assertV2MigrationsCanRun
at runMigrations
Tail of effect_sql_migrations:
61 | 2026-10-10 19:55:21 | PeerLinks
60 | 2026-10-10 00:10:26 | ThreadSnapshotWindowIndexes
59 | 2026-10-10 00:10:26 | McpAppModelContext
58 | 2026-10-08 19:10:50 | WebhookRelayDeliveries
57 | 2026-10-08 19:10:50 | ScheduledTaskWebhooks
apps/server/src/persistence/Migrations at 01cd49f (2909) has 061_PeerLinks.ts. On current main it has 061_PullRequestReviewGuides.ts, 062_ThreadFailureLookupIndex.ts and 063_DropUnusedV1Projections.ts.
Impact
The server can't move past 2909: every new build fails and rolls back. Each attempt also causes about a minute of downtime, during which running threads are interrupted. statev2.sqlite is about 4 GB with active history, so recreating it isn't an option, and we would rather not hand-edit migration rows. 063_DropUnusedV1Projections is destructive, and PeerLinks would be re-applied.
Version or commit
Active: 0.0.46-preview.20261010.2909 (01cd49f). Failing: 3190, 3203, 3254 and 3300; 3327 contains no migration changes relative to 3300.
Environment
Linux x64 (Ubuntu, kernel 6.8). Headless managed server via t3 __service-launcher under a systemd user service, T3 Connect relay.
Logs or stack traces
See above. The service launcher state records targetVersion: 0.1.1-preview.20261018.3300, status: rolled-back, reason: candidate-exited:1.
A supported recovery path would help, either a name-aware remap in the migrator or documented manual steps.
Activity
lebasoft commentedon Oct 19, 2026
Resolved on our side with 0.1.1-preview.20261019.3339. That build moved
PeerLinksto064_PeerLinks.ts, which is byte-identical to the 2909061_PeerLinks.tsand usesCREATE TABLE IF NOT EXISTS, so this manual path was safe:statev2.sqlite(VACUUM INTO).(61, 'PeerLinks')fromeffect_sql_migrations.fenced. The update was committed with no MigrationError.Leaving this here for anyone else upgrading from 0.0.46-preview.2909. A name-aware reconcile like
reconcileV2PreviewMigrationfor61/PeerLinkswould make this automatic. Closing.