fix: Extend sent echo_counts retention from 1h to 7 days

Same 1-hour cleanup issue as incoming_paths: sent messages lost
their analyzer links after ~1 hour because echo_counts was pruned
on every new send. Now matches .echoes.jsonl 7-day retention.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-02-22 17:24:57 +01:00
parent 9ad3435609
commit bcdc014965

View File

@@ -612,8 +612,8 @@ class MeshCLISession:
'channel_idx': channel_idx,
'pkt_payload': None
}
# Cleanup old echo counts (> 1 hour)
cutoff = time.time() - 3600
# Cleanup old echo counts (> 7 days, matching .echoes.jsonl retention)
cutoff = time.time() - (7 * 24 * 3600)
self.echo_counts = {k: v for k, v in self.echo_counts.items()
if v['timestamp'] > cutoff}
logger.debug(f"Registered pending echo for channel {channel_idx}")