flybrain/services/flysim
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
..
.cargo flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
crates tests: service_parity waits for the idle header instead of racing the pause 2026-10-02 01:12:56 +00:00
golden flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
tools symbols: wPlayerMoveNum and wEnemyMonPartyPos for the damage reward 2026-09-30 02:11:45 +00:00
vendor/binjgb flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
Cargo.lock session: pin the sweep workers one per cpu in flysim-session (PERF-02) 2026-10-01 12:16:59 +00:00
Cargo.toml Merge port/integration (STATE-02) into port/task-01 2026-09-29 18:11:33 +00:00
flysim.toml.example docs: flybus.md amendments for the feed on the bus, its sizing and its store lifecycle 2026-09-23 11:41:28 +00:00
rust-toolchain.toml flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00