Simulation config: frac_adsb_outage knob + retina-simulation bump - #332
Conversation
Bump retina-simulation for the ADS-B outage knob and plumb it through the simulation config API. frac_adsb_outage is the fraction OF the ADS-B aircraft the simulator takes transponder-silent mid-flight, so it is deliberately outside the frac_anomalous + frac_drone + frac_dark <= 1.0 constraint — folding it in would make a dark-heavy scene unable to test outages at all. The ground-truth push now stores adsb_silent in ground_truth_meta (has_adsb stays true, so the dark count is unaffected) and GET /api/simulation/config reports counts["adsb_silent"] beside the type buckets. The snapshot restore whitelist keeps the new key so an operator's setting survives a rebuild. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
The capture tooling that measures the known-track hold reads /api/v1/ground-truth/aircraft, so the silent flag has to be visible there as well as on the simulation config counts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Claude finished @jehanazad's task in 1m 20s —— View job Review: PR #332 —
|
Summary
Plumbs the simulator's new transponder-outage knob through the simulation config API, and bumps
libs/retina-simulationto pick it up (offworldlabs/retina-simulation#13).The simulator previously never stopped ADS-B: every transponder aircraft was tagged in every node frame and pushed every second for its whole life. That left the known-track hold (a node track claimed to a hex staying claimed once ADS-B stops) unverifiable against simulated traffic. With
frac_adsb_outagean ADS-B aircraft goes silent mid-flight and comes back —has_adsbstays true, it just stops broadcasting.Default
0.0, so nothing changes for a deployment that never sets it.Changes
core/state.py:simulation_config/_SIMULATION_CONFIG_DEFAULTSgainfrac_adsb_outage: 0.0. Deliberately not added to_SIM_FRAC_FALLBACKS— it is not one of the spawn-type fractions and is not env-seeded with them.routes/test.py:PUT /api/simulation/configacceptsfrac_adsb_outage(0.0–1.0), validated by the existingfrac_*range rule but excluded from the sum constraint — it is a fraction OF the ADS-B population, orthogonal to the type roll, so a dark-heavy scene at the 1.0 ceiling can still take its transponder aircraft silent.GETreportsground_truth_counts["adsb_silent"], counted alongside (not instead of) the type buckets, since a silent aircraft is still a commercial aircraft.routes/sim_ingest.py: the ground-truth push whitelistsadsb_silentintoground_truth_meta, defaultingFalsefor older fleet payloads.has_adsbis untouched, so the dark count does not move when a transponder goes quiet.services/state_snapshot.py:_SIM_CONFIG_RESTORE_KEYSgains the key, so an operator's setting survives a rebuild like the other fractions.libs/retina-simulation.Test coverage
backend/tests/test_sim_ingest.pyextended alongside the existingfrac_dark/ scene-key cases: default is off, PUT accepted and echoed, out-of-range rejected both ends, the knob accepted at 1.0 while the type fractions already sum to 1.0 (the sum-exclusion guard), counts reporting a silent aircraft without moving the dark count, and the ground-truth meta flag with its legacy-payload default. Existing exact-dict count assertion updated for the new key.Review notes
frac_darkand also re-rolls aircraft already in the air, so raising it is visible within a poll interval rather than a fleet turnover.🤖 Generated with Claude Code