Files
hermes-agent/persistence/sqlite/admin
arcabotai b32b91631e fix(update): a locked state.db is never rolled back to an old snapshot
The post-update guard read a header it could not open (a Windows sharing
violation, or a live connection in this process) as "corrupted", restored
the newest snapshot on disk however old, then re-ran the same header read
and reported the successful restore as "did not complete" (#147938).

- verify_sqlite_integrity is tri-state: an unreadable or short header read
  falls through to SQLite's own probe, and only NOTADB/CORRUPT, bad magic or
  a failed integrity_check return False. Access failures return None.
- The guard defers on None and restores only from the snapshot this update
  took for that home; an older snapshot on disk is never a source.
- A restore is judged by SQLite, so a refused header read after it no
  longer reports a failure. The boot guard and the after-snapshot check
  do not report None as corruption.

Refs #147938

Co-authored-by: Smit Desai <183234613+sd2389@users.noreply.github.com>
Co-authored-by: teknium1 <127238744+teknium1@users.noreply.github.com>
Co-authored-by: Kevin Rajan <7121943+kvnloo@users.noreply.github.com>
2026-11-28 21:03:36 -08:00
..
…
…