Files
EscapistsReintroduced/docs/hq-local-handoff.md
T

34 lines
6.2 KiB
Markdown

# Local visual-report radio handoff
A registered military enemy squad with a fresh native visual sighting now prefers its own usable radio route. If that route is unavailable, it may hand the same sighting to an indexed living friendly radio carrier within 100 metres of an attributable original source-squad member. Distance is current three-dimensional physical distance. The source's bound original roster, exact member identity, faction, living/conscious state and player/capture exclusions must hold; replacement group members cannot originate this handoff.
The original squad retains its pending report. Source group, observed timestamp, target, position and message lineage are unchanged. The receiver is only a carrier. HQ learns nothing until the existing physical radio route completes. The source member, bound roster, recipient and local distance are revalidated throughout the existing three-second originating call; loss or separation fails the route. A retained roster reference keeps this guard active even if the native source-group handle disappears. After this local phase completes, the carrier has the information independently; later observer loss cannot erase it, while all existing radio sender/receiver, range, final-hop and timeout rules remain active.
A receiver with its own pending uplink or another squad's still-originating handoff is excluded. Its own routine/body/search/visual and mortar-supply calls defer during the borrowed originating phase. Deferral conservatively resets a pending negative-search dwell clock, so unseen combat during the pause cannot count toward a clear 30-second search. No new tactical scheduler or force is introduced.
The bounded selector checks at most 4096 candidate/member pairs across a five-second network rebuild, with at most32 original members per source and the existing2048-node graph limit. A no-sighting squad consumes no local-route budget. Fresh attempts obey the existing report cadence. Saturation conservatively defers work; this bounded slice does not add a new global fairness scheduler for unusually large networks. Per-source sighting watermarks preserve up to64 target timestamps and reject duplicate/older attempts, including interrupted calls. Watermarks expire after120seconds; source observations themselves must be at most500ms old, so expiry cannot revive an old sighting.
Executable policy tests run actual helper/history, network route/Advance, HQ route choice/Observe/QueueReports and the existing graph/fairness/equipment suites. They cover exact100m boundaries including vertical distance, original-member loss/replacement, deleted native source, radio loss, capture, originating-call exclusion, immutable report lineage, no early HQ intake, replay rejection, bounded work and negative-search dwell reset. The controlled native proof below covers delivery and interruption; natural perception and multiplayer remain separate.
This checkpoint covers existing ground squads' visual contacts. Body-discovery reports, routine status/check-ins, negative-sweep reports and aircraft observations do not gain local fallback here. Handing off speech through obstructing terrain or loud combat is not an acoustics simulation; the contract is the owner's bounded local100m communication rule followed by physical radio delivery.
Owned reference provenance (originals read-only; SHA-256):
- `EAI_HQ.c`, IndexRadios/FindCaller/Queue/HandoffAvailable/LogHandoff behavior only: `4898ac471fb16433fc5d98244a8cec89c5e8e006af2c94bbcd89113a2b7107c8`.
- `EAI_HQNetwork.c`, physical carrier graph/hop semantics compared with the already migrated successor: `1a7e279b050514bad86f18fdd233b7eb5728e99bab3daae3aedb31ceb571c271`.
- `EAI_NativeRadioCall.c`, inspected only to distinguish the old Ready→Called callback from this successor's existing originating-call state machine: `ed9ad2a8137395e25363f94e81d4854e159136a53a67e2be4b89fdcb08d712d6`. No protected extension hooks from that file are copied.
No EAI_GroupLookup, original Escapists or ScrtCore implementation was read or reused. No resources, dependency identities, native windows or original missions were modified.
## Retained native setup failure
The [initial native fixture](evidence/native-2026-09-20-100734-handoff-startup-race/report.json) compiled all integrated changes but expired without establishing its handoff. It removed seven source radios before that formation's one-time startup allocator had settled. The allocator subsequently completed a legitimate basic-radio insertion; the source then sent ordinary status M23 through its own radio route. The fixture correctly refused to describe that own-radio path as a local handoff. This is a failed test setup, retained with its exact source/input snapshot and confirmed private cleanup; it does not qualify runtime handoff.
## Controlled native delivery and interruption
The [101306 checkpoint](evidence/native-2026-09-20-101306-local-handoff/report.json) completes one scripted round and 81 assertions, with no script/runtime failures. The corrected fixture waits for both original groups' radio allocators to be terminal with no submitted insertion. It then removes existing source radios, positions an original witness near another original group's caller, and supplies an explicitly arranged immutable sighting. Production ObservationRoute and the ordinary HQ tick deliver that snapshot through the local originating phase and actual radio route. HQ has no belief before delivery; source group, message, position and observed time match afterward. Mutating the caller's separate report object cannot change the queued snapshot.
A second arranged snapshot remains absent after the receiving caller's actual radio is removed during the local call. The route fails before origin completion, preserving the first delivered belief. Source/recipient ownership and exact fixture reservations are checked throughout. This proves the physical radio/handoff boundary with arranged data and controlled positioning, not native visual detection, shouting acoustics, ordinary play or multiplayer.
The source and installed dependency fingerprints remain unchanged, and hidden/muted cleanup is confirmed. Four installed external localization errors still fail strict native qualification. The prior setup failure remains archived.