Repository navigation
chore(quest): plan the m1 quests that had no real plan #3343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,63 @@ | ||
| # [S] per-broadcast bandwidth estimates and reservation | ||
| # [L] js/net: mirror the send-side bandwidth allocator | ||
|
|
||
| ## Goal | ||
|
|
||
| Implement and verify the behavior tracked in [#2709](https://github.com/moq-dev/moq/issues/2709) | ||
| within the issue's stated scope and boundaries. | ||
| On a connection shared by several components (#2705), each JS publisher's | ||
| encoder targets its own share of the send-rate estimate instead of the | ||
| whole-session number, and audio reserves its bitrate so video's share is | ||
| honest. The split follows the Rust allocator exactly: strict priority tiers by | ||
| track priority, max-min fair within a tier, surplus left unclaimed. | ||
|
|
||
| ## Plan | ||
|
|
||
| Use the public issue's scope, implementation notes, and acceptance criteria | ||
| below as the starting plan. Reconcile paths and assumptions with the current | ||
| tree before implementation. | ||
|
|
||
| ### Issue context | ||
|
|
||
| The congestion controller's `estimatedSendRate` (and the PROBE receive estimate) are per-session. With #2705 sharing one session across every component on a page, that aggregate is the wrong number for any individual publisher: two publish components each cap their encoder at the full-session estimate and jointly overshoot, and a watcher's ABR reads a budget it shares with everything else on the connection. | ||
| Boundaries: the receive side is untouched. Watch ABR keeps reading the | ||
| whole-connection PROBE estimate until Rust has a receive-side split to mirror. | ||
|
|
||
| This is not a regression in kind (separate sessions just let congestion control arbitrate blindly), but sharing makes it structural. What is missing is a mechanism to split the session estimate across broadcasts: per-broadcast accounting at minimum, and ideally a way to reserve or prioritize bitrate so a publisher's encoder cap and a watcher's rendition selection each work against their own share rather than the whole pipe. | ||
| ## Plan | ||
|
|
||
| Related: #2283 fed the session estimate into the encoder; catalog::Estimator (#2530) measures per-rendition receive rates. Neither divides the send budget. | ||
| The Rust side landed on `dev` in `rs/moq-net/src/model/bandwidth.rs` | ||
| (#2854): `Allocator::new(estimate)` / `unlimited()`, `reserve(&track::Demand, | ||
| max) -> Reservation`, `Reservation::{peek, consumer, update}` with `Drop` | ||
| removing the entry, and a pure `allocate(estimate, wants, id) -> Option<Rate>` | ||
| where `None` means "not registered, hold your rate" and is distinct from a | ||
| zero grant. Only tracks whose demand is active claim anything. That module is | ||
| the spec; JS has no equivalent today. | ||
|
|
||
| What JS does today: `js/publish/src/element.ts` polls `connection.stats()` | ||
| every 100 ms into one signal and hands it to the video encoder only, which | ||
| caps at `estimate * 0.9`; audio is invisible to it. `js/net` exposes | ||
| `Stats.estimatedSendRate` and the PROBE `estimatedRecvRate` but nothing | ||
| divides either. | ||
|
|
||
| Steps: | ||
|
|
||
| - Add a `bandwidth` module to `js/net` porting `Allocator`, `Reservation`, | ||
| and `allocate()` one to one, including the Rust unit tests. Rates are bits | ||
| per second as plain numbers. A reservation exposes its grant as a | ||
| `Getter<number | undefined>` so encoders react through the signal model. | ||
|
Comment on lines
+32
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 6 'Reservation|dispose|release|unregister|close|reload|unmount' js/net js/publishRepository: moq-dev/moq Length of output: 50368 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- review document ---'
cat -n quest/m1/2709-per-broadcast-bandwidth-estimates-and-reservation.md | sed -n '1,100p'
printf '%s\n' '--- repository guidance for quest/net scopes ---'
find /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a -maxdepth 2 -type f -name '*.md' -print \
| sort \
| while read -r f; do
case "$f" in
*/quest/*|*/js/*|*/rust/*|*/learnings/*|*/architecture/*) printf '%s\n' "$f" ;;
esac
done
printf '%s\n' '--- allocator and reservation definitions/usages ---'
rg -n -g '!*.test.*' -g '!*.md' \
'(^|[^[:alnum:]_])(pub[[:space:]]+)?(struct|enum|impl|trait)[[:space:]]+(Allocator|Reservation)|Allocator::|Reservation::|allocate\(' \
. --glob '!target/**' --glob '!node_modules/**' | head -300Repository: moq-dev/moq Length of output: 6316 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- scoped repository learnings ---'
cat /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a/learnings/js-net-src.md
cat /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a/learnings/js-publish.md
cat /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a/learnings/rs-moq-net.md
printf '%s\n' '--- Rust bandwidth module ---'
bandwidth=$(fd -t f 'bandwidth\.rs$' rs | head -1 || true)
if [ -n "$bandwidth" ]; then
cat -n "$bandwidth" | sed -n '1,260p'
else
printf '%s\n' 'bandwidth.rs not found'
fi
printf '%s\n' '--- JavaScript track/connection lifecycle definitions ---'
rg -n -g '*.ts' \
'class (Track|Producer|Established|Connection)|interface (Track|Producer|Established|Connection)|close\(\)|closed:|stats\(\)|createTrack|publish\(' \
js/net/src js/publish/src | head -250Repository: moq-dev/moq Length of output: 25267 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- all bandwidth/allocator candidates ---'
fd -t f -i 'bandwidth|allocator|reservation' rs js | sort
rg -n -g '*.rs' -g '*.ts' 'Allocator|Reservation|reserve\(|allocate\(' rs js | head -240
printf '%s\n' '--- JavaScript track producer lifecycle ---'
cat -n js/net/src/track.ts | sed -n '230,380p'
cat -n js/net/src/track.ts | sed -n '440,530p'
printf '%s\n' '--- established connection implementation and close path ---'
fd -t f 'established\.ts|connection\.ts|element\.ts' js/net/src js/publish/src | sort
rg -n -C 8 'class Established|close\(\)|stats\(\)|connection\.stats|setInterval|setTimeout' \
js/net/src/connection js/publish/src/element.ts js/publish/src | head -260Repository: moq-dev/moq Length of output: 50367 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- producer close implementation ---'
cat -n js/net/src/track.ts | sed -n '377,455p'
cat -n js/net/src/track.ts | sed -n '560,675p'
printf '%s\n' '--- connection ownership and teardown ---'
cat -n js/net/src/connection/established.ts | sed -n '1,110p'
cat -n js/net/src/connection/reload.ts | sed -n '1,180p'
printf '%s\n' '--- publish reload/track construction and cleanup ---'
cat -n js/publish/src/element.ts | sed -n '175,235p'
rg -n -C 5 'createTrack|appendGroup|\.close\(\)' js/publish/src/video js/publish/src/audio js/publish/src/element.ts | head -180Repository: moq-dev/moq Length of output: 32177 Define explicit reservation release in the JavaScript plan. The plan lists 🧰 Tools🪛 LanguageTool[grammar] ~33-~33: Use a hyphen to join words. (QB_NEW_EN_HYPHEN) 🤖 Prompt for AI Agents |
||
| - Move the send-estimate sampler from `js/publish` into `js/net`: the | ||
| established connection owns one 100 ms `getStats()` loop and one | ||
| `Allocator`, shared across reloads, so every component on the connection | ||
| reserves against the same registry. | ||
|
Comment on lines
+36
to
+39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 6 'estimatedSendRate|Allocator|unlimited|allocate|update' rs/moq-net js/net js/publishRepository: moq-dev/moq Length of output: 50368 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- roadmap ---'
cat -n quest/m1/2709-per-broadcast-bandwidth-estimates-and-reservation.md | sed -n '1,180p'
printf '%s\n' '--- allocator definitions and direct callers ---'
rg -n -C 12 'struct Allocator|enum Allocator|impl Allocator|pub struct Reservation|fn allocate|Allocator::new|Allocator::unlimited|estimated_send_rate|estimatedSendRate' rs js -g '*.rs' -g '*.ts' -g '*.md' -g '!**/*.test.ts'Repository: moq-dev/moq Length of output: 35539 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- repository review conventions ---'
find /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- bandwidth source map ---'
fd -i 'bandwidth' rs js
rg -n -C 16 'pub struct Allocator|struct Allocator|impl Allocator|pub struct Reservation|impl Reservation|fn allocate|fn reserve|fn update|unlimited' rs/moq-net/src/model/bandwidth.rs rs/moq-net/src -g '*.rs'Repository: moq-dev/moq Length of output: 30958 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- quest conventions ---'
cat /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a/conventions/quest.md
printf '%s\n' '--- allocator file ---'
wc -l rs/moq-net/src/model/bandwidth.rs
cat -n rs/moq-net/src/model/bandwidth.rs | sed -n '1,280p'
printf '%s\n' '--- module export and connection ownership ---'
rg -n -C 10 'mod bandwidth|pub.*bandwidth|struct Session|struct SendBandwidth|bandwidth::' rs/moq-net/src/lib.rs rs/moq-net/src/session.rs rs/moq-net/src -g '*.rs' | head -n 260Repository: moq-dev/moq Length of output: 23754 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- all allocator references ---'
rg -n -C 8 '\bAllocator\b|\bReservation\b|allocate\(estimate|reserve\(&track|bandwidth allocator' . -g '!target' -g '!node_modules' -g '!dist' -g '!build' | head -n 320
printf '%s\n' '--- relevant learnings ---'
cat /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a/learnings/js-net-src.md
cat /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a/learnings/js-publish.mdRepository: moq-dev/moq Length of output: 19887 🌐 Web query:
💡 Result: There is no public record of a pull request Citations:
Define how each stats sample updates the shared allocator. The plan does not specify how the 100 ms 🤖 Prompt for AI Agents |
||
| - Demand comes from the `js/net` track producer (active vs idle) and priority | ||
| from the track info the publisher set (`js/hang` `PRIORITY`: catalog 100, | ||
| audio 80, video 60), the same tiers Rust allocates on. | ||
| - `js/publish` video takes its reservation's grant instead of `estimate * | ||
| 0.9`; audio reserves at its configured bitrate and ignores the grant, which | ||
| matches Rust's audio today. Following the grant for Opus is the JS twin of | ||
| [#2848](/quest/m1/2848-follow-the-bandwidth-grant-in-moq-audio-instead-of.md) | ||
| and stays out of scope. | ||
|
|
||
| Tests: the ported `allocate()` cases verbatim; an integration test with two | ||
| publish components on one connection whose grants sum to at most the estimate | ||
| and rank by priority; a test that an idle track claims nothing. | ||
|
|
||
| Branch from `dev`, where the shared connection and `forward.ts` live. | ||
|
|
||
| ## Closes | ||
|
|
||
| - [#2709](https://github.com/moq-dev/moq/issues/2709) - close this issue when the quest finishes | ||
|
|
||
| ## Related | ||
|
|
||
| - [#2848](/quest/m1/2848-follow-the-bandwidth-grant-in-moq-audio-instead-of.md) - audio following its grant, the Rust half | ||
| - [#2859](/quest/m1/2859-passthrough-imports-reserve-no-bandwidth-so-a-co-resident.md) - passthrough imports reserving nothing | ||
| - [#2857](/quest/m1/2857-bindings-cant-reach-encoder-rate-control-so-every-non.md) - the same gap for the native bindings | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,50 @@ | ||
| # [S] moq-tokio does not compile with --no-default-features, and workspace feature unification hides it | ||
| # [M] moq-tokio: compile with any subset of transport features | ||
|
|
||
| ## Goal | ||
|
|
||
| Implement and verify the behavior tracked in [#2979](https://github.com/moq-dev/moq/issues/2979) | ||
| within the issue's stated scope and boundaries. | ||
| `cargo check -p moq-tokio --no-default-features` and every single-feature | ||
| build compile. A crate with no transport at all builds into something that | ||
| cannot connect; a `tcp` / `uds`-only build serves qmux. `moq-relay`, | ||
| `moq-cli`, `moq-bench`, and `moq-boy` compile with their own | ||
| `--no-default-features`. Nightly proves all of it per crate, so workspace | ||
| feature unification can never hide a break again. | ||
|
|
||
| ## Plan | ||
|
|
||
| Use the public issue's scope, implementation notes, and acceptance criteria | ||
| below as the starting plan. Reconcile paths and assumptions with the current | ||
| tree before implementation. | ||
|
|
||
| ### Issue context | ||
|
|
||
| `cargo check -p moq-tokio --no-default-features` fails on `dev`. Found while reviewing #2977; the breakage predates #2921. | ||
|
|
||
| #### Errors | ||
|
|
||
| At `ca2fd504f` (before #2921 merged), 4 errors: | ||
|
|
||
| - 2x `E0004: non-exhaustive patterns: type &RequestKind is non-empty` (all variants cfg'd out by the missing backend features, so the remaining matches don't compile) | ||
| - 2x `E0282: type annotations needed` | ||
|
|
||
| `#2921` added a 5th: `E0433: cannot find util in crate` from `worker.rs`, which calls `crate::util::resolve` while `mod util` is gated on `any(noq, quinn, quiche)`. `worker::Workers::bind` now also references the equally-gated `crate::server::DEFAULT_BIND` (#2977), deepening the same dependency rather than introducing it. | ||
|
|
||
| #### Why CI never sees it | ||
|
|
||
| Nightly `just rs features` runs `--no-default-features` across the workspace, and cargo unifies features per crate: `moq-relay` (and everything else) depends on `moq-tokio` with a backend enabled, so `moq-tokio` never actually compiles with zero features in a workspace build. Only a `-p moq-tokio --no-default-features` invocation, or an external consumer with `default-features = false` and no backend feature, hits it. | ||
|
|
||
| #### Options | ||
|
|
||
| - Decide the backend-less configuration is unsupported and enforce it: `compile_error!` when no QUIC backend feature is enabled (a tcp/uds-only build would need its own thought), which turns 5 confusing errors into 1 honest one. | ||
| - Or make it compile: ungate `util`/`DEFAULT_BIND` (both are dependency-free), gate `worker`/`steer` on a backend, and fix the pre-existing `RequestKind` matches. | ||
|
|
||
| The first is less work and matches reality: `worker`, `steer`, and `server` all assume a backend exists. | ||
| Decided: make it compile rather than `compile_error!`. `dev` already gates | ||
| `server`, `worker`, and `util` on a transport, hands `QuicBackend` an empty | ||
| choice list without a QUIC feature, and treats tcp-only as a real | ||
| configuration, so refusing the backend-less build would contradict the gates | ||
| the crate ships. The existing `compile_error!` for a rustls backend without a | ||
| crypto provider stays. | ||
|
|
||
| What breaks today, measured on the pre-rename crate: | ||
|
|
||
| - Zero features: four errors, all from `RequestKind` in `src/server.rs`. | ||
| Every variant is feature-gated, so the `request_ref!` / `request_into!` / | ||
| `request_map!` matches become non-exhaustive over an empty, still-inhabited | ||
| enum. Fix the macros to expand to an uninhabited match (`match *self {}`) | ||
| when no variant exists, or give the enum a gated never-variant. | ||
| - `tcp`-only relay and cli: `tls::Server::server_config` is gated on a QUIC | ||
| backend but called unconditionally. Split the gate so only the QUIC-specific | ||
| parts of `tls::Server` need a backend. | ||
| - The `steer` module the issue names no longer exists; `worker` and `util` | ||
| already share one gate on `dev`. | ||
|
|
||
| Why nightly is green: `just rs features` runs `--workspace | ||
| --no-default-features`, and `moq-rtmp`'s dev-dependency enables | ||
| `moq-tokio/quinn` (so its RTMPS test can borrow the self-signed cert helper, | ||
| which needs `tls::Server`). Unification hands every crate a backend. Once | ||
| `tls` compiles without one, drop that pin, keeping `aws-lc-rs`. | ||
|
|
||
| Even then relay and cli unify `tcp` and `aws-lc-rs` into `moq-tokio`, so add | ||
| per-crate coverage to `just rs features`: `cargo hack check -p moq-tokio | ||
| --each-feature --no-dev-deps --locked`, plus `cargo check -p <crate> | ||
|
Comment on lines
+41
to
+42
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
cargo hack --version
cargo hack check -p moq-tokio --each-feature --no-dev-deps --locked --print-command-list
cargo hack check -p moq-tokio --feature-powerset --no-dev-deps --locked --print-command-listRepository: moq-dev/moq Length of output: 799 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- repository conventions ---'
find /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- target file ---'
cat -n quest/m1/2979-moq-tokio-does-not-compile-with-no-default-features-and.md | sed -n '1,70p'
printf '%s\n' '--- cargo-hack references ---'
rg -n --hidden -g '!target' -g '!node_modules' 'cargo[- ]hack|feature-powerset|each-feature|moq-tokio' .Repository: moq-dev/moq Length of output: 16495 🌐 Web query:
💡 Result: In cargo-hack, the --each-feature and --feature-powerset flags define different strategies for iterating over a crate's feature sets to verify compilation and testing [1][2]. --each-feature This flag performs the specified cargo command for each individual feature of the package in isolation [1][2]. It includes: - A run with no features enabled (--no-default-features) [1][3]. - A run for each individual feature, including default features [1][2]. - A run with all features enabled (--all-features), provided that no features are excluded via --exclude-features or --skip [1][3]. --feature-powerset This flag performs the command for the entire "power set" (all possible combinations) of the package's features [1][2]. This is significantly more thorough than --each-feature but grows exponentially (2^n combinations for n features) [2]. It includes: - A run with no features enabled (--no-default-features) [1][3]. - A run for all possible combinations of features [2]. - A run with all features enabled (--all-features), subject to the same conditions regarding exclusions as --each-feature [1][3]. When multiple features are present, --feature-powerset is often used with the --depth flag to limit the maximum number of features enabled in a single combination, which helps manage the exponential growth of test cases [1][2]. Both flags implicitly handle the --no-default-features and --all-features states to ensure comprehensive coverage, but they can be further controlled using --exclude-features (or --skip) to omit specific features or meta-combinations from the execution [1][3]. Citations:
🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- quest convention ---'
cat /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a/conventions/quest.md
printf '%s\n' '--- candidate Cargo.toml files ---'
fd -H -t f 'Cargo.toml' .
printf '%s\n' '--- moq-tokio feature declarations ---'
while IFS= read -r f; do
if rg -q '^\[features\]|^name\s*=\s*"moq-tokio"' "$f"; then
printf '\n--- %s ---\n' "$f"
rg -n -A30 -B3 '^\[features\]|^name\s*=\s*"moq-tokio"' "$f"
fi
done < <(fd -H -t f 'Cargo.toml' .)Repository: moq-dev/moq Length of output: 1434 Cover feature combinations in the validation command.
🤖 Prompt for AI AgentsSource: MCP tools |
||
| --no-default-features` for `moq-relay`, `moq-cli`, `moq-bench`, and | ||
| `moq-boy`. Add `cargo-hack` to the Nix dev shell next to `cargo-deny`; if it | ||
| must be installed in CI, pin the version, since `--locked` alone does not. | ||
|
|
||
| Branch from `dev`: the crate exists only there. | ||
|
|
||
| ## Closes | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,64 +1,58 @@ | ||
| # [L] Align origin broadcast creation naming across language bindings | ||
| # [M] Bindings: create_broadcast, set_announce, and announce mean the same thing everywhere | ||
|
|
||
| ## Goal | ||
|
|
||
| Implement and verify the behavior tracked in [#3190](https://github.com/moq-dev/moq/issues/3190) | ||
| within the issue's stated scope and boundaries. | ||
| Every native binding exposes the announce surface the Rust model settled on, | ||
| with one meaning per name: | ||
|
|
||
| ## Plan | ||
|
|
||
| Use the public issue's scope, implementation notes, and acceptance criteria | ||
| below as the starting plan. Reconcile paths and assumptions with the current | ||
| tree before implementation. | ||
|
|
||
| ### After prefix routes | ||
|
|
||
| This is now a semantics divergence, not only a naming one. | ||
| [moq#3225](https://github.com/moq-dev/moq/pull/3225) made Rust's | ||
| `origin::Producer::create_broadcast` stop announcing, while the FFI's | ||
| `create_broadcast` still announces the exact path on the caller's behalf (it | ||
| calls `announce(path, Default::default())` and hands back the guard), so | ||
| wrappers keep announcing by convention. Two surfaces now share one name and do | ||
| different things. | ||
|
|
||
| Settle that before the rename: either the FFI's auto-announce becomes explicit | ||
| in the wrappers too, or the fused operation keeps a distinct name of its own. | ||
| Renaming both to `create_broadcast` without deciding hides the difference behind | ||
| matching spelling, which is worse than the inconsistency it fixes. | ||
|
|
||
| ### Issue context | ||
|
|
||
| #### Problem | ||
|
|
||
| The operation that allocates and owns a new broadcast has different names across public surfaces: | ||
|
|
||
| - Rust FFI uses [`create_broadcast`](https://github.com/moq-dev/moq/blob/7494084aaf7e2fa6abe553ac83101ac4ef19f33a/rs/moq-ffi/src/origin.rs#L251-L267) | ||
| - Python, Swift, and Go expose `create_broadcast` or `CreateBroadcast`, for example [Go](https://github.com/moq-dev/moq/blob/7494084aaf7e2fa6abe553ac83101ac4ef19f33a/go/wrapper/origin.go#L38-L51) | ||
| - TypeScript uses [`publish(path)`](https://github.com/moq-dev/moq/blob/7494084aaf7e2fa6abe553ac83101ac4ef19f33a/js/net/src/origin.ts#L106-L107) | ||
| - C uses [`moq_origin_publish`](https://github.com/moq-dev/moq/blob/7494084aaf7e2fa6abe553ac83101ac4ef19f33a/rs/libmoq/src/api.rs#L1102-L1123) | ||
| - `create_broadcast` (Python, Rust) / `createBroadcast` (Swift, Kotlin) / | ||
| `CreateBroadcast` (Go) / `moq_origin_create_broadcast` (C) creates an | ||
| unadvertised broadcast. | ||
| - `set_announce(bool)` on the broadcast producer flips its exact-path advert. | ||
| - `announce(prefix, route)` returns the handle that advertises and serves | ||
| requests beneath the prefix. | ||
|
|
||
| `publish` suggests announcement or transmission. The operation actually creates a broadcast, while announcement visibility is controlled separately through `setAnnounce` or its equivalent. | ||
| No binding announces on the caller's behalf any more. | ||
|
Comment on lines
+11
to
+15
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift Define one producer-teardown contract for all bindings.
Specify whether 🤖 Prompt for AI Agents |
||
|
|
||
| Issue #1073 changes Origin lifecycle but explicitly leaves naming outside its scope. | ||
|
|
||
| #### Proposed direction | ||
|
|
||
| Use the role-accurate creation verb consistently: | ||
|
|
||
| - Rust and Python: `create_broadcast` | ||
| - TypeScript, Swift, and Kotlin: `createBroadcast` | ||
| - Go: `CreateBroadcast` | ||
| - C: `moq_origin_create_broadcast` | ||
|
|
||
| If compatibility aliases are retained, keep deprecated names hidden from user-facing documentation according to the repository deprecation policy. | ||
|
|
||
| #### Acceptance criteria | ||
| ## Plan | ||
|
|
||
| - Every language uses its idiomatic spelling of the same `create broadcast` operation. | ||
| - Announcement APIs retain separate announce terminology. | ||
| - Examples and generated documentation use only the canonical name. | ||
| - Breaking renames target `dev`. | ||
| Today `rs/moq-ffi`'s `create_broadcast` calls `announce(path, ..)` internally | ||
| and stores the guard, so Python, Swift, Kotlin, Go, and C all inherit an | ||
| auto-announce that Rust does not have, while `MoqOriginDynamic` is a separate | ||
| type from `MoqAnnounce`. Two surfaces share a name and differ; that is what | ||
| the rename must not paper over. | ||
|
|
||
| - moq-ffi: `MoqOriginProducer::create_broadcast(path)` stops announcing. | ||
| `MoqBroadcastProducer::set_announce(bool)` stays as the flip, now defaulting | ||
| to `false`. `MoqAnnounce` gains the request queue (`requested()` yielding | ||
| `MoqBroadcastRequest` with accept and reject) and `MoqOriginDynamic` is | ||
| deleted. | ||
| - libmoq: hard rename `moq_origin_publish` to `moq_origin_create_broadcast` | ||
| with no alias, `moq_publish_set_announce` kept, and announce/request | ||
| accessors mirroring the FFI. Regenerate `moq.h`; update `cpp/obs/src` and | ||
| the `cpp/obs/test` stub that declares the old symbol. | ||
|
Comment on lines
+30
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This plan transfers the C request-serving API into #3190, but AGENTS.md reference: quest/AGENTS.md:L93-L94 Useful? React with 👍 / 👎. |
||
| - Wrappers: `py/moq-rs`, `swift`, `kt`, and `go/wrapper` (flat on `dev`) | ||
| adopt the three verbs and drop any create-and-announce convenience. | ||
| `dart/` exists only on `main`, so it has its own quest gated on the merge. | ||
| - Docs: `doc/lib/{py,swift,kt,go,c}`, including the `doc/lib/py/moq-rs.md` | ||
| sentence that says `create_broadcast` creates an announced broadcast. | ||
|
Comment on lines
+37
to
+38
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Update the inline Python API documentation.
Include the wrapper docstring in this migration, not only 🤖 Prompt for AI Agents |
||
|
|
||
| Tests: each wrapper covers create, populate, `set_announce(true)`, visible in | ||
| `announced`; and `announce(prefix)` serving a request. Run `just test | ||
| smoke-full` since the FFI surface changed. | ||
|
|
||
| Branch from `dev`: every rename is breaking. | ||
|
|
||
| ## Required | ||
|
|
||
| - [Announce handle](/quest/m1/announce-handle.md) - the Rust surface these bindings mirror | ||
|
|
||
| ## Closes | ||
|
|
||
| - [#3190](https://github.com/moq-dev/moq/issues/3190) - close this issue when the quest finishes | ||
|
|
||
| ## Related | ||
|
|
||
| - [#2152](/quest/m1/2152-libmoq-c-abi-catch-up-with-the-moq-ffi-surface.md) - the rest of the C ABI catch-up | ||
| - [JS announce](/quest/m1/js-announce.md) - the same alignment for js/net | ||
| - [Dart announce](/quest/m1/dart-announce.md) - the Dart wrapper, once `dev` merges | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Align the Goal with the stated audio scope.
The Goal says each publisher's encoder targets its own share. The later plan says only video consumes its grant, while audio following its grant remains out of scope. Narrow the Goal to video encoders, or include audio grant-following in this quest.
🤖 Prompt for AI Agents