Skip to content

fix(id-cli): world join pump no longer races the refusal frame on stdin EOF - #10998

Merged
dezren39 merged 1 commit into
mainfrom
queue/20375-9274-forged-join
Nov 17, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/20375-9274-forged-join

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What

id world join's pump raced its own reader task: when stdin was already at EOF (a scripted join with stdin closed — the one-shot probe shape), the pump broke on the EOF arm and aborted the reader before the server's first frame could print. A join refusal ("join denied") therefore never reached stdout, which is exactly what #9274's failing test asserts.

Fix in pkgs/id/crates/id-cli/src/commands/world.rs (pump):

  • The reader task now records (atomic flag, set after printing) that at least one server frame has been printed.
  • The stdin-EOF arm keeps its existing behavior once any frame has printed (scripted clients still leave by closing stdin), but on EOF before the first frame it disables the stdin arm and lets the reader arm end the pump when the stream closes. A refusal closes the stream right after the error frame, so the refusal prints and the pump then exits — no abort race, and no new hang for the refusal path.

Verification

Fixes #9274


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…in EOF (#9274)

With stdin already at EOF (scripted one-shot join), pump broke on the EOF arm and aborted the reader task before the server's first frame could print, so a join refusal ("join denied") never reached stdout. Track whether a frame has printed; on EOF before the first frame, disable the stdin arm and let the reader arm end the pump when the stream closes — a refusal closes the stream right after its error frame.
@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 05:29
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T05:29:59.861740Z
We couldn’t complete this review. Comment @codex review to try again.
c11755f PR opened
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

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 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review 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: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3da6609c-4927-4f4a-b1d9-de247b490ec4
Commits

Reviewing files that changed from the base of the PR and between 09ae3a8 and c11755f.

Files selected for processing: 1

  • pkgs/id/crates/id-cli/src/commands/world.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

@dezren39
dezren39 merged commit ebfbd0b into main Nov 17, 2026
1 check passed
@dezren39
dezren39 deleted the queue/20375-9274-forged-join branch November 17, 2026 05:31
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.

serve_tests web/iroh world test: forged join not refused with "join denied" (pre-existing, hidden by suite-B compile break)

1 participant