Skip to content

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

Merged
kixelated merged 2 commits into
mainfrom
fix/interop-datagram-timestamp
Nov 22, 2026
Merged

kixelated merged 2 commits 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 and JS publishers' comments no longer say 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.
  • After merging main (conflict in the Rust publisher's comment against main's new .context("the track already exists"); kept both): just test interop --tail --publishers rust,js-native-node --subscribers rust,js-native-node,js-native-bun --versions moq-transport-18 passes, including datagram rust -> js-native-node and rust -> js-native-bun; just check 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
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, XS)

(Written by Opus 5.5)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: c9ae869

  • Base: origin/main at f2965d8

  • Risk: low, Only interop test assertions and comments change, so contributors could see test failures, but no consumer API or wire behavior changes and a revert fully undoes it.

  • Classified: low by Codex, gpt-6.1-sol, low effort, session 01a2021b-8ab0-7bc2-ad64-db09d7cd7600

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

  • Session: 01a2021b-a688-7413-b1f6-8d5d6e37a97c, round 1

  • Score: 10/10, The updated assertions match both implementations and correct stale expectations without changing production behavior.

  • Rounds: 2; 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[bot]
pullfrog Bot previously approved these changes Nov 19, 2026

@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…
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.
Description check Passed The description states the problem (the Interop datagram rust to js-native-node and rust to js-native-bun runs fail on tail.ts:225 because the timestamp assertion is stale after #8918), the approach (…
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 (the Interop datagram rust to js-native-node and rust to js-native-bun runs fail on tail.ts:225 because the timestamp assertion is stale after #8918), the approach (JS and Rust tail subscribers now check timestamp equals sequence, and publisher comments are updated), the validation commands, and the linked cause. It directly describes the changeset, so it is not off-topic or vague.

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.

# Conflicts:
#	test/interop/clients/rust/tail.rs

@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 since the prior review: only a merge of main into the branch.

  • Merged main — no change to the PR's own edits: the JS and Rust tail subscribers still assert a datagram's timestamp is unscaled at its sequence.

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

@kixelated
kixelated added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit c9e2630 Nov 22, 2026
9 checks passed
@kixelated
kixelated deleted the fix/interop-datagram-timestamp branch November 22, 2026 08:12
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