moq-net: largest() after a skip, JS refusal errors, and one-shot OLD Max Age (from #10112/#10138 review)

Abierto
#10,295 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
56/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, rust

Línea de trabajo

Start with the named Rust paths in rs/moq-net/src/model/group.rs, rs/moq-net/src/model/track.rs, and rs/moq-net/src/lite/subscriber.rs, plus the JS paths in js/net/src/track.ts, js/net/src/internal.ts, js/net/src/broadcast.ts, and js/net/src/fill.ts. Read the regression test at js/net/src/fill.test.ts:635-639 and trace the corresponding Rust tests for each finding. Done when permanent skips settle largest(), retryable aborts leave it open, JS fetches preserve the refusal error, and OLD verdicts retain the narrower Max Age, with regression coverage for the affected paths.

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

Descripción

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: S. Rust and JS, no public API or wire change. Each fix gets a regression test, mirrored in Rust and JS where both have the path.

The same review's other skip/abort findings are already tracked: unpaid drop debt in https://github.com/moq-dev/moq/issues/10213, and JS skipped frames plus SKIP on a taken one-shot fetch in https://github.com/moq-dev/moq/issues/10277.

Findings and plan

  1. Skipping the largest group never settles largest(). Rust group::Producer::skip (rs/moq-net/src/model/group.rs:2834-2840) and TrackState::skip_groups never call finish_largest, so Largest.open stays true and poll_largest (rs/moq-net/src/model/track.rs:5882-5895) waits forever while the producer is retained. JS #endLargest returns early on #largestOpen (js/net/src/track.ts:3559-3569), so largest() hangs (track.ts:6530).
    Fix: a permanent skip covering the largest group settles it (Rust clears open as finish_largest does; JS sets largestFinished); a retryable abort keeps it open.
    Caused by https://github.com/moq-dev/moq/pull/10112.
  2. JS reports NotFound for a fetch refused with another error. refuse stores { ...holeOf(error) } (js/net/src/track.ts:5158), and holeOf maps Cancel to drop (js/net/src/internal.ts:388-397), so fetchGroup throws NotFound (js/net/src/broadcast.ts:372-378). Rust returns the refusal's own error (rs/moq-net/src/model/track.rs:10124-10144), as JS refuseGroups's doc promises (js/net/src/fill.ts:862-866).
    Fix: keep the supplied error on the requesting fetch's refusal, normalizing only the range disposition, and restore js/net/src/fill.test.ts:635-639's expectation.
    Caused by https://github.com/moq-dev/moq/pull/10112.
  3. A one-shot fill's OLD verdict loses its Max Age. SubFillRun maps OLD to req.reject(Old) and drops max_age (rs/moq-net/src/lite/subscriber.rs:18009-18021), and Inner::reject records the prefix as Hole::stale(max_age_bound()) (rs/moq-net/src/model/track/fill.rs:1814-1830). When upstream's cache ceiling is narrower than this hop's bound, a reader between the two settles on a verdict upstream never made, which breaks the rule that a cache answers only what upstream would.
    Fix: record stale(min(bound, old.max_age)). This predates the split; found re-reviewing https://github.com/moq-dev/moq/pull/10138.

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)

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.