Files
airdef/airdef-mod
chexit f2bc8550f5
build / mod (push) Failing after 28s
Tie a radar's refine/fire channel to its own plot's freshness (#140)
A station counted any own plot, however old, as a busy refine/fire
channel: a network heartbeat kept a stale contact's track fresh, so two
long-expired own fire plots still held both channels of the engagement
radar and a new contact nearby got only a coarse search plot, even with
the search radar running.

Channel occupancy now follows the station's own tracking.
Track::holds_channel requires an own (never relayed) refine/fire plot no
older than the station's track_ttl — three missed turns, the same value
that already bounds a contact without a fresh measurement. The planner
counts channels with the same Sam::own_channels_used(now) the panel,
monitor, map and "why" views read, so the UI and the allocation cannot
disagree about a stale channel. A stale channel frees for a new contact
without the network's survey track being removed; the hard per-profile
limit and the own measurement's provenance are unchanged, and a relayed
plot still never holds a channel.

Test: two contacts take both channels at the station, then leave its
reach while the search radar beside them keeps relaying them; a third
contact arrives nearby and gets its own fire channel (the test fails on
the old counting), and the relayed survey tracks of the old contacts
stay.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-21 09:53:43 +03:00
..