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
1 change: 1 addition & 0 deletions quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ above them.
- [Slow source fails](/quest/m1/slow-source.md) - an export whose source runs further off real time than the output may follow fails promptly naming the rate, instead of dropping frames for hours
- [Same-instance TS resume](/quest/m1/ts-same-instance-resume.md) - prove valid continuation and fix the unexpected final exporter failure without weakening identity
- [Wire compat media](/quest/m1/wire-compat-media.md) - wire-compat always runs same-version media cells through the compat reader, so planned breaks can't hide its regressions
- [Binding panic supervision](/quest/m1/ffi-panic-supervision.md) - a panic in any moq-c or moq-ffi background task reaches the host as a panic, never a lost callback or Cancel
- [More tests under load](/quest/m1/test-flakes-2/README.md) - the second round of load-only failures, one quest per flake, fixed at the cause
- [Plan: a public model](/quest/m1/model-public-surface.md) - every crate-private model item is made public or unnecessary, so a custom publisher or subscriber builds from the public model alone
- [Lazy discovery](/quest/m1/lazy-discovery/README.md) - a `consume` session requests announcements only for prefixes the origin is watching, in JS then Rust; `follow`, `broadcasts`, and the `discovery` option go away
Expand Down
35 changes: 35 additions & 0 deletions quest/m1/ffi-panic-supervision.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# [M] A panic in a binding's background task reaches the host

## Goal

A panic in any task moq-c or moq-ffi spawns (consume, publish, origin, audio,
video, server, and `ffi::spawn`'s tasks, including the origin driver)
reaches the host as a panic error through that object's final callback or
the uniffi call, never as a lost callback or `Cancel`. A moq-tokio driver
panic under a binding reports `Panic`, not `Cancel`.

## Plan

Follow-up from [#5447](https://github.com/moq-dev/moq/pull/5447), which made
a panic close only its session and supervised moq-c's session tasks. The
other moq-c tasks still drop a panic, so the host's final callback never
fires and a C host waits forever; moq-ffi's `ffi::spawn` tasks do the same
for uniffi callers.

Decided 2026-10-13 (maintainer): m1, one quest for both bindings. Supervise
each task's `JoinHandle` the way #5447 did for moq-c sessions, reusing
`moq_tokio::panic`. Carry a driver's panic through as a panic rather than
the `Cancel` its dropped channel produces today. Add a regression per
binding that injects a panic into one background task and asserts the
host sees `MOQ_ERROR_PANIC` (moq-c) or the binding's panic error (moq-ffi),
while another object keeps working. Also add the regression #5447 left out:
a moq-tokio accept loop that panics ends its listener.

Public API: none expected, beyond the panic error reaching more callbacks.
That is a host-visible change even without a new error variant, so walk the
`rs/moq-ffi` row of the Cross-Package Sync table: every wrapper and
`doc/lib` page surfaces the panic error. Wire: none.

## Related

- [Long-lived task supervision](/quest/m2/task-supervision.md) - the remaining process-wide tasks
1 change: 1 addition & 0 deletions quest/m1/test-flakes-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Public API: none. Wire: none.
- [Interop close code](/quest/m1/test-flakes-2/interop-close-code.md) - the browser close-code test reliably sees `unauthorized` for a refused session
- [QUIC-wins race](/quest/m1/test-flakes-2/quic-winning-race.md) - moq-tokio's QUIC-wins test sets up QUIC's win instead of racing the WebSocket head start
- [Handshake ACK](/quest/m1/test-flakes-2/handshake-ack.md) - the impaired cluster drill's connect survives a lost handshake ACK
- [Auth refresh expiry](/quest/m1/test-flakes-2/auth-refresh-expiry.md) - the auth refresh outage test measures the grant's life on one clock

## Related

Expand Down
27 changes: 27 additions & 0 deletions quest/m1/test-flakes-2/auth-refresh-expiry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# [XS] Auth refresh measures a grant's life on one clock

## Goal

moq-relay's `an_outage_refuses_transiently_and_never_extends_the_expiry`
(`rs/moq-relay/src/auth/refresh.rs`) passes under a loaded `just check`,
fixed at its cause.

## Plan

Seen 2026-10-13 on #5446's first `just check`: the session lived 28.862 s
against the test's 29 s floor, then the test passed alone and on rerun.

The test's `grant()` stamps the expiry with `SystemTime::now() + 30s`, but
`Grant::deadline()` (`rs/moq-auth/src/grant.rs`) converts the remaining wall
time onto Tokio's paused clock only when the lease snapshots it. Wall time
keeps running under load while the paused clock does not, so a 1.14 s
scheduling delay before the snapshot leaves 28.86 s on the Tokio clock.
Moving `start` earlier does not fix that; `sessions()` uses an in-memory
duplex, so no real socket is involved.

Measure against one clock: assert the session ends at the deadline the lease
captured, or build the grant's expiry from the moment that deadline is
taken, keeping the bounds. Reproduce first by delaying wall time between
`grant()` and admission.

Public API: none. Wire: none.
1 change: 1 addition & 0 deletions quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ ranked just below deterministic TS legs, which it requires.
- [Release execution](/quest/m2/release/README.md) - publication, installed-artifact proof, cleanup, and downstream adoption after m1
- [IETF driver double poll](/quest/m2/ietf-driver-double-poll.md) - a fired deadline costs a moq-transport session's driver one poll, as #5393 makes moq-lite's
- [Play resume](/quest/m2/play-resume.md) - `moq-cli play` plays out pictures buffered before a declared end when new media arrives quickly
- [Task supervision](/quest/m2/task-supervision.md) - the auth decider loop, stats publisher, and moq-tokio's token and WebSocket internals are supervised like #5447's tasks
25 changes: 25 additions & 0 deletions quest/m2/task-supervision.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# [S] The remaining long-lived tasks are supervised

## Goal

A panic in the relay's auth decider loop, the stats publisher, or
moq-tokio's token and WebSocket internals either ends only what depends on
it or exits the process, by the rule [#5447](https://github.com/moq-dev/moq/pull/5447)
set: a per-connection task's panic is isolated and counted, a long-lived
task's panic propagates out of `Relay::run` or the CLI's main. None is
swallowed.

## Plan

Follow-up from #5447, which supervised the session drivers and the relay's
critical tasks but left these. Decided 2026-10-13 (maintainer): m2, low
priority, since each is a single process-wide task. Classify each task as
per-connection or long-lived, observe its `JoinHandle` with
`moq_tokio::panic`, and add a regression that injects a panic into one task
of each class.

Public API: none expected. Wire: none.

## Related

- [Binding panic supervision](/quest/m1/ffi-panic-supervision.md) - the moq-c and moq-ffi tasks, ahead of this
Loading