Files
hermes-agent/agent
John Paul Soliva 44cf71f231 fix(compression): in-place compaction accounts for every row behind a merged user turn
A prompt that never got its reply leaves a durable user;user pair. The
alternation repair hands the compressor one dict for both rows, and the
in-place commit counted it as one original.

On a reload without row ids (gateway) the merged dict matched no row, read
as an unpersisted turn, and its two rows were re-sequenced after the
compacted set: the old prompts landed behind the running turn, and the
tail rewind reached one row into the summarized region and hid it.

With row ids the absorbed row was covered but not counted, so the oldest
carried original stayed compacted=1 beside its live copy.

The commit now resolves a merged user dict to the run of active rows it
was built from, and the tail rewind covers every row a tail dict absorbed.

(cherry picked from commit ba02ecf54487ca5235b99f70e6370db66aba94f4)
(cherry picked from commit 09715419ac7de957b757b5446208d05e26e75f3b)
2026-10-03 18:17:35 +05:30
..
2026-09-11 09:31:13 -07:00