enrich: fix dedup keys never written for empty mining results

The early return on line 343 when the LLM found no missed experiences
bypassed the dedup key writes at lines 397-414, despite the comment
saying "even if count == 0, to prevent re-runs." This caused sessions
with nothing to mine to be re-mined every 60s tick indefinitely.

Fix: replace the early return with a conditional print, so the dedup
keys are always written and saved.
This commit is contained in:
ProofOfConcept 2026-03-07 00:09:35 -05:00
parent 841cfe035b
commit fca9e58713

View file

@ -340,10 +340,9 @@ pub fn experience_mine(
if entries.is_empty() { if entries.is_empty() {
println!(" No missed experiences found."); println!(" No missed experiences found.");
return Ok(0); } else {
println!(" Found {} experiential moments:", entries.len());
} }
println!(" Found {} experiential moments:", entries.len());
let mut count = 0; let mut count = 0;
for entry in &entries { for entry in &entries {
let ts = entry.get("timestamp").and_then(|v| v.as_str()).unwrap_or(""); let ts = entry.get("timestamp").and_then(|v| v.as_str()).unwrap_or("");