Skip to content

fix: the Flatpak lists cameras again - #173

Merged
kixelated merged 13 commits into
mainfrom
quest/m0/packaging/flatpak-cameras
Nov 16, 2026
Merged

kixelated merged 13 commits into
mainfrom
quest/m0/packaging/flatpak-cameras

Conversation

@kixelated

@kixelated kixelated commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the Flatpak's camera listing by moving the moq pin to a moq main that holds the portals on zbus 5 (moq-dev/moq#8861), catches the studio up to moq main's API, and completes the quest quest/m0/packaging/flatpak-cameras.md.

Root cause

  • moq-video's camera and ScreenCast portals moved to ashpd 0.14 / zbus 6 in build(deps): bump the cargo group with 18 updates moq#8695, a dependabot bump. feat!: catch the studio up to moq's main #163's catch-up brought that in.
  • zbus 6 writes the whole D-Bus handshake (AUTH, NEGOTIATE_UNIX_FD, BEGIN, Hello) in one write.
  • Before 0.1.6, xdg-dbus-proxy marks the connection authenticated in both directions once it forwards BEGIN. The bus's OK / AGREE_UNIX_FD still on their way back are then parsed as message headers: Invalid message header read, the proxy hangs up, and the client sees D-Bus handshake failed: Unexpected EOF during handshake.
  • Flatpak runs the host's proxy, and Ubuntu 24.04 LTS (the CI runner, and many users) ships 0.1.5. zbus 5 avoided this by staging the handshake under FLATPAK_ID, a workaround zbus 6 removed.
  • The wgpu The surface isn't supported by this adapter panic is not a second bug. smoke.sh fails on the camera listing and kills sway while the studio is still opening its window (ERROR_SURFACE_LOST_KHR 6 ms later). With the fix, the window opens and closes cleanly.

Changes

  • Pin: just upgrade-moq to moq-dev/moq@6c726f455, on moq's main after #8861 (ashpd 0.13, a dependabot ignore, and a test that plays a 0.1.5 proxy). The studio's own ashpd is already 0.13, so the tree keeps one zbus (5.19).
  • Features: feat(moq-audio,moq-ffi,moq-video)!: drop the compile-trim features from the media and gateway crates moq#8851 and feat(moq-tokio,moq-relay,qmux)!: always compile the network stack moq#8852 dropped the compile-trim features, so moq-audio's mixing bus and moq-tokio's network stack always compile. The studio drops its bus and net requests and its own quic and websocket features, which only forwarded to moq-tokio's; nothing gated on them.
  • API catch-up (staged earlier on the deleted validate/flatpak-cameras scratch branch): feat(moq-net)!: address groups by their start moq#8638's groups addressed by their start and the fallible Timestamp, and feat(moq-video)!: capture listings and the display selection can grow moq#8742's DisplaySelection. The replay now refuses a track off hang's timescale, since its range is keyed before the track describes itself.
  • Skips in copied tracks (found by review): since feat(moq-net)!: address groups by their start moq#8638, a reader treats a run the publisher declared skipped as media running on, and a decoder spots an encoder's first group by is_skipped(0..start). The replay copy now repeats only the skips its source declared, so a group lost on the way stays a gap instead of freezing the last picture. The publish copy, which declared none, now repeats them too, so a forwarded source keeps its encoder-first marker and its continuity. Tests: a_forwarded_track_keeps_its_skips, a_take_keeps_the_skips_it_was_given, and a_take_keeps_a_gap, whose lost group the old fixture had declared skipped.
  • Group ends in copied tracks (found by Pullfrog): the publish copy closed every group, so a paused source's last forwarded group never aged out and readers lost its end. It now finishes a group at the end its source stated; a replay does the same for a group it holds whole. Test: a_take_keeps_where_its_whole_groups_end, and a_forwarded_track_keeps_its_skips checks ends too.
  • REVIEW page catch-up (after merging main at 7fa9668, moq-dev/studio#177): REVIEW's strip (past.rs) and replay (replay.rs) landed against the old pin. The strip keys its cached groups by start, and its timestamp-to-moment mapping fails loud on an unscaled timestamp instead of panicking or guessing; replay::before reads the end's now-optional scale with an error. Test: the_strip_shows_each_groups_keyframe_once, which drives the strip over a real take, where nothing covered it before.
  • Quest: deletes quest/m0/packaging/flatpak-cameras.md.

Decisions

  • Scope: ✅ keep moq main's API catch-up in this PR (rejected: a separate catch-up quest first), since any pin that holds the fix needs it. Maintainer, 2026-11-15.
  • Reporting the regression to z-galaxy/zbus: ✅ don't post (rejected: post the drafted issue; post it offering a PR). moq keeps its ashpd 0.13 hold until Ubuntu 24.04 ages out or zbus restores the staged handshake on its own. Maintainer, 2026-11-15.
  • Made without asking, for review: the studio's quic and websocket features are removed rather than kept as empty no-ops, since moq-tokio no longer lets a build leave either transport out and nothing in the studio gated on them.

Validation

  • I built xdg-dbus-proxy 0.1.5 from its release tarball and ran it in front of a private dbus-daemon, filtered as flatpak run does. With FLATPAK_ID set, I called the camera portal as moq-video does:

    Proxy ashpd 0.13 (zbus 5) ashpd 0.14 (zbus 6)
    0.1.5 (Ubuntu 24.04) Ok(present=false) Invalid message header read, then main's CI error verbatim
    0.1.9 (Fedora 45) Ok(present=false) Ok(present=false)
  • End to end on Ubuntu 24.04: the Flatpak workflow dispatched on head 87b778f, after merging the REVIEW page, passed on x86_64 and aarch64, behind the runner's xdg-dbus-proxy 0.1.5-1ubuntu0.2, as it had on 168ca2e (run). Both smoke logs show listed devices cameras=Ok(0) displays=Ok(1) windows=Ok(1) audio=Ok(7). The head f5ecf28 adds only main's quest-file changes from moq-dev/studio#185. It runs only on dispatch here, since this PR touches no packaging/flatpak path.

  • just ci passes on head 87b778f (351 tests), and quest check on f5ecf28.

Caused by

  • moq-dev/studio#163 - moved the moq pin past moq-dev/moq#8695, which put moq-video's portals on zbus 6, whose pipelined handshake xdg-dbus-proxy before 0.1.6 drops (found by check: the Flatpak Bundle jobs)

Follow-ups

Notes

Models

Size: L
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, L)
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, S)

(Written by Opus 5.5)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: 87b778f

  • Base: origin/main at 7fa9668

  • Risk: medium, the base has no RISK.md to name what is always high or customer-facing, so every change is medium

  • Classified: medium by default

  • Reviewer: Codex, gpt-6.1-sol, xhigh effort

  • Session: 01a1e359-0b8f-7910-b7c7-baec7b7603cd, round 4

  • Score: 10/10, The incremental REVIEW adaptations consistently use the new timestamp and group-start APIs, with no new findings from code review; builds and tests were excluded by the review rules.

  • Rounds: 4; first round 2 (medium 2); findings 2 (medium 2): fixed 2, refuted 0, open 0

  • Findings: none

  • Reviewer: Codex, gpt-6.1-sol, high effort, shadow

  • Session: 01a1e359-0b90-7ef1-8674-f95922368f2a

  • Rounds: 2; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0

kixelated and others added 2 commits November 15, 2026 09:20
Copied from #170's branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Contributor Author

Maintainer decision (2026-11-15, /quest-complete, taking the recommendation):

  • Scope: ✅ keep moq main's API catch-up in this PR (rejected: a separate catch-up quest first), since any pin that holds the fix needs it.
  • fix(video): the portals connect from inside a Flatpak again moq#8861 is queued in moq's merge queue; once it lands, this PR bumps the pin and merges the staged catch-up.
  • Reporting the regression to z-galaxy/zbus is still open (it posts outside the maintainer's orgs).

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Contributor Author

Maintainer decision (2026-11-15, /quest-complete): reporting the regression to z-galaxy/zbus: ✅ don't post (rejected: post the drafted issue; post it offering a PR). moq keeps its ashpd 0.13 hold (moq-dev/moq#8861) until Ubuntu 24.04 ages out or zbus restores the staged handshake on its own. Remove this item from ## Waiting when this PR is next iterated.

(Written by Claude Opus 5.5)

kixelated and others added 7 commits November 15, 2026 23:46
Moves the pin to moq-dev/moq@6c726f455, which holds ashpd at 0.13
(moq-dev/moq#8861). moq-dev/moq#8851 and #8852 dropped the compile-trim
features, so moq-audio's bus and moq-tokio's network stack always compile:
the studio drops its bus, net, quic, and websocket features.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A replay copy declared every start between its groups skipped, so a group
lost on the way read as media running on and no gap reached the player.
The publish copy declared none, so a forwarded track lost the skip before
the encoder's first group, and its decoder treated that group as a
midstream join. Both now repeat the source's skips, the initial run
included, and leave a hole a hole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 16, 2026 08:13
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes update media writing, forwarding, replay, and playback to use timestamp-based group starts. Forwarding and replay preserve source-declared skips and group ends, while gaps caused by missing groups remain distinct from skips. Timestamp conversions now propagate errors in replay, decoding, and media playback. Dependency settings and timestamped test fixtures also change.

Merge Risk: Minimal · up to 87b77

The change restores camera listing in the Flatpak build and moves group and timestamp handling to the new moq API. No confirmed defect remains, and it looks ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix: the Flatpak lists cameras again" matches the main goal of the PR, which is fixing Flatpak camera listing by moving the moq pin and adapting APIs. The changeset in the raw summary is mo…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is specific to the changeset. It explains the moq pin bump to 6c726f455, the removal of the quic and websocket features, the API catch-up (groups by start, fallible Timestamp, DisplayS…
Full details: Title check

Explanation

The title "fix: the Flatpak lists cameras again" matches the main goal of the PR, which is fixing Flatpak camera listing by moving the moq pin and adapting APIs. The changeset in the raw summary is mostly Rust code adaptations (timestamps, group starts, skips, features) and does not show the pin change directly, but the PR objectives and description tie the work to the camera-listing fix. The title is specific and clear, though the file summaries alone do not show the portal fix itself.

Full details: Description check

Explanation

The description is specific to the changeset. It explains the moq pin bump to 6c726f455, the removal of the quic and websocket features, the API catch-up (groups by start, fallible Timestamp, DisplaySelection), the skip and group-end handling in copied tracks, the REVIEW page strip and replay adaptations, and the deleted Flatpak camera quest. It also gives root cause and validation details that match the raw summary. It is not off-topic and is not vague.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0a6bec41-b16b-4173-80d9-89d9659184a8
Commits

Reviewing files that changed from the base of the PR and between 7fa9668 and 87b778f.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 16

  • js/join/src/renew.test.ts
  • moq
  • rs/moq-scene/Cargo.toml
  • rs/moq-scene/src/layout.rs
  • rs/moq-scene/src/publish.rs
  • rs/moq-scene/src/replay.rs
  • rs/moq-scene/src/source.rs
  • rs/moq-studio/Cargo.toml
  • rs/moq-studio/src/engine.rs
  • rs/moq-studio/src/guests.rs
  • rs/moq-studio/src/health.rs
  • rs/moq-studio/src/ladder.rs
  • rs/moq-studio/src/past.rs
  • rs/moq-studio/src/replay.rs
  • rs/moq-studio/src/uplink.rs
  • rs/moq-studio/src/watch.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues. One minor suggestion inline.

Reviewed changes

I reviewed the whole PR at fb6f3c7: the moq pin bump to a commit on moq's main (checked with the compare API, which reports behind), and the studio's catch-up to moq main's API.

  • Pin and features: moves moq to 6c726f455, which includes the ashpd 0.13 / zbus 5 hold. It drops the trimmed-away bus, net, quic and websocket feature requests. Nothing in justfile, packaging/ or README.md still names them.
  • Group starts and fallible time: group::Info { start }, append_group(start), close(), Duration::try_from and Timestamp::unscaled are applied everywhere they're used. The untimed token and probe tracks get keys that only ever increase.
  • Skips in copies: the forwarded copy in publish.rs and the replay take in replay.rs now repeat only the skips their source declared. A lost group stays a gap instead of a run where the media seems to continue. The source is local and append_group records its skip under the same lock as the group, so the is_skipped check can't miss a skip that hasn't arrived yet.
  • Replay timescale: a take keys its range in hang::container::TIMESCALE, and it now refuses a track on any other timescale instead of misreading its range.

quest context could not run here, because the review shell has no quest or nix binary.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread rs/moq-scene/src/publish.rs Resolved
The publish copy closed every group, so a forwarded source's last group
never aged out after it paused and its readers lost the group's end. It
now finishes a group at the end its source stated. A replay does the same
for a group it holds whole; one cut at the span's end still only closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pullfrog[bot]
pullfrog Bot previously approved these changes Nov 16, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

I reviewed 168ca2e, the only commit since the prior Pullfrog review at fb6f3c7.

  • Group ends in the publish copy: copy in publish.rs now ends a group with finish(end) when the source gave group.end(), and only closes it otherwise. A paused source's last forwarded group now ages out of FORWARDED and keeps its presented end.
  • Group ends in the replay copy: copy_held records end only for a group it kept whole. A group cut at the span's end, or one still arriving (end() is None), is still only closed.
  • Tests: a_forwarded_track_keeps_its_skips now checks one finished end and two closed groups. The new a_take_keeps_where_its_whole_groups_end checks that two whole groups keep their ends and that the group cut at 2.5 s has none.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

kixelated and others added 2 commits November 16, 2026 00:55
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The REVIEW page landed against the old pin: timestamps convert to a Duration fallibly now, a timestamp's scale is optional, and groups are addressed by their start. The strip keys groups by start and fails loud on an unscaled timestamp; a test drives it over a real take.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

I reviewed what changed since 168ca2e: the merge of main at 7fa9668 (#177, the REVIEW page) and 87b778f, which moves REVIEW's strip and replay onto moq main's API.

  • Strip keys groups by start: groups in past.rs now keys each group by group.start instead of its sequence, and Decoding.peaks keeps one entry per start. The cache and the "redecode the newest group" rule work as before.
  • Fallible time in the strip: the take's end goes through Duration::try_from, so an unscaled end resets the strip with a held error instead of panicking. The at closure, as_micros() for the picture cache key, and the sound peaks now return TimeOverflow as an error, which shows up as the strip's held or sound error.
  • Optional scale in replay::before: it reads end.scale() as an Option, with a context error for a timeline that has no timescale, and uses Duration::try_from for the end.
  • New test: the_strip_shows_each_groups_keyframe_once encodes 3 s of 30 fps with a keyframe every second, cuts a real Take, and checks that the strip shows keyframes at 0, 1 and 2 s and doesn't decode them again on a second sample. It needs openh264, which just test enables through the features list, so CI runs it (the Check job was still pending when I reviewed).

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated merged commit 510b5fb into main Nov 16, 2026
4 checks passed
@kixelated
kixelated deleted the quest/m0/packaging/flatpak-cameras branch November 16, 2026 09:29
kixelated added a commit that referenced this pull request Nov 16, 2026
Brings in BUILD's layers and inspector (#174), Studio mode (#176), REVIEW and
Settings' Recording tab (#177), the moq pin and Flatpak camera fix (#173), and
the quest cleanup (#185). The copied source tracks take main's group starts
and skips while still stopping at END STREAM; BUILD's picture frames the
program by whether it is on air and a scene open off program as main does;
Settings has both Stream and Recording; and the hotkeys add Go live and End
stream to TAKE, AUTO, and Studio mode.

Records the maintainer's choice for program-encoder-priority.md: release the
sources' replay encoders when the program's cannot open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant