Files
hermes-agent/tools
kshitijk4poor 2a9c27f1de fix(skills): warn when compaction is skipped because the ledger is unreadable
compact_ledger() returns (0, 0, 0) when the ledger cannot be read or decoded
(tools/skill_ledger.py:308-309) but did so silently, so `hermes curator ledger --compact`
reported a no-op compaction as if the ledger were simply empty. gc_blobs() already logs
"ledger unreadable (...); blob GC skipped" for the identical condition; emit the
symmetric warning here so the operator sees the ledger needs attention.

Manual probe (HERMES_HOME=<tmp>, ledger bytes b"\xff"):
  WARNING skill_ledger: ledger unreadable ('utf-8' codec can't decode byte 0xff in
  position 0: invalid start byte); compaction skipped
  compact_ledger() -> (0, 0, 0); ledger bytes still b"\xff".
The regression test that pins this arrives in the following commit.
2026-09-22 13:40:40 +05:30
..