Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f7cc585
quest: claim quest/m0/audit-lints.md
kixelated Oct 21, 2026
e40db75
refactor(net): express lite version predicates with matches!
kixelated Oct 21, 2026
4c799c5
refactor(net): use is_multiple_of in Timestamp's Debug
kixelated Oct 21, 2026
7ad3633
refactor(tokio): name the interruptible stream op type
kixelated Oct 21, 2026
1f98fa3
fix(lint): clear clippy failures in moq-auth examples and the jitter …
kixelated Oct 21, 2026
0f50eda
fix(publish): read file track metadata through mediabunny's async get…
kixelated Oct 21, 2026
15c152a
chore(publish): say which DOM types each ts-expect-error covers
kixelated Oct 21, 2026
576f55b
chore(py): enable ruff's RUF100 and drop stale noqa directives
kixelated Oct 21, 2026
6b7ae69
ci(rs): require a reason on every lint suppression, and expect where …
kixelated Oct 21, 2026
1d07785
quest: hand the lint audit to m1 with this run's baselines
kixelated Oct 21, 2026
23ea3e2
Merge remote-tracking branch 'origin/main' into quest/m0/audit-lints
kixelated Oct 21, 2026
22c9288
fix(net): give suppressions merged from main a reason
kixelated Oct 21, 2026
82b47fb
style(sock): format the quinn-derived udp module after the reason sweep
kixelated Oct 21, 2026
6fca024
Merge origin/main into quest/m0/audit-lints
kixelated Oct 21, 2026
bb4c190
style: wrap the group bench's expect
kixelated Oct 21, 2026
b635923
Merge origin/main into quest/m0/audit-lints
kixelated Oct 22, 2026
1c8a047
Merge origin/main into quest/m0/audit-lints
kixelated Oct 22, 2026
c547ade
Merge remote-tracking branch 'origin/main' into audit-lints-iter
kixelated Oct 22, 2026
13e33c9
chore(lint): give main's new suppressions reasons, keep moq-quic lint…
kixelated Oct 22, 2026
2da7b8a
chore(lint): rustfmt a quinn-style test attribute, refresh the m1 lin…
kixelated Oct 22, 2026
80209ed
Merge remote-tracking branch 'origin/main' into audit-lints-iter
kixelated Oct 22, 2026
7b0960e
fix(model-markers): ignore delimiters in comments inside a wrapped at…
kixelated Oct 22, 2026
ba9e7fc
quest: point the m1 lint audit at moq-quic's manifest lint tables
kixelated Oct 22, 2026
0425ec5
fix(model-markers): find a wrapped attribute by rustfmt's shape, not …
kixelated Oct 22, 2026
b1f00cc
Merge remote-tracking branch 'origin/main' into fix-6159
kixelated Oct 23, 2026
68ed7f2
Merge remote-tracking branch 'origin/main' into fix-6159
kixelated Oct 23, 2026
bef45d2
style: wrap the run_present lint expectation
kixelated Oct 23, 2026
d4c9287
Merge remote-tracking branch 'origin/main' into fix-6159
kixelated Oct 23, 2026
aa49c9b
fix(net): allow FetchServe's variant gap, which varies by target
kixelated Oct 23, 2026
63a4b54
Merge remote-tracking branch 'origin/main' into fix-6159
kixelated Oct 23, 2026
5e47b6b
fix(relay): give main's new bench and test double lint reasons
kixelated Oct 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ ignored = ["getrandom"]
# That pin sits above every MSRV here; rust-toolchain.toml says why.
rust-version = "1.91"

[workspace.lints.rust]
# kio and moq-net model-check their primitives under `--cfg loom`.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)'] }

[workspace.lints.clippy]
# Every suppression says why, so the next lint audit can judge it.
allow_attributes_without_reason = "warn"
Comment on lines +122 to +124

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Opt test-env into the workspace lint table

Checked cargo metadata for the workspace: rs/test-env is a workspace member, but its manifest is the sole member besides the deliberately custom moq-quic manifest without lints.workspace = true. Consequently this new lint is not enabled for that crate, so a future reasonless suppression there will still pass the workspace Clippy gate; opt rs/test-env/Cargo.toml into the workspace lint table as the other members are.

AGENTS.md reference: AGENTS.md:L23-L23

Useful? React with 👍 / 👎.


[workspace.dependencies]
anyhow = "1"
ash = "0.38"
Expand Down
3 changes: 3 additions & 0 deletions demo/carla/bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ tracing = { workspace = true }
# The stand-in producer: a native Vulkan renderer that hands the bridge
# exportable slots exactly the way the CARLA plugin does.
ash = { workspace = true }

[lints]
workspace = true
3 changes: 2 additions & 1 deletion demo/carla/sim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ line-length = 120
target-version = "py312"

[tool.ruff.lint]
select = ["E", "F", "W", "I"]
# RUF100 fails a `noqa` that no longer suppresses anything.
select = ["E", "F", "W", "I", "RUF100"]

[tool.ruff.format]
quote-style = "double"
Expand Down
2 changes: 1 addition & 1 deletion demo/carla/sim/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def scenario() -> tuple[BaseException | None, asyncio.Task]:
truck = asyncio.create_task(asyncio.Event().wait(), name="truck:truck1")
try:
await asyncio.wait_for(main_module.supervise(client, [truck], clock, watchdog), timeout=1.0)
except BaseException as err: # noqa: BLE001 - the test asserts on it
except BaseException as err: # the test asserts on it
return err, truck
return None, truck

Expand Down
27 changes: 14 additions & 13 deletions js/publish/src/source/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ export class File {
// The encoder sizes its bitrate off this, and a file's real cadence beats assuming 30fps.
const frameRate =
video && videoOk ? (await video.computePacketStats(FRAME_RATE_SAMPLES)).averagePacketRate : undefined;
const toFrame = video && videoOk ? await converter(video) : undefined;
const format =
audio && audioOk
? { sampleRate: await audio.getSampleRate(), channelCount: await audio.getNumberOfChannels() }
: undefined;

// Pin the clock last. Probing the file takes a moment, and anchoring before that would leave
// the first samples already overdue, so playback would open with a catch-up burst.
Expand All @@ -171,28 +176,22 @@ export class File {

const source: Media = {
video:
video && videoOk
video && toFrame
? {
frames: pace(
new VideoSampleSink(video),
timeline,
video.rotation === 0 ? (sample) => sample.toVideoFrame() : rotator(video),
signal,
),
frames: pace(new VideoSampleSink(video), timeline, toFrame, signal),
frameRate,
}
: undefined,
audio:
audio && audioOk
audio && format
? {
samples: pace(
new AudioSampleSink(audio),
timeline,
(sample) => sample.toAudioData(),
signal,
),
sampleRate: audio.sampleRate,
channelCount: audio.numberOfChannels,
...format,
// A file is whatever the user picked, so leave the Opus tuning to the encoder.
kind: "auto",
}
Expand Down Expand Up @@ -295,8 +294,10 @@ function pace<S extends Sample, T>(

// Phone footage is usually stored sideways with rotation metadata, which toVideoFrame() ignores
// because a VideoFrame can't carry it. Drawing through a canvas is the only way to bake it in.
function rotator(track: InputVideoTrack): (sample: VideoSample) => VideoFrame {
const canvas = new OffscreenCanvas(track.displayWidth, track.displayHeight);
async function converter(track: InputVideoTrack): Promise<(sample: VideoSample) => VideoFrame> {
if ((await track.getRotation()) === 0) return (sample) => sample.toVideoFrame();

const canvas = new OffscreenCanvas(await track.getDisplayWidth(), await track.getDisplayHeight());

const ctx = canvas.getContext("2d");
if (!ctx) throw new Error("Failed to create 2D canvas context");
Expand All @@ -314,7 +315,7 @@ async function decodable(track: InputVideoTrack | InputAudioTrack | null, file:
if (await track.canDecode()) return true;

console.warn(
`Publishing "${file.name}" without its ${track.type} track: this browser can't decode ${track.codec}.`,
`Publishing "${file.name}" without its ${track.type} track: this browser can't decode ${await track.getCodec()}.`,
);
return false;
}
Expand Down
8 changes: 4 additions & 4 deletions js/publish/src/source/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ export class Screen {
const audio = effect.get(this.audio);

// TODO Expose these to the application.
// @ts-expect-error Chrome only
// @ts-expect-error TypeScript's DOM lib lacks the Chrome-only `CaptureController`.
let controller: CaptureController | undefined;
// @ts-expect-error Chrome only
// @ts-expect-error TypeScript's DOM lib lacks the Chrome-only `CaptureController`.
if (typeof self.CaptureController !== "undefined") {
// @ts-expect-error Chrome only
// @ts-expect-error TypeScript's DOM lib lacks the Chrome-only `CaptureController`.
controller = new CaptureController();
controller.setFocusBehavior("no-focus-change");
}
Expand All @@ -90,7 +90,7 @@ export class Screen {
.getDisplayMedia({
video,
audio,
// @ts-expect-error Chrome only
// @ts-expect-error TypeScript's DOM lib lacks the Chrome-only `CaptureController`.
controller,
preferCurrentTab: false,
selfBrowserSurface: "exclude",
Expand Down
2 changes: 1 addition & 1 deletion js/publish/src/video/capture-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async function handle(msg: ToWorker): Promise<void> {
function start(track: MediaStreamTrack): void {
source = track;

// @ts-expect-error No typescript types yet.
// @ts-expect-error TypeScript's DOM lib lacks the Chrome-only `MediaStreamTrackProcessor`.
const processor = new MediaStreamTrackProcessor({ track });
reader = (processor.readable as ReadableStream<VideoFrame>).getReader();
}
Expand Down
2 changes: 1 addition & 1 deletion js/publish/src/video/encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ export class Encoder {
latencyMode: "realtime",
hardwareAcceleration,
avc: codec.startsWith("avc1") ? { format: "annexb" } : undefined,
// @ts-expect-error Typescript needs to be updated.
// @ts-expect-error TypeScript's DOM lib lacks the HEVC codec registration's `hevc` config.
hevc: codec.startsWith("hev1") ? { format: "annexb" } : undefined,
};

Expand Down
2 changes: 1 addition & 1 deletion py/moq-ffi/moq_ffi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import atexit

from ._uniffi import * # noqa: F401,F403
from ._uniffi import * # noqa: F403
from ._uniffi.moq import _UniffiLib

# Rust runtime workers wake awaiting coroutines through a ctypes
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ target-version = "py310"
extend-exclude = ["**/_uniffi"]

[tool.ruff.lint]
select = ["E", "F", "W", "I"]
# RUF100 fails a `noqa` that no longer suppresses anything.
select = ["E", "F", "W", "I", "RUF100"]

[tool.ruff.format]
quote-style = "double"
1 change: 0 additions & 1 deletion quest/m0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ Each lands its fixes in its own PR and plans only what needs a decision.
- [Release shutdown backport](/quest/m0/ffi-shutdown-backport.md) - `release` publishes a non-breaking moq-ffi with an async `drain()` and qmux sessions on the QUIC stream limit
- [Release fixed delay](/quest/m0/release-fixed-delay.md) - a fixed latency on `release`, which moq.dev runs, ignores the catalog's jitter and delay as `main` already does
- [CI cost and latency](/quest/m0/ci/README.md) - cloud CI runs only in the merge queue as one `just ci` pass, expensive checks run nightly and gate `release`, caches move to R2, and runners are chosen last
- [Lint override and deprecation audit](/quest/m0/audit-lints.md) - every lint suppression is still needed and says why, nothing calls a deprecated API, and stale Rust overrides fail the build
90 changes: 0 additions & 90 deletions quest/m0/audit-lints.md

This file was deleted.

1 change: 1 addition & 0 deletions quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ tracks, so per-group stats stop costing cluster announces.
- [Binding peer version](/quest/m1/binding-peer-version.md) - every binding names itself ahead of the Rust core in that parameter
- [Nightly benchmark regressions](/quest/m1/bench-ci.md) - each nightly compares the Rust Criterion benches against the previous nightly's commit on the same hosted runner, publishes it to the git.moq.dev report, and alerts on a regression
- [Interop audit](/quest/m1/audit-interop.md) - our interop runner entries match what we ship, and every red interop cell with a moq.dev side is fixed, reported, or noted as down
- [Lint override and deprecation audit](/quest/m1/audit-lints.md) - repeat the suppression and deprecation audit, starting with the conditional allows and the lanes clippy never runs

## Related

Expand Down
105 changes: 105 additions & 0 deletions quest/m1/audit-lints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# [M] Lint override and deprecation audit

## Goal

Every lint suppression in first-party code, in every language, is still
needed and says why, or is removed. Nothing calls a deprecated upstream API,
and our own deprecated items are removed or planned for removal once their
migration window has passed.

## Plan

Recurs once per major release (decided 2026-10-20). The PR that finishes
this run also adds the next one with the same file name at the end of the next
milestone's `Required` (m0 to m1, m1 to m2). The successor keeps the Goal
and this paragraph; the rest of its Plan is rewritten with what this run
learned: baselines, results, and what to check first. A successor placed in m2
also lists the [release cut](/quest/m2/release/cut.md) under `Required`, so it
waits for the release in flight to ship. Only `/quest-delete` ends the
recurrence. Fixes land in the run's PR, one commit each, rather than as follow-ups.
Only a change that needs a maintainer decision (public API, scope) or is
independently landable and too large to review alongside the rest becomes a
follow-up through `/quest-plan`.

Scope is every language (decided 2026-10-20): clippy and rustc overrides,
`clippy.toml`, `biome-ignore`, `@ts-expect-error`, `noqa` and
`type: ignore`, Kotlin `@Suppress`, and the equivalents in Go, Swift, Dart,
and C/C++. `dead_code` and `unused` suppressions belong to the [dead code
audit](/quest/m2/audit-dead-code.md); skip them here. Generated or vendored
bindings (`moq-nvenc`, `moq-v4l/src/sys`, `moq-rtmp/src/rml`, and the
untracked UniFFI output) keep their blanket allows unless the generator can
emit clean code. Shell `shellcheck disable` comments stay out of scope.

A suppression stays only when fixing the lint would make the code worse; a
signature reshaped to satisfy `too_many_arguments` or `large_enum_variant`
on a public type is an API change, so it is a follow-up. Removing one of our
own deprecated exports or hidden CLI spellings is a breaking change with a
`MIGRATE.md` entry, so it is also a follow-up.

### What the m0 run left in place

Every workspace crate but `moq-quic` sets `lints.workspace = true`, and the
root `[workspace.lints]` enables `clippy::allow_attributes_without_reason`, so a
suppression without a reason fails clippy. Unconditional suppressions are
`#[expect(..., reason = "...")]`, so a stale one fails as
`unfulfilled_lint_expectations`. A crate needing extra lints gets its own
manifest `[lints]` tables that repeat that rule (`moq-quic/Cargo.toml`), since
Cargo can't extend the workspace table per crate and crate attributes skip
benches and examples. Biome reports an unused `biome-ignore` as
`suppressions/unused`, and ruff selects `RUF100` (root and
`demo/carla/sim`). This run only reviews what those gates can't see.

### Check first

- Conditional suppressions: every `cfg_attr(..., allow(...))` and every
plain `allow` with a reason. Ask whether the condition still holds or the
lint now fires everywhere (then `expect`) or nowhere (then delete). The
wasm lane also lints `moq-net` and `moq-flate` as dependencies, so a
suppression there must hold on wasm32 too.
- Lanes clippy never runs: the macOS and Windows platform lane is
`cargo check` only, so an `expect` on Apple or Windows code
(`moq-video` AVFoundation, `moq-sock`) is unverified. Run clippy there or
confirm by reading.
- Python type ignores: run pyright with
`reportUnnecessaryTypeIgnoreComment`, which m0 didn't.
- Swift: grep and build for deprecation warnings, which m0 didn't.
- TypeScript deprecations: typescript-eslint doesn't support the repo's TS 7
yet, so m0 swept `no-deprecated` from a throwaway package pinning
typescript 6 and eslint 9. Files outside any `tsconfig` project can't be
typed-linted. Check whether typescript-eslint supports TS 7 before
repeating that setup; if it does, consider joining CI.
- `sh/rs/model-markers.py` walks attributes above a model marker, including
ones rustfmt wraps over several lines. Run its tests if a long reason moves
near a marker.

### Results (m0, 2026-10-20)

- Rust: workspace lints adopted, every suppression given a reason, and
stale ones removed: 27 `match_like_matches_macro` (now `matches!`), 27
`non_camel_case_types` on `repr(C)` structs, `moq-quic`'s crate-wide
`cognitive_complexity` and `too_many_arguments`, and stale
`type_complexity`, `arc_with_non_send_sync`, `field_reassign_with_default`,
`disallowed_methods`, and pedantic allows.
- Deprecations: `js/publish` file import moved to mediabunny's async track
getters. The `moq-relay` cluster test's `#[allow(deprecated)]` was stale.
Go (staticcheck `SA1019`), Kotlin, and Dart (`--fatal-infos`) were clean.

### Baselines (2026-10-20, after the m0 run)

- Rust `clippy::` suppression attributes: 189 (168 `expect`, 12 `cfg_attr`
`expect`, 9 `allow`), counted 2026-10-22 after main's moq-clock move.
Most common: `disallowed_methods` 123, `disallowed_types` 48,
`large_enum_variant` 24, mostly test modules reading the host clock.
- Rust rustc and rustdoc suppressions: 64 (49 `expect`, 15 `allow`), led by
`non_camel_case_types` 19 on C ABI enums. `dead_code` and `unused`: 421,
owned by the dead code audit.
- Rust `deprecated`: 1, the macOS AVFoundation `devicesWithMediaType`.
- TypeScript: 40 `biome-ignore` and 47 `@ts-expect-error`.
- Python: 26 `noqa` or `type: ignore`.

Count with `git grep` over the whole tree, not per language directory, so
only tracked files count and none outside `rs/`, `js/`, or `py/` are missed.
Count multi-line Rust attributes too, since rustfmt wraps long ones.
Generated UniFFI bindings are untracked (`kt/.gitignore`) and carry their own
suppressions, such as Kotlin's 139 `@Suppress`; leave them out, and fix a
noisy one in the generator config instead of the output.
3 changes: 3 additions & 0 deletions rs/hang/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ moq-tokio = { path = "../moq-tokio", default-features = false, features = ["quic
tokio = { workspace = true, features = ["macros", "fs"] }
tracing = { workspace = true }
url = { workspace = true }

[lints]
workspace = true
5 changes: 4 additions & 1 deletion rs/hang/src/catalog/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,10 @@ impl<E: DeserializeOwned + Default> Catalog<E> {
///
/// Fails with [`Error::UnsupportedVersion`](crate::Error::UnsupportedVersion) if the catalog
/// needs a newer moq-hang draft than this crate reads.
#[allow(clippy::should_implement_trait)]
#[expect(
clippy::should_implement_trait,
reason = "public inherent parser; switching to `FromStr` is a breaking change"
)]
pub fn from_str(s: &str) -> Result<Self> {
Self::from_slice(s.as_bytes())
}
Expand Down
Loading
Loading