Skip to content

test(net): kill or exclude 35 resume and relay route mutants - #9540

Merged
kixelated merged 11 commits into
mainfrom
quest/m0/nightly/resume-route-mutants
Nov 25, 2026
Merged

kixelated merged 11 commits into
mainfrom
quest/m0/nightly/resume-route-mutants

Conversation

@kixelated

@kixelated kixelated commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Works quest/m0/nightly/resume-route-mutants.md: kills or excludes 35 of the 45 resume.rs and route/relay.rs mutants that survive on main, and rewrites the quest to the ten left.

Summary

I reran cargo-mutants on main at moq-dev/moq#9531 over three sets:

  • every mutant in the functions the quest names;
  • the earlier rotation slices' survivors;
  • the in-diff set tonight's Nightly would test, which is everything changed since run 45242597151.

That found 45 survivors, 8 of them new since the quest was written. 35 are now handled:

  • Killed by new tests (30).
    • Copy::cap: a later switch at the same boundary only narrows a replaced copy's cap.
    • Reader::resumed: four tests, covering a failed serving copy, an unmirrored edit, an answered empty copy, and a placed live join.
    • Reader::sync: the returning route's resume.
    • Reader::poll_drop: two tests.
    • Reader::drained, owed, asking (two), and ask.
    • poll_lowest's refusal and held-back checks.
    • Subscriber::ranges, knows_edge, and places_as_upstream.
    • Router::step.
    • a_capped_copy_places_only_what_its_cap_leaves_whole gains no row. The window mutant is excluded instead, see below.
  • Rewritten away (3 sites).
    • Copy::cap compares one (group, frame) limit, where a whole group sorts past every frame. It drops the dead stop filter: held_at only ever returns a stop in the boundary group, past its first frame.
    • Reader::resolve tests a time start with != 0.
    • Reader::sync's restate arm clears ranges and joining in place. cargo-mutants can't exclude a "delete field" mutant, and dropping joining there changed nothing observable.
    • backfill_gaps takes a staleness verdict from every answered copy, since drains already checks replaced.
  • Excluded as equivalent (5), each with its reason in .cargo/mutants.toml:
    • Router::disconnect < to <=: session numbers are unique, and the closed session already left peers.
    • Router::awaits' shortcut guard: the best route is always a usable one.
    • Reader::window's capped-end filter < to >: a capped copy resolves an end its cap leaves whole one past the range's own, since keys are times.
    • backfill_gaps key < end in drains: may_take already confines a key to the copy's ranges.
    • backfill_gaps owed.len() < raised.len(): excluded on an argument, see Waiting.

The ten left are listed in the rewritten quest, with what each probe found. The quest's late-group lead didn't reproduce in eight setups, and a_start_moved_to_the_resume_point_takes_no_late_group_below_it pins it.

Public API: none. Wire: none.

Validation

  • cargo nextest run -p moq-net --all-features --lib --test integration passes: 4479 tests.
  • For each kill, I applied the mutant to the source by hand and checked that the new test fails on it and passes without it.
  • I reran cargo-mutants (-j 8, from .cargo/mutants.toml) on a snapshot of 677b4d9. It covered every mutant in the functions handled here, plus the in-diff set: 178 mutants, 165 caught, 3 unviable. The 10 missed are exactly the ten the quest keeps.
  • just check passes except check quest, which flags the .claude/skills as outdated against the pinned quest. That fails the same way on main, and this branch doesn't touch those files.

Decisions

The maintainer's picks, and the choices I made without asking:

  • The rewrites above remove mutants instead of excluding them. Only the resolve one (start != 0) hides a boundary that nothing tests: a time start of 0 that no copy resolves is placed as it is instead of waiting. backfill_gaps places such a start at its own time anyway.
  • Maintainer, 2026-11-24 (comment): land this partial PR now. The quest keeps the ten left, which Nightly's list shrinks to from 45.
  • Maintainer, 2026-11-24: keep the owed.len() < raised.len() exclusion in backfill_gaps (.cargo/mutants.toml, column 17), with its argument in the comment, rather than moving it to the quest's unproven list.
  • I merged main for the refuse_time test helper (moq-dev/moq#9495), which one test uses.

Follow-ups

  • quest/m0/nightly/resume-model-missing-group.md (new, M): MOQ_RESUME_SEED=2 MOQ_RESUME_CASES=4096 fails the resume model on main. A reader joining after two give-ups misses group 1 across a route flap. Nightly sweeps a fresh seed, so seeds like this one fail it on some nights. Open decision: none.

Caused by

No defect fixed. The tests and exclusions cover logic that landed untested.

Models

Size: M
Implementer: Claude Code, 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: 677b4d9

  • Base: origin/main at b367c92

  • Risk: medium, The branch changes shipped `rs/moq-net` resume logic (`Copy::cap`, `Reader::resolve`, `backfill_gaps`, and the mirrored-ranges rebuild in `resume.rs`), which could break subscribers' resume and delivery behavior if it is wrong, but it keeps the public API and wire format and a revert undoes it fully, so it is a fix rather than a high-risk break; the mutants config, quest docs, and new tests are low.

  • Classified: medium by Claude Code, claude-haiku-5-5, low effort, session 1e237656-43b2-4a73-9a52-87fe472eb615

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

  • Session: 01a210c0-5988-79d0-b29a-10917b1ece09, round 1

  • Score: 9/10, No actionable regressions were found in the reviewed resume logic, but builds, tests, and model checks were not run as instructed.

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

  • Findings: none

  • Reviewer: Codex, gpt-6.1-sol, xhigh effort, shadow

  • Session: 01a210c0-599a-79a3-8270-3cb787fa04bf, round 1

  • Score: 9/10, Static review found no actionable defects in cap narrowing, range resolution, or subscription mirroring; builds, tests, and model checks were not run, as instructed.

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

  • Findings: none

kixelated and others added 11 commits November 24, 2026 09:00
…d disconnect mutants

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and placement for its serving copy

Kills the Subscriber::ranges, knows_edge, and places_as_upstream mutants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A restate clears the mirrored joining map in place, which only bounds memory:
cargo-mutants cannot exclude its field-deletion mutant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takes every answered copy's staleness verdict, since drains reads only the
replaced ones; excludes the empty-resolve and cap-bound comparisons as
equivalent; pins that a start moved to the resume point takes no late group
below it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hortcut guard

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… model's missing group

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title No resume or relay route mutant survives test(net): kill or exclude 35 resume and relay route mutants Nov 25, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (/quest-run pick, 2026-11-24):

  • ✅ Land this partial PR now: it cuts Nightly's surviving-mutant list from 45 to 10, and the quest keeps the remaining ten (rejected: keep it open until all ten are resolved).
  • ✅ Keep the .cargo/mutants.toml exclusion for the owed.len() < raised.len() mutant in backfill_gaps, with its argument in the comment (rejected: move it to the quest's unproven list).

(Written by Claude Opus 5.5)

@kixelated
kixelated marked this pull request as ready for review November 25, 2026 03:31
@coderabbitai

coderabbitai Bot commented Nov 25, 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 23 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: 4590647c-0503-4e24-a04a-2f176b9492d2
Commits

Reviewing files that changed from the base of the PR and between 36eda93 and 677b4d9.

Files selected for processing: 5

  • .cargo/mutants.toml
  • quest/m0/nightly/resume-model-missing-group.md
  • quest/m0/nightly/resume-route-mutants.md
  • rs/moq-net/src/model/resume.rs
  • rs/moq-net/src/route/relay.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

@kixelated

Copy link
Copy Markdown
Collaborator Author

Answers #9540 (comment): both picks are recorded under ## Decisions in the PR body. The partial PR lands now and the quest keeps the ten mutants left. The owed.len() < raised.len() exclusion stays in .cargo/mutants.toml with its argument in the comment. The head 677b4d9 needed no code change for either pick. The local quest review round on it (Codex gpt-6.1-sol high, plus an xhigh shadow reviewer) reported no findings.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 2d3bc05 Nov 25, 2026
13 checks passed
@kixelated
kixelated deleted the quest/m0/nightly/resume-route-mutants branch November 25, 2026 03:52
kixelated added a commit that referenced this pull request Nov 25, 2026
#9540's ten resume tests assumed an arrival read hands out a backlog oldest first. Those draining one now expect newest first, as this branch's others do; those whose subject needs the oldest read first, a capped unread group or a placement, ask ascending.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant