Problem
Desktop automation history is stored in automations-history.jsonl, and compaction treats each physical line as either one JSON object or one malformed line.
If a history file contains two complete JSON object records glued onto the same physical line, for example:
{id:a1,ts:1,ok:true}
{id:a1,ts:2,ok:true}{id:a1,ts:3,ok:true}
the glued line cannot be parsed by a single JSON.parse(line). The current compaction path skips that whole physical line and can then rewrite the history file without the otherwise recoverable records.
Impact
This can silently drop automation run history / last-executed evidence during compaction. Automation execution itself is not affected.
Expected behavior
Compaction should keep ordinary malformed-line skipping, but recover balanced top-level object records from a glued JSONL line before applying retention and rewriting the history file.
Validation target
A focused automation history compaction test should cover:
- glued object records are preserved when retention allows them
- unrecoverable malformed lines are still skipped
- non-object JSON values such as
null, 42, and [] are not treated as history entries
Problem
Desktop automation history is stored in
automations-history.jsonl, and compaction treats each physical line as either one JSON object or one malformed line.If a history file contains two complete JSON object records glued onto the same physical line, for example:
{id:a1,ts:1,ok:true} {id:a1,ts:2,ok:true}{id:a1,ts:3,ok:true}the glued line cannot be parsed by a single
JSON.parse(line). The current compaction path skips that whole physical line and can then rewrite the history file without the otherwise recoverable records.Impact
This can silently drop automation run history / last-executed evidence during compaction. Automation execution itself is not affected.
Expected behavior
Compaction should keep ordinary malformed-line skipping, but recover balanced top-level object records from a glued JSONL line before applying retention and rewriting the history file.
Validation target
A focused automation history compaction test should cover:
null,42, and[]are not treated as history entries