fix(app): join voice rooms with the LiveKit room on real instances #203

Manually merged
charles merged 0 commits from fix-wire-livekit into main 2026-11-12 05:11:47 +00:00
Owner

Stacked on #197.

The application runtime (Voice task 14) used a placeholder room that refused every join with "this build cannot join voice rooms yet (no LiveKit client)". It was meant to be replaced when the LiveKit room (task 13) landed; task 13 merged later and nothing replaced it, so voice only worked with --devserver. The acceptance task did not catch it because every automated voice path uses the fake room or the interop test of fluxer-voice alone.

  • VoiceBackend::system now uses LiveKitRoom.
  • The placeholder room and its test are removed; a new test checks that the system backend attempts a real join and reports the failure without the token.

Not yet verified: a join against a real instance (being tried by the owner), Windows.

🤖 Generated with Claude Code

Stacked on #197. The application runtime (Voice task 14) used a placeholder room that refused every join with "this build cannot join voice rooms yet (no LiveKit client)". It was meant to be replaced when the LiveKit room (task 13) landed; task 13 merged later and nothing replaced it, so voice only worked with `--devserver`. The acceptance task did not catch it because every automated voice path uses the fake room or the interop test of `fluxer-voice` alone. - `VoiceBackend::system` now uses `LiveKitRoom`. - The placeholder room and its test are removed; a new test checks that the system backend attempts a real join and reports the failure without the token. Not yet verified: a join against a real instance (being tried by the owner), Windows. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Solve the fork's ALTCHA captcha in fluxer-api
All checks were successful
ci / Linux (x86_64) (push) Successful in 16m3s
ci / Windows (x64) (push) Successful in 16m12s
d281e073da
A 400 CAPTCHA_REQUIRED / INVALID_CAPTCHA carrying an ALTCHA v2 challenge
is now solved by the client (PBKDF2-HMAC-SHA-256 over nonce || counter_be32,
counters from 0 until the key starts with keyPrefix) and the same request is
sent again with X-Captcha-Token, at most twice per request, as the web
app's CaptchaInterceptor does for every request. The search runs in
spawn_blocking on up to 8 threads, bounded by 60 s and the challenge's
expiry, and stops when the request is dropped. The token is byte for byte
the web client's encoding.

ApiError::CaptchaRequired is left for captchas the client cannot solve
(unknown provider, malformed challenge, timeout, both solutions refused);
INVALID_CAPTCHA maps to it instead of a plain 400 that the core read as
wrong credentials. The login screen's message says so.

Test vector fixtures/captcha/altcha_login.json was produced by the fork's
own AltchaProvider; the API tests run against a mock that verifies tokens
the way the fork does. Adds ring (already in the graph via rustls) as a
direct dependency of fluxer-api.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`threads` was logged before the cap of 8 (the web app's MAX_SOLVER_WORKERS)
that `solve` applies, so a 32-core machine logged threads=32 while 8 ran.
Clamp before logging; behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Read READY as a real Fluxer server sends it
All checks were successful
ci / Linux (x86_64) (push) Successful in 14m30s
ci / Windows (x64) (push) Successful in 15m57s
3bf4ee7931
The server deduplicates users in READY: guilds[].members[].user is
{"id"} only and the full users are in the top-level `users` list
(session_ready_collect.erl). fluxer-proto required a full user on every
member, so a real READY failed to parse as a whole and the client showed
no guilds, no DMs and "Unknown User".

- fluxer-proto: `UserRef` (full user or `{"id"}` reference) for
  GuildMember::user, Presence::user (the offline PRESENCE_UPDATE sent when
  a friend/group-DM subscription is dropped) and GUILD_MEMBER_REMOVE's
  user (always a reference). `ReadyPayload::resolve_users()` fills the
  references from `users` and `user`.
- Every list of ReadyPayload / GuildReadyData is read leniently: a
  malformed entry is dropped with a warning instead of losing the
  session; a malformed guild object leaves `properties: None`. Adds
  `tracing` to fluxer-proto for that warning.
- fluxer-core: members and presences that are references add nothing to
  the user cache; names come from READY.users, unknown users show as
  Unknown User.
- fixtures/gateway/ready.json now has the real structure (member user
  references, `users` with every member, relationships without `user`,
  empty guild presences, sessions/version/...), with the same fake
  identities. The devserver resolves it before indexing message authors.
- tests/replay.rs in fluxer-core: with FLUXER_REPLAY_DIR set, replays a
  --record recording through the parsers and the store and reports
  mismatches by key path and redacted error only; skipped otherwise.
- Regression tests: references resolved via `users`, an unknown member
  user id kept, malformed members/channels/users/guilds dropped without
  failing READY, references in GUILD_MEMBER_REMOVE and PRESENCE_UPDATE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Subscribe to guild member lists as the web app does
All checks were successful
ci / Linux (x86_64) (push) Successful in 37m5s
ci / Windows (x64) (push) Successful in 29m8s
0b6c986ffd
The real server sends only the user's own member in READY and no guild
presences; the other members arrive in GUILD_MEMBER_LIST_UPDATE after an
op 14 (LAZY_REQUEST) subscription, which the client never sent.

- fluxer-proto: LazyRequest/GuildSubscription/MemberListRange, the
  GUILD_MEMBER_LIST_UPDATE and GUILD_SYNC dispatches, with a fixture.
- fluxer-core: MemberLists sends {active, sync} on guild select and the
  shown channel's member list ranges, again after every reconnect; keeps
  the server list and feeds member_list, users and presences from it;
  falls back to READY's members when no answer comes. GUILD_CREATE and
  GUILD_SYNC add their partial members instead of replacing them.
- fluxer-ui: group headers show the server's count.
- fluxer-devserver: READY and GUILD_CREATE carry only the signed-in
  member; op 14 is answered with a server-shaped member list, and
  presence changes resend it. New end-to-end test.

Follow-ups: #195 (scroll ranges past 1,000 rows), #196 (PASSIVE_UPDATES).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(app): join voice rooms with the LiveKit room on real instances
All checks were successful
ci / Linux (x86_64) (push) Successful in 14m42s
ci / Windows (x64) (push) Successful in 15m45s
247fa06f45
The runtime of Voice task 14 used a placeholder room that refused every join
("this build cannot join voice rooms yet") until the LiveKit room of task 13
existed. Task 13 merged later and nothing replaced the placeholder, so voice
only worked with --devserver.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
charles manually merged commit 421838b9e4 into main 2026-11-12 05:11:47 +00:00
Sign in to join this conversation.
No description provided.