Detecting 0-byte state.db as data loss, not healthy

NousResearch/hermes-agent · cluster 97568

Data as of

Nothing open on GitHub. Fix merged in #98017. Check it covers your case.

The short answer

0open issues
0open PRs
7items grouped
Known?
Yes. 7 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #98017. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #98017. That is separate from the fix event.
Still open
Nothing open on GitHub.

These issues and PRs address a bug where a zero-byte state.db file is not recognized as a data-loss condition, causing silent total loss. The work involves updating detection logic, quarantining truncated files, and related corruption-handling improvements.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #98017 fix(state): quarantine 0-byte truncated state.db (salvage of #97580)

    merged to main

    files: hermes_cli/backup.py, hermes_state.py, hermes_state_schema.py, tests/test_zeroed_state_db.py

  • #99513 fix(state): corruption detection & heal cluster — 0-byte quarantine race, decode-error probe/heal, CJK never-raises

    merged to main

    files: contributors/emails/[redacted:email], hermes_cli/backup.py, hermes_cli/web_server.py, hermes_state.py, hermes_state_schema.py, tests/hermes_cli/test_web_server.py, tests/test_98924_readonly_fts_decode_error.py, tests/test_fts_update_of_narrowing.py, tests/test_state_db_malformed_repair.py, tests/test_tui_gateway_server.py, tests/test_zeroed_state_db.py, tui_gateway/methods_prompt.py, tui_gateway/server.py

4 PRs closed without merging

From the close comments: done elsewhere 2 · duplicate 1 · merged via another change 1

  • #97580 fix(state): quarantine 0-byte truncated state.db and record store provenance (#97568) · merged via another change → a071fc8, #98017, #99513
  • #98300 fix(agent): detect 0-byte state.db as zeroed, not healthy (#97568) · duplicate → #98017
  • #99100 fix(state): is_zeroed_state_db returns True for 0-byte file (complete data loss) · done elsewhere → a071fc8, #97580, #97568, #98017, #99513
  • #99179 fix(sessions): treat a zero-byte state.db as zeroed so total loss is not silent · done elsewhere → a071fc8, #97580, #97568, #98017, #99513
Closed issues · 1
  • Closed#97568is_zeroed_state_db() returns False for a 0-byte file, so total data loss is silent
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.29: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Merged PRs
#98017, #99513
Closed issues
1
Attempts
4 PRs closed without merging
Fix link checked
31 Aug 2026

For your agent

The same facts, typed.