Migrate profile state to SQLite and move writes and backups into a background worker. Acknowledge terminal, SSH and automation changes only after durable saves. Preserve JSON import, recovery, rollback and compatibility exports.
Validate migration, worker failures, maintenance, cross-profile moves and terminal lifetime races with unit, integration and end-to-end coverage.
`logPersistenceStartupMilestone` resolved the lazy `details` closure before
reading `performance.now()`, so the 1.6 MB `JSON.stringify` that
`persistence-load-done` uses to report `workspaceSessionBytes` was billed to the
milestone it measures. Snapshot `t` first.
Diagnostics output is unchanged; only the recorded timestamp moves.