diff --git a/quest/m4/README.md b/quest/m4/README.md index 6da9dc34ea8..03400431dc6 100644 --- a/quest/m4/README.md +++ b/quest/m4/README.md @@ -113,3 +113,4 @@ deleted. - [js/net decodes the Rust fuzzers' corpus the same way](/quest/m4/fuzz-corpus-js.md) - nightly, both codecs agree on acceptance and re-encoding for every corpus input - [No mutation of the route and resume code survives its tests](/quest/m4/mutants.md) - cargo-mutants nightly, failing on any survivor - [Concurrent tests run under many Miri schedules and ThreadSanitizer](/quest/m4/miri-seeds-tsan.md) - shim-free race checks on kio and moq-net, nightly +- [moq's fuzz targets run continuously on OSS-Fuzz](/quest/m4/oss-fuzz.md) - round-the-clock fuzzing with private crash reports, after the session targets exist and the maintainer approves the application diff --git a/quest/m4/miri-seeds-tsan.md b/quest/m4/miri-seeds-tsan.md index 95295f03401..9849a967571 100644 --- a/quest/m4/miri-seeds-tsan.md +++ b/quest/m4/miri-seeds-tsan.md @@ -30,6 +30,7 @@ moq-net). Milestone m4. the recipe's doc line. - Miri's GenMC mode would explore every schedule without shims, but does not support `cargo miri test` today. It is not part of this quest. + [Its own quest](/quest/m5/miri-genmc.md) waits on that. Public API: none. Wire: none. diff --git a/quest/m4/oss-fuzz.md b/quest/m4/oss-fuzz.md new file mode 100644 index 00000000000..f472c4047ea --- /dev/null +++ b/quest/m4/oss-fuzz.md @@ -0,0 +1,52 @@ +# [M] moq's fuzz targets run continuously on OSS-Fuzz + +## Goal + +OSS-Fuzz builds moq's fuzz targets from `main` and fuzzes them around the +clock, keeping its own corpus. A crash it finds reaches the maintainer +privately, and its reproducer lands in the target's `regressions/` so +`just check` replays it. + +## Waiting + +- Maintainer: approve the application PR to + [google/oss-fuzz](https://github.com/google/oss-fuzz) and name the contact + address it lists. An agent cannot take this: it posts outside the + `kixelated` and `moq-dev` orgs, the address receives private security + reports, and accepting commits the project to OSS-Fuzz's 90-day disclosure + deadline. Done when the application PR is open. + +## Plan + +Decided 2026-11-10 (maintainer, /quest-plan of the follow-ups from +[moq-dev/moq#8472](https://github.com/moq-dev/moq/pull/8472)): + +- ✅ OSS-Fuzz (rejected: longer runs on our own runners, which cost runner + time and stay far short of continuous; dropping it). +- ✅ m4, after the whole-session targets exist, since stateful targets gain + the most from long runs. + +Nightly gives each of its 22 targets five minutes. That finds shallow bugs +and replays the corpus; it rarely reaches deep states. + +- The OSS-Fuzz project files (`project.yaml`, `Dockerfile`, `build.sh`) live + in google/oss-fuzz. The build script calls `cargo fuzz build` per crate + with the same profile overrides `sh/rs/fuzz.sh` sets, so keep those in one + place both can use. +- Seed each target from `fuzz/regressions/` and the generated seeds. +- Enable every target in Nightly's matrix; say which, if any, OSS-Fuzz's + toolchain cannot build. +- Add ClusterFuzzLite or OSS-Fuzz's CIFuzz action to PRs only if it stays + cheap; Nightly's five-minute run already covers regressions. +- Say in `CONTRIBUTING.md` or the fuzz README how a reported crash is + handled: reproduce, fix on `main`, commit the input, backport when serious. + +Public API: none. Wire: none. + +## Required + +- [A hostile peer's session cannot panic, leak, or disturb another broadcast](/quest/m1/session-fuzz.md) - the stateful targets that gain most from continuous fuzzing + +## Related + +- [Wire fuzz coverage](/quest/m4/wire-fuzz-coverage.md) - adds the moq-sock and moq-uring targets OSS-Fuzz would also run diff --git a/quest/m5/README.md b/quest/m5/README.md index a2a5f6056d5..402e3297dbc 100644 --- a/quest/m5/README.md +++ b/quest/m5/README.md @@ -36,6 +36,7 @@ consumer asks. ## Required +- [Miri's GenMC mode explores every schedule of kio's lock-free code](/quest/m5/miri-genmc.md) - waiting on rust-lang/miri to run `cargo miri test` in GenMC mode, then Nightly checks kio's log and channel exhaustively - [Mesh over ICE](/quest/m5/mesh-ice.md) - mesh nodes on different networks connect directly through the P2P line's ICE pairs, once a mesh user needs it - [Video validation hardware is on hand](/quest/m5/video-hardware-access.md) - the machines the validation runs on, including a Raspberry Pi 4/5 for embedded presenting - [Fair share across broadcasts on cluster links](/quest/m5/broadcast-fairness.md) - broadcasts share a cluster link fairly, so one tenant's priority never starves another's, once a tenant identity exists diff --git a/quest/m5/miri-genmc.md b/quest/m5/miri-genmc.md new file mode 100644 index 00000000000..311958f7d01 --- /dev/null +++ b/quest/m5/miri-genmc.md @@ -0,0 +1,49 @@ +# [S] Miri's GenMC mode explores every schedule of kio's lock-free code + +## Goal + +Nightly runs kio's log and channel tests under Miri's GenMC mode, which +explores every thread schedule and weak-memory outcome the Rust memory model +allows, with no change to the code under test. An ordering bug in kio's +lock-free code fails Nightly on every run, not only on a lucky seed. + +## Waiting + +- rust-lang/miri: a Miri shipped as a rustup component runs `cargo miri test` + in GenMC mode (`-Zmiri-genmc`). Check + [Miri's GenMC document](https://github.com/rust-lang/miri/blob/master/doc/genmc.md), + which today says `cargo miri test` is not supported and GenMC needs a Miri + built with its own feature flag. Delete this quest if upstream drops the + mode. + +## Plan + +Decided 2026-11-10 (maintainer, /quest-plan of the follow-ups from +[moq-dev/moq#8472](https://github.com/moq-dev/moq/pull/8472)): ✅ plan it in +m5, waiting on upstream (rejected: dropping it and relying on random seeds +alone). + +Loom did this job and was removed in +[moq-dev/moq#7474](https://github.com/moq-dev/moq/pull/7474) because it +needed a `cfg(loom)` shim around every primitive and never found a race. +GenMC needs no shims, so the only upkeep is the Nightly row. + +- Add a pass to `sh/rs/miri.sh` over the tests of `rs/kio/src/log.rs` and + `rs/kio/src/channel.rs` that spawn threads. Keep the many-seeds pass for + everything GenMC cannot run. +- GenMC explodes with thread count and loop bounds. Size each test it runs + to a few threads and a few operations, and measure that the pass fits + Nightly. +- As of 2026-11-10 it also misses bugs that depend on reused allocations and + on spurious `compare_exchange_weak` failures, and it runs without borrow + tracking. Recheck those limits and say in the recipe which remain. + +Public API: none. Wire: none. + +## Required + +- [Concurrent tests run under many Miri schedules and ThreadSanitizer](/quest/m4/miri-seeds-tsan.md) - the Miri pass over threaded tests that this makes exhaustive + +## Related + +- [Drop kio's epoch fence](/quest/m4/crossbeam-pin-fence.md) - the ordering in kio's log that only a weak-memory check can confirm