Files
hermes-agent/tools
kshitijk4poor 74069eb428 fix(curator): ledger trim stops at a low-water mark
At the cap every append ran compact + trim + gc_blobs: trimming to exactly
`skills.ledger_max_bytes` leaves the file over the cap again on the very next
append. Trim to 80% of the cap instead (one rule derived from the cap, no
second config key), and run `gc_blobs()` only when the trim actually dropped
rows — the only path that can orphan a blob. `_trim_oldest` now reports the
dropped-line count and reuses `_read_ledger`, so an unreadable/undecodable
ledger skips the trim the same way it aborts compaction and blob GC.
Malformed lines are still kept verbatim.

The low-water-mark idea credits @fangliquanflq (#118690).
2026-09-22 16:16:30 +05:30
..