Screen share 31: Acceptance (#178) #289

Manually merged
charles merged 3 commits from screenshare-31-acceptance into screenshare 2026-11-12 12:15:24 +00:00
Owner

Stacked on: screenshare-21-app-screenshare-runtime, screenshare-29-parity-screenshots, screenshare-30-packaging-ci, screenshare-19-spike-hw-encode-windows

What this builds

  • apps/fluxer/tests/screenshare_acceptance.rs::screenshare_session_end_to_end: one session of the whole client on the devserver screenshare scenario with FakeRoom, NullHost and the fake capture backends. login → join → go live (in-app picker, fake screen) → publication, then the op 4 sequence from --record (no self_stream: true before the publication, own key after) → own tile and room frames → preview upload → relay joins and watches the own stream (viewer count 1 in streams_in_channel / spectators and on the devserver), then leaves (0) → quality changed live (Custom, 480p, 15 fps: capture target and room encoding change in place, same publication) → stop (unpublished, capture off, server clear, own key dropped, self_stream: false) → watch ada (subscribed, her devserver viewer count 2 → 3, frames on the bus) → stream volume 50 % (store curve ratio, user volume does not apply) → stop watching (unsubscribed, frames gone, count 3 → 2, nothing heard) → go live again and the devserver's hangout-loses-stream (STREAM revoked) stops the share while voice stays connected.
  • docs/acceptance/screenshare.md: spec §2 item by item (tests covering each), the live checklist for Charles (items 1–7 and 9 with exact steps, what to look for, the Electron console lines for codec selection and "Copy stats JSON" / chrome://webrtc-internals as the stats check), open question and follow-up issues, known gaps.

How it was tested

  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally on Linux (on the merged base before any change, and again with this commit).
  • The acceptance test: about 7.5 s; 48 of 48 runs passed, six at a time.
  • Not run: FLUXER_LIVEKIT_TESTS (#120), FLUXER_CAPTURE_TESTS, FLUXER_HW_ENCODER_TESTS (this task adds no real-device test); nothing against the live instance, nothing on Windows.

Deviations and findings

  • No code outside the task's two files. The plan's "failing test first" does not fit an acceptance test over finished code; the first runs failed only on three races in the test itself (LIVE row follows the server's op 4 echo; the own key leaves in an op 4 after self_stream: false; the viewer-leave chime plays when watching stops), now waited for. No client bug found.
  • Opened follow-up #288: encoder statistics reach the store and are dropped, so spec §2 item 9 cannot be read on the native side.
  • Biggest known gap for the live checklist: #237 (the running app does not hand its FrameBus to the views), so native-side video and previews cannot be checked live until it lands. #193 (stream chimes) looks done on this base; Charles to confirm and close.

Closes #178

🤖 Generated with Claude Code

Stacked on: screenshare-21-app-screenshare-runtime, screenshare-29-parity-screenshots, screenshare-30-packaging-ci, screenshare-19-spike-hw-encode-windows ## What this builds - `apps/fluxer/tests/screenshare_acceptance.rs::screenshare_session_end_to_end`: one session of the whole client on the devserver `screenshare` scenario with `FakeRoom`, `NullHost` and the fake capture backends. login → join → go live (in-app picker, fake screen) → publication, then the op 4 sequence from `--record` (no `self_stream: true` before the publication, own key after) → own tile and room frames → preview upload → relay joins and watches the own stream (viewer count 1 in `streams_in_channel` / `spectators` and on the devserver), then leaves (0) → quality changed live (Custom, 480p, 15 fps: capture target and room encoding change in place, same publication) → stop (unpublished, capture off, server clear, own key dropped, `self_stream: false`) → watch ada (subscribed, her devserver viewer count 2 → 3, frames on the bus) → stream volume 50 % (store curve ratio, user volume does not apply) → stop watching (unsubscribed, frames gone, count 3 → 2, nothing heard) → go live again and the devserver's `hangout-loses-stream` (STREAM revoked) stops the share while voice stays connected. - `docs/acceptance/screenshare.md`: spec §2 item by item (tests covering each), the live checklist for Charles (items 1–7 and 9 with exact steps, what to look for, the Electron console lines for codec selection and "Copy stats JSON" / `chrome://webrtc-internals` as the stats check), open `question` and `follow-up` issues, known gaps. ## How it was tested - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally on Linux (on the merged base before any change, and again with this commit). - The acceptance test: about 7.5 s; 48 of 48 runs passed, six at a time. - Not run: `FLUXER_LIVEKIT_TESTS` (#120), `FLUXER_CAPTURE_TESTS`, `FLUXER_HW_ENCODER_TESTS` (this task adds no real-device test); nothing against the live instance, nothing on Windows. ## Deviations and findings - No code outside the task's two files. The plan's "failing test first" does not fit an acceptance test over finished code; the first runs failed only on three races in the test itself (LIVE row follows the server's op 4 echo; the own key leaves in an op 4 after `self_stream: false`; the viewer-leave chime plays when watching stops), now waited for. No client bug found. - Opened follow-up #288: encoder statistics reach the store and are dropped, so spec §2 item 9 cannot be read on the native side. - Biggest known gap for the live checklist: #237 (the running app does not hand its `FrameBus` to the views), so native-side video and previews cannot be checked live until it lands. #193 (stream chimes) looks done on this base; Charles to confirm and close. Closes #178 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The Linux package now declares ALSA, PipeWire and GLib everywhere:
AppRun names every missing declared library and the packages that
provide it (Debian/Ubuntu 22.04, Ubuntu 24.04+, Fedora, Arch), the
release workflow's clean ubuntu:22.04 job installs exactly those and
checks the --debug-info screen-share section, and the README and the
release notes list them with the portal and optional libva (#243).
Unit tests keep LINUX_DECLARED, AppRun, release.yaml and the README in
step.

Windows CI: the disk report publishes the last cold and warm run's
target-dir sizes as the prerelease ci-disk-windows (#127);
MIN_FREE_GB 12 -> 18 from the Linux cold build measured with screen
share (13.2 GB debug + 3.0 GB release).

Refs #177

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
End-to-end screen-share session on the devserver with the fake room, the
null audio host and the fake capture backends, plus the live checklist,
open questions, follow-ups and known gaps in docs/acceptance/screenshare.md.

Refs #178

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Author
Owner

Review: Screen share 31 Acceptance (independent reviewer)

I reviewed the diff 7fc45fd..origin/screenshare-31-acceptance without relying on the implementer's notes. It touches 2 files, both in the task's Files list: apps/fluxer/tests/screenshare_acceptance.rs and docs/acceptance/screenshare.md.

Plan steps

  • The end-to-end test covers each step the plan lists, in order: login, join, go live with fake capture, the op 4 sequence and the publication, the preview upload, a viewer joining and leaving with the count, a live quality change (480p at 15 fps, same publication sid), stop, watching ada (frames on the bus, stream volume ratio against stream_gain, her viewer count from 2 to 3 to 2), stop watching, and STREAM revoked mid-share. Assertions are made on snapshots and selectors, on the fake room and capture, on the devserver streams and on the --record op 4s.
  • The doc has spec §2 item by item, a live checklist for items 1–7 and 9, the open question and follow-up issues, and the known gaps.
  • Every test name the doc cites exists in the tree; I checked 28 of them. The Electron console strings exist in the fork (ScreenShareCodecNegotiation.ts, VoiceEngineV2AppScreenShareLiveKitFlows.ts), as do "Copy stats JSON" in the stream menu, the log line voice: screen share encoder opened (rtc.rs), FLUXER_LOG and the Linux log directory.
  • #237 is open (the runtime's FrameBus is created and exposed through Handle::frame_bus, but is not handed to the views). #288 is open with the follow-up label.

Interfaces: this task has no Interfaces block, and the diff changes no public API.

Invariants: no crate code changed, so the dependency rules hold. The test contains no secrets or tokens and uses only the devserver and fakes.

Review Focus: item 7 (self-exclusion) is in the live checklist (§2 step 2 and step 4), and the test asserts excluded_pid == std::process::id(). Item 1 is checked at acceptance level; its tests live in Screen share 10.

Findings

  • minor: The doc's table says the test proves "no self_stream: true before the publication". The test reads the op 4s only after the publication is confirmed and checks that self_stream comes at or before the own key. It never checks that no op 4 with self_stream: true was sent before the room published. The guarantee itself is tested by stream_golive.rs::self_stream_never_true_before_publication. Either reword the row or cite that test.
  • minor: In the same way, the Stop row describes an order (self_stream: false first, then the key leaves) that the test does not check. The test only checks that the last op 4 has self_stream: false and no own key. It also does not check that self_stream: false was sent before the unpublish (Review Focus 1). That order is covered in Screen share 10, not here.

CI: I ran FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in a clean review worktree at 867ad08. It is green: all steps passed and screenshare_session_end_to_end passed. LiveKit interop was skipped (env var not set).

Verdict: approved. There are no blocking findings and local CI is green. The two minor findings are doc wording only.

🤖 Generated with Claude Code

## Review: Screen share 31 Acceptance (independent reviewer) I reviewed the diff `7fc45fd..origin/screenshare-31-acceptance` without relying on the implementer's notes. It touches 2 files, both in the task's Files list: `apps/fluxer/tests/screenshare_acceptance.rs` and `docs/acceptance/screenshare.md`. **Plan steps** - The end-to-end test covers each step the plan lists, in order: login, join, go live with fake capture, the op 4 sequence and the publication, the preview upload, a viewer joining and leaving with the count, a live quality change (480p at 15 fps, same publication sid), stop, watching ada (frames on the bus, stream volume ratio against `stream_gain`, her viewer count from 2 to 3 to 2), stop watching, and STREAM revoked mid-share. Assertions are made on snapshots and selectors, on the fake room and capture, on the devserver streams and on the `--record` op 4s. - The doc has spec §2 item by item, a live checklist for items 1–7 and 9, the open `question` and `follow-up` issues, and the known gaps. - Every test name the doc cites exists in the tree; I checked 28 of them. The Electron console strings exist in the fork (`ScreenShareCodecNegotiation.ts`, `VoiceEngineV2AppScreenShareLiveKitFlows.ts`), as do "Copy stats JSON" in the stream menu, the log line `voice: screen share encoder opened` (rtc.rs), `FLUXER_LOG` and the Linux log directory. - #237 is open (the runtime's FrameBus is created and exposed through `Handle::frame_bus`, but is not handed to the views). #288 is open with the `follow-up` label. **Interfaces:** this task has no Interfaces block, and the diff changes no public API. **Invariants:** no crate code changed, so the dependency rules hold. The test contains no secrets or tokens and uses only the devserver and fakes. **Review Focus:** item 7 (self-exclusion) is in the live checklist (§2 step 2 and step 4), and the test asserts `excluded_pid == std::process::id()`. Item 1 is checked at acceptance level; its tests live in Screen share 10. **Findings** - minor: The doc's table says the test proves "no `self_stream: true` before the publication". The test reads the op 4s only after the publication is confirmed and checks that `self_stream` comes at or before the own key. It never checks that no op 4 with `self_stream: true` was sent before the room published. The guarantee itself is tested by `stream_golive.rs::self_stream_never_true_before_publication`. Either reword the row or cite that test. - minor: In the same way, the Stop row describes an order (`self_stream: false` first, then the key leaves) that the test does not check. The test only checks that the last op 4 has `self_stream: false` and no own key. It also does not check that `self_stream: false` was sent before the unpublish (Review Focus 1). That order is covered in Screen share 10, not here. **CI:** I ran `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in a clean review worktree at 867ad08. It is green: all steps passed and `screenshare_session_end_to_end` passed. LiveKit interop was skipped (env var not set). **Verdict: approved.** There are no blocking findings and local CI is green. The two minor findings are doc wording only. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Merge remote-tracking branch 'origin/screenshare' into screenshare-31-acceptance
Some checks failed
ci / Linux (x86_64) (push) Failing after 6m14s
ci / Windows (x64) (push) Successful in 17m0s
6fbcf2a576
charles manually merged commit 6fbcf2a576 into screenshare 2026-11-12 12:15:24 +00:00
Sign in to join this conversation.
No description provided.