Skip to content

test(moq-net): a request waiting for a way fails once its route ends - #9312

Merged
kixelated merged 1 commit into
mainfrom
test/route-awaits-ended-route
Nov 23, 2026
Merged

kixelated merged 1 commit into
mainfrom
test/route-awaits-ended-route

Conversation

@kixelated

@kixelated kixelated commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Nightly mutants reports a survivor (job): rs/moq-net/src/route/relay.rs:2550:27: replace || with && in Router::awaits. No test reaches awaits with the origin's claims known but no route to it. The only test of a lost route withdraws the offer, which also forgets the claims, so awaits returns false at the known check whatever the guard says.

Approach

The guard is not redundant. A neighbour's Dead for a session on the route's path ends the route but keeps the heard copy of its claims, so best loses the origin while known keeps an available claim of the best precedence. There, && would hold the request forever instead of failing it. The new node test drives that: a request waiting for a way, then a Dead on the route's link, after which poll_forward fails both the picked and the named request.

Impact

None: test only. No public API or wire change.

Alternatives

Excluding the mutant in .cargo/mutants.toml: rejected, since the mutant changes behavior.

Caused by

  • moq-dev/moq#9231 - added Router::awaits without a test of an ended route whose claims stay known (found by check: Nightly mutants)

Validation

  • cargo mutants -f rs/moq-net/src/route/relay.rs --re 'replace \|\| with && in Router<N, I, A>::awaits' now lists the mutant under caught. That same run reported one more survivor, resume.rs:1811:5: delete field ranges from struct Subscription expression in Reader::resumed, which belongs to the resume-route-mutants quest.
  • just rs test -p moq-net --features async --lib -E 'test(/a_request_waiting_for_a_way/)' passes all three tests.
  • just check passes.

Follow-ups

  • The resume.rs:1811 survivor above, for quest/m0/nightly/resume-route-mutants.md.

Models

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

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

Review

Rewritten by quest review after each round.

  • Head: 3d6ab02

  • Base: origin/main at c63adc8

  • Risk: low, This adds only a routing regression test, so no consumer or deployed peer behavior can break, and a revert fully removes the change.

  • Classified: low by Codex, gpt-6.1-sol, low effort, session 01a1ff4f-1f8e-7fd3-865f-3761b5836d49

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

  • Session: 01a1ff4f-2f3d-7af2-bf1f-2ddc0f3f0a1a, round 1

  • Score: 10/10, The focused routing regression tests cover wakeup and forwarding failure after a route ends, with no actionable defects found by source inspection; tests were not run as instructed.

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

  • Findings: none

Kills the nightly mutant replacing || with && in Router::awaits: an ended
route keeps its copy of the claims, so only the routed check fails it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 21, 2026 18:12
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds a test for a pending request after the claim’s serving session closes. The test delivers Msg::Dead for a hop on the remaining route, checks that the request wakes, and verifies that forwarding returns Poll::Ready(None) both without a named node and with far.

Merge Risk: Minimal · up to 3d6ab

This change only adds a routing regression test and does not alter production behavior. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the added test and its scenario: a request waiting for a way fails once its route ends. The change is a single added routing test in rs/moq-net, and the title matches it.
Description check Passed The description explains the surviving Router::awaits mutant, the guard's purpose, the new node test that drives the Dead-on-route scenario, and the validation commands. It matches the test-only chang…
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: Description check

Explanation

The description explains the surviving Router::awaits mutant, the guard's purpose, the new node test that drives the Dead-on-route scenario, and the validation commands. It matches the test-only change.

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: 37029442-3cfb-46b5-b45d-23722acc953a
Commits

Reviewing files that changed from the base of the PR and between c63adc8 and 3d6ab02.

Files selected for processing: 1

  • rs/moq-net/src/route/node/tests.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.

@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. A node test drives the surviving Router::awaits mutant by ending the route with a Dead while keeping the claims known.

Reviewed changes

  • a_request_waiting_for_a_way_fails_once_its_route_ends in rs/moq-net/src/route/node/tests.rs: sets up a route and claims, parks a request, then sends Dead for the route's hop. It asserts the waiter is woken and that both the picked and named poll_forward calls return Ready(None). It follows the setup style of the neighbouring test.

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

@kixelated
kixelated added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit fd122bb Nov 23, 2026
7 checks passed
@kixelated
kixelated deleted the test/route-awaits-ended-route branch November 23, 2026 05:03
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