3 Commits

Author SHA1 Message Date
kshitijk4poor
018d1f9c27 fix(storage): a transient IOERR in the rank probe replays the read instead of latching
Second-model review of 5046fe2946: the attribution probe caught every
DatabaseError, including a transient "disk I/O error" OperationalError, and
then returned the original bare SQLITE_CORRUPT. _read_retrying_ioerr retries
only IOERR, so it published the unattributed error to the storage-health
latch: the bug this PR fixes, reachable when index damage and the WAL
transition window coincide. The probe now re-raises OperationalError so the
holder replays the whole read.

Also from the gate wave:
- _in_one_read moves unchanged from stored_reads to sql_common, so search no
  longer imports a private helper from the transcript module.
- The interrupted-realign test raises only after the FTS DDL, not after any
  script the executor runs.

New test: a disk I/O error on the first probe replays the read, answers from
canonical rows and leaves storage ok. Red with the re-raise removed.
2026-11-18 16:37:44 +05:30
yoniebans
65cca66545 fix(persistence): the SQLite listing preview trims leading whitespace before its head cut
The plain-message branch of the listing preview SQL now left-trims the content before the 63-character head cut, as main's listing does, so leading whitespace no longer eats into the cut and every cut preview carries the ... marker.
2026-11-17 17:49:49 +01:00
yoniebans
a00a6e8934 feat(persistence/sqlite): the conversation family
The SQLite implementation of the conversation contracts.
2026-11-17 17:49:46 +01:00