From ce7f646f420de233b2af8c91d06366e3978ec26e Mon Sep 17 00:00:00 2001 From: Matthew Stanley <1379tech@gmail.com> Date: Sat, 12 Sep 2026 23:10:42 -0700 Subject: [PATCH] fix(runtime): keep chat-report dependency inside enabled lobby path --- recompiler/tests/test_optional_netplay_auth.py | 15 ++++++++++++++- runtime/src/psx_lobby_client.c | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/recompiler/tests/test_optional_netplay_auth.py b/recompiler/tests/test_optional_netplay_auth.py index 1a3b7af7..b1073c88 100644 --- a/recompiler/tests/test_optional_netplay_auth.py +++ b/recompiler/tests/test_optional_netplay_auth.py @@ -50,7 +50,20 @@ def main(): else: assert "rnet_account_" not in p.stdout, "offline launcher retained account linkage" assert "RNET_ACCOUNT_" not in p.stdout, "offline launcher retained account state dependency" - print("PASS: offline launcher needs no auth headers/symbols; enabled account path retained") + # Compile the REAL offline lobby TU too: its early chat-report include + # used to leak an independent optional dependency before the #else. + lobby = args.source.parent / "psx_lobby_client.c" + includes = args.source.parent.parent / "include" + if is_msvc: + cmd = [args.cxx, "/nologo", "/TC", "/c", "/I"+str(includes), + str(lobby), "/Fo"+str(root / "lobby.obj")] + else: + cmd = [args.cxx, "-x", "c", "-c", "-I", str(includes), str(lobby), + "-o", str(root / "lobby.obj")] + p = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", + errors="replace", timeout=30) + assert p.returncode == 0, p.stderr + print("PASS: offline launcher/auth guards and real offline lobby compilation; enabled account path retained") if __name__ == "__main__": main() diff --git a/runtime/src/psx_lobby_client.c b/runtime/src/psx_lobby_client.c index 4dc5d738..4d656440 100644 --- a/runtime/src/psx_lobby_client.c +++ b/runtime/src/psx_lobby_client.c @@ -1,5 +1,4 @@ #include "psx_lobby_client.h" -#include "recomp_net/chat_report.h" #include #include @@ -173,6 +172,7 @@ void psx_lobby_clear_launch_pending(void) {} #include "recomp_net/lan_beacon.h" #include "recomp_net/rtt_probe.h" #include "recomp_net/chat_filter.h" +#include "recomp_net/chat_report.h" #include "recomp_net/auth.h" /* optional Discord session for `hello` */ #include "host_time.h"