Skip to content

fix(interop): an untimed IETF datagram's timestamp is its sequence - #9197

Open
kixelated wants to merge 1 commit into
mainfrom
fix/interop-datagram-timestamp
Open

kixelated wants to merge 1 commit into
mainfrom
fix/interop-datagram-timestamp

Conversation

@kixelated

@kixelated kixelated commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Scheduled Interop run 44353391853 fails datagram rust -> js-native-node and rust -> js-native-bun on moq-transport-18: tail.ts:225 expects a received datagram's timestamp to be undefined, but it is Timestamp.unscaled(0). Since #8918 a JS datagram always carries a timestamp, unscaled at its sequence on a scale-less track (datagram.ts), so the assertion is stale. Earlier scheduled runs failed before reaching this step, so this is persistent, not flaky.

Approach

  • The JS tail subscriber asserts each datagram's timestamp key equals its sequence.
  • The Rust tail subscriber mirrors it, asserting Timestamp::unscaled(sequence) instead of only an absent scale.
  • The Rust publisher's comment no longer says the datagram is untimestamped.

Impact

  • None: interop test clients only. No public API or wire change.

Validation

  • On main: just test interop --tail --publishers rust --subscribers js-native-node --versions moq-transport-18 fails with the nightly's unexpected IETF timestamp for node and bun.
  • On this branch: just test interop --tail --publishers rust --subscribers rust,js-native-node,js-native-bun --versions moq-transport-18 passes, including all four datagram lanes (both directions, node and bun).
  • just ci passes.

Alternatives

  • Keep checking only that the timestamp is unscaled. The key check is stricter and costs nothing.

Caused by

  • moq-dev/moq#8918 - made every received IETF datagram carry a timestamp but left the interop tail asserting none (found by check)

Follow-ups

None.

Models

Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort

(Written by Opus 5.5)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: ed872cf

  • Base: origin/main at 91dc634

  • 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: 01a1f4ce-3f02-7312-a47d-6343cb16ca93, round 1

  • Score: 10/10, Both updated assertions match the subscriber implementations, correcting stale interop expectations without changing runtime behavior.

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

  • Findings: none

#8918 made every received datagram carry a timestamp, unscaled at its
sequence, but the interop tail still expected none from JS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 19, 2026 17:15

@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.

Approach: sound. It updates the stale interop assertions to match the post-#8918 behavior, where a scale-less datagram's timestamp is Timestamp.unscaled(sequence).

Reviewed changes

Reviewed the full diff. I also checked the assertions against js/net/src/time.ts and js/net/src/datagram.ts.

  • JS tail subscriber: asserts frame.timestamp.key === BigInt(sequence). key is bigint | undefined, and datagram.ts sets a scale-less datagram's timestamp to its sequence, so the check is correct.
  • Rust tail subscriber: asserts frame.timestamp == Timestamp::unscaled(sequence) in place of scale().is_none(). This is stricter and matches the JS side.
  • Rust publisher comment: no longer says the datagram carries no timestamp.

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

@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Rust publisher comment now describes each datagram timestamp as unscaled and carried as the OBJECT_DATAGRAM group ID. The Rust and JavaScript subscribers now check that each datagram’s timestamp matches its sequence number.

Merge Risk: Minimal · up to ed872

This updates interop test expectations to match the timestamp behavior already in place, with no production or API impact. It is low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the interop tail subscribers now expect an untimed IETF datagram's timestamp to equal its sequence, matching the change in #8918. The raw summary and objectives both d…
Description check Passed The description states the problem (a stale assertion in tail.ts that fails after #8918), the approach (JS and Rust subscribers now check the timestamp against the sequence, and the Rust publisher com…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the interop tail subscribers now expect an untimed IETF datagram's timestamp to equal its sequence, matching the change in #8918. The raw summary and objectives both describe this assertion update in the JS and Rust tail subscribers, so the title is clearly related and specific.

Full details: Description check

Explanation

The description states the problem (a stale assertion in tail.ts that fails after #8918), the approach (JS and Rust subscribers now check the timestamp against the sequence, and the Rust publisher comment is removed), the impact, and validation steps. This matches the changeset described in the raw summary, so it is clearly related.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

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: 186cb0c3-43ce-4d97-b79a-66bdbf6c5993
Commits

Reviewing files that changed from the base of the PR and between 91dc634 and ed872cf.

Files selected for processing: 2

  • test/interop/clients/js-native/tail.ts
  • test/interop/clients/rust/tail.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

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