5760c65be2
Addresses teknium1's review (#64195) finding #1: the previous PR placed the migration inside the connection IIFE, AFTER `resolveRemoteBackend(primaryProfileKey())`. When the preference file was missing, `primaryProfileKey()` resolved to 'default' and the remote branch returned immediately without ever reaching the migration. Remote- mode users got no migration at all. Move the call site to the top of `startHermes()`, before the connection IIFE that reads `primaryProfileKey()`. Both remote and local branches now flow through this path before any profile-dependent resolution, so the migration runs on first boot regardless of mode. The inlined implementation is replaced with a thin wrapper that builds a `MigrationDeps` bag and delegates to `migrateActiveProfileIfMissing` from `profile-migration.ts`. No production behavior change beyond the call- site move. Tests added in a separate commit.