Skip to content

test(net): cover lagging replicas on epoch wires - #6232

Merged
kixelated merged 8 commits into
mainfrom
quest/m1/replica-resume
Oct 23, 2026
Merged

kixelated merged 8 commits into
mainfrom
quest/m1/replica-resume

Conversation

@kixelated

@kixelated kixelated commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The lagging same-epoch replica fixture covered only lite-07 and stopped after the successor group's first frame. IETF draft 17 and 22 use different resume request paths, so both need direct coverage.

Approach

Run the real-session fixture on all three protocols, asserting the interrupted suffix and complete successor group, timestamps, order, and no trailing delivery. Add a manual-clock JS mirror whose two replicas forward one original publisher's bytes, with a deterministic mid-group stall and session failure. Existing recovery passes without production changes. Remove the completed quest.

Current consumers are subscribers resuming through a warmed replica after their incumbent relay fails. The test fixtures exercise that existing behavior and run in the existing net CI suites.

Impact

  • Public API: none.
  • Wire: none. Draft 17's joining FETCH and draft 22's location filter already recover this case.

Alternatives

Avoided a new JS transport latency API: a frame gate models the lag deterministically without changing production interfaces. No retry, sleep, or timeout was added.

Validation

  • just rs test -p moq-net: 2,865 passed, 8 skipped, including all three lagging-replica wire cases.
  • bun test js/net/src/resume.test.ts: 69 passed.
  • bun run --filter @moq/net check: passed.
  • quest check: 452 documents valid; formatting and diff checks passed.
  • After merging main at 43fc925 (which includes moq-dev/moq#6348): the three lagging_route_dies cases pass, including ietf_17_resumes_after_a_lagging_route_dies; bun test js/net/src/resume.test.ts passes 83 tests after renaming clock.advanceAsync to awaited clock.advance per moq-dev/moq#6222 (no logic change); just check js, rs, and quest modules pass.
  • CI: just ci selects moq-net and @moq/net from the changed files, so both fixtures run in the PR and merge-queue checks. The local flake module cannot build the runner image on this host (unshare: write failed /proc/self/uid_map); this PR does not touch the flake.

Follow-ups

No product decisions or follow-up quests. Audited the in-flight resume end/dedup change; these tests do not duplicate its fixes or depend on them.

(Written by GPT-6 and Claude Opus 5.5)

kixelated and others added 2 commits October 21, 2026 18:21
Co-Authored-By: GPT-6 <noreply@openai.com>
Exercise IETF 17 and 22 beside lite-07 and mirror recovery from one original source in JS. Assert the complete resumed suffix and successor group exactly once and in order.

Co-Authored-By: GPT-6 <noreply@openai.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Quest outcome: complete as test coverage. All three Rust wire cases and the JS same-source mirror pass; the full moq-net suite passed 2,865 tests (8 skipped), JS resume passed 69 tests, and type/quest checks passed. No API or wire change, no open decisions, and no suggested product follow-ups. Source is committed at 93f9319.

Readiness remains blocked by the existing host restriction building the Nix runner image (unshare: write failed /proc/self/uid_map: Operation not permitted). Keep draft until just ci completes in a capable environment. No merge or enqueue requested.

(Written by GPT-6)

@kixelated
kixelated marked this pull request as ready for review October 22, 2026 06:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-23T02:07:46.907398Z a2991ce New commits
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Oct 22, 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 25 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: 72b033d1-483c-4c4d-b84d-14a6aa933880
📥 Commits

Reviewing files that changed from the base of the PR and between 3b6234c and a2991ce.

📒 Files selected for processing: 4
  • js/net/src/resume.test.ts
  • quest/m1/README.md
  • quest/m1/replica-resume.md
  • rs/moq-net/tests/integration/route_change.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

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13aae8d672

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread js/net/src/resume.test.ts
Comment thread rs/moq-net/tests/integration/route_change.rs Outdated
An empty channel or queue also matched a subscription that ended after catch-up. The source is still open, so assert the subscriber is open rather than merely idle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated and others added 2 commits October 22, 2026 14:05
…rename

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 22, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
@kixelated
kixelated removed this pull request from the merge queue due to a manual request Oct 23, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 2e226ee Oct 23, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m1/replica-resume branch October 23, 2026 04:28
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