net: a widened lite-07 reader takes recovered groups its new max already expired

Open
#10,346 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, rust

Research direction

Read js/net/src/lite/widened_max_age.test.ts and the Rust widened_max_age::a_widened_reader_gets_what_was_skipped test to compare the recovery behavior. The issue offers two possible approaches, so first trace how recovered groups are judged in the JS arrival reader and how TrackState::join_start handles stale groups. Done means the JS test gets groups 2 to 5 and a Rust test covers recovery groups landing one at a time.

Written by the indexing model from the issue text.

Description

quest

Problem

A lite-07 reader that widens its live join's max asks for the groups its narrow max was told were old (SUBSCRIBE_OLD) on a recovery subscription of its own. The recovery has no max age and lands its groups oldest first. @moq/net's arrival reader hands out each recovered group as it lands. At that moment the next group it holds is the first one the narrow max kept, so the recovered group's reach looks bounded by that much later group and it passes as fresh, even when the widened max already expired it.

js/net/src/lite/widened_max_age.test.ts (a widened reader gets what was skipped on moq-lite-07-wip) pins this. Groups 0 to 9 are one per second, the reader widens from 2.5 s to 6.5 s, and it gets groups 0 to 5, where Rust's widened_max_age::a_widened_reader_gets_what_was_skipped gets 2 to 5. Rust's sim lands the recovery's groups together, so its reader judges group 0 with group 1 already held. Over a real network Rust may hand them out the same way.

Options

  • Hold a recovered group's staleness verdict until the keys just above it are accounted for, as TrackState::join_start waits for given-up keys before passing a stale group.
  • Have the recovery carry the reader's max (a Joined range), so the publisher judges and names the expired groups in SUBSCRIBE_OLD again.

Done

The JS test asserts groups 2 to 5 for lite-07, and a Rust test drives the recovery's groups landing one at a time.

Found in https://github.com/moq-dev/moq/pull/10307.

(Written by Claude Opus 5.5 with high)

Dominant language
Rust
Stars
1.6k
Forks
251
Avg merge
10h 10m
Merged PRs (30d)
822

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from moq-dev/moq

All issues in moq-dev/moq

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.