test(capture): decoder coverage, replica read-back and generator check; docs

Every LU MessageType has a struct or is listed as never used by this server; every game message struct reads;
samples of each family and of sent game messages read back; replica constructions, updates and destructions written
by the server's own serializers read back. Generator finds constructors defined in the .cpp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-30 04:43:09 -05:00
parent d1ea2992e4
commit 4d7bea6f06
10 changed files with 482 additions and 8 deletions

View File

@@ -134,6 +134,13 @@ def game_messages():
if path.name == "GameMessages.h":
continue
structs += [s for s in parse(path) if s["base"] != "GameMsg"]
# Constructors defined in the .cpp
for s in structs:
source = directory / s["file"].replace(".h", ".cpp")
if s["base"] == "NetGameMsg" and not s["id"] and source.exists():
own = s["short"].split("::")[-1]
if (mid := re.search(rf"\b{own}::{own}\s*\(\s*\)\s*:\s*NetGameMsg\(\s*MessageType::Game::(\w+)", source.read_text())):
s["enum"], s["id"] = "Game", mid.group(1)
wire = [s for s in structs if s["enum"] == "Game" and s["id"]]
lines = member_lines(reachable(structs, wire))
lines.append("// Wire messages: (ID, direction, reader). A struct with Handle is what the server reads from a client.")