Skip to content

The agent that grows with you

refactor(state): one WHY line on the rebuild_fts corruption arm

kshitijk4poor583e995a91b6
diff --git a/hermes_state_search.py b/hermes_state_search.py
index 1716b66bac6..bc66b2bebae 100644
--- a/hermes_state_search.py
+++ b/hermes_state_search.py
@@ -1330,10 +1330,7 @@ class SessionSearchMixin:
self._conn.rollback()
logger.warning("FTS rebuild failed for %s: %s", tbl, exc)
except sqlite3.DatabaseError as exc:
- # SQLITE_CORRUPT ("database disk image is malformed") is a DatabaseError,
- # not an OperationalError — the corruption class this recovery exists for.
- # Without this arm the error escaped the loop un-rolled-back and callers
- # lost the 0-means-no-progress signal they route on (#133375).
+ # SQLITE_CORRUPT is a DatabaseError, not an OperationalError (#133375).
self._conn.rollback()
logger.error(
"FTS rebuild failed with a corruption-class error for %s: %s; "