Skip to content

test(moq-net): kill or exclude 26 of the resume and relay route mutant survivors - #9294

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

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

Conversation

@kixelated

@kixelated kixelated commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Works on quest/m0/nightly/resume-route-mutants.md: of the 30 mutants Nightly run 44767045952 reported surviving in resume.rs and relay.rs, 27 are now caught or excluded with a reason. The quest is rewritten to the three left, which wait on moq-dev/moq#9278.

Changes

Tests (each named for the edge case its guard decides):

  • relay.rs publish and adopt, the unhold closures (10 mutants): a_holder_restating_its_copy_still_holds_it and a_neighbour_restating_its_copy_still_holds_it. A claimant or scoped neighbour that restates its copy of an ended claim (same announcer, same or older epoch) is still held back. Another announcer's claim or a newer epoch lets it go, so the ended claim claimed again after that shows.
  • relay.rs withdraw, the lost_copy closure (2): a_lost_copy_beside_an_ended_claim_ends_no_other_path. A copy that the ending message loses ends only its own path. Another announcer's claim, lost earlier under the ended one, still waits out its debounce.
  • Resume::add (3): the_fronts_subscription_resumes_past_the_reader_furthest_behind, in both reader orders.
  • Mirrored::insert and remove (2): editing_an_oldest_end_away_lifts_its_refusal. The case is a range keyed again in place, then a range retired.
  • Copy::ask_whole (1): a_copy_asked_whole_keys_its_ranges_as_the_reader_does. Edits that outrun the reader's log reach the copy as one whole ask, and the reader's next edit replaces the range there.
  • Reader::sync's resolve right after a range change (1, delete !): an_added_relative_start_below_the_resume_point_reads_the_group_it_counts_back_to. A range added with Relative(3) after a route switch whose resume point lies above the group it counts back to. Without that resolve, the reader places the range from the copy's own subscription, which the wire clamped up to the floor, and reads group 0 as well as group 2. A time start never showed it, because unraised restores a time start; a relative one has no such fallback.
  • Subscriber::landed (1): a_front_reports_a_late_arrival_as_a_gap now asserts that the gap says when its group landed.
  • unraised (9 of 12): a_replacement_places_time_anchors_around_its_resume_point. An unanswered replacement places a range wholly under its resume point at the end it asks for, and places a time start above it at the group holding that time.
  • Not a survivor fix: a_failed_copy_places_no_range_the_reader_updates (sync's failed-copy skip, with the update taken before the next route) and an_added_time_start_below_the_resume_point_reads_the_group_holding_it.

Code:

  • Subscriber::poll_peek_group: deleted the moved check and its Idle::disarm (1 mutant). passed was true only for a Ready(Ok(None)) read, and idle.finish(.., pending = false) already leaves the gate unarmed, so the disarm never changed anything.
  • .cargo/mutants.toml: two exclusions, each with its reason.
    • The + in withdraw's self.count(origins.len() + peers.len()) (2 mutants), for the same reason as the existing visit|count rule: it only feeds the tests' work budgets.
    • resolve's !range.is_empty() before an open relative end (1). Probes of six ranges, in both read orders, read the same groups with and without it. A range placed with its relative end still open stays unsettled, so a copy places it again once it resolves that end. The check only saves the window an edit. The column is pinned, because the other delete ! in resolve is caught.

Left in the quest:

  • unraised, 3 mutants: start < floor to <=, and the end < floor guard as true or <=. They decide only an anchor exactly at the resume point, or a time end above it. Probes with the replacement holding and lacking the floor group read the same groups. moq-dev/moq#9278 deletes unraised for raised, so they are left to it instead of excluded.

Choices for review:

  • Deleting the dead disarm rather than excluding its mutant.
  • Excluding the resolve relative-end check rather than deleting it: it saves the window an edit restart, the same kind of saving the file's other exclusions name.
  • Leaving the three unraised mutants to moq-dev/moq#9278 rather than excluding them now. Its head 7bed524d11 (checked 2026-11-20, during its scope-down) still replaces unraised with raised, so the quest keeps that as an outside wait and this PR goes ready without it.

Impact

  • Public API: none. Wire: none. Behavior: none (one dead branch removed).

Validation

  • The Reader::sync mutant applied by hand: the new relative-start test fails with left: [0, 2], right: [2]; reverted, it and the other an_added_* tests pass (cargo test -p moq-net --features async --lib -- an_added_).
  • cargo mutants --in-place on the 30 survivors by name, plus poll_peek_group, with the resume and relay test modules: 26 caught, the 4 above missed. The field-deletion mutants in the log come in past --re; they are not survivors.
  • The poll_peek_group is_pending mutant, which the module filter missed, against the full --lib --test integration suite: caught by range_anchors::a_time_end_between_groups_ends_an_ordered_read_at_the_next. The other 4129 tests pass.
  • Each exclusion and deferral was probed by applying the mutation by hand and comparing what readers received (described above).
  • just check and quest check --base origin/main pass.

Follow-ups

None. The quest file holds the remaining work.

Models

Size: S
Implementer: Claude, claude-opus-5-5, medium effort (arm A)
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, S, arm A)

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

Review

Rewritten by quest review after each round.

  • Head: eab4c8e

  • Base: origin/main at 99d3757

  • Risk: low, The change adds tests, mutation exclusions, and plan updates while removing a redundant idle disarm, preserving subscriber behavior for consumers; a revert fully undoes it.

  • Classified: low by Codex, gpt-6.1-sol, low effort, session 01a1fd09-9d3b-7d43-ac09-16ec10b2836c

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

  • Session: 01a1fd09-e628-7c63-acee-d3789d5a177e, round 1

  • Score: 9/10, Source review found no actionable defects because Idle::finish already leaves completed reads unarmed, though builds and tests were not run.

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

  • Findings: none

kixelated and others added 6 commits November 20, 2026 21:41
…resume

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…art reads the group holding it

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title No resume or relay route mutant survives test(moq-net): kill or exclude 26 of the resume and relay route mutant survivors Nov 21, 2026
…he group it counts back to

Kills the Reader::sync mutant that skips the resolve right after a range
change: without it the reader places the range at the copy's own,
floor-raised resolution and reads group 0 too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 21, 2026 07:38
@kixelated
kixelated enabled auto-merge November 21, 2026 07:39
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Subscriber::poll_peek_group now forgets ordered-read delivery history below the effective window end without disarming the idle gate. New tests cover resume-range edits, failed-copy placement, aggregate resume, and relay withdrawal behavior. The change also updates mutation exclusions and the nightly mutation plan.

Merge Risk: Minimal · up to eab4c

This PR mainly adds regression tests for resume and relay-route behavior, plus mutation-testing exclusions and plan notes. It also removes one idle-gate branch that the author and earlier review found to be redundant. No public API, wire format or user-visible behavior change is expected, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: adding tests that kill or exclude resume and relay route mutant survivors. The changeset adds resume.rs and relay.rs regression tests, plus .cargo/mutants.toml exclusions a…
Description check Passed The description matches the changeset. It names the quest file and the Nightly run, lists the added resume.rs and relay.rs tests, describes the mutants.toml exclusions, and explains the removed idle 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.
Full details: Title check

Explanation

The title names the change: adding tests that kill or exclude resume and relay route mutant survivors. The changeset adds resume.rs and relay.rs regression tests, plus .cargo/mutants.toml exclusions and a quest plan update. The title says 26 of the survivors, while the description says 27 of 30 are caught or excluded. The count differs, but the main change matches.

Full details: Description check

Explanation

The description matches the changeset. It names the quest file and the Nightly run, lists the added resume.rs and relay.rs tests, describes the mutants.toml exclusions, and explains the removed idle disarm in poll_peek_group. It is detailed and specific.

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: b67b9a8b-ea0a-47a7-9874-82f37f25902d
Commits

Reviewing files that changed from the base of the PR and between c6727f2 and eab4c8e.

Files selected for processing: 4

  • .cargo/mutants.toml
  • quest/m0/nightly/resume-route-mutants.md
  • rs/moq-net/src/model/resume.rs
  • rs/moq-net/src/route/relay.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. Each survivor gets a test named for the edge case its guard decides. Truly equivalent mutants are excluded with a reason, and the one dead branch is deleted rather than excluded.

Reviewed changes

I reviewed all 7 commits: the one code change, both new exclusions, the new tests, and the quest rewrite.

  • Subscriber::poll_peek_group disarm removal: this is dead code, as claimed. passed was only true for Poll::Ready(Ok(None)), and Idle::finish(.., pending = false) (rs/moq-net/src/util/idle.rs:102) already sets parked = None before the removed Idle::disarm ran. delivered.forget_below(..) still runs on the same condition.
  • resolve column-pinned exclusion: :7: selects the right !. Using the convention of the existing :32: … Reader::backfill entry (1-based columns, a tab counts as one), column 7 is the relative-end !range.is_empty() at resume.rs:1927. The caught ! at resume.rs:1899 sits at column 8.
  • withdraw + exclusion: withdraw has exactly one +, the count(origins.len() + peers.len()) argument. The - replacement looked risky: in test builds, a usize underflow would panic when peers.len() > origins.len(). Applied by hand, though, it still passes all 65 route::relay::tests, including the three new ones, so the exclusion holds.
  • New resume.rs and relay.rs tests: they target the listed guards (restated copies held back, lost copies beside an ended claim, the furthest-behind resume point, oldest-end edits, whole-ask keying, relative and time starts below the resume point, replacement time anchors), and the late-arrival gap test now asserts landed.
  • Quest file: it is cut down to the three unraised mutants and an outside wait on #9278.

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

@kixelated
kixelated added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit c227f89 Nov 21, 2026
12 checks passed
@kixelated
kixelated deleted the quest/m0/nightly/resume-route-mutants branch November 21, 2026 07:53
kixelated added a commit that referenced this pull request Nov 21, 2026
#9294's resume tests move to the Range without anchors: the Relative(3) edit
becomes a live join with a 6 ms Min Age, and the two Oldest-end refusal tests
go, since a range end can no longer be Oldest.

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