Camera 18: fluxer-devserver camera scenario (#970) #976

Closed
charles wants to merge 0 commits from camera-18-devserver-camera-scenario into camera
Owner

What this builds

The devserver camera scenario (plan Task 18, Camera spec §3 rows 27–30, §14 "Whole app").

  • fixtures/gateway/camera_ready.json: the screen-share READY with Hangout changed — ada on camera, grace streaming (own key in her viewer keys) and on camera, hedy neither; Gaming denies STREAM to @everyone; linus on two devices; the DM with ada.
  • fixtures/scenarios/camera.toml: named steps ada-camera-off, ada-camera-on, hedy-camera-on, linus-camera-on (refused, no STREAM), fill-hangout-cameras (25 other camera users), crowd-hangout (26 other users without cameras: >25 participants), clear-hangout, hangout-loses-stream (reused revoke_stream_permission: clears every self_video there, the signed-in user's included), ada-calls.
  • voice.rs: step kinds start_camera, stop_camera, fill_cameras (made-up guestNN members with a full member); op 4 asking for self_video: true in a guild channel refused whole with VOICE_CAMERA_USER_LIMIT past 25 distinct camera users, the asking user added (check_camera_user_limit, guild_voice_connection_util.erl:106-126): read before STREAM strips it, each user counted once (second device not counted twice), DM calls not limited (the gateway's call path has no such check). The existing STREAM strip and 25-user effective limit while a camera is on are covered by the new tests. New VoiceScriptError::CameraUserLimit.
  • VoiceScript::cameras() / LiveCamera { user_id, guild_id, channel_id, connection_id, identity() }.

How it was tested

crates/fluxer-devserver/tests/camera.rs (seen failing first, then passing): scenario_parses_with_proto_types, self_video_echoed_with_stream_permission_and_stripped_without, twenty_sixth_camera_is_refused_with_the_error, own_second_device_is_not_counted_twice, user_limit_is_25_while_a_camera_is_on, steps_publish_and_unpublish_remote_cameras; plus a TOML-defaults unit test. FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally. No camera, display or live server used; no desktop tests needed.

Deviations from the plan

  • Outside the Files list: apps/fluxer/src/runtime.rs (the --devserver module only, ~60 lines). The Interfaces say "the client's fake room follows the steps (a remote camera publication appears and disappears with them)", and that fake room lives there: it now publishes a TrackSource::Camera test-pattern track (640x360, 15 fps, only while subscribed) per remote LiveCamera, as it does for streams. No other scenario has a camera on, so other tests are unaffected. Task 12 owns the rest of that file.
  • "Push a channel above 25 participants" is fill_cameras with camera = false (no fifth step kind).
  • A fresh second connection cannot join a channel holding 25 other users while a camera is on: the gateway's user-limit check (VOICE_CHANNEL_FULL) comes before the camera check, and the devserver keeps that order; the second-device test therefore joins both devices before filling.
  • The DM call is on request (ada-calls), not timed, so nothing rings unasked.

Closes #970

🤖 Generated with Claude Code

https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K

## What this builds The devserver `camera` scenario (plan Task 18, Camera spec §3 rows 27–30, §14 "Whole app"). - `fixtures/gateway/camera_ready.json`: the screen-share READY with Hangout changed — ada on camera, grace streaming (own key in her viewer keys) and on camera, hedy neither; Gaming denies STREAM to `@everyone`; linus on two devices; the DM with ada. - `fixtures/scenarios/camera.toml`: named steps `ada-camera-off`, `ada-camera-on`, `hedy-camera-on`, `linus-camera-on` (refused, no STREAM), `fill-hangout-cameras` (25 other camera users), `crowd-hangout` (26 other users without cameras: >25 participants), `clear-hangout`, `hangout-loses-stream` (reused `revoke_stream_permission`: clears every `self_video` there, the signed-in user's included), `ada-calls`. - `voice.rs`: step kinds `start_camera`, `stop_camera`, `fill_cameras` (made-up `guestNN` members with a full `member`); op 4 asking for `self_video: true` in a guild channel refused whole with `VOICE_CAMERA_USER_LIMIT` past 25 distinct camera users, the asking user added (`check_camera_user_limit`, `guild_voice_connection_util.erl:106-126`): read before STREAM strips it, each user counted once (second device not counted twice), DM calls not limited (the gateway's call path has no such check). The existing STREAM strip and 25-user effective limit while a camera is on are covered by the new tests. New `VoiceScriptError::CameraUserLimit`. - `VoiceScript::cameras()` / `LiveCamera { user_id, guild_id, channel_id, connection_id, identity() }`. ## How it was tested `crates/fluxer-devserver/tests/camera.rs` (seen failing first, then passing): `scenario_parses_with_proto_types`, `self_video_echoed_with_stream_permission_and_stripped_without`, `twenty_sixth_camera_is_refused_with_the_error`, `own_second_device_is_not_counted_twice`, `user_limit_is_25_while_a_camera_is_on`, `steps_publish_and_unpublish_remote_cameras`; plus a TOML-defaults unit test. `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. No camera, display or live server used; no desktop tests needed. ## Deviations from the plan - Outside the Files list: `apps/fluxer/src/runtime.rs` (the `--devserver` module only, ~60 lines). The Interfaces say "the client's fake room follows the steps (a remote camera publication appears and disappears with them)", and that fake room lives there: it now publishes a `TrackSource::Camera` test-pattern track (640x360, 15 fps, only while subscribed) per remote `LiveCamera`, as it does for streams. No other scenario has a camera on, so other tests are unaffected. Task 12 owns the rest of that file. - "Push a channel above 25 participants" is `fill_cameras` with `camera = false` (no fifth step kind). - A fresh second connection cannot join a channel holding 25 other users while a camera is on: the gateway's user-limit check (`VOICE_CHANNEL_FULL`) comes before the camera check, and the devserver keeps that order; the second-device test therefore joins both devices before filling. - The DM call is on request (`ada-calls`), not timed, so nothing rings unasked. Closes #970 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
camera_ready.json is screenshare_ready.json with Hangout's voice states
changed: ada self_video, grace self_stream + self_video (own key in her
viewer_stream_keys), hedy neither. Voice states shaped as the gateway's
(fluxer_gateway/src/guild/voice/voice_utils.erl:45-49 strips self_video
without STREAM; guild_voice_connection_util.erl:106-126 is the camera
user limit; guild_voice_permissions.erl:188-192 the effective user limit).

Refs #970

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Step kinds start_camera, stop_camera and fill_cameras (revoke_stream_permission
reused); op 4 refused with VOICE_CAMERA_USER_LIMIT past 25 distinct camera users
in a guild channel, as check_camera_user_limit
(fluxer_gateway/src/guild/voice/guild_voice_connection_util.erl:106-126);
VoiceScript::cameras() / LiveCamera, which the --devserver fake room in
apps/fluxer follows to publish a test-pattern camera track per remote camera.

Refs #970

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Author
Owner

Merged into camera by hand (the merge API returns 405); the commits are in the branch.

Merged into `camera` by hand (the merge API returns 405); the commits are in the branch.
charles closed this pull request 2026-11-19 23:15:49 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.