Skip to content

sync: upstream moxygen 945c100ce82a - #631

Merged
omoq-sync-bot[bot] merged 16 commits into
mainfrom
sync/945c100ce82a
Nov 18, 2026
Merged

omoq-sync-bot[bot] merged 16 commits into
mainfrom
sync/945c100ce82a

Conversation

@omoq-sync-bot

@omoq-sync-bot omoq-sync-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Automated upstream sync.

  • Upstream commit: 945c100ce82a
  • Upstream status: success (green)
  • Merge type: git merge (sync/945c100ce82a → main)

The verify workflow will validate the standalone build. On success, this PR auto-merges.
Devs can push conflict-resolution commits to sync/945c100ce82a if needed.

Created by omoq-upstream-sync workflow.


This change is Reviewable

generatedunixname89002005307016 and others added 16 commits November 17, 2026 07:15
Summary:
This Phabricator Diff was generated from Pyrefly type-checker output by the per-target upgrade tool. It was not generated by an AI coding system.

It adds `# pyrefly: ignore[...]` comments for type errors reported by Pyrefly R1546.1 and moves the packages it suppresses errors in to that release in `tools/build_defs/fbcode_macros/build_defs/rollouts/pyrefly_checker_rollout.bzl`, so they switch type checkers in the commit that adds their suppressions. Other packages move when the upgrade changes the default checker. It does not change Python runtime behavior or application logic.

Landing group: `ad057e7a59c43a1ec04130e73781521f3c19a694f26f2b41e660266a4ad92eb2` (attempt 3, 20 batches, 47 files)
Merged patch SHA-256: `02bcdd1aa75a36d8f54f0299a8be3ce7055f94db34afc6e9bc4544f977df3538`
Excluded sensitive files: 2
Packages moved to R1546.1: 36

#pyreupgrade

Differential Revision: D132565304

fbshipit-source-id: fe53ce17d2e4ce9124294d5b1b34966eb641c3d8
Summary:
Objects on fetch and fill streams always carried publisher priority 0, because `FetchConsumer` does not pass one. A fill could then disagree with live objects in the same subgroup, which makes the track malformed. Fetch streams now use the publisher's priority, and a fill uses its subscription's. The cache does not store per-object priorities yet, so a publisher that varies priority by subgroup can still mismatch. The framer also writes the priority byte from a plain value instead of an optional's storage.

___

landed-with-radar-review

Differential Revision: D132205350

fbshipit-source-id: 890ac151ca2d855d8dbafc660a69d44edfd2f73f
Summary:
Relay data forwarded between Edgeray hosts over the MoQ control channel was written as objects on a single subgroup, i.e. one reliable, ordered QUIC stream per flow. Media therefore suffered head-of-line blocking and QUIC retransmitted stale packets that UDP would have dropped.

`FlowSenderHandle::sendPacket` now publishes each packet as a MoQ datagram and falls back to the existing subgroup stream only when the datagram send fails, e.g. the packet exceeds the QUIC datagram size limit. Object IDs stay monotonic across both paths. `terminateFlow` always sends END_OF_TRACK on the stream, because the receiver closes the flow only on that reliable status.

The sender's QUIC client now enables datagrams, which `MoQServer` already does on the receiver side; the receiver's `ObjectReceiver` already delivers datagrams to the flow handler.

Reviewed By: sharmafb

Differential Revision: D132354872

fbshipit-source-id: f27d3e4ceac295de7b95f6860ff6707bcf8be48d
Summary: Extend `WithNoOtherHubAHubGoingAwayKeepsServing` to check the session and request-stream GOAWAY counters over real `MoQSession` pairs. This is meant to address a comment on the already-landed diff D131381668.

Reviewed By: sandarsh

Differential Revision: D132441591

fbshipit-source-id: c47fc3ef4ef216a217aa1e20894393bda6eab507
Summary: This is a code reorganization rather than a functional change.

Reviewed By: sandarsh

Differential Revision: D132609818

fbshipit-source-id: 0602a941e9e0290fda97251f5b9bf65550bc72cd
Summary: This diff lets MoQProxy report its upstream switching activity through an optional stats callback.

Reviewed By: sandarsh

Differential Revision: D131381669

fbshipit-source-id: ab6a5eecfcea04bdd60c6e02b7c45d48526b052c
Summary: A switch that ends because its last viewer left, the track closed, or the upstream ended the track was counted neither completed nor failed, so `started` never matched the outcomes. `MoQProxySwitchStats` now counts those as `stopped`, for lost and graceful switches, and reports them through `onLostSwitchStopped()` and `onGracefulSwitchStopped()` on `MoQProxyStatsCallback`, so `started` equals `completed + failed + stopped` once no switch runs. A graceful switch whose upstream is lost before its replacement forwarded an object stops there and carries on as a lost switch, counted there as before, and one already counted as failed isn't counted again when it ends. revproxy exports the two as `revproxy.moq.proxy.lost_switches.stopped` and `revproxy.moq.proxy.graceful_switches.stopped`, like the other switch counters.

Reviewed By: sharmafb

Differential Revision: D132430556

fbshipit-source-id: 490440c227ff66ae841c12791d0e0608d1a197ba
Summary:
First diff of MoQLaneManager, the edge-side ABR that splices a broadcast's lanes into one virtual track per media type. Adds `lane_manager/` with `LaneInfo` and `SwitchingSet` (a catalog switching set, shaped like Track Properties) and the per-subscription-set `SwitchingPolicy` interface (`initialLane`, `select` returning a `SwitchPlan`, `onSwitchOutcome`). The interface is shaped like `media::abr::AbrPolicy`, so an adapter stays thin. Adds `samples/lane_manager/ScriptedPolicy`, a test policy that starts on the lowest lane and moves to the next one every N groups, kept out of production code.

Blast radius: a new header-only library and a sample, with no users yet. The only existing files changed are moxygen's top-level and `samples/` `CMakeLists.txt` (one `add_subdirectory` each).

Reviewed By: timmboettger

Differential Revision: D129501194

fbshipit-source-id: 52d74dbbf450af223c6a2c754d391deb0e4a076d
Summary: Reads a broadcast's MSF catalog through a `Publisher` (SUBSCRIBE plus a joining FETCH) and keeps one `SwitchingSet` per `Role`, with decoded inits and bitrates from every catalog object. Lanes sort by bitrate, or by size when a lane has none. `open()` gives up with `folly::FutureTimeout` if no catalog arrives within 5 s. No users yet.

Reviewed By: timmboettger

Differential Revision: D129788918

fbshipit-source-id: 43b2bca0a88e1e109d2249cbbb3bc026de0d1dae
Summary: Serves one virtual track per role from a lane: the policy picks the lane, the manager SUBSCRIBEs it through the proxy in the client's context, and returns its SUBSCRIBE_OK under the client's alias. Forwards the lane with its init as property 0x3801 on the first object, re-picks when a lane SUBSCRIBE fails, and ends the virtual track with the lane. A catalog that doesn't arrive in time fails the SUBSCRIBE with TIMEOUT and a Retry Interval. No users yet.

Reviewed By: timmboettger

Differential Revision: D129793524

fbshipit-source-id: ff3545910a6d052a93f43637462965e7a1a67acc
Summary: `MoQLaneManager::fetch` rewrites a joining FETCH on a virtual track to the lane its SUBSCRIBE_OK came from, keeping the joining request ID (the lane SUBSCRIBE's), and puts the lane's init on the first object. MoQProxy serves it from its group cache or upstream.

Reviewed By: timmboettger

Differential Revision: D129792058

fbshipit-source-id: 18e0a7ec8fa8ea670b74e2416f71e2a811b5a784
Summary: A per-session `Publisher` that sends SUBSCRIBE and FETCH on `<name>--abr-video` / `<name>--abr-audio` to the broadcast's `MoQLaneManager` (one per broadcast, held by `weak_ptr`) with a policy from its factory, and everything else to the proxy. Adds an in-process end-to-end test: viewer, router over a real `MoQProxy`, origin with a catalog and two lanes.

Reviewed By: timmboettger

Differential Revision: D129795151

fbshipit-source-id: 7c0d841f7151bc41a89cbb68f4b9cc5708256b74
Summary: A pure state machine for one virtual track's switches: for each group a lane starts it forwards, drops, or holds the live lane's group while a plan waits for the target's group, up to the plan's `maxWait` or a configurable default (0 never holds). Reports Committed, Cancelled and Retried outcomes, and accepts only targets of the live lane's codec family. No users yet.

Reviewed By: timmboettger

Differential Revision: D129797161

fbshipit-source-id: 9c4e40adbde0b348941a5beae038aa5c8436c847
Summary:
MoQLaneManager subscribes every lane of the role in the background and asks the policy for a plan once per live group. SwitchExecutor decides each lane subgroup: forwarded, dropped, or held on a session timer until the target group arrives; the first object after a switch carries the new lane's init. Dropping the virtual track's handle unsubscribes, as MoQProxy's handles do. Runs on the client session's executor; `MoQLaneRouter` now takes the default wait.

___

landed-with-radar-review

Differential Revision: D129820952

fbshipit-source-id: 5d856f42bb1b47f0d144eb2eda7ef2408044f05a
Summary:
Add default no-op `MoQForwarder::Callback::onSubscriberRemoved` and notify from the existing subscriber-removal routine after detachment and before `onEmpty`. Reuse the routine's existing strong subscriber reference and `OnEmptyGuard`.

`Subscriber::unsubscribe` only locates its active entry and calls the existing removal routine. There is no notification flag, additional lifetime guard, or subscriber-lifecycle ledger. Existing media-object methods are unchanged.

landed-with-radar-review

Reviewed By: sharmafb

Differential Revision: D132695213

fbshipit-source-id: b64ea9861b798b9db84a370591dcde5159bdeee4

@gmarzot gmarzot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Auto-approved by upstream sync workflow.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@omoq-sync-bot
omoq-sync-bot Bot merged commit b421f35 into main Nov 18, 2026
3 checks passed
@omoq-sync-bot
omoq-sync-bot Bot deleted the sync/945c100ce82a branch November 18, 2026 13:33
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.

5 participants