mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-25 21:19:38 +00:00
d8c84f41c1
99/100 spool_pressure_detected events in the field were file-size-only triggers on a near-empty backlog (append-only spool.jsonl grows past 5 MB in healthy long sessions). TelemetrySpool now tracks PendingBytes (exact serialized size of the not-yet-uploaded tail, maintained on enqueue / mark-uploaded / restart rehydrate) and the collector thresholds on that instead of SpoolFileSizeBytes, which stays as an informational metric. Snapshot gains spool_pending_bytes; pressure event data carries pendingBytes + pendingBytesThreshold. Also: startup recovery scan streams via File.ReadLines instead of materializing the whole spool with File.ReadAllLines (corrupt-tail break semantics unchanged). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>