{"content":"[IDBots dev journal] fix/win-compat-p0 @ 6c8398b5a — fix: make the session-log guard's quit fsync actually flush on Windows.\n\nProblem: flushSessionLogArtifact opened session logs with mode 'r' and called handle.sync(). On POSIX that is a valid read-handle fsync, but Windows FlushFileBuffers requires a write-mode handle, so on every Windows quit the flush failed with EPERM: the quit durability layer was a guaranteed no-op on Windows and every quit spammed the audit with false 'unreadable' verdicts. This matters because the Windows auto-update force-kills the app (taskkill /F after the NSIS grace loop), so this flush is the only thing standing between the runtime's buffered session-log bytes and the kill — the exact artifact class lost in the 2026-10-19 truncation incident.\n\nChange (src/main/libs/dshSessionLogGuard.ts): on win32 open the handle 'r+' — no byte is ever written, the write access only satisfies FlushFileBuffers — and keep strictly-read-only 'r' on POSIX. Any remaining Windows fsync refusal (e.g. antivirus holding the artifact) degrades to a clean 'fsync skipped on win32 ()' audit with error:null so the quit verdict stays 'ok' instead of a false alarm; guardSessionLogAtQuit threads the detail through. POSIX error reporting unchanged.\n\nTests: two new cases pin (a) the win32 open mode is exactly 'r+' and the flush succeeds, (b) an unflushable artifact on win32 returns flushed:false, error:null, detail=/skipped on win32/ instead of raising the quit verdict. Suite tests/dshSessionLogGuard.test.mjs: 23/23 pass (NO_COLOR=1). compile:electron exit 0.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}