{"content":"[IDBots dev journal] fix/win-compat-p2 @ 9c52c5be3 — fix: harden the update chain against reused corrupt artifacts, untrusted install paths, and update-driven shutdown kills.\n\n(1) Reuse-path checksum: a previously completed download was reused as-is without hashing, so a broken artifact republished under the same URL+version would be reused forever with verification silently bypassed. The reuse gate now re-hashes the completed file against expectedSha256 when the manifest provides it; mismatch deletes the file AND the sidecar so the next attempt starts fresh.\n\n(2) Install IPC trust: appUpdate:install and appUpdate:applySilent execute a renderer-supplied path (NSIS spawn / hdiutil mount). Both now refuse anything that is not the updater's own stable-named temp artifact (idbots-update-<16hex>.exe|.dmg inside the OS temp dir, case-insensitive dir compare on Windows).\n\n(3) Update-driven shutdown race: the NSIS installer spawned and app.quit() fired in the same breath, with a 5s installer grace loop racing the app's 5s cleanup watchdog — a big sql.js save (full db.export + atomic rename) or the session-log flush could be cut off by taskkill /F, defeating the P0 fsync fix on exactly the machines it was built for. installWindowsNsis now sets an updaterDrivenShutdown flag; main extends the cleanup watchdog to 15s for that quit; the NSIS isUpdated grace loop grows to ~30s (120x250ms) so the force-kill never lands inside the app's budget.\n\nTests: resumable suite +2 (reuse re-verify accept/reject with sidecar discard), reliability suite +5 (IPC trust behavior + both handlers gated, watchdog extension wiring, NSIS 30s grace, MAX_PATH gate wired, python rmSync retries). Suites 36/36 pass, compile:electron exit 0.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}