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
2 changes: 1 addition & 1 deletion bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ run by default:
- `group`, on request: every subscriber drains one finished 512-frame group in
object batches through the relay's private reader, as moq-net's
`group_relay_objects/plain/512/*` bench does, so that bench's cost is counted
without its wall-clock noise. Revisions before the hidden `ObjectBatch` helper
without its wall-clock noise. Revisions before the `fuzz::ObjectBatch` helper
report unsupported; historical frame-batch counts remain in the bisect report.

Each `bench/fanout/<scenario>` crate builds against each base's and the current
Expand Down
1 change: 0 additions & 1 deletion quest/m2/api-shape/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,4 @@ Rejected in planning:

## Required

- [Ban doc(hidden) in Rust](/quest/m2/api-shape/doc-hidden.md) - `just check` bans it; each use becomes private or documented, test-support modules documented behind their feature
- [A peer's closed session reads as Closed in the bindings](/quest/m2/api-shape/session-closed.md) - a remote SESSION_CLOSED maps to `MoqError::Closed`, as a local close does
53 changes: 0 additions & 53 deletions quest/m2/api-shape/doc-hidden.md

This file was deleted.

7 changes: 4 additions & 3 deletions quest/m4/quic-sim.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ deterministically with no sockets.

Already landed: MoQ sessions over moq-quic on the sim. The QUIC driver
spawns on the simulator inside `kio::clock::sim::run`, under moq-tokio's
hidden `sim` feature. `quic::driver::sim::Network` binds a socket per address
`sim` feature. `quic::driver::sim::Network` binds a socket per address
and carries datagrams across moq-quic's seeded `Link` (now
`moq_quic::sim`), so one seed replays a run.
`rs/moq-tokio/tests/integration/sim.rs` builds both endpoints on the raw
Expand All @@ -22,8 +22,9 @@ What remains:

- moq-tokio's `Client` and `Server` bind their QUIC endpoint from an address
(`crate::bind::udp`), so a sim test cannot reach them yet. Pick how a
caller hands either one a `driver::endpoint::Socket`, such as a hidden
`sim`-only hook. That API choice belongs to the maintainer.
caller hands either one a `driver::endpoint::Socket`, such as a
documented `sim`-only hook (`just check` bans `#[doc(hidden)]`). That API
choice belongs to the maintainer.
- Route the session-level spawns that `server.rs`, `connection.rs`, and
`origin.rs` still send through `crate::runtime::spawn` through
`runtime::Spawner`, as `transport.rs` and the WebTransport session already
Expand Down
2 changes: 1 addition & 1 deletion quest/m4/wire-fuzz-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Decided 2026-10-22 from the security audit, with the maintainer:

The point is the invariant, not the coverage number: a target that only checks for a panic would miss the bugs this audit is about.

Each crate follows moq-net's shape (`rs/moq-net/fuzz/README.md`): the target body in a hidden `fuzz` module so the crate's own tests replay `fuzz/regressions/` on stable, a one-line shim per target, an `--exclude` in the `no_fuzz` list of `rs/justfile`, and a row in `nightly.yml`'s fuzz matrix. Target names must stay unique across crates.
Each crate follows moq-net's shape (`rs/moq-net/fuzz/README.md`): the target body in a `fuzz` module, documented as test support behind the `fuzz` feature, so the crate's own tests replay `fuzz/regressions/` on stable, a one-line shim per target, an `--exclude` in the `no_fuzz` list of `rs/justfile`, and a row in `nightly.yml`'s fuzz matrix. Target names must stay unique across crates.

Ordering:

Expand Down
4 changes: 2 additions & 2 deletions rs/moq-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ features = ["async"]
default = []
# Generated async wrappers for the poll methods. Enable where you `.await` them.
async = ["kio/async"]
# Exposes the merge-patch diff to the codec bench, through the hidden `bench` module. Off by
# default and hidden from the docs. Not a supported API.
# Exposes the merge-patch diff to the codec bench, through the `bench` module. Off by
# default.
bench = []

[dependencies]
Expand Down
4 changes: 1 addition & 3 deletions rs/moq-json/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ pub mod stream;
mod strict;
pub mod window;

/// The merge-patch diff, for the codec bench. Not a public API: compiled only with the `bench`
/// feature, which nothing enables by default.
/// Test support for the codec bench, enabled by the `bench` feature: the merge-patch diff.
#[cfg(feature = "bench")]
#[doc(hidden)]
pub mod bench {
pub use crate::diff::{Diff, diff};
}
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-mux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ default = []
# poll of their own. Enable where you `.await` them.
async = ["kio/async", "moq-net/async"]
# Exposes the media parsers' fuzz target bodies and seeds to the `fuzz/` harness through the
# hidden `fuzz` module. Off by default and hidden from the docs.
# `fuzz` module. Off by default.
fuzz = []

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-mux/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# excluded from every gate that means "all of it" instead: libFuzzer needs a nightly
# toolchain and sanitizer flags, so nothing in `check` or `test` may compile it.
#
# The target bodies live in `moq-mux`'s hidden `fuzz` module, not here: sharing them
# The target bodies live in `moq-mux`'s `fuzz` module, not here: sharing them
# is what lets the crate's own tests replay the corpus on stable, allocation bound
# included.
[package]
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-mux/fuzz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ minimized corpus, and uploads failure inputs as workflow artifacts.

## How it fits together

The target bodies are not in `fuzz_targets/`; they are in `moq-mux`'s hidden `fuzz`
The target bodies are not in `fuzz_targets/`; they are in `moq-mux`'s `fuzz`
module (`src/fuzz.rs`), and the files here are shims that also register its counting
allocator. `just check` replays the same bodies on the pinned stable toolchain, bound
included, so a failure found here becomes a regression test that CI runs without anyone
Expand Down
6 changes: 3 additions & 3 deletions rs/moq-mux/src/fuzz.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Fuzz target bodies for the media parsers an untrusted publisher reaches, plus their seeds.
//! Test support, enabled by the `fuzz` feature: fuzz target bodies for the media parsers an
//! untrusted publisher reaches, plus their seeds.
//!
//! Each target takes raw fuzzer bytes, drives one parser through its public entry point the way
//! ingest or a subscriber does, and returns whether the input was accepted. [`run`] wraps a target
Expand All @@ -7,8 +8,7 @@
//! them on stable, which is what turns a crash the fuzzer found into a regression `just check`
//! runs.
//!
//! Compiled only under `cfg(test)` or the `fuzz` feature, so none of this is part of the published
//! API. See `fuzz/README.md` for the workflow.
//! It tracks the crate's internals, so it can change in any release. See `fuzz/README.md` for the workflow.

use std::task::Poll;

Expand Down
3 changes: 0 additions & 3 deletions rs/moq-mux/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ pub mod codec;
pub mod container;
mod error;
pub mod follow;
// Not part of the public API: compiled only for the crate's own tests and for the `fuzz/`
// harness.
#[cfg(any(test, feature = "fuzz"))]
#[doc(hidden)]
pub mod fuzz;
pub mod import;
mod ingest;
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "moq-net-tests"
description = "moq-net tests that need its hidden fuzz module or JSON consumers."
description = "moq-net tests that need its `fuzz` module or JSON consumers."
repository = "https://github.com/moq-dev/moq"
license = "MIT OR Apache-2.0"
version = "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net-tests/tests/integration/hop_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! forwards one it has no room to stamp.
//!
//! Only a peer's route arrives with hops, so the routes under test land through the
//! hidden `fuzz` module as a session lands them.
//! `fuzz` module as a session lands them.

use crate::support::{
Kind, drain,
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net-tests/tests/integration/ietf_conformance.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Moxygen announces one prefix, then serves its sixteen-field test namespaces.
//!
//! It answers each namespace without announcing its exact path, as only a session's peer
//! claim does, so the claim lands through the hidden `fuzz` module.
//! claim does, so the claim lands through the `fuzz` module.

use crate::support::harness::{MockConnectOptions, connect_mock, spawn};
use moq_net::{Version, broadcast, origin};
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net-tests/tests/integration/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Tests that need JSON consumers or moq-net's hidden fuzz hooks.
//! Tests that need JSON consumers or moq-net's `fuzz` module.

mod hop_limit;
mod ietf_conformance;
Expand Down
4 changes: 2 additions & 2 deletions rs/moq-net-tests/tests/integration/restart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ relay_chain_tests! {

/// A worker claiming `pool` under its own instance, `worker-<hop>`, answering each request
/// with an output whose `video` track carries the worker's name. The claim is a peer's, landed through
/// the hidden `fuzz` module as a session lands it, so its answers carry no exact route.
/// the `fuzz` module as a session lands it, so its answers carry no exact route.
struct Worker {
origin: origin::Producer,
_claim: Rc<origin::Claim>,
Expand Down Expand Up @@ -305,7 +305,7 @@ async fn prefix_pool_lite07() {

/// A claim at `live` whose handler answers each request with a fresh output, kept so
/// the test can write into it: `outputs[n]` answered the `n`th request. Only a peer's
/// claim moves to another instance or re-prices in place, so it lands through the hidden
/// claim moves to another instance or re-prices in place, so it lands through the
/// `fuzz` module as a session lands it.
struct Claim {
dynamic: Rc<origin::Claim>,
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net-tests/tests/integration/wide_hop.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Hop IDs span 64 bits. A link whose varint stops at 2^62 - 1 carries a larger
//! one as 0, the reserved unknown hop.
//!
//! The hop chain is crate-private, so it is read through the hidden `fuzz` module.
//! The hop chain is crate-private, so it is read through the `fuzz` module.

use crate::support;

Expand Down
30 changes: 15 additions & 15 deletions rs/moq-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async = ["dep:futures", "kio/async", "kio/runtime"]
# Exposes the wire codecs to the `fuzz/` harness and the announce, codec, path, varint, frame, and canonical storage benches,
# session views of an origin to the viewers bench, the lite publisher's run loop to the
# publisher bench, and a lite-07 publisher's frame bounds to the ranges bench, through the
# hidden `fuzz` module. Off by default and hidden from the docs.
# `fuzz` module. Off by default.
fuzz = ["async"]

[dependencies]
Expand Down Expand Up @@ -77,43 +77,43 @@ name = "fuzz-seeds"
path = "examples/fuzz-seeds.rs"
required-features = ["fuzz"]

# Lands peer claims through the hidden `fuzz` module, as a session does.
# Lands peer claims through the `fuzz` module, as a session does.
[[bench]]
name = "origin"
harness = false
required-features = ["fuzz"]

# Reaches the crate-private session view of an origin through the hidden `fuzz` module.
# Reaches the crate-private session view of an origin through the `fuzz` module.
[[bench]]
name = "viewers"
harness = false
required-features = ["fuzz"]

# Reaches the private announce codec through the hidden `fuzz` module.
# Reaches the private announce codec through the `fuzz` module.
[[bench]]
name = "announce"
harness = false
required-features = ["fuzz"]

# Reaches the crate-private session snapshot through the hidden `fuzz` module.
# Reaches the crate-private session snapshot through the `fuzz` module.
[[bench]]
name = "synced"
harness = false
required-features = ["fuzz"]

# Reaches the crate-private session interests through the hidden `fuzz` module.
# Reaches the crate-private session interests through the `fuzz` module.
[[bench]]
name = "interests"
harness = false
required-features = ["fuzz"]

# Reaches the crate-private route layer through the hidden `fuzz` module.
# Reaches the crate-private route layer through the `fuzz` module.
[[bench]]
name = "routes"
harness = false
required-features = ["fuzz"]

# Reaches the private message codecs through the hidden `fuzz` module.
# Reaches the private message codecs through the `fuzz` module.
[[bench]]
name = "codec"
harness = false
Expand All @@ -125,25 +125,25 @@ name = "parameters"
harness = false
required-features = ["fuzz"]

# Reaches the private lite codec through the hidden `fuzz` module.
# Reaches the private lite codec through the `fuzz` module.
[[bench]]
name = "varint"
harness = false
required-features = ["fuzz"]

# Reaches the private frame ingest through the hidden `fuzz` module.
# Reaches the private frame ingest through the `fuzz` module.
[[bench]]
name = "frame"
harness = false
required-features = ["fuzz"]

# Reaches a lite-07 publisher's frame bounds through the hidden `fuzz` module.
# Reaches a lite-07 publisher's frame bounds through the `fuzz` module.
[[bench]]
name = "ranges"
harness = false
required-features = ["fuzz"]

# Receives frames through the private session reader via the hidden `fuzz` module.
# Receives frames through the private session reader via the `fuzz` module.
[[bench]]
name = "backing"
harness = false
Expand Down Expand Up @@ -172,7 +172,7 @@ name = "tail"
harness = false
required-features = ["fuzz"]

# Drives the lite publisher's run loop through the hidden `fuzz` module.
# Drives the lite publisher's run loop through the `fuzz` module.
[[bench]]
name = "publisher"
harness = false
Expand Down Expand Up @@ -208,13 +208,13 @@ required-features = ["async"]
name = "refresh"
harness = false

# Follows the session's probe target through the hidden `fuzz` module.
# Follows the session's probe target through the `fuzz` module.
[[bench]]
name = "bandwidth"
harness = false
required-features = ["fuzz"]

# Uses the hidden fuzz module to observe source selection without public API.
# Uses the `fuzz` module to observe source selection without public API.
[[bench]]
name = "retirement"
harness = false
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net/benches/interests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! - uncovered: a watch on a fresh prefix comes and goes, which every session hears.
//! - covered: a watch beneath one already held comes and goes, which no session hears.
//!
//! The session side is crate-private, so this reaches it through the hidden `fuzz` module.
//! The session side is crate-private, so this reaches it through the `fuzz` module.
//!
//! Run with `cargo bench -p moq-net --features fuzz --bench interests`.

Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net/benches/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//! A claim's answer, and its retraction moving the claim to a fresh instance, is swept
//! over the paths the claim already answered and the cursors watching it.
//!
//! Peer claims land through the hidden `fuzz` module, as a session lands them.
//! Peer claims land through the `fuzz` module, as a session lands them.
//!
//! Run with `cargo bench -p moq-net --features fuzz --bench origin`.

Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net/benches/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//! batches behind the first, and each hears its next batch. Swept over the claims
//! the origin holds and how far the second lags: neither axis is expected to grow.
//!
//! The route layer is crate-private, so this reaches it through the hidden `fuzz` module.
//! The route layer is crate-private, so this reaches it through the `fuzz` module.
//!
//! Run with `cargo bench -p moq-net --features fuzz --bench routes`.

Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net/benches/synced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//! - land: a snapshot starts and lands under one prefix, releasing its one consumer.
//! - register: a consumer of one prefix registers, counting the snapshots it waits on.
//!
//! The snapshot is crate-private, so this reaches it through the hidden `fuzz` module.
//! The snapshot is crate-private, so this reaches it through the `fuzz` module.
//!
//! Run with `cargo bench -p moq-net --features fuzz --bench synced`.

Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net/benches/viewers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! may depend on how many came before.
//!
//! Each viewer excludes its own hop the way a session serves its peer. That view
//! is crate-private, so this reaches it through the hidden `fuzz` module. Its own
//! is crate-private, so this reaches it through the `fuzz` module. Its own
//! target keeps the counting allocator out of the `origin` bench.
//!
//! Run with `cargo bench -p moq-net --features fuzz --bench viewers`.
Expand Down
Loading
Loading