Files
hermes-agent/tools
kshitijk4poor 72ac9d2d1b refactor(curator): drop the unreachable newest-line fallback in _trim_oldest
The loop keeps lines[-1] unconditionally on its first iteration and
compact_ledger() (always run first by _maintain_size) strips blank lines,
so 'newest_json not in kept' could never be true; the size=2 slack was
also spurious since the join is exactly sum(len+1). Move _TRIM_LOW_WATER
above its first user.

PROOF: tests/tools/test_skill_ledger.py all green before and after (the
newest-survives assertion in test_trim_oldest_when_still_over_cap still
holds); probes/s5_trim_probe.py output unchanged.
2026-09-22 16:16:30 +05:30
..