Feed: dev-only debug state for scripts #32

Closed
opened 2026-10-20 18:41:24 +00:00 by mintopia · 4 comments
Owner

Dev-build-only feed state keys (ADR 0015 split; never in release builds) so scripts/ can drive the game.

Acceptance

  • menu: current screen + focused item (name and index), updated as focus moves.
  • Current loadout and lobby readiness.
  • Absent from release builds (checked).
  • Nothing beyond what the race scenarios need (YAGNI).

Rules

  • Wire format: ADR 0019 (docs/decisions/0019-feed-message-contract.md). Repo data/tools: ADR 0020.
  • Fix and verify on BLUR_ENGINE=recomp only.
  • Update docs/state-websocket.md and examples/live-timing for any feed change.
  • Test races: use the scripts/ scenarios (windowed, low settings) once #33 exists.
Dev-build-only feed state keys (ADR 0015 split; never in release builds) so `scripts/` can drive the game. ## Acceptance - `menu`: current screen + focused item (name and index), updated as focus moves. - Current loadout and lobby readiness. - Absent from release builds (checked). - Nothing beyond what the race scenarios need (YAGNI). ## Rules - Wire format: ADR 0019 (`docs/decisions/0019-feed-message-contract.md`). Repo data/tools: ADR 0020. - Fix and verify on `BLUR_ENGINE=recomp` only. - Update `docs/state-websocket.md` and `examples/live-timing` for any feed change. - Test races: use the `scripts/` scenarios (windowed, low settings) once #33 exists.
Author
Owner

Commit ef6ae0d. Dev-only feed keys (published every frame from a FrameUpdate_Wrapper hook in patches/Screens/GUIBank.post.lua; Host.state drops dev_ keys when BLUR_DEV=0, release build compiled, docs in docs/state-websocket.md):

  • dev_menu_index: focused item index (list/carousel). Verified on recomp via mdrive (SpMain carousel 0,1,2,1).
  • dev_lobby_state: UIEnums.MpLobbyState name (FindingPlayers outside a lobby; read with lobby).
  • dev_loadout: current mod loadout number.

Gaps: no focused item NAME: the carousel selection is a float scroll position with no item text, and Options-style screens expose no CurrentList/carousel_id, so index is null there; screen key identifies the page. Names would need per-screen tables. Lobby readiness and loadout not exercised in a live lobby (only defaults seen); scripts/ (#33) does not exist yet. Release absence checked by compile only (dev_ filter in lua_patch.cpp), not by running a release build. ctest 17/17 pass. examples/live-timing ignores dev_ keys, no change.

Commit ef6ae0d. Dev-only feed keys (published every frame from a FrameUpdate_Wrapper hook in patches/Screens/GUIBank.post.lua; Host.state drops dev_ keys when BLUR_DEV=0, release build compiled, docs in docs/state-websocket.md): - dev_menu_index: focused item index (list/carousel). Verified on recomp via mdrive (SpMain carousel 0,1,2,1). - dev_lobby_state: UIEnums.MpLobbyState name (FindingPlayers outside a lobby; read with lobby). - dev_loadout: current mod loadout number. Gaps: no focused item NAME: the carousel selection is a float scroll position with no item text, and Options-style screens expose no CurrentList/carousel_id, so index is null there; screen key identifies the page. Names would need per-screen tables. Lobby readiness and loadout not exercised in a live lobby (only defaults seen); scripts/ (#33) does not exist yet. Release absence checked by compile only (dev_ filter in lua_patch.cpp), not by running a release build. ctest 17/17 pass. examples/live-timing ignores dev_ keys, no change.
Author
Owner

Self-heal fix (commit after ef6ae0d). Verified live on recomp (mdrive, state log):

  • dev_menu_item now published: carousel names from GUI.branch_name[GUI.over_selection] (SpMain: Races/Stickers/Garage/Photos/Options/Quit; mpmain: MpOnline/MpLan/Quit). Index also read from GUI.MenuId (Options menu shows index). Not nameable: Options pages, LAN browser, lobby rows (host cannot see their text), item is null there, documented.
  • Loadout bug fixed: dev_loadout = profile set, dev_loadout_lobby = lobby set (no longer keyed on lobby state).
  • dev_lobby_state verified in a real hosted LAN lobby: FindingPlayers (idle) -> WaitingForHost with lobby=hosting, players=1 (NETON=1 BLUR_ONLINE_URL=off BLUR_LANSIM=1).
  • Release absence: gate moved to state::set (BLUR_DEV=0 drops dev_ keys); game_state_test asserts it, run compiled with -DBLUR_DEV=0 (dropped) and =1 (kept). Release blurhost builds. ctest 17/17.
    Docs: docs/state-websocket.md. live-timing ignores dev_ keys.
Self-heal fix (commit after ef6ae0d). Verified live on recomp (mdrive, state log): - dev_menu_item now published: carousel names from GUI.branch_name[GUI.over_selection] (SpMain: Races/Stickers/Garage/Photos/Options/Quit; mpmain: MpOnline/MpLan/Quit). Index also read from GUI.MenuId (Options menu shows index). Not nameable: Options pages, LAN browser, lobby rows (host cannot see their text), item is null there, documented. - Loadout bug fixed: dev_loadout = profile set, dev_loadout_lobby = lobby set (no longer keyed on lobby state). - dev_lobby_state verified in a real hosted LAN lobby: FindingPlayers (idle) -> WaitingForHost with lobby=hosting, players=1 (NETON=1 BLUR_ONLINE_URL=off BLUR_LANSIM=1). - Release absence: gate moved to state::set (BLUR_DEV=0 drops dev_ keys); game_state_test asserts it, run compiled with -DBLUR_DEV=0 (dropped) and =1 (kept). Release blurhost builds. ctest 17/17. Docs: docs/state-websocket.md. live-timing ignores dev_ keys.
Author
Owner

Removed the flagged section-label comment in patches/Screens/GUIBank.post.lua (comment check fix). Feature unchanged: dev_menu_item/index, dev_lobby_state, dev_loadout/dev_loadout_lobby, dev_ keys dropped in state::set when BLUR_DEV=0, with test and docs.

Removed the flagged section-label comment in patches/Screens/GUIBank.post.lua (comment check fix). Feature unchanged: dev_menu_item/index, dev_lobby_state, dev_loadout/dev_loadout_lobby, dev_ keys dropped in state::set when BLUR_DEV=0, with test and docs.
Author
Owner

Completed and merged by Harmonic (task 36).

Completed and merged by Harmonic (task 36).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
mintopia/blur#32
No description provided.