Skip to content

sync: upstream moxygen cd1781a4234f#262

Merged
omoq-sync-bot[bot] merged 8 commits into
mainfrom
sync/cd1781a4234f
Jun 9, 2026
Merged

sync: upstream moxygen cd1781a4234f#262
omoq-sync-bot[bot] merged 8 commits into
mainfrom
sync/cd1781a4234f

Conversation

@omoq-sync-bot

@omoq-sync-bot omoq-sync-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

Automated upstream sync.

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

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

Created by omoq-upstream-sync workflow.


This change is Reviewable

afrind and others added 7 commits June 8, 2026 08:10
Summary:
Several changes to make MoQChatClient work with draft 16 subscribe namespace:

- Add ChatNamespacePublishHandle to receive NAMESPACE frames on the bidi stream and trigger subscribeToUser for new participants.
- Set SubscribeNamespaceOptions::BOTH so the relay delivers both PUBLISH_NAMESPACE and NAMESPACE notifications.
- Implement publishNamespaceDone (was a TODO) to unsubscribe and clean up when a participant leaves.
- Fix use-after-free in publishLoop by capturing shared_from_this() instead of raw this in lambdas posted to the thread pool and event base. Extract handleInput helper to keep the code clean.

___

Differential Revision: D93674573

fbshipit-source-id: 3fa4b7efc03d65cd4776e522d914b930f8022da4
Summary:
Mechanical conversion of the glog macros still in moxygen sources, with no semantic level changes:

| pattern | replacement |
|---|---|
| `CHECK*` | `XCHECK*` |
| `DCHECK*` | `XDCHECK*` |
| `LOG(INFO)` | `XLOG(INFO)` |
| `LOG(WARNING)` | `XLOG(WARN)` |
| `LOG(ERROR)` | `XLOG(ERR)` |
| `LOG(FATAL)` | `XLOG(FATAL)` |
| `VLOG(N)` | `XLOG(DBG<N>)`, saturating `VLOG(10+)` at `DBG9` (folly only defines `DBG0..DBG9`; same gotcha as facebook/wangle#252) |

Also adds `<folly/logging/xlog.h>` to the 13 files whose glog macros previously leaked in transitively via folly headers and did not include it directly. No file used `<glog/...>` directly.

22 files touched.

Pull Request resolved: facebookexperimental#182

Test Plan:
- [ ] Standalone build compiles cleanly (verified locally against an openmoq-fork build of this branch + downstream consumers: 993/993 targets, 0 errors).
- [ ] No false positives — verified by grep for residual `CHECK(`/`LOG(`/`VLOG(`/`DCHECK(` outside `XCHECK`/`XLOG`/`XDCHECK`.

Reviewed By: kvtsoy

Differential Revision: D107670429

Pulled By: afrind

fbshipit-source-id: 7dc9e2d3ea7405c82c55633946dac2c9e9b7b09f
Summary:
Three sites whose level was higher than warranted by what the code actually does:

| file:line | from | to | reason |
|---|---|---|---|
| `MoQFramer.cpp` "Control message size exceeds max" | `ERR` | `WARN` | The framer rejects the oversized message and the session continues; ERR suggested an actionable failure when it's recoverable input rejection. |
| `MoQServer.cpp` "Cannot register ALPN handler: factory not initialized" | `INFO` | `DBG1` | Fires as expected during normal bring-up ordering; not user-actionable. |
| `MoQServer.cpp` "Cannot register ALPN handler: server already started" | `INFO` | `DBG1` | Same — bring-up race, expected. |

## Stacked on facebookexperimental#182 (Convert remaining glog usage to folly XLOG/XCHECK)
This branch is based on the mechanical conversion branch (the `MoQFramer.cpp` site changes the just-converted `XLOG(ERR)` to `XLOG(WARN)`). After facebookexperimental#182 merges this diff narrows to three lines. Sequencing: review facebookexperimental#182 first; this is reviewable on its own once that's in.

Pull Request resolved: facebookexperimental#183

Test Plan:
- [ ] Compiles after the conversion PR lands.
- [ ] Verbose runs no longer surface these as INFO/ERR.

Reviewed By: kvtsoy

Differential Revision: D107670495

Pulled By: afrind

fbshipit-source-id: 1825818097e8bfbacdaa7bd392bf08971ebdbb6d
Summary:
Fixes #ISSUE_NUMBER

X-link: https://github.com/facebookincubator/rebalancer/pull/40

Reviewed By: sravi-in

Differential Revision: D107910573

Pulled By: r-barnes

fbshipit-source-id: 5e5f2c3c42ec68b75d3309a2a276e35504cd5e48
Summary:
Draft-18 §10.2 changes control-message parameters from Key-Value-Pairs (TLV, with odd-key = length-prefixed / even-key = varint) to TV (Type-Value), where each parameter's value encoding is fixed per-parameter-definition: `uint8`, `varint`, `Location` (two consecutive varints), or length-prefixed. Setup Options (§10.3) and data-plane extensions keep the KVP format.

Changes:
- New parameter keys: `OBJECT_DELIVERY_TIMEOUT` (0x02 — same numeric as `DELIVERY_TIMEOUT`), `SUBGROUP_DELIVERY_TIMEOUT` (0x06), `FILL_TIMEOUT` (0x0A), `TRACK_NAMESPACE_PREFIX` (0x34), with per-frame allowlists and a v18+ gate so v17 and earlier reject the new keys.
- \`paramEncodingV18(key)\` returns the per-key value encoding for draft-18 Message Parameters.
- \`MoQFrameParser::parseV18ParamValue\` dispatches on encoding (uint8 / varint / bare Location / length-prefixed). \`parseParams\` calls it when version >= 18 and paramsType is Request; v17 and earlier keep the existing parity-based path untouched.
- \`MoQFrameWriter::writeV18ParamValue\` is the symmetric writer. The big difference vs v17 is `LARGEST_OBJECT`: bare Location in v18, length-prefixed before.
- `SUBSCRIBER_PRIORITY`, `GROUP_ORDER`, `FORWARD` are now single-byte `uint8` on the wire (were varints). Values still flow through `Parameter::asUint64` in memory, so existing handlers are unchanged.
- `PUBLISHER_PRIORITY` is routed through Varint in `paramEncodingV18`; it is extensions-only in v16+, so the existing post-parse `insertParam` check rejects it as `PROTOCOL_VIOLATION`.

Reviewed By: sandarsh

Differential Revision: D107873802

fbshipit-source-id: d0023342d7c85114ff64fdc45e7e03631621fd8e

@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.

… merge

Upstream cd1781a (draft-18 TV Message Parameters) rewrote the
kParamAllowlist map; the 3-way merge silently dropped our fork-local
TRACK_FILTER (0x29) entry, leaving an inconsistent tree -- the enum and
parse/write code survived but the allowlist registration did not.

This broke 3 tests:
- isKnownParamKey(0x29) returned false, so parseParams rejected
  SUBSCRIBE_NAMESPACE with TRACK_FILTER as PROTOCOL_VIOLATION
  (SubscribeNamespaceWithTrackFilter, TrackFilterLargeValues)
- isParamAllowed fell through to the unknown-key "allow everywhere"
  branch (TrackFilterAllowedOnlyForSubscribeNamespace)

Restore kAllowedFramesForTrackFilter + its kParamAllowlist entry, and
register TRACK_FILTER as LengthPrefixed in paramEncodingV18 so the
draft-18+ TV path decodes it via parseVariableParam instead of DFATAL.
@omoq-sync-bot omoq-sync-bot Bot merged commit f89be84 into main Jun 9, 2026
6 checks passed
@omoq-sync-bot omoq-sync-bot Bot deleted the sync/cd1781a4234f branch June 9, 2026 12:36
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.

3 participants