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

Abierto
#10,299 1 comentario 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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)

Lenguaje dominante
Rust
Estrellas
1.6k
Forks
251
Merge medio
10 h 10 min
PR fusionados (30 d)
832

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de moq-dev/moq

Todos los issues de moq-dev/moq

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.