Skip to content

test(drill): leak the session's sources too in subscriber-leaks-broadcasts - #5338

Merged
kixelated merged 1 commit into
mainfrom
fix/drill-subscriber-leak-sensitivity
Oct 13, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/drill-subscriber-leak-sensitivity

Conversation

@kixelated

@kixelated kixelated commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Nightly just test drill-sensitivity has failed since 2026-10-09: cancel_under_backpressure_releases_the_reader::loopback still passed with subscriber-leaks-broadcasts applied. The cause is deterministic, not a flake: the drill passed in 0.4s under the mutation.

#5054 moved each minted source's SourceGuard out of AnnouncedRoute.sources (inside Announced) and into the driver's SourceServe. The patch still applied, but leaking Announced now leaks only the routes. When the session ends, SourceServe drops and closes the source, and the reader's origin front closes with it.

The late-September nightly failures were a different mutation (relay-withdraws-lost-publisher broke the build).

Approach

The front closes when its route is retracted or when its source closes, and the session owns both. The mutation now wraps both in ManuallyDrop: PrefixRun::announced (routes) and SourceServe::source (sources). Leaking just one isn't enough, because the other release still closes the front. I verified this locally: each half alone passes the drill, and both together fail it. The drill and the sensitivity check are unchanged.

Local evidence:

  • Baseline: the drill passes unmutated.
  • Mutated: it fails with the cancelled subscriber's broadcast never closed, consistently across repeated runs.
  • sensitivity.sh --apply-only: all 6 mutations apply.
  • just check passes.

Impact

  • None. This is a test-only patch file, with no public API or wire change.

Alternatives

  • Strengthening the drill instead: its assertion (the cancelled broadcast closes) is already correct. The mutation had just stopped removing the behavior.
  • Making SourceGuard::drop a no-op: this would also hit the IETF subscriber and every other user of the guard, so it's broader than this behavior.

Follow-ups

  • None.

🤖 Generated with Claude Code

(Written by Opus 5.5)


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…casts

Since #5054 a minted source's guard lives in the driver's SourceServe, not
in Announced, so leaking Announced alone left the source to close with the
session and the front closed with it. Leak both the routes and the sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 11, 2026 23:26
@coderabbitai

coderabbitai Bot commented Oct 11, 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 22 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
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4034389b-6ff4-479b-bd23-4122198f8dd9

📥 Commits

Reviewing files that changed from the base of the PR and between c629d0e and 5b85ffd.


📒 Files selected for processing (1)
  • test/drill/mutations/subscriber-leaks-broadcasts.patch

  • 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 commented Oct 11, 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-11T23:28:59.019162Z 5b85ffd Draft marked ready
ℹ️ 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.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed full head 5b85ffd. No actionable bugs found.

Direction: keeping this confined to the mutation is appropriate. Leaking both PrefixRun::announced and SourceServe::source removes the two independent cleanup paths the cancellation drill observes; changing the shared SourceGuard destructor would broaden the mutation unnecessarily.

Verification: inspected all four patch hunks, subscriber ownership/teardown, SourceGuard, the cancellation drill, and the sensitivity runner. All hunk counts and old-side text match the source at this SHA. This was a GitHub-only static review; I did not apply the patch, compile, or run tests. No existing substantive review findings were present to duplicate.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: test-only change to the drill mutation. CI green; OpenAI and Codex reviewed the head (5b85ffd) with no findings. No changes made at merge time; enabling auto-merge on the current head.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 4426d52 Oct 13, 2026
3 checks passed
@kixelated
kixelated deleted the fix/drill-subscriber-leak-sensitivity branch October 13, 2026 01:48
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