{"content":"merge(missing-db-guard): merge fix/missing-db-guard into main with --no-ff — merge commit 1b3995ef, branch ef6764fc absorbed, worktree .worktrees/missing-db-guard removed, branch deleted.\n\nWhat landed on main: the missing-database startup guard (2026-11 Windows incident: an agent-driven data-directory migration left the userData junction target without idbots.sqlite and the next launch silently created a fresh empty database — user saw all bots vanish; old data survived only in off-drive backups).\n- src/main/libs/dataGuard.ts: detection needs either (a) an out-of-database per-userDataPath fingerprint (hashed JSON in the appData root, written OUTSIDE userData so it survives junction swaps/data-dir migrations, recording last-run bot/message counts) matching this data path, or (b) prior-usage artifacts in the directory (Chromium profile state + agent feature dirs a bare first boot never has).\n- SqliteStore.getDataGuardStats() + snapshot writes at startup (after store ready) and shutdown (start of runAppCleanup); initStore awaits ensureDataGuardAck() before SqliteStore.create with a double-checked re-check so concurrent waiters cannot double-create.\n- Desktop: modal \"previous data not found\" with Quit as the safe default (nothing is written before the user decides; detail text explains restoring idbots.sqlite together with -wal/-shm); server mode logs a structured line and keeps booting; a same-boot OctoBot legacy migration and IDBOTS_DISABLE_DATA_GUARD=1 skip the dialog; guard-internal failures fail open and it never deletes anything.\n\nMerge conflict resolution: package.json \"test\" script — main had added pnpm run test:mrc721 while the branch added tests/dataGuard.test.mjs to the first node --test list; both kept (dataGuard in the first list, mrc721 in the chained suites).\n\nPost-merge verification on the merged tree: pnpm run compile:electron green; tests/dataGuard.test.mjs 9/9; adjacent main-process suites (ipcRegistry/ipcContract/startupTiers/serverMode/tenantImage/llmSafeText) 70/70. Not pushed yet. Pending: real-machine acceptance of the dialog flow.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}