picoclaw/pkg/memory
xiaoen b464687e2f feat(memory): add Compact method for physical JSONL compaction
Address file growth concern from #711 review: logical truncation via
skip offset is fast but leaves dead lines on disk indefinitely.

Compact() rewrites the JSONL file keeping only active messages, using
the same temp+rename pattern for crash safety. No-op when skip == 0.
The caller (lifecycle manager or agent loop) decides when to trigger
compaction — e.g. when skipped lines exceed active lines.
2026-02-26 08:42:35 +08:00
..
jsonl.go feat(memory): add Compact method for physical JSONL compaction 2026-02-26 08:42:35 +08:00
jsonl_test.go feat(memory): add Compact method for physical JSONL compaction 2026-02-26 08:42:35 +08:00
migration.go feat(memory): support migration from legacy JSON sessions 2026-02-26 08:35:05 +08:00
migration_test.go feat(memory): support migration from legacy JSON sessions 2026-02-26 08:35:05 +08:00
store.go feat(memory): add Compact method for physical JSONL compaction 2026-02-26 08:42:35 +08:00