Review follow-ups on the authorization work.
The listing carried its own copy of the ROM visibility decision. The shared
`assert_rom_visible` already masks a hidden ROM as a missing one, so the route
uses that instead and a private duplicate disappears. Hidden and unknown ids
now answer 404 rather than `200 {}`, which the in-tree client already maps to
no rooms.
The socket module's docstrings are cut to the one sentence each that carries
something the code does not, and the new test helpers are typed, which also
drops an unused `sid` argument from every call site.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The connect-time identity was cached for the life of the socket, so an
account disabled afterwards kept its access until it disconnected. The
signal relay trusted the room id stored on the session, which a departed
socket still carried, so it could keep injecting offers into the room it
had left, and the game data relay had the same stale room. The room
listing answered for asset-read tokens, though what it discloses is
ROM-scoped.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
GET /api/netplay/list answered for any game_id a caller passed, including roms
hidden from them, which let the listing confirm that someone was playing a rom
the caller is not allowed to know about.
The room list is now scoped to a rom the caller can see. A hidden rom and a
rom that does not exist both answer with no rooms, so the listing cannot be
used to probe for hidden roms.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>