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 .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ default-filter = "not kind(bench)"
# hosted CI's locked-memory limit and uses the host's hard limit locally.
# Several invocations still share that user-wide budget; see rs/moq-uring/README.md.
[[profile.default.overrides]]
filter = "package(moq-uring) | binary_id(moq-relay::runtime_uring) | (binary_id(moq-relay::embed) & test(/uring/))"
filter = "package(moq-uring) | (binary_id(moq-relay::integration) & (test(/^runtime_uring::/) | test(/^embed::.*uring/)))"
test-group = "io-uring"

# The binding benchmark runs many `MOQ_BENCH_SECONDS` budgets back to back, so its
Expand Down
1 change: 0 additions & 1 deletion .github/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ test:
python3 bench/profile.test.py
python3 bench/ffi.test.py
python3 sh/gh/gst-formula.test.py
python3 test/drill/pr.test.py
python3 sh/changed.test.py
python3 sh/dispatch-query.test.py
python3 sh/dispatch-query.test.py --bench
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,46 +144,3 @@ jobs:
CI_BASE: ${{ github.event.merge_group.base_sha }}
MOQ_STRICT: 1
NEXTEST_PROFILE: ci

drill-sensitivity:
name: Drill sensitivity
if: github.event.action != 'closed'
runs-on: ubuntu-24.04-arm
timeout-minutes: 60
# Socket timing is still uncontrolled. Keep this advisory until the drills
# use the controlled clock, then remove this and require the stable job name.
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0

- uses: ./.github/actions/just

- name: Select mutations
id: scope
run: just test drill-pr select "$CI_BASE" >> "$GITHUB_OUTPUT"
env:
CI_BASE: ${{ github.event.merge_group.base_sha }}

- uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main
if: steps.scope.outputs.needed == 'true'
with:
determinate: false
extra-conf: |
extra-substituters = https://kixelated.cachix.org
extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk=

- name: Rust cache
if: steps.scope.outputs.needed == 'true'
uses: ./.github/actions/rust-cache

- name: Prove sensitivity
if: steps.scope.outputs.needed == 'true'
run: nix develop --command just test drill-pr run "$CI_BASE"
env:
CI_BASE: ${{ github.event.merge_group.base_sha }}
MOQ_SHAPER_SEED: "1"
NEXTEST_PROFILE: ci
2 changes: 1 addition & 1 deletion .github/workflows/interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- "test/interop/**"
- "test/max-age/**"
- "test/portrait/**"
- "rs/moq-tokio/tests/max_age.rs"
- "rs/moq-tokio/tests/integration/max_age.rs"
# The interop job also depends on the recipe that invokes it and the
# workspace membership that links the JS clients to source.
- "test/justfile"
Expand Down
2 changes: 1 addition & 1 deletion js/net/src/untimed.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// A track keeps its timedness end to end: no receive path fills in arrival time, and a
// wire that can't declare a timeline delivers frames untimed. Mirrors rs/moq-net/tests/untimed.rs.
// wire that can't declare a timeline delivers frames untimed. Mirrors rs/moq-net/tests/integration/untimed.rs.
import { expect, test } from "bun:test";
import { type Consumer as BroadcastConsumer, Producer as BroadcastProducer } from "./broadcast.ts";
import { accept, connect } from "./connection/index.ts";
Expand Down
2 changes: 1 addition & 1 deletion quest/m0/ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The historical samples locate candidates; they are not controlled benchmarks.

- [Pin Quest's gate](/quest/m0/ci/quest-gate-pin.md) - make shared command admission available
- [Share local check capacity](/quest/m0/ci/local-gate.md) - gate expensive phases and bound internal fanout
- [Reduce test cost](/quest/m0/ci/test-cost.md) - measure and retire low-value expensive work
- [Dart FFI build](/quest/m0/ci/dart-ffi-build.md) - the Dart check builds release `moq-ffi` once instead of twice
- [Windows restart drill](/quest/m0/ci/platform-windows-drill.md) - the relay restart drill passes on Windows in the merge queue
- [macOS zero-RTT test](/quest/m0/ci/platform-macos-zero-rtt.md) - the moq-tokio 0-RTT driver test passes on macOS in the merge queue
- [Require platform gates](/quest/m0/ci/platform-queue.md) - activate the consolidated platform checks in the main and release rulesets after the workflow lands
Expand Down
15 changes: 15 additions & 0 deletions quest/m0/ci/dart-ffi-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# [S] Build moq-ffi once in the Dart check

## Goal

The Dart check builds the release `moq-ffi` library once, not twice, and
`dart test` still exercises a library built from this checkout.

## Plan

- Today `sh/dart/generate.sh` builds it, then `dart test`'s build hook builds it
again, probably because the hook's filtered environment changes Cargo's
fingerprint. Check [run 38853884676](https://github.com/moq-dev/moq/actions/runs/38853884676)
spent about 6.7 and 6 minutes on the two builds.
- Confirm the cause before changing either side, then reuse one build. Record
the Dart check's before/after time in the PR.
25 changes: 0 additions & 25 deletions quest/m0/ci/test-cost.md

This file was deleted.

2 changes: 1 addition & 1 deletion quest/m1/claim-answer-epochs.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ and behind an edge relay of ours, on lite-05, 06, 07 and moq-transport 14,
16, 22: the returning reader gets the new output from group 0, never the old
group, and sibling paths keep their readers. On the wires without an epoch
that rests on our relays retiring a copy on End then Start, as
`tests/restart.rs` shows; arbitrary older caching relays are out of scope, as
`tests/integration/restart.rs` shows; arbitrary older caching relays are out of scope, as
in [IETF epochs](/quest/m1/ietf-epochs.md), since base IETF object identity
survives a withdrawal. A same-epoch lagging replica still resumes, checked on
lite-07 only, the one wire here that carries the epoch. JS mirrors the tests.
Expand Down
2 changes: 1 addition & 1 deletion quest/m1/close-tail-drain.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Found while reworking the in-memory transport (#5530). Facts at 813a92b48:
and IETF the receiver throws away a tail its transport already holds.
lite-07 already avoids this at the protocol level: the closer waits for the
subscriber's Subscribe-stream FIN (`drafts/draft-lcurley-moq-lite.md`).
- The test mock (`rs/moq-net/tests/support/mock.rs`) hid it: its FIN counts as
- The test mock (`rs/moq-net/tests/integration/support/mock.rs`) hid it: its FIN counts as
acked only once the reading application stops or drops the stream.
`older_lite_close_keeps_ack_drain` never checks what the reader got.

Expand Down
4 changes: 2 additions & 2 deletions quest/m1/cluster-routing/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ claim whose withdrawal is already known.
Keep the 2026-10-01 two-layer direction, reconciled with the maintainer's
2026-10-13 [decisions](/quest/m1/cluster-routing/README.md) and the routing
contract below. The routing contract's fixtures live in
`rs/moq-net/tests/routing_contracts/` and run against a small reference model;
`rs/moq-net/tests/integration/routing_contracts/` and run against a small reference model;
port each topology to the implementation as acceptance, then delete the model.
The sketch stays conditional on Next-hop handoff, which settles claim
freshness before coding:
Expand Down Expand Up @@ -316,7 +316,7 @@ Open, for the implementer to settle and record:
- How much of today's route trie, fronts, and `route_order` survives intact.

The #4349 counterexamples are the `residual_*` tests in
`rs/moq-net/tests/mesh_withdraw.rs`. They pin today's hunting on lite-06:
`rs/moq-net/tests/integration/mesh_withdraw.rs`. They pin today's hunting on lite-06:
a stale path outlasting the 300 ms hold, a revival the quarantine misses,
and 179 hunting relays (3 reviving) over 200 seeded meshes. Turn each into a
single retraction everywhere, and keep `cross_node_close_retracts_once`
Expand Down
2 changes: 1 addition & 1 deletion quest/m1/lite07-finalize.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The cut:
draft (whose text already names the rename), and at every site spelling
the wip ALPN: `rs/moq-tokio/src/connect.rs` and `listen.rs`,
`rs/moq-tokio/tests/`, `rs/moq-relay/src/cluster.rs`,
`rs/moq-relay/tests/smoke.rs`,
`rs/moq-relay/tests/integration/smoke.rs`,
`test/interop/bare-fin.ts`, `test/interop/lite-varint.ts`, and
`doc/concept/moq-lite.md`; grep for `moq-lite-07-wip` to catch new ones. A wip peer and a final peer refuse each other by ALPN
rather than misparse; no compatibility shim.
Expand Down
2 changes: 1 addition & 1 deletion quest/m1/probe-on-demand-rs.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Decided (2026-10-12, quest-plan):

Test: a session nobody holds a consumer for opens no PROBE stream, and one that
holds then drops a consumer opens and then resets it. Reuse the mock transport
stats and the harness in `rs/moq-net/tests/idle_session.rs`.
stats and the harness in `rs/moq-net/tests/integration/idle_session.rs`.
2 changes: 1 addition & 1 deletion quest/m1/public-model/ingest.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Rust items (`rs/moq-net/src/model/`), as they stood at b4eab0db1:
reports the last frame that exists. This touches
[Live largest location](/quest/m1/largest.md); align with it there.
- Regression guard: `rejoin_waits_for_the_answers_first_frame`
(`rs/moq-net/tests/rejoin.rs`, fails when the judgments count a
(`rs/moq-net/tests/integration/rejoin.rs`, fails when the judgments count a
frameless group) and
`revealing_a_presented_group_wakes_a_read_it_expires` stay;
`a_withheld_group_holds_the_end` and
Expand Down
4 changes: 2 additions & 2 deletions quest/m1/restart-followers.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ every connect; it remains for GOAWAY drains and publisher replacement.
The origin side is done: a handle resolved through a peer keeps serving new
requests while the peer's epochless replacement is held, and refuses them
with `Unroutable` only once the `Restart` is deliverable (`Release` in `rs/moq-net/src/model/origin.rs`,
`rs/moq-net/tests/replacement.rs`). So a consumer that never follows `Restart`
`rs/moq-net/tests/integration/replacement.rs`). So a consumer that never follows `Restart`
works through the hold (300 ms by default), and its open subscriptions stay
sticky on the old session until it closes, where they end cleanly. A
consumer that opens a request after the hold, or reads past the old
Expand Down Expand Up @@ -45,7 +45,7 @@ Audit and fix:
- The interop clients under `test/interop/clients`, where they resolve a
broadcast themselves.

Regression: extend `rs/moq-net/tests/replacement.rs` (or the consumer's own
Regression: extend `rs/moq-net/tests/integration/replacement.rs` (or the consumer's own
tests) so each follower reads past the old session's close after an
epochless replacement. Then run `just test interop --all`.

Expand Down
2 changes: 1 addition & 1 deletion quest/m1/test-flakes-2/auth-refresh-mock-time.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load, because they read one mocked clock instead of the host's wall clock:
(`rs/moq-relay/src/auth/refresh.rs`)
- `a_fixed_lease_still_expires` and
`an_outage_keeps_the_session_until_expires`
(`rs/moq-relay/tests/auth_lifetime.rs`)
(`rs/moq-relay/tests/integration/auth_lifetime.rs`)

## Plan

Expand Down
2 changes: 1 addition & 1 deletion quest/m1/test-flakes-2/uring-teardown-close.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Goal

`moq-uring`'s `a_published_close_has_already_left_the_client`
(`rs/moq-uring/tests/teardown.rs`) passes under a loaded `just check`,
(`rs/moq-uring/tests/integration/teardown.rs`) passes under a loaded `just check`,
fixed at its cause. It still proves that a close the client reported as
published reaches the server as the application code, not an idle timeout.

Expand Down
2 changes: 1 addition & 1 deletion quest/m1/time/uring.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ flavors, and relay CPU via `just bench BASE` on Linux. The existing keep-alive
and idle-timeout tests stay unchanged. Ban direct clock reads in moq-uring
outside its backend (the ratchet).

Move `uring_workers_bound_stalled_handshakes` (`rs/moq-relay/tests/runtime_uring.rs`)
Move `uring_workers_bound_stalled_handshakes` (`rs/moq-relay/tests/integration/runtime_uring.rs`)
onto controlled time too; it landed on the wall clock in #5244 rather than
waiting for this quest.

Expand Down
2 changes: 1 addition & 1 deletion quest/m2/uring-connection-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Recommendations:
harness filters:
- An io_uring session shows its `conn` span and its close, like
`relay_websocket_logs_its_close_under_a_cluster_id` in
`rs/moq-relay/tests/smoke.rs`. It belongs in `tests/runtime_uring.rs`,
`rs/moq-relay/tests/integration/smoke.rs`. It belongs in `tests/integration/runtime_uring.rs`,
which skips loudly below the kernel floor.
- A panic inside the lifecycle owner, forced on the ring's
shared-runtime supervision, still logs that connection's close. This is
Expand Down
2 changes: 1 addition & 1 deletion quest/m2/uring-ietf.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gap is in the worker's accept path, not in moq-net.
- Serve the SETUP-negotiated lite versions the same way, or record why they
stay refused; the operator-facing rule must be "the ring serves what the
config lists".
- `tests/runtime_uring.rs` gains an IETF session and a SETUP-negotiated
- `tests/integration/runtime_uring.rs` gains an IETF session and a SETUP-negotiated
session; both skip loudly below the kernel floor like the rest.
- `doc/bin/relay/config.md` and the `moq-uring` README drop the lite-only
caveat.
Expand Down
2 changes: 1 addition & 1 deletion quest/m3/hidden-exemption.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the mesh runs lite-07.
hidden routes only when it asks, and the forced `with_hidden(true)` on the
outbound dial in the same file. `connection::authorize` no longer exists on
`main`; only `release` still has that shape.
- Replace `rs/moq-relay/tests/hidden_cluster.rs` with a lite-07 mesh test that
- Replace `rs/moq-relay/tests/integration/hidden_cluster.rs` with a lite-07 mesh test that
still sees a `.`-prefixed hidden broadcast.

## Required
Expand Down
2 changes: 1 addition & 1 deletion quest/m3/uring-tcp/relay.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ transport is driven, which is what makes that handoff free here too.

Keep the ops and web listeners' behavior identical: the same routes, the same
CORS scoping, the same landing-page fallback, and the same
`/certificate.sha256` fingerprint. Extend `rs/moq-relay/tests/runtime_uring.rs`
`/certificate.sha256` fingerprint. Extend `rs/moq-relay/tests/integration/runtime_uring.rs`
to prove a WebSocket session and an HTTP route both work when served from a
worker.

Expand Down
2 changes: 1 addition & 1 deletion rs/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Prefer poll. New logic is a `poll_*` with an `async` helper, not the other way a

# Testing

- Tests are inline `#[cfg(test)] mod tests`, except full Client/Server session tests over a crate's shared mock harness, which go in its `tests/` directory. Time-dependent async tests call `tokio::time::pause()` first (moq-net uses `#[moq_net_sim::test]` instead), unless they cross real networking that can't be mocked (sockets, smoke tests); those run on the wall clock and assert lower bounds.
- Tests are inline `#[cfg(test)] mod tests`, except full Client/Server session tests over a crate's shared mock harness, which go in its `tests/integration/` module. Time-dependent async tests call `tokio::time::pause()` first (moq-net uses `#[moq_net_sim::test]` instead), unless they cross real networking that can't be mocked (sockets, smoke tests); those run on the wall clock and assert lower bounds.
- Run tests through `just` (nextest), not `cargo test`: nextest kills a wedged test as TIMEOUT, cargo hangs forever. A test flagged SLOW is a bug to fix, not a threshold to raise.
- `just check` compiles default features only, like CI. `just rs features` (nightly) covers `--all-features` / `--no-default-features`. Keep a feature gate around the dependency, not the logic, so the logic's tests stay in the merge gate.
- Local checks compile only the host platform; PR CI runs `just rs windows` / `macos` on those hosts, and `just rs wasm` covers `moq-wasm`.
6 changes: 4 additions & 2 deletions rs/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,14 @@ gpu:
sh/rs/gpu.sh

# The media tasks run against a recorder rather than a device (see
# `rs/moq-cli/src/play/fake.rs`), so this needs no speaker or display.
# `rs/moq-cli/src/play/fake.rs`), so this needs no speaker or display. Only the
# binary's own tests: the integration tests spawn verbs `play` leaves alone,
# and the default pass already runs them.

# Test moq-cli's `play` feature, which default features leave out.
[positional-arguments]
play *args:
just rs test -p moq-cli --features play "$@"
CARGO_BUILD_WARNINGS=deny RUSTC_WORKSPACE_WRAPPER={{ quote(require("clippy-driver")) }} bash sh/rs/nextest.sh cargo nextest run --locked -p moq-cli --features play --bins "$@"

# Compile and run the `/// ```` examples, which nextest skips.
[positional-arguments]
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net/benches/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! Measures the pending queue and complete grant/withdrawal lifecycle. Run the same
//! matrix before and after queue changes so a per-session scan appears on its own axis.

#[path = "../tests/support/mod.rs"]
#[path = "../tests/integration/support/mod.rs"]
mod support;

use bytes::Bytes;
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 @@ -24,7 +24,7 @@
//!
//! Run with `cargo bench -p moq-net --bench origin`.

#[path = "../tests/support/mod.rs"]
#[path = "../tests/integration/support/mod.rs"]
mod support;

use std::task::Poll;
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-net/benches/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
//!
//! Run with `cargo bench -p moq-net --bench session`.

#[path = "../tests/support/mod.rs"]
#[path = "../tests/integration/support/mod.rs"]
mod support;

use std::alloc::{GlobalAlloc, Layout, System};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! `.dash/nobody` sees it at its own root. Across a session the publisher must
//! translate it into the requested scope rather than end the session.

mod support;
use crate::support;

use std::time::Duration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! Deterministic: time is paused and the runtime is single-threaded, so settling
//! is a virtual sleep.

mod support;
use crate::support;

use std::time::Duration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! tokens union, and a publication outside the grant fails loud. Every case runs on
//! moq-lite-07-wip and on moq-transport with the MoQ Auth extension.

mod support;
use crate::support;

use std::time::Duration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! [`Error::Unroutable`](moq_net::Error::Unroutable), a fresh request for the path
//! answers the same, and the broadcast can never be announced again.

mod support;
use crate::support;

use std::time::Duration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//! Initial catalog acquisition while the same publisher gains a second session.

mod support;
use crate::support;

use moq_net::{Error, Hop, Version, origin};
use support::harness::{MockConnectOptions, MockPair, connect_mock};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! delivery through the model. The mock delivers queued datagrams
//! deterministically, so every wait here is on an observable event.

mod support;
use crate::support;

use std::time::Duration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! anonymous dial: the accepting side already stamps one, and the dialing side
//! has to as well.

mod support;
use crate::support;

use std::time::Duration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//! once unread lets the next viewer reach worker `B`, which wins the path now, rather
//! than the drained worker.

mod support;
use crate::support;

use std::{cell::RefCell, rc::Rc, time::Duration};

Expand Down
Loading
Loading