@moq/net: make direct and relayed reads report the same gaps as Rust

Aperta
#10,299 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
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, rust

Direzione di ricerca

Start with js/net/src/publisher_accounting.test.ts and compare its cases with rs/moq-net/tests/integration/publisher_accounting.rs to see the expected groups and gaps. Trace the JS publisher and relay handling for the four divergences listed in the issue, then use the Rust time-start behavior in rs/moq-net/src/model/track.rs as context. Done when the known list is empty and each JS case reads what its Rust twin reads.

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

Descrizione

Goal

@moq/net readers should learn the same groups and gaps whether they read a publisher directly, through a cold relay copy, or through a warmed one. The Rust moq-net harness already proves this for Rust. Done means the known list in js/net/src/publisher_accounting.test.ts is empty, and each case reads what its Rust twin in rs/moq-net/tests/integration/publisher_accounting.rs reads.

Non-goals: Rust changes, except where a JS fix shows that Rust diverges too.

Context

Split from moq-net-publisher-accounting in https://github.com/moq-dev/moq/pull/10178. The lite-07 wire-invariant proofs are Rust-only, so these JS gaps block nothing before the 0.22.0 cut.

Divergences the JS harness pins today:

  • Origin-front reads omit gaps. A read through the origin's own front (origin.consume().request) omits the gap a fill reported as not found over keys the publisher never produced. This covers the keys below its first group once the handle closes, and every key a handler answered (cases dropping, refusing, and unanswering handler). producer.subscribe and relayed reads do report these gaps.
  • No record of evicted groups. The JS publisher keeps no record of the groups its cache let go (Rust keeps TrackState::departed). So neither a direct read nor a cold relay copy names evicted groups (cases evicted and time in evicted).
  • Relay copies wait on evicted groups. A relay copy, warm or cold, keeps waiting on evicted groups after its readers parked, and names them not found only after the finish (case evicted).
  • Warmed copies ask fills from 0. A warmed copy asks a fill below its live group from 0, and the publisher drops it whole (case time in evicted, which reads gap 0..4000 not found).

Plan

Once JS records departures, mirror the Rust time-start fix. A lite-07 publisher should answer a time start that reaches back past every group it holds at the first key it names from that time, not at the next group held. In Rust this is SourceStart::Named in rs/moq-net/src/model/track.rs, used by both TrackRun::starts and TrackRun::report_started.

(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.