Skip to content
1 change: 1 addition & 0 deletions quest/m0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ edge, which embeds moq-relay; it moved there on 2026-09-28.
- [Benchmark sessions can't overlap on a host](/quest/m0/bench-host-lock.md) - a host-level lock keeps a second benchmark or profile session from measuring under the first's load
- [A waiter's record limit changes no behavior](/quest/m0/kio-waiter-records.md) - two moq-net tests stop failing when kio's waiters remember 16 lists, and the limit becomes a tuning knob worth 3.9% per delivered group
- [Backport the relay and auth hardening to release](/quest/m0/backport-release-hardening.md) - `release`'s relay refuses dot-segment paths, serves its HTTP routes with main's response hardening, and withdraws advertisements a peer starves of send credit; its auth client refuses redirects
- [Agent build output can't fill the desktop's disk](/quest/m0/agent-disk-budget.md) - finished agent checkouts reclaim their mbx targets automatically, so parallel agent builds stop filling the root disk
- [HLS lists contributions](/quest/m0/hls-contributions.md) - an HLS master lists each catalog contribution's renditions, and a contribution's media is subscribed only while players fetch it
- [@moq/net passes qmux stream limits through](/quest/m0/qmux-stream-limits.md) - Node and WebSocket JS clients stop failing near 100 live tracks
56 changes: 56 additions & 0 deletions quest/m0/agent-disk-budget.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# [S] Agent build output can't fill the desktop's disk

## Goal

The desktop host's agent checkouts reclaim their own build output, so parallel
agent builds don't fill the root disk and nobody has to run `mbx clean` by
hand. Done when a finished T3 or Claude Code checkout's managed target is
reclaimed automatically, without touching a checkout whose owner is still
using its outputs, and the PR records the free space over a busy day of
parallel agents.

## Plan

Planned 2026-11-04 with the maintainer, after the desktop's root disk filled
three times on 2026-11-04: to 244 MB, then twice to 5-14 GB while ten iterate
agents ran. Each time a human-run cleanup (`mbx gc`, `mbx clean`, worktree
removal, nix gc) freed the space.

What holds the space (measured 2026-11-04):

- `~/.cache/mbx/targets` held 430 GiB of managed targets for about 420
checkouts, with single checkouts at 10-43 GiB. `mbx cache projects` attributes
nearly all of it to `~/worktrees/moq/t3-*` T3 thread worktrees, about 740 of
which existed. Cleaning the targets of those idle over six hours freed about
150 GiB.
- The dotfiles `mbx/config.toml` sets `target.keep = ["/"]` and
`gc.min_free_size = "none"` on purpose (see dotfiles `docs/mbx.md`): a target
is kept while its checkout exists, because directly launched binaries hold no
mbx lease. So a target is only reclaimed when its checkout is removed.
- Dotfiles' `worktree-clean.service` removes finished checkouts, but it runs
only when started by hand and scans `~/work`, `~/.codex/worktrees`,
`~/.worktrees` and `/tmp`, not `~/worktrees`, where T3 creates its checkouts.
Most T3 worktrees there sit at a base commit or an unmerged branch, so even
the merged-PR rule finds few: on 2026-11-04 only 2 of 742 were at a merged PR
head.
- `docs/mbx.md` points quest repositories at `quest worktree` to reclaim
finished checkouts. It already keeps a per-user disk budget (`quest worktree
capacity`), runs commands supervised so it knows when a checkout's processes
stop, and removes a finished checkout without forcing. It manages the
checkouts it creates under `.worktrees/`: T3's bypass it, while Claude
Code's already go through `.claude/settings.json`'s `WorktreeCreate` and
`WorktreeRemove` hooks. Trace where finished Claude Code checkouts (such
as the 139 under `~/work/moq/.claude/worktrees` on 2026-11-04) leave their
targets before adding another cleaner; T3's need a new path either way.

The work lands mostly in [kixelated/dotfiles](https://github.com/kixelated/dotfiles)
(cleaner scope, a schedule, mbx retention), and possibly in how T3 retires
thread worktrees. Weigh routing T3's checkouts through `quest worktree`
against extending the dotfiles cleaner. Keep the retention guarantee `docs/mbx.md` gives: never
reclaim a target whose owner is still using it. Find the signal that a T3 or
Claude Code checkout is finished (its thread or task ended, its PR merged or
closed, no process using it) and reclaim on that, rather than on idle time
alone. Also check `/tmp` test scratch, which filled the disk on 2026-11-04
before the reboot.

Public API: none. Wire: none.
6 changes: 4 additions & 2 deletions quest/m0/nightly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ This README's own work, after the children:
[audio jitter target](/quest/m1/audio-jitter-target/README.md), the
macOS `receive_credit` timeout has no owner since its quest was deleted in
[moq-dev/moq#6732](https://github.com/moq-dev/moq/pull/6732), so plan one under
[test flakes](/quest/m0/test-flakes-2/README.md) if it recurs, and the paired bench
threshold to [bench CI](/quest/m1/bench-ci.md).
[test flakes](/quest/m0/test-flakes-2/README.md) if it recurs, the paired bench
threshold to [bench CI](/quest/m1/bench-ci.md), and the moq-net bench
panics in "Rust bench targets" to
[moq-net's benches run to completion](/quest/m1/bench-test-mode.md).

Public API: none. Wire: none.

Expand Down
1 change: 1 addition & 0 deletions quest/m0/test-flakes-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ Public API: none. Wire: none.

- [IETF22 fallback](/quest/m0/test-flakes-2/ietf22-fallback.md) - an IETF22 browser viewer follows a fallback within the media lane's bound, keeping its session and its audio
- [Browser buffering and Firefox audio-tone tests pass under load](/quest/m0/test-flakes-2/browser-media-flakes.md) - the two `harness.browser.ts` buffering tests and the Firefox player's audio-tone checks pass reliably in Interop and Nightly, each fixed at its cause under the epic's rules
- [reload.test.ts's close-drain tests pass under load](/quest/m0/test-flakes-2/reload-close-drain.md) - the drain cases in `js/net`'s reload tests pass in loaded multi-file runs
30 changes: 30 additions & 0 deletions quest/m0/test-flakes-2/reload-close-drain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# [S] reload.test.ts's close-drain tests pass under load

## Goal

`closing the loop keeps the tokens until the session drains` in
`js/net/src/connection/reload.test.ts`, and any drain case sharing its race,
passes under load in multi-file runs, fixed at its cause under the
[epic](/quest/m0/test-flakes-2/README.md)'s rules. Done when the PR explains
the race and shows the repeated multi-file run that reproduced it now passing.

## Plan

Planned 2026-11-04 with the maintainer. While iterating
[moq-dev/moq#7090](https://github.com/moq-dev/moq/pull/7090), its agent saw
`closing the loop keeps the tokens until the session drains` fail once in a
four-file batch, then pass 13 runs with and without that PR's change. Its
failure output wasn't kept. The other drain cases in the file also run on a
manual clock and wait for the old session to close: `teardown by … drains the
session` shares its held-FIN fixture (`holdFins`), and `a URL change connects
the replacement while the old session drains until …` waits out a drain
deadline. Check them for the same race.

Reproduce first: run `reload.test.ts` together with the rest of `js/net` under
CPU contention and `--rerun-each`, as the epic's earlier JS fixes did
([moq-dev/moq#7658](https://github.com/moq-dev/moq/pull/7658) fixed
`lite/connection.test.ts`'s close-drain fixture race that way). If it doesn't
reproduce in a reasonable number of runs, report that and the runs tried
rather than changing the test blind.

Public API: none. Wire: none.
2 changes: 2 additions & 0 deletions quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ their end report, so an embedder's drain alert pages on real cuts.
- [Rust releases publish through OIDC](/quest/m1/release-rs-oidc.md) - release-plz publishes with trusted publishing and `CARGO_REGISTRY_TOKEN` is revoked
- [Main is no slower than release](/quest/m1/release-perf/README.md) - every benchmark where main is slower than release is fixed or accepted with a reason, checked by a final paired run before the cut
- [Calibrate the paired nightly benchmarks](/quest/m1/bench-ci.md) - A/A and deliberately slowed Nightly runs set the paired comparison's threshold, so its regression alerts can be trusted
- [moq-net's benches run to completion](/quest/m1/bench-test-mode.md) - the `origin`, `session` and `memory` benches stop panicking in test mode and Nightly's measured run, and the maintainer picks where CI catches the next break
- [Catalog contributions become includes on the root's timeline](/quest/m1/catalog-include.md) - rename the unreleased `contributions` map before the cut and state that included broadcasts share the root's timeline
- [Unbounded groups](/quest/m1/unbounded-groups/README.md) - groups and frames lose their size caps; a group keeps a 32 MB tail, and readers behind it replay through paced flights or refresh
- [Session policy lives in moq-net](/quest/m1/session-policy/README.md) - accept and connect deadlines, admission, window widening and reconnect live once in moq-net; moq-tokio and moq-relay's io_uring path call them
- [Poll-first async](/quest/m1/poll-first/README.md) - library crates compile no coroutines by default: async wrappers are generated from `poll_*` and gated behind an `async` feature
Expand Down
59 changes: 59 additions & 0 deletions quest/m1/bench-test-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# [S] moq-net's benches run to completion

## Goal

Every moq-net bench target runs to completion, both in Criterion's test mode
(`cargo test -p moq-net --features fuzz --benches`) and in Nightly's measured
run, so a bench broken by a behaviour change fails where someone sees it.
Done when that command passes on main, Nightly's "Rust bench targets" job gets
past its `criterion net` step, and the PR records where CI catches the next
such break.

## Plan

Planned 2026-11-04 with the maintainer. While iterating
[moq-dev/moq#7729](https://github.com/moq-dev/moq/pull/7729) (authored tracks
default to zero max age, merged 2026-11-04), its agent ran the Rust benches in
test mode: `group` panicked under the new default and was fixed there, while
`origin`, `session` and `track` in `rs/moq-net/benches/` panicked on main
before the change.

Nightly already runs these targets measured: `sh/gh/nightly.sh`'s `rust-bench`
step runs `criterion net --no-fail-fast -p moq-net --features fuzz --bench '*'`.
Scheduled run
[41656613559](https://github.com/moq-dev/moq/actions/runs/41656613559)
(2026-11-03, before #7729) failed it on four targets:

- `origin` (`origin.rs:574` and `:576`, `winner changed`) in
`origin/reprice_duplicate/1d_1s_cost2`.
- `session` (`session/mod.rs:371` and `:492`, `Evicted`) in
`session_delivery_burst/moq-transport-22/...`.
- `memory` (`memory.rs:194`, `Evicted`) in `memory/streams=16/size=1048576`.
- `track` (`track.rs:1718` and `:1730`) in `track_range_widening/1r/64`, fixed
by [moq-dev/moq#7840](https://github.com/moq-dev/moq/pull/7840) (merged
2026-11-04).

Start by re-running every moq-net bench target on main, in test mode and in a
short measured run, since #7729's zero max-age default may have broken more.
Fix each at its cause: a bench whose expectation predates a deliberate
behaviour change is updated; a bench exposing a product bug gets the product
fix. `origin` and `session` need `fuzz`, and Cargo skips a bench whose
`required-features` are off without a word, so a test-mode run without it
passes while they're broken.

Where CI catches the next break is the maintainer's call; ask in the PR. A
test-mode run in Nightly adds nothing, since the measured run covers the same
targets. Today the PR gate builds benches with their features but leaves them
unrun (`rs/justfile` above the `test` recipe; `.config/nextest.toml`'s
`default-filter = "not kind(bench)"`). Running them there, which would have
caught these before merge, reverses the
[Nightly epic](/quest/m0/nightly/README.md)'s 2026-10-24 decision that the
gate keeps skipping benches and a green Nightly catches them within a day.
Measure the test-mode run's cost before asking.

Public API: none. Wire: none.

## Related

- [Nightly passes on main](/quest/m0/nightly/README.md) - this quest owns the moq-net bench panics in Nightly's "Rust bench targets" job
- [Calibrate the paired nightly benchmarks](/quest/m1/bench-ci.md) - calibrates the measurements; this quest only keeps the bench executables correct
41 changes: 41 additions & 0 deletions quest/m1/catalog-include.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# [S] Catalog contributions become includes on the root's timeline

## Goal

The hang catalog's root `contributions` map is renamed to say what it is: other
broadcasts the root includes, which share the root's PTS timeline and its
catalog-root settings (clock, join interval). The rename covers the Rust and JS
catalog types and schemas, `@moq/watch`'s `broadcast.contribution(effect, id)`,
the parity fixture, `doc/concept/hang.md`, and the draft's
`{#contributions}` section, with the shared-timeline rule stated in the draft.
Done before the next release cut, while the field is still unreleased.

## Plan

Planned 2026-11-04 with the maintainer, while settling
[moq-dev/moq#7836](https://github.com/moq-dev/moq/pull/7836)'s HLS listing.
The maintainer: keep contributions; "consider renaming them. Afaik the
use-case is moq.pro transcodes so they must share PTS and really everything in
the catalog root. Its why I wanted to call the section `include` originally."

- ✅ **Contributions stay** (maintainer, 2026-11-04). Not chosen: removing them.
- ✅ **They share the root's timeline** (maintainer, 2026-11-04): consumers
such as moq-hls treat a contribution as on the root's PTS timeline and grid,
with no clock or interval comparison; a mismatch is the publisher's bug.
#7836 implements that for HLS.
- **The name is the open decision.** `include` is the maintainer's original
preference; confirm it (or another) in this quest's PR before renaming, then
rename the field, the types (`Contribution`), the watch method and the draft
section consistently in Rust, JS and the bindings that expose them.
- The field arrived in [moq-dev/moq#7312](https://github.com/moq-dev/moq/pull/7312)
(2026-11-01) and isn't on `release`, so no compatibility alias is needed and
the catalog `version` stays.
- Update the [HLS contributions](/quest/m0/hls-contributions.md) quest, or its
code if #7836 has landed, to the new name.

Public API: breaking but unreleased (Rust `hang`, `@moq/hang`, `@moq/watch`).
Wire: the catalog JSON key changes; unreleased.

## Related

- [HLS lists contributions](/quest/m0/hls-contributions.md) - the HLS consumer settled with the shared-timeline rule
Loading