From 80f185c7f84a78e6563f7aff29b63d4a142e8482 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 7 Nov 2026 18:32:25 -0800 Subject: [PATCH 1/3] agents: don't spend cycles detecting a publisher that breaks identity A publisher that reuses or restarts group sequences, or rewinds timestamps, hurts only its own broadcast. Code must stay safe (no panic, no unbounded cost, no effect on other broadcasts) but not detect it. REVIEW.md's matching "Not findings" entry now covers reused sequences. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 1 + REVIEW.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 61f7a884669..7bc30e84513 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,6 +10,7 @@ Trust this checkout's source over published API references, which may describe a - Immediately disable a flaky test and plan a follow-up to investigate. - The same identity (ex. broadcast+track+group+frame) always has the same content. Use a new identity for new content. +- A publisher that breaks that, such as by reusing or restarting group sequences or rewinding timestamps, hurts only its own broadcast. Spend no cycles detecting it; it must only never panic, cost unbounded work, or affect other broadcasts. - Never match on errors; it's brittle. - moq-lite and moq-net take priority over moq-transport and other IETF drafts, which are a low-effort compatibility layer. Ignore their requirements (even MUSTs) that add cost without a clear behavioral benefit, and never add API for functionality only they have. diff --git a/REVIEW.md b/REVIEW.md index a8732c27965..4a74fc09d19 100644 --- a/REVIEW.md +++ b/REVIEW.md @@ -52,7 +52,7 @@ The runtime guards fail Rust and bun tests only when a timer fires on the host c Each of these has been raised and refuted repeatedly here; the rules in `AGENTS.md` already decide them: - A cap, timeout, or retry as the fix for an unbounded cost or a hang. Name the design-level bound (backpressure, flow control, ownership) or the root cause instead. -- Detecting a peer's duplicate or reused IDs when only the sender's own requests suffer. +- Detecting a peer's duplicate or reused IDs, or a publisher's reused sequences, when only the sender's own requests or broadcast suffer. - A compatibility shim, deprecation path, or migration for something no release has shipped. Check the `release` branch and tags before claiming a break; `main` breaks freely, and unpublished `-wip` wire versions change freely. - A moq-transport MUST or "spec violation" with no behavioral consequence, or extra machinery for a moq-transport feature moq-lite lacks. - Cross-node or cross-session waiting to close a rare race. Reporting current state and accepting a rare undercount is the intended design. From be256c39b8623007e6fbfd6cb6cb96b35acce0fa Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 7 Nov 2026 18:34:17 -0800 Subject: [PATCH 2/3] quest: drop copy-identity under the publisher-identity rule Copies of one group identity disagree only when the publisher broke the identity rule, which hurts only its own broadcast. Maintainer decision, 2026-11-07: drop it entirely. Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 1 - quest/m1/copy-identity.md | 13 ------------- 2 files changed, 14 deletions(-) delete mode 100644 quest/m1/copy-identity.md diff --git a/quest/m1/README.md b/quest/m1/README.md index da300e96d79..7a1b7703686 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -54,7 +54,6 @@ moves what remains of them once their claims merge. - [Tests run on a mocked clock](/quest/m1/mock-clock-tests/README.md) - about 300 tests stop proving nothing happened by waiting, sleeping to settle, or asserting on elapsed time - [moq-mux reads only the base layer's H.265 SPS](/quest/m1/h265-base-layer-sps.md) - a layered MV-HEVC or SHVC stream imports as its base layer instead of misreading an enhancement-layer SPS, which still reaches the track - [Lifecycles are explicit state](/quest/m1/explicit-state/README.md) - every lifecycle the 2026-11-07 audit found implicit is one enum or union, fixing the bugs in the 11 lifecycles it redesigns, with review and agent rules against new ones -- [Copies of one group identity must agree beyond their bytes](/quest/m1/copy-identity.md) - copies that differ in timestamp, object fields, or frame count fail as a protocol violation - [Session auth grants and replies stay consistent and bounded](/quest/m1/auth-stream-bounds.md) - an AUTH_ERROR revokes its grant, queued grants and retiring tokens are bounded, and dropping queued requests cannot deadlock - [Relay settings parse once into a validated configuration](/quest/m1/relay-config-checks.md) - settings that cannot work together are refused at load instead of accepted and ignored - [Track drop runs are forgotten below the floor](/quest/m1/drop-runs-prune.md) - a track's dropped-group record stays proportional to its window in Rust and JS diff --git a/quest/m1/copy-identity.md b/quest/m1/copy-identity.md deleted file mode 100644 index 0cbbba322fd..00000000000 --- a/quest/m1/copy-identity.md +++ /dev/null @@ -1,13 +0,0 @@ -# [M] Copies of one group identity must agree beyond their bytes - -## Goal - -Two copies of the same broadcast+track+group (another route, a FETCH answer, a re-offer, a mid-frame recovery) that disagree on anything a reader sees fail the later copy with a protocol violation, instead of readers of each copy seeing different content under one identity. Today `rs/moq-net/src/model/group/content.rs` `row()`, `write_chunk` and the recovery in `frame.rs` compare only size, `inflated` and overlapping bytes; nothing compares a frame's timestamp, its IETF object fields, or the group's final frame count, so a copy with one more frame can raise `largest` after `finish_largest` declared it settled. - -## Plan - -Found by the 2026-11-07 invariant audit (model-1). Put the timestamp and a digest of the object fields in the shared row, and the group's fin in `Content`; a copy that disagrees, commits past the fin, or finishes short of it gets `ProtocolViolation`. Tests: two copies with differing timestamps, differing fields, and an extra frame. Check the JS counterpart (`js/net/src/group.ts`) and match it in the same PR. - -## Related - -- [A reader on a failed copy continues on the held re-offer](/quest/m1/copy-recover.md) - also stitches frames across copies From fda232efec3fff7571d70db249a4d7b9c14d6f49 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 7 Nov 2026 21:21:24 -0800 Subject: [PATCH 3/3] docs(agents): scope the publisher-misuse rule to identity breaks Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 7bc30e84513..288ff6983f2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ Trust this checkout's source over published API references, which may describe a - Immediately disable a flaky test and plan a follow-up to investigate. - The same identity (ex. broadcast+track+group+frame) always has the same content. Use a new identity for new content. -- A publisher that breaks that, such as by reusing or restarting group sequences or rewinding timestamps, hurts only its own broadcast. Spend no cycles detecting it; it must only never panic, cost unbounded work, or affect other broadcasts. +- A publisher that breaks that, such as by reusing or restarting group sequences, hurts only its own broadcast. Code spends no cycles detecting it: the violation must only never panic, cost unbounded work, or affect other broadcasts. - Never match on errors; it's brittle. - moq-lite and moq-net take priority over moq-transport and other IETF drafts, which are a low-effort compatibility layer. Ignore their requirements (even MUSTs) that add cost without a clear behavioral benefit, and never add API for functionality only they have.