From fbd443d168cbffecbd2ca29b19cfdcb883357af7 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Tue, 10 Nov 2026 17:58:58 -0800 Subject: [PATCH] fix(audio-quality): the congestion shaper profile ships as a moq-shaper builtin test/audio-quality/congestion.toml sat where moq-relay's repository_configs_load test reads every tracked TOML as a relay config, so main failed on its unknown `down` field. Shaper profiles live in rs/moq-shaper/profiles/, so it moves there and run.sh passes it by name like bursty and step. Co-Authored-By: Claude Opus 5.5 --- rs/moq-shaper/README.md | 3 ++- {test/audio-quality => rs/moq-shaper/profiles}/congestion.toml | 0 rs/moq-shaper/src/preset.rs | 1 + test/audio-quality/README.md | 3 +-- test/audio-quality/run.sh | 3 +-- 5 files changed, 5 insertions(+), 5 deletions(-) rename {test/audio-quality => rs/moq-shaper/profiles}/congestion.toml (100%) diff --git a/rs/moq-shaper/README.md b/rs/moq-shaper/README.md index 6a746bf0790..d7205e77329 100644 --- a/rs/moq-shaper/README.md +++ b/rs/moq-shaper/README.md @@ -148,7 +148,7 @@ delay = "5ms" ``` `--profile` takes a file's path, or one of the built-ins in `profiles/`, embedded in the binary. The -audio-quality lane (`test/audio-quality/`) uses `bursty` and `step`, plus its own flag profiles. +audio-quality lane (`test/audio-quality/`) uses `bursty`, `step`, and `congestion`, plus its own flag profiles. | Name | What it models | | --- | --- | @@ -159,6 +159,7 @@ audio-quality lane (`test/audio-quality/`) uses `bursty` and `step`, plus its ow | `cellular-step` | A 2 Mbit/s uplink behind a 500ms queue that drops to 500 kbit/s at 10s and recovers at 20s. | | `cellular-bursty` | A 2 Mbit/s uplink released in scheduler grants of five datagrams or 20ms, at 1 Mbit/s from 10s to 20s. | | `cellular-deep` | A 1 Mbit/s uplink behind a 2s queue that drops to 300 kbit/s at 10s and recovers at 20s. | +| `congestion` | A 1 Mbit/s downlink behind a 1s queue that collapses to 16 kbit/s at 25s and recovers at 26.5s. | Each built-in is a shared path, as a browser page's sessions on one host would be. The `cellular-*` ones shape only the uplink and keep a plain delay on the way back, so the acknowledgments are not impaired. diff --git a/test/audio-quality/congestion.toml b/rs/moq-shaper/profiles/congestion.toml similarity index 100% rename from test/audio-quality/congestion.toml rename to rs/moq-shaper/profiles/congestion.toml diff --git a/rs/moq-shaper/src/preset.rs b/rs/moq-shaper/src/preset.rs index 0952fda6fca..5e6332cb94d 100644 --- a/rs/moq-shaper/src/preset.rs +++ b/rs/moq-shaper/src/preset.rs @@ -14,6 +14,7 @@ const BUILTIN: &[(&str, &str)] = &[ ("cellular-step", include_str!("../profiles/cellular-step.toml")), ("cellular-bursty", include_str!("../profiles/cellular-bursty.toml")), ("cellular-deep", include_str!("../profiles/cellular-deep.toml")), + ("congestion", include_str!("../profiles/congestion.toml")), ]; /// A named, seeded treatment of both directions, loaded from a TOML profile. diff --git a/test/audio-quality/README.md b/test/audio-quality/README.md index 31e2595447e..d198c0d7baf 100644 --- a/test/audio-quality/README.md +++ b/test/audio-quality/README.md @@ -50,7 +50,7 @@ response would make a failure hard to attribute. The `mild` and `wide` profiles shaper startup, before the page connects; the driver gives up on a row with no audio 20 s in, so the measured window starts before the step, and `--duration` must exceed 30 s so playback spans it. -`congestion` ([`congestion.toml`](congestion.toml)) is a queue that fills until it drops, as a +`congestion` ([`congestion.toml`](../../rs/moq-shaper/profiles/congestion.toml)) is a queue that fills until it drops, as a congested link's does, rather than random loss. The tone needs about 140 kbit/s, so for a second and a half the queue holds its full second of wait and drops the rest, longer than any row's target. When the rate returns, the transport delivers the backlog, the queue's and every retransmit. The @@ -388,7 +388,6 @@ run.sh builds, starts the relay and publishers, runs each row be ../lib/pulse.py the native rows' private PulseAudio null sink record.sh records traces/, by hand relay.toml anonymous relay, self-signed cert -congestion.toml the congestion profile's shaper treatment budgets.json a ceiling per metric per row traces/ recorded arrivals, one replay profile each clients/js/ diff --git a/test/audio-quality/run.sh b/test/audio-quality/run.sh index 6fd28fcc849..59c5845146f 100755 --- a/test/audio-quality/run.sh +++ b/test/audio-quality/run.sh @@ -178,8 +178,7 @@ shaper_of() { near-zero | fixed-250) ;; mild) echo "--delay 5ms --jitter 5ms --jitter-model gaussian --shared" ;; wide) echo "--delay 40ms --jitter 40ms --jitter-model gaussian --shared" ;; - bursty | step) echo "--profile $1" ;; - congestion) echo "--profile $AQ_DIR/congestion.toml" ;; + bursty | step | congestion) echo "--profile $1" ;; esac }