Lobby loop: auto-rejoin between rounds + seat reclaim + live mission edits

The between-rounds arcade flow (first-playtest-night field request): at
mission end every pod exited, seats dropped, and every round required
everyone to re-run join.bat with no way to adjust the mission.

1. AUTO-REJOIN: StopMission (operator END / mission clock -- NOT a
   window close) sets gBTMissionStoppedByConsole; after the matchlog
   upload btl4main relaunches the pod into the join wait with the same
   cmdline (BT_CALLSIGN/BT_MECH ride the inherited environment).

2. SEAT RECLAIM: the assigned tag is mirrored file-scope
   (BTRelaySelfTag) and re-presented as the 3rd SEAT_REQUEST payload
   field (BT_SEAT_CLAIM); the relay holds a dropped seat for its tag
   for 90s and a returning player gets their EXACT seat back -- static
   ordering across rounds, the real-pod model.  Non-claim joiners skip
   reclaim-held seats.

3. LIVE MISSION EDITS: the console gains "Apply mission settings"
   (enabled while a session runs) writing arena/time/weather/length
   into the session egg; the relay re-reads the file at round reset and
   egg release (roster shape locked mid-session).

Verified 2-pod 3-round: pods self-relaunched after each clock end; the
SECOND-to-rejoin still reclaimed its original seat (ordering held); the
between-rounds edit landed ("mission length now 75s").  Known edge
noted in the KB: a stale ready flag from a not-yet-exited old conn can
satisfy the launch gate mid-rejoin -- operators launch on green dots.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-23 00:28:56 -05:00
co-authored by Claude Opus 4.8
parent fa935777cc
commit 8368163b04
7 changed files with 178 additions and 11 deletions
+18
View File
@@ -449,6 +449,24 @@ phase). Plan: `~/.claude/plans/partitioned-snuggling-piglet.md`.
per-event cost) is an OPEN perf item -- deliberately not attempted pre-8-player-night.
Diags: `[loadphase]` markers always on; the full queue dump gates on `BT_LOAD_DIAG=1`;
`GeneralEventQueue::DumpBlockers` + the named fallback in `Event::DumpData`.
- **LOBBY LOOP + SEAT RECLAIM (2026-07-23) [T2]**: the between-rounds arcade flow. Field
problem (first playtest night): at mission end every pod EXITED -> seats dropped -> every
round required everyone to re-run join.bat, and the operator could not adjust the mission.
Now: (1) `Application::StopMissionMessageHandler` sets `gBTMissionStoppedByConsole` (operator
END / mission clock only -- a window close still exits for good); btl4main, after the
matchlog upload, relaunches the pod into the join wait (`BTFE_RelaunchSelfAndExit` with the
same cmdline; BT_CALLSIGN/BT_MECH ride the inherited env). (2) **SEAT RECLAIM**: the
assigned tag is mirrored (`BTRelaySelfTag`, L4NET) and re-presented as the 3rd SEAT_REQUEST
payload field (`BT_SEAT_CLAIM`); the relay holds a dropped seat for its tag 90s
(`seat_reclaim`) and returning players get their EXACT seat back -- VERIFIED: the
second-to-rejoin still reclaimed its original seat (static ordering, the real-pod model).
Non-claim joiners skip reclaim-held seats. (3) **BETWEEN-ROUNDS MISSION EDITS**: the GUI's
"Apply mission settings" button (enabled while a session runs) rewrites the session egg's
[mission] params; the relay re-reads the FILE at round reset + egg release
(`_reload_egg_file`; roster shape locked mid-session) -- verified live ("mission length now
75s" on round 3's reset). KNOWN EDGE [T3]: during the rejoin window a not-yet-exited old
conn's stale `ready` flag can satisfy the all-ready launch gate -- in practice the operator
launches on green dots after rejoin; harden later if it bites.
- **READY LIGHT (2026-07-22) [T2, live-verified]**: the roster showed "registered" for a
still-loading pod and a ready one alike. When the app ladder reaches WaitingForLaunch
(APP.cpp CheckLoad transition) the pod sends ONE empty route **-10** frame on its live relay