Skip to content

fix(net): write IETF data stream headers in one write (backport #6504) - #6769

Merged
kixelated merged 1 commit into
releasefrom
backport/js-ietf-header-one-write
Oct 25, 2026
Merged

kixelated merged 1 commit into
releasefrom
backport/js-ietf-header-one-write

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Backports the js/net change from moq-dev/moq#6504 to release, so it ships in the next @moq/net patch release and the interop runner's moq-dev-js client can bump to it without taking main's breaking API.

Problem

imquic drops a SUBGROUP_HEADER or FETCH_HEADER that arrives across more than one stream read (meetecho/imquic#43, acknowledged upstream, still open). @moq/net 0.4.6 on release writes the header one field per write(), which the @moq/web-transport polyfill sends as separate STREAM frames, so the runner's moq-dev-js data-subgroup-basic case gets no objects through imquic (draft-22, WebTransport).

Changes

  • Group.encode and FetchHeader.encode write the stream type and header in one write, as on main. The fetch path no longer writes its stream type separately.
  • Writer.collect and concat come over from main (moq-dev/moq#6255) unchanged, so the release-into-main merge stays clean. stream.ts is not exported from the package.
  • ietf/object.test.ts carries fix(net): write IETF data stream headers in one write #6504's test; it fails on release without the fix (6 writes instead of 2).

Public API and wire impact

  • Public API: none.
  • Wire: none. Same bytes, fewer writes.

Verification

The runner's moq-dev-js client (builds/moq-dev-js/src/main.ts at upstream HEAD) against ghcr.io/englishm/moq-interop-runner-imquic-moq-relay:latest locally:

@moq/net data-subgroup-basic
published 0.4.4 fails 2/2, all 15 objects missing
this branch passes 3/3

The other cases are unchanged between the two: announce-subscribe times out waiting for the broadcast with both, so it is unrelated.

Checks

  • just check origin/release: pass (@moq/net 1282 tests).
  • just test interop --all: not run. The harness runs moq-lite, which this does not touch; the live imquic runs above are the coverage.

Choices

  • Backported per CONTRIBUTING.md (broken interop), JS-only like moq-dev/moq#6518. The Rust publisher already buffers the header.

Tracked by the quest PR moq-dev/moq#6764.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

imquic drops a SUBGROUP_HEADER or FETCH_HEADER that spans more than one
stream read, and @moq/net on release writes the header one field per write.
Write the stream type and header as one chunk, as main does since #6504.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T09:13:25.918640Z d29a1aa PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed commit: d29a1aa

No actionable bugs found. This is a focused backport: buffering preserves the header encoding, copies reusable scratch buffers safely, and moves the FETCH stream type into the header encoder without duplicating it at the publisher. The regression checks both varint formats, write count and decoding. Coalescing writes is a reasonable interoperability mitigation, though it cannot guarantee transport read boundaries.

Verification: static review of the patch, writer lifecycle, publisher call path and original in-repository change. I did not run tests or independently verify the external imquic/runner results.

@kixelated
kixelated merged commit 44abd5f into release Oct 25, 2026
5 checks passed
@kixelated
kixelated deleted the backport/js-ietf-header-one-write branch October 25, 2026 16:04
kixelated added a commit that referenced this pull request Oct 28, 2026
@moq/net 0.4.7 shipped from release with #6769, and
englishm/moq-interop-runner#179 moves the runner's moq-dev-js client to
it. Rewrite the quest to wait for that PR to merge and the client image
to be rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gmarzot pushed a commit to englishm/moq-interop-runner that referenced this pull request Oct 28, 2026
imquic drops a SUBGROUP_HEADER or FETCH_HEADER that arrives across more
than one stream read (meetecho/imquic#43), and @moq/net 0.4.6 and
earlier write those headers one field per write, so imquic discards
every object and data-subgroup-basic fails. 0.4.7 carries
moq-dev/moq#6769 and writes each header in one write.

Against the imquic relay image (draft-22, WebTransport), the client
built from this commit passes data-subgroup-basic 3/3 (0.4.6: 0/3).
announce-subscribe times out on both versions.

Also corrects the TAP banner, which still said 0.4.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant