Feed: apply the ADR 0019 message contract #31
Labels
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#32 Feed: dev-only debug state for scripts
mintopia/blur
#49 JSON Schema for the game-state feed
mintopia/blur
#30 Lookup data and art generated by tools
mintopia/blur
Reference
mintopia/blur#31
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refactor every feed message to ADR 0019.
Acceptance
{type, race_id, race_ms, ...}on every message; events carryevent+data.change.valuenative JSON;null= cleared; optional fields absent._ms,racer/victim/attacker,modsalways an array, lowercase icon names.hitmoves to the envelope withserial(+0x14) added.roster= client state in snapshot and lobby:[{racer, join_ref, name, car, mods, local, ai}];standingsdropsname/car/mods.car_names/mod_namesno longer on the wire (repo data, #30).race_time;eventkey ->race_type;speedsfolded intostandingsasmph;race_result={final, completed, standings}.track_name/route_namedocumented.powerupsstays a fixed 3-slot array,null= empty slot (ADR 0019 exception).race_resulttimes in ms astime_ms(was whole seconds astime).race_id: minted UUIDv7 per race until #34 finds a game ID.docs/state-websocket.md,examples/live-timing,ws_tap.py,tests/state_ws_test.mmupdated; no compatibility shim.Rules
docs/decisions/0019-feed-message-contract.md). Repo data/tools: ADR 0020.BLUR_ENGINE=recomponly.docs/state-websocket.mdandexamples/live-timingfor any feed change.scripts/scenarios (windowed, low settings) once #33 exists.Research findings (static: Blur.exe strings + current src), 2026-10-20.
Drift inventory checked against ADR 0019. Covered by the acceptance list except:
race_result.timeis whole seconds today, unlabelled. Under ADR 0019 it becomes_ms(e.g.time_ms) insiderace_result.standings.powerupsusesnullslots ([null,null,null]), while ADR 0019 says to leave optional fields out. Decide: keep a fixed 3-slot array withnull= empty slot (positional, document it as an exception), or a compact array of held kinds.Already intended by ADR 0019, no action: ids are local to each instance (match LAN by
serial), hitrace_msis the local racer's clock, no schema version.Current emitters:
src/host/race_feed.cpp,game_state.cpp,state_ws.mm,hit_event.cpp,lua_patch.cpp,patches/Screens/Commands.post.lua,patches/Screens/Ingame/Hud.post.lua.Decided:
powerupskeepsnullslots;race_resulttime becomestime_msin ms. Added to acceptance; ADR 0019 updated.null
Completed and merged by Harmonic (task 37).