Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ The rename/removal rationale lives in the commit message and PR description, not

## Retries

Fail fast; retry only what a few seconds can fix. Every retry loop uses capped exponential backoff with jitter, inlined at the call site (no shared `Backoff` type), and is bounded by *time*, not by error type: a short budget (~10s), then surface the last real error. Don't classify errors as retryable (`is_retryable()`); an ephemeral failure is one that clears within the budget, so the budget is the classifier. The one exception is an answer a peer actually sent, where the protocol defines the meaning: an HTTP status short-circuits (a `404` fails immediately; `408`/`429`/gateway statuses ride the backoff) via the `status()` accessors on `moq_native::Error` / `moq_hls::Error`. The only unbounded loops are process-lifetime supervisors with nobody to return an error to (cluster peers, device reopen, accept loops); they retry forever but cap the delay at seconds and warn per attempt, loudly broken rather than silently parked. Exactly one layer owns a retry: an outer loop that rebuilds an inner one resets its escalation, so watch the inner loop's terminal signal instead.
Retry only operations that are safe to repeat and whose failure may clear without caller action. Use capped exponential backoff with jitter and normally stop after a short time or attempt budget, returning the last real error. Retry indefinitely only in process-lifetime supervisors waiting for external state; cap the delay and report failures.

Use explicit protocol semantics to fail early when available, such as authentication rejection or a non-retryable HTTP status. Avoid broad `is_retryable()` classifications for opaque failures. Exactly one layer owns each retry sequence: callers must observe its terminal result rather than recreate it and reset its budget.

## Root Cause First

Expand Down
40 changes: 20 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ kio = { version = "0.5", path = "rs/kio" }
# Permutation testing for the kio primitives (and everything built on them).
# Only compiled under `--cfg loom`; see `just rs loom`.
loom = { version = "0.7.2", features = ["futures"] }
moq-audio = { version = "0.0.15", path = "rs/moq-audio" }
moq-audio = { version = "0.0.16", path = "rs/moq-audio" }
moq-flate = { version = "0.1.1", path = "rs/moq-flate" }
moq-hls = { version = "0.4.5", path = "rs/moq-hls", default-features = false }
moq-hls = { version = "0.4.6", path = "rs/moq-hls", default-features = false }
moq-json = { version = "0.3.3", path = "rs/moq-json" }
moq-loc = { version = "0.2", path = "rs/moq-loc" }
moq-msf = { version = "0.4", path = "rs/moq-msf" }
Expand All @@ -92,8 +92,8 @@ moq-net = { version = "0.2", path = "rs/moq-net" }
# driver at runtime. Compiles on any platform (macOS included) but only actually
# used by moq-video on Linux.
moq-nvenc = { version = "0.0.3", path = "rs/moq-nvenc" }
moq-rtc = { version = "0.2.2", path = "rs/moq-rtc" }
moq-rtmp = { version = "0.2.3", path = "rs/moq-rtmp" }
moq-rtc = { version = "0.2.3", path = "rs/moq-rtc" }
moq-rtmp = { version = "0.2.4", path = "rs/moq-rtmp" }
moq-srt = { version = "0.2.3", path = "rs/moq-srt" }
moq-stats = { version = "0.1.4", path = "rs/moq-stats" }
moq-token = { version = "0.7", path = "rs/moq-token" }
Expand All @@ -103,11 +103,11 @@ moq-token-cli = { version = "0.5", path = "rs/moq-token-cli" }
# can leave them off to drop the CUDA dependencies. Both crates still default
# them on when depended on directly. VAAPI is opt-in everywhere, since that
# backend has never been validated on real hardware.
moq-transcode = { version = "0.0.7", path = "rs/moq-transcode", default-features = false }
moq-transcode = { version = "0.0.8", path = "rs/moq-transcode", default-features = false }
# Standalone crate (moq-dev/vaapi); vendored from cros-libva + cros-codecs.
# dlopen's libva at runtime (no libva-dev at build, no NEEDED libva in the binary).
moq-vaapi = "0.0.3"
moq-video = { version = "0.0.13", path = "rs/moq-video", default-features = false }
moq-video = { version = "0.0.14", path = "rs/moq-video", default-features = false }
percent-encoding = "2"
qmux = { version = "0.4.0", default-features = false }
serde = { version = "1", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion js/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Plain custom elements built directly on `@moq/signals`, no framework (except moq

## Conventions

- **Retry loops inline their backoff** (root Retries has the policy). Escalate a local delay toward a `max`, jitter each wait (`delay * (0.5 + Math.random() / 2)`), and hand it to `effect.timer`; a short time or attempt budget stops the loop, never a classification of the thrown value.
- **Retry loops use capped backoff with jitter** (root Retries has the policy). For a local loop, escalate a delay toward a `max`, jitter each wait (`delay * (0.5 + Math.random() / 2)`), and hand it to `effect.timer`. Reuse an existing operation-specific retry abstraction when one owns the sequence already.
- **Avoid callback parameters.** A function taking a `fn`/`create`/`onXxx` to invoke later reads poorly and hides control flow. Prefer returning a value the caller acts on, exposing a method or getter, or splitting into a couple of small calls the caller sequences itself (e.g. a cache `get()` then `insert(value)`, not `getOrCreate(key, () => value)`). Reserve callbacks for genuine event/subscription sinks where there is no alternative (`effect.subscribe`, DOM listeners, `Signal` subscriptions).
- ESM only (`"type": "module"`). Relative imports include the `.ts`/`.tsx` extension in the lower-level packages (`net`, `signals`, `hang`); `rewriteRelativeImportExtensions` in `tsconfig.json` rewrites them to `.js` on build. Some higher-level packages (watch/publish) still omit extensions, so match the file you are editing.
- Document every exported symbol and add a top-of-file `@module` doc block to each entrypoint (root convention; the published JSR/`.d.ts` docs render these). Use `@public` on the load-bearing classes.
Expand Down
2 changes: 1 addition & 1 deletion rs/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Negotiation: `version::NEGOTIATED` lists SETUP-negotiated versions in preference

## Rust conventions

- **Retry loops inline their backoff** (root Retries has the policy). Escalate a local `Duration` toward a `const MAX` (seconds, not minutes), jitter each wait (`delay.mul_f64(0.5 + rand::rng().random::<f64>() / 2.0)`), and track the give-up deadline as a `tokio::time::Instant` next to the delay. No shared backoff helper, and no `is_retryable()` on error types; the one thing worth reading off a failure is a status a peer actually sent, via the `status()` accessors on `moq_native::Error` / `moq_hls::Error`.
- **Retry loops use capped backoff with jitter** (root Retries has the policy). For a local loop, escalate a `Duration` toward a `const MAX`, jitter each wait (`delay.mul_f64(0.5 + rand::rng().random::<f64>() / 2.0)`), and keep its budget next to the delay. Reuse an existing operation-specific retry abstraction when one owns the sequence already.
- **Prefer `kio` over tokio sync primitives**: reach for `kio::Producer`/`Consumer` (and the `poll_*` plumbing) instead of `tokio::sync` channels or `watch`. A `tokio::sync::watch` (or a channel) carrying a single value is a code smell. `kio` ties into the runtime-free `poll_*` model and avoids a hard runtime dependency.
- **Errors**: `thiserror` with `#[from]` for libraries, `anyhow` (with `.context("...")`, not `.map_err(|_| anyhow!())`) for binaries. Always `#[non_exhaustive]` on public error enums (e.g. `moq-net/src/error.rs`, `moq-ffi/src/error.rs`, `moq-loc/src/lib.rs`). Use `#[error(transparent)]` + `#[from]` for wrapped foreign errors (see `moq-token/src/error.rs`).
- **Config + TOML merge**: any `#[arg]` field on a TOML-loadable config must be `Option<T>`, never a bare `bool`/`String`/etc. The TOML->CLI merge re-applies clap defaults and silently clobbers TOML values for bare fields. See `moq-relay/src/config.rs` and its regression tests (`cli_does_not_clobber_toml_*`); add such a test for any new flag.
Expand Down
6 changes: 6 additions & 0 deletions rs/hang/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.20.4](https://github.com/moq-dev/moq/compare/hang-v0.20.3...hang-v0.20.4) - 2026-08-06

### Added

- *(hang)* declare a configurable 30s retention on media tracks, and fix relayed cache misses ([#2615](https://github.com/moq-dev/moq/pull/2615))

## [0.20.3](https://github.com/moq-dev/moq/compare/hang-v0.20.2...hang-v0.20.3) - 2026-08-05

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion rs/hang/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Luke Curley <kixelated@gmail.com>"]
repository = "https://github.com/moq-dev/moq"
license = "MIT OR Apache-2.0"

version = "0.20.3"
version = "0.20.4"
edition = "2024"
rust-version.workspace = true

Expand Down
8 changes: 8 additions & 0 deletions rs/libmoq/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.5.5](https://github.com/moq-dev/moq/compare/libmoq-v0.5.4...libmoq-v0.5.5) - 2026-08-06

### Fixed

- *(libmoq)* stop holding the global locks across a video encode ([#2663](https://github.com/moq-dev/moq/pull/2663))
- *(libmoq)* fix the generated CMake package config for Windows and installs ([#2671](https://github.com/moq-dev/moq/pull/2671))
- *(libmoq)* unbreak the Linux C link list, and make VAAPI opt-in ([#2669](https://github.com/moq-dev/moq/pull/2669))

## [0.5.4](https://github.com/moq-dev/moq/compare/libmoq-v0.5.3...libmoq-v0.5.4) - 2026-08-05

### Added
Expand Down
2 changes: 1 addition & 1 deletion rs/libmoq/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Luke Curley <kixelated@gmail.com>", "Brian Medley <bpm@bmedley.org>"
repository = "https://github.com/moq-dev/moq"
license = "MIT OR Apache-2.0"

version = "0.5.4"
version = "0.5.5"
edition = "2024"
rust-version.workspace = true

Expand Down
7 changes: 7 additions & 0 deletions rs/moq-audio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.16](https://github.com/moq-dev/moq/compare/moq-audio-v0.0.15...moq-audio-v0.0.16) - 2026-08-06

### Added

- *(hang)* declare a configurable 30s retention on media tracks, and fix relayed cache misses ([#2615](https://github.com/moq-dev/moq/pull/2615))
- fail-fast retries: jittered backoff bounded by time, not error type ([#2647](https://github.com/moq-dev/moq/pull/2647))

## [0.0.15](https://github.com/moq-dev/moq/compare/moq-audio-v0.0.14...moq-audio-v0.0.15) - 2026-07-29

### Added
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-audio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Luke Curley <kixelated@gmail.com>"]
repository = "https://github.com/moq-dev/moq"
license = "MIT OR Apache-2.0"

version = "0.0.15"
version = "0.0.16"
edition = "2024"
rust-version.workspace = true

Expand Down
6 changes: 6 additions & 0 deletions rs/moq-boy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.5](https://github.com/moq-dev/moq/compare/moq-boy-v0.4.4...moq-boy-v0.4.5) - 2026-08-06

### Fixed

- *(libmoq)* unbreak the Linux C link list, and make VAAPI opt-in ([#2669](https://github.com/moq-dev/moq/pull/2669))

## [0.4.4](https://github.com/moq-dev/moq/compare/moq-boy-v0.4.3...moq-boy-v0.4.4) - 2026-08-05

### Other
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-boy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
keywords = ["moq", "gameboy", "streaming", "emulator", "live"]
categories = ["multimedia::video", "emulators", "network-programming"]

version = "0.4.4"
version = "0.4.5"
edition = "2024"
rust-version.workspace = true

Expand Down
10 changes: 10 additions & 0 deletions rs/moq-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.9.8](https://github.com/moq-dev/moq/compare/moq-cli-v0.9.7...moq-cli-v0.9.8) - 2026-08-06

### Added

- *(hang)* declare a configurable 30s retention on media tracks, and fix relayed cache misses ([#2615](https://github.com/moq-dev/moq/pull/2615))

### Fixed

- *(libmoq)* unbreak the Linux C link list, and make VAAPI opt-in ([#2669](https://github.com/moq-dev/moq/pull/2669))

## [0.9.7](https://github.com/moq-dev/moq/compare/moq-cli-v0.9.6...moq-cli-v0.9.7) - 2026-08-05

### Added
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Luke Curley <kixelated@gmail.com>"]
repository = "https://github.com/moq-dev/moq"
license = "MIT OR Apache-2.0"

version = "0.9.7"
version = "0.9.8"
edition = "2024"
rust-version.workspace = true

Expand Down
6 changes: 6 additions & 0 deletions rs/moq-ffi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.8](https://github.com/moq-dev/moq/compare/moq-ffi-v0.3.7...moq-ffi-v0.3.8) - 2026-08-06

### Fixed

- *(libmoq)* unbreak the Linux C link list, and make VAAPI opt-in ([#2669](https://github.com/moq-dev/moq/pull/2669))

## [0.3.7](https://github.com/moq-dev/moq/compare/moq-ffi-v0.3.6...moq-ffi-v0.3.7) - 2026-08-05

### Added
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Luke Curley <kixelated@gmail.com>", "Brian Medley <bpm@bmedley.org>"
repository = "https://github.com/moq-dev/moq"
license = "MIT OR Apache-2.0"

version = "0.3.7"
version = "0.3.8"
edition = "2024"

keywords = ["quic", "http3", "webtransport", "media", "live"]
Expand Down
6 changes: 6 additions & 0 deletions rs/moq-gst/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.4](https://github.com/moq-dev/moq/compare/moq-gst-v0.3.3...moq-gst-v0.3.4) - 2026-08-06

### Added

- fail-fast retries: jittered backoff bounded by time, not error type ([#2647](https://github.com/moq-dev/moq/pull/2647))

## [0.3.3](https://github.com/moq-dev/moq/compare/moq-gst-v0.3.2...moq-gst-v0.3.3) - 2026-07-25

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-gst/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Luke Curley"]
repository = "https://github.com/kixelated/moq"
license = "MIT OR Apache-2.0"

version = "0.3.3"
version = "0.3.4"
edition = "2024"
rust-version.workspace = true
publish = true
Expand Down
Loading
Loading