Skip to content

p2000-chirp v1.1.0

Choose a tag to compare

@foae foae released this 07 Sep 07:29
· 18 commits to main since this release
9bf6e7a

Gentler, more polite polling — and a set of correctness fixes from a cross-model code review.

Polling behavior (user-specified pacing)

  • Sources poll on staggered slot schedules poll_interval_seconds apart (default 5): a single source at least every 15 s, each of N sources every (stagger x N) seconds — 2 sources = every 10 s, 3 = every 15 s
  • Every poll carries a random 1-3 s jitter; the cadence is never fixed
  • HTTP 429 / Retry-After honored (numeric or HTTP-date form), capped at 10 minutes; repeated failures back off exponentially (10-minute cap); sources recover automatically with a log line

Correctness fixes from the review

  • Restarts no longer re-bootstrap: per-source bootstrap markers persist in the state file, so incidents that arrived during downtime are delivered (previously the first poll after every restart silently swallowed the current feed snapshot)
  • Concurrent per-source polls can no longer double-notify the same incident (in-flight tracking closes the race)
  • Truncated radio retransmissions (e.g. "A2 Ambu 08123" for "A2 Ambu 08123 DIA Groesbeek Rit 276252") are deduplicated via a new one-directional prefix rule — a longer new dispatch is never suppressed
  • A transient state-file write failure (ENOSPC, unmounted volume) logs instead of crashing the daemon
  • Slot-grid anchoring keeps sources on their own stagger residue for the process lifetime

Ops

  • 57 unit tests (pacing math, failure policy, slot scheduling, bootstrap persistence, Retry-After parsing incl. HTTP-date), CI on GitHub Actions

Note: upgrading from v1.0.0 runs one final per-source bootstrap on first start (the state format gained bootstrap markers); from then on restarts deliver everything that happened while the daemon was down.