moq-net: a narrowed lite-05/06 budget blocks a later widening, and per-reader skip harvest cost (from #10037/#10095 review)

Aperta
#10,296 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, rust

Direzione di ricerca

Start with rs/moq-net/src/lite/publisher.rs at the cited name_history and serve-path locations, then compare js/net/src/lite/publisher.ts; trace how a narrowed budget marks cached groups and how widening serves them. Reproduce the narrow-then-widen case and add mirrored regression tests that confirm every cached group in the widened span arrives. For the skip harvest, read rs/moq-net/src/ledger.rs and AGENTS.md, then add the requested failover benchmark across reader and cached-run counts.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Found by the retroactive Codex review in https://github.com/moq-dev/moq/pull/10288 (Codex seats replayed on PRs that landed while Codex was at its usage limit, 2026-12-01T18:30Z onward), each verified against main at a62650a98f by an independent read-only pass.

Size: M. Rust and JS, no public API or wire change. Each fix has a regression test (mirrored in Rust and JS where both sides have the path), and the skip harvest gets a failover benchmark swept over reader count and cached run count.

The same review's other findings here are already tracked: JS lacking keep_floor_skips in https://github.com/moq-dev/moq/issues/10276, and name_owed rebuilding skipped_in per step in https://github.com/moq-dev/moq/issues/10275. https://github.com/moq-dev/moq/issues/10215 covers a neighboring name_history bug (queued drops marked Final before they're sent); fix both together. https://github.com/moq-dev/moq/pull/10177 is open lite-06 sparse-skip work in the same publisher paths.

Findings and plan

  1. A narrowed budget names cached history final, so a later widening can't serve it. When the budget narrows (100 to 50 ms), name_history sets placed = from and tells everything untold in vouched..from as Report::Final stale (rs/moq-net/src/lite/publisher.rs:6314-6350). A later widening re-offers cached groups there, but the serve path skips any key already told (publisher.rs:6943-6949), so they never reach the wire, contradicting name_skipped's doc ("a wider budget may still serve a stale one"). JS matches (js/net/src/lite/publisher.ts:2462-2488). lite-06 is the default clients negotiate.
    Fix: name as final only what the publisher's own upstream verdict or the track's Max Age bound proves no later widening can offer (a group this relay merely evicted can still be refetched upstream, so its absence from the cache is no proof), and leave the rest below the start untold, keeping #10037's coalescing for what does get named. Test: narrow, then widen twice, and every cached group in the widened span arrives.
    Caused by https://github.com/moq-dev/moq/pull/10037.
  2. Each reader re-harvests the whole skip index after a switch. Every reader's keep_floor_skips resets SkipsSeen on a generation change, so its first call walks all of drops_changes from 0 (rs/moq-net/src/ledger.rs:102-109) under the copy's lock and re-learns the same runs into the shared Skips. A switch costs readers times runs.
    Fix: harvest below-floor skips once per generation on the front, not per reader, and add the failover benchmark above (swept over reader count and cached run count, per AGENTS.md's fan-out rule).
    Caused by https://github.com/moq-dev/moq/pull/10095.

The fixing PR lists each originating PR under ## Caused by as - [moq-dev/moq#N](url) - what it got wrong (found by reviewer).

(Written by Claude Opus 5.5)

Lingua principale
Rust
Stelle
1.6k
Fork
251
Merge medio
10h 10m
PR unite (30g)
832

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di moq-dev/moq

Tutte le issue di moq-dev/moq

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.