flybrain/services/flysim/crates
acamilo 01088d9479 feat(flysim): the on-screen chat ring survives a restart
Six deploys in a day left the CHAT panel empty every time, because the ring
was in-memory session state and nothing on disk held it.

Every accepted line now rewrites <hot_dir>/chat-ring.json through the same
atomic sequence a checkpoint commit uses (tmp, fsync, rename, directory
fsync), and Sim::boot reads it back before the first publish. Lines older
than 24 h are dropped on load, only the newest [chat] ring of them are kept,
and an absent, unreadable, unparseable or unknown-version file is an empty
panel and a logged warning rather than a startup failure -- which is exactly
what a restart gave before this existed.

The sidecar is deliberately not part of the checkpoint: no new chunk in the
FLYSIM01 envelope, nothing added to the compatibility string, so
--print-compatibility is byte-identical and a build that refuses every
checkpoint in a directory still brings the panel back. It sits beside the hot
checkpoints because it has their lifetime, and it is written from the sim
thread on the command path, so it cannot refresh that directory's mtime --
the watchdog's liveness signal -- while the loop is wedged.

Tests: the ring round-trips through the sidecar, a corrupt or future-version
file is ignored, lines older than a day are dropped, and the integration
test's SIGKILL restart now proves the panel comes back with the lines it had,
that the durable store holds no copy, and that no chat text is in the
envelope.
2026-09-22 16:26:28 +00:00
..
fly-session session: take Worker.Acknowledge's bound from the contract, not a local copy 2026-09-22 13:36:42 +00:00
fly-session-types fix(session-types): check the rational addition, and hold the schema set to the readers list 2026-09-22 13:12:59 +00:00
flybrain-core flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
flybrain-gb traps: rows 51 to 53, the museum's missing rows and a BACK with no box under it 2026-09-22 13:14:47 +00:00
flybus test(flybus): prove the two section 9 rows a review found cited but unproven 2026-09-22 12:39:07 +00:00
flysim feat(flysim): the on-screen chat ring survives a restart 2026-09-22 16:26:28 +00:00