From e008b62a72074a802ac4b60c1f2046ac5ea20016 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 31 Jul 2026 22:24:16 -0700 Subject: [PATCH] fix(state): route no-more-rows retries through the shared patience helper; add contributor mappings The rebase onto main's extracted _sleep_before_write_retry() method left three call sites pointing at the dropped local helper; rewire them. Also adds contributors/emails mappings (Dannou, trippyogi, spfcraze). --- contributors/emails/dasilva.daniel6@gmail.com | 1 + contributors/emails/peace@trippyogi.com | 1 + hermes_state.py | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 contributors/emails/dasilva.daniel6@gmail.com create mode 100644 contributors/emails/peace@trippyogi.com diff --git a/contributors/emails/dasilva.daniel6@gmail.com b/contributors/emails/dasilva.daniel6@gmail.com new file mode 100644 index 0000000000..9ee44b73e6 --- /dev/null +++ b/contributors/emails/dasilva.daniel6@gmail.com @@ -0,0 +1 @@ +Dannou diff --git a/contributors/emails/peace@trippyogi.com b/contributors/emails/peace@trippyogi.com new file mode 100644 index 0000000000..53ff409dd6 --- /dev/null +++ b/contributors/emails/peace@trippyogi.com @@ -0,0 +1 @@ +trippyogi diff --git a/hermes_state.py b/hermes_state.py index 22e2d05267..4f7b645346 100644 --- a/hermes_state.py +++ b/hermes_state.py @@ -2471,12 +2471,12 @@ class SessionDB(SessionSearchMixin, SessionSchemaMixin, SessionPortabilityMixin) "a large WAL checkpoint, or an older pre-update " "process; the database itself is healthy)" ) from exc - if _is_no_more_rows(exc) and _sleep_before_retry(): + if _is_no_more_rows(exc) and self._sleep_before_write_retry(deadline, patience_s): continue # Non-lock error or patience exhausted — propagate. raise except sqlite3.DatabaseError as exc: - if _is_no_more_rows(exc) and _sleep_before_retry(): + if _is_no_more_rows(exc) and self._sleep_before_write_retry(deadline, patience_s): continue # Corrupt FTS shadow tables make every write raise the # malformed/corrupt error class through the FTS sync triggers @@ -2496,7 +2496,7 @@ class SessionDB(SessionSearchMixin, SessionSchemaMixin, SessionPortabilityMixin) # subclass) or another sqlite3.Error class outside the two # handlers above. Message-scoped: anything else propagates # untouched. - if _is_no_more_rows(exc) and _sleep_before_retry(): + if _is_no_more_rows(exc) and self._sleep_before_write_retry(deadline, patience_s): continue raise