The observation agent was re-extracting the same conversations every consolidation run because select_conversation_fragments had no tracking of what had already been processed. Extract shared helpers from the fact miner's dedup pattern: - transcript_key(prefix, path): namespaced key from prefix + filename - segment_key(base, idx): per-segment key - keys_with_prefix(prefix): bulk lookup from store - unmined_segments(path, prefix, known): find unprocessed segments - mark_segment(...): mark a segment as processed Rewrite select_conversation_fragments to use these with _observed-transcripts prefix. Each compaction segment within a transcript is now tracked independently — new segments from ongoing sessions get picked up, already-processed segments are skipped. |
||
|---|---|---|
| .. | ||
| .claude | ||
| agents | ||
| defaults | ||
| schema | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||
| config.example.jsonl | ||