Repository navigation
test(drill): subscriber-leaks-broadcasts removes the session end's source close too - #9292
Conversation
Quest-Claim: ce1628462fd98a8a
… source close #9219 made a subscribing session close its sources outright when it ends, so leaking the guards alone no longer kept the cancelled reader's broadcast open. The mutation now removes those closes too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou'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. View limit details
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. |
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. #9219 added two direct SourceGuard closes on session end, which made the ManuallyDrop leaks harmless. Removing those closes inside the mutation fixes the cause and leaves the drill as it was.
Reviewed changes
I reviewed both commits: the mutation patch and the deletion of the quest file.
subscriber-leaks-broadcasts.patch: the patch now also removes thesource.source.close()loop inSubscriberDriver::abortand emptiesTrackServe::close_if_ending. The old hunk offsets are rebased onto currentmain, and the header comment explains why every release must go.- Quest file:
quest/m0/nightly/drill-leak-sensitivity.mdis deleted now that the work is done.
What I checked:
git apply --checkapplies the patch cleanly to this tree.- The mutation leaves no dead code that would add warnings.
self.sourcesis still polled inpoll_drain, andpoll_endingstill has other callers. - The
subscriber-leaks-broadcastsrow intest/drill/README.mdstill describes the mutation correctly.
Keeping the abort hunk is the right call. With it, the mutation removes every release that runs at session end, so the drill stays sensitive if a later refactor moves the release into the driver.
claude-opus-5-5 | 𝕏

Nightly's
Tests (test drill-sensitivity)job failed in run 44767045952.cancel_under_backpressure_releases_the_reader::loopbackstill passed withsubscriber-leaks-broadcastsapplied, so the drill was no longer checking that release.Summary
#9219 made a subscribing session close its sources directly when the session ends:
SubscriberDriver::abortcloses every source in its task set.TrackServe::close_if_endingcloses a run's source before the session's end fails that run.The mutation only leaked the
SourceGuards and theAnnouncedroutes by wrapping them inManuallyDrop. The new direct close still released the cancelled reader's broadcast, so the drill passed. The patch now removes both direct closes as well, and the drill catches the missing release again. The drill itself is unchanged.This finishes quest/m0/nightly/drill-leak-sensitivity.md and deletes the quest file.
Choices for review
SubscriberDriver::abort, even though this drill only depends onclose_if_ending. With the leaks applied, removing onlyclose_if_endingmakes the drill fail, while removing only the abort loop does not. I kept the abort hunk so the mutation removes every release that runs when a session ends. That way the drill stays sensitive if its path later moves to the driver's abort. The alternative is to drop that hunk for a smaller patch.Validation
I applied the mutation in place on this branch and ran the drill with nextest:
close_if_endingturned into a no-op: the drill fails withthe cancelled subscriber's broadcast never closed.close_if_endingas a no-op without theManuallyDropleaks: the drill passes, so the leaks are still needed.TMPDIR=.tmp test/drill/sensitivity.sh subscriber-leaks-broadcasts: the unmutated baseline passes, and the mutated run reportssensitive: ... fails with 'the cancelled subscriber's broadcast never closed'.sensitivity.sh --apply-only: all 11 mutations apply.Caused by
Impact
Public API: none. Wire: none. Only a test patch file changes.
Follow-ups
None.
Models
Size: S
Implementer: Claude, claude-opus-5-5, medium effort (arm A)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: a114477
Base: origin/main at c6727f2
Risk: low,
Only a test mutation fixture and a quest plan change, so any break affects contributors running the leak-sensitivity drill, and a revert fully undoes it.Classified: low by Codex, gpt-6.1-sol, low effort, session
01a1fca8-6dd6-7730-959d-1ac38ffd928aReviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1fca8-82f8-73c3-b9b3-f7daac878bd1, round 1Score: 9/10,
Source inspection found no defects and the mutation matches the intended failure scenario, but tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none