flybrain/services/flysim/crates/fly-legacy-session/tests
acamilo 3ea56ef3f8 tests: service_parity waits for the idle header instead of racing the pause
The idle-headers check failed 8 of 12 runs on a loaded build box (main
46e25ef: 3 of 4). The script paused and resumed 2 ms apart, so whether the
loop published a header-only idle snapshot in that window (due at 2 Hz) was
wall-clock luck, and legacy and session often disagreed. Not a product race:
the cadence is the protocol's.

The recorder now holds the resume until the first idle header has been seen
(bounded wait, 30 s), and the compare requires BOTH runtimes to have published
one, rather than merely agreeing on whether any did. The first idle header is
compared as before except for its `events` list: which publish carries the
pause's events is wall clock, and the events are compared in the running
snapshots and the event log.

Also fixed, found once the first was gone (1 in 20 under load): the two
sugars sent at one frame must be drained together; when the loop publishes
a snapshot while they are being sent the run is flagged incomplete and
repeated, like a missed frame.

What it proves, unchanged: a pause makes each runtime publish header-only
idle snapshots (status paused, no attachments) whose fields match the legacy
loop, and the script's responses, feed, event log, journal and final
checkpoint are identical between runtimes.

Under load (build box, load ~25 on 6 cores), toy_raw_service_contracts:
before 4/12 pass, after 40/40.
2026-10-02 01:12:56 +00:00
..
journal_replay.rs journal_replay: compare the adapter ledger as numbers 2026-09-29 21:54:41 +00:00
ledger_size.rs TASK-01 review fixes: an artifact-backed task ledger, the pending pulse, the palette seed, queued saves 2026-09-29 20:47:19 +00:00
palette_seed.rs TASK-01 review fixes: an artifact-backed task ledger, the pending pulse, the palette seed, queued saves 2026-09-29 20:47:19 +00:00
rollback_sequence.rs TASK-01 review fixes: an artifact-backed task ledger, the pending pulse, the palette seed, queued saves 2026-09-29 20:47:19 +00:00
save_handoff.rs TASK-01 round-2 notes: saves reach the writer on a failed step and on pause, every save outcome reported, sugar admission atomic with the commit 2026-09-30 01:30:56 +00:00
service_parity.rs tests: service_parity waits for the idle header instead of racing the pause 2026-10-02 01:12:56 +00:00
session_trace.rs session_trace: boot parity accepts the adapter migrations v0.6.7 deploys with 2026-09-30 04:11:06 +00:00
shadow.rs shadow: r3 notes: a reward skip still reads on for a stop; the relay flags a byte-cap stop; a window end takes back a pass; runbook: a new run after a long outage 2026-10-01 04:42:02 +00:00
shadow_relay_coverage.rs shadow: r3 notes: a reward skip still reads on for a stop; the relay flags a byte-cap stop; a window end takes back a pass; runbook: a new run after a long outage 2026-10-01 04:42:02 +00:00
shadow_remote.rs shadow: a trace stop ends the verdict's window; a pass counts only brain time after the last coverage gap (SHADOW-02 review B2) 2026-10-01 03:49:18 +00:00
speed.rs N5: publication at the feed's rate, in-memory transport in-process, capture spans; docs for the fix round 2026-09-29 22:20:39 +00:00
speed_ab.rs fly-legacy-session: in-process sessions over the local lane; speed_ab arms 2026-09-30 01:46:07 +00:00