Skip to content

feat(moq-net,net)!: lite-07 FETCH drops Start Byte - #8837

Open
kixelated wants to merge 2 commits into
mainfrom
quest/m2/fetch-start-byte
Open

kixelated wants to merge 2 commits into
mainfrom
quest/m2/fetch-start-byte

Conversation

@kixelated

@kixelated kixelated commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m2/fetch-start-byte.md and deletes it.

Summary

Backs out moq-dev/moq#8699, as the maintainer picked on moq-dev/moq#8764. lite-07-wip FETCH no longer carries Start Byte. A frame read partway when its route fails is refetched whole from the next route, and the reader skips the bytes it already read (frame::Consumer's Recover), as before #8699.

Frames are capped at 32 MiB (MAX_CACHE_BYTES), whole-frame reads asked byte 0 anyway, and only chunk readers saved at most one frame's prefix on one hop per failover. That did not pay for a Lead in the group model, the start-byte plumbing through the fill, subscriber, and publisher in Rust and JS, and a field frozen in lite-07.

Removed:

  • Draft: Start Byte in the lite draft's FETCH, its Positions sentence, and its changelog line; the ietf draft's ban on a non-zero Start Byte for a track with a Version, and its changelog line.
  • Rust (moq-net): lite::Fetch::start_byte, Version::has_byte_start, group::Bounds::byte, the Lead (create_lead, lead_at, group::Consumer::at, poll_next_frame_at), the fill's byte (Ask::byte, Pending::byte, GroupFill::byte_start), frame::Consumer::base, and the publisher's serving from a byte.
  • JS (@moq/net): Fetch.startByte, hasByteStart, sendPayloadFrom, and the publisher's serving from a byte.

The revert of the squashed #8699 commit conflicted only where later PRs renamed sequence to key or touched the same tests; those were resolved to the current names.

Quests: Byte holes records the backout, lists restoring the slice in what remains, and waits on the maintainer naming a consumer of frames over 32 MiB, as this quest's Plan required. Lite-07 finalize drops its link, and Yield on relay links no longer points at Start Byte as its example.

Choices made without asking

Public API and wire impact

Validation

  • half_read_frame::a_half_read_frame_refetches_whole_and_skips_what_was_read: relays P -> A, B -> E over lite-07-wip. E reads 2 MiB of a 5 MiB frame through A, A's session dies, and E reads the rest through B byte-for-byte. B's session sent between the frame's full size and 1 KiB more, so the frame was refetched whole and the read part skipped.
  • cargo test -p moq-net --all-features: all pass (3375 unit, 602 integration).
  • cargo clippy -p moq-net --all-features --all-targets -D warnings and the --no-default-features --lib build: clean.
  • just check: passes (Rust lint across the workspace, JS, drafts, markdown, quest).
  • just test interop --all: 211 passed, 0 failed.

Caused by

Follow-ups

None new. Restoring the slice stays in Byte holes.

Models

Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm A)

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: 853a4a1

  • Base: origin/main at 505a86f

  • Risk: medium, the base has no RISK.md to name what is always high or customer-facing, so every change is medium

  • Classified: medium by default

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1df97-1c5b-7573-8955-40c36b2ca597, round 1

  • Score: 9/10, The removal consistently updates Rust, JavaScript, and the draft while preserving recovery for partially read frames; source inspection found no actionable defects, but builds and tests were not run as instructed.

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

kixelated and others added 2 commits November 15, 2026 05:00
Backs out #8699. A failover mid-frame refetches the frame whole and skips
the bytes already read, as before. Frames are capped at 32 MiB, so the
byte offset saved at most one frame's prefix per failover, on one hop,
and only for chunk readers. The draft, Rust, and JS drop the field
together; lite-07 is unpublished.

The 5 MiB failover integration test stays as half_read_frame.rs and now
asserts the new route resends the whole frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title lite-07 freezes without FETCH Start Byte feat(moq-net,net)!: lite-07 FETCH drops Start Byte Nov 15, 2026
@kixelated
kixelated marked this pull request as ready for review November 15, 2026 14:24
@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a2126e75-3eba-4a1a-82e5-fd9048b4cf1e
Commits

Reviewing files that changed from the base of the PR and between 250a13a and 853a4a1.

Files selected for processing: 24

  • drafts/draft-lcurley-moq-ietf.md
  • drafts/draft-lcurley-moq-lite.md
  • js/net/src/lite/fetch.test.ts
  • js/net/src/lite/fetch.ts
  • js/net/src/lite/publisher.ts
  • js/net/src/lite/version.ts
  • js/net/src/payload.ts
  • quest/m2/fetch-start-byte.md
  • quest/m2/lite07-finalize.md
  • quest/m2/yield-relay-links.md
  • quest/m3/unbounded-groups/byte-holes.md
  • rs/moq-net/src/lite/fetch.rs
  • rs/moq-net/src/lite/publisher.rs
  • rs/moq-net/src/lite/subscriber.rs
  • rs/moq-net/src/lite/version.rs
  • rs/moq-net/src/model/frame.rs
  • rs/moq-net/src/model/group.rs
  • rs/moq-net/src/model/resume.rs
  • rs/moq-net/src/model/track.rs
  • rs/moq-net/src/model/track/fill.rs
  • rs/moq-net/src/model/track/miss.rs
  • rs/moq-net/src/recv.rs
  • rs/moq-net/tests/integration/half_read_frame.rs
  • rs/moq-net/tests/integration/main.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This review covers the full backout of #8699's FETCH Start Byte across the drafts, moq-net, @moq/net, and the quest files.

  • Wire and drafts: lite-07-wip FETCH drops Start Byte in both the encoder and decoder, in Rust and JS. The lite draft loses the field, its Positions sentence, and its changelog line. The ietf draft loses its non-zero Start Byte ban.
  • Group model: group::Bounds::byte and the whole Lead path are gone (create_lead, lead_at, Consumer::at, poll_next_frame_at, the lead's billing and shedding in tail/trim). bound goes back to a plain start_at.
  • Failover read: frame::Consumer's Recover asks for the frame by index alone, reads the replacement with poll_next_frame, and keeps its own read_idx against the new whole-frame source. Without base, the offset logic in poll_read_chunk/poll_read_all goes back to plain read_idx.
  • Fill and fetch plumbing: the byte is removed from Ask, Pending, Inner, GroupFill, Fetching, and group::Fetch. Fill merging compares frames only.
  • Publisher and subscriber serving: the Rust fetch serve goes back to with_range(start_frame..) with the index() != start_frame → Lagged guard, and buffer_frame_info always announces size. FrameIngest::dispatch no longer routes to a lead. JS #runFetchGroup writes whole frames through sendPayload.
  • Regression test: half_read_frame.rs (formerly byte_holes.rs) now checks that the reader gets the 5 MiB frame byte-for-byte and that B resends the whole frame.
  • Quests: fetch-start-byte.md is deleted, byte-holes.md records the backout and a maintainer Waiting item, and the links in lite07-finalize.md and yield-relay-links.md are updated.

A repo-wide search found no leftover start-byte or Lead references in the code, drafts, doc/, or the TLA+ models.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant