Skip to content

fix(app-server): keep responses live behind event routing - #674

Merged
GraciousGazelles merged 2 commits into
mainfrom
fix/in-process-response-routing-w12624
Aug 23, 2026
Merged

GraciousGazelles merged 2 commits into
mainfrom
fix/in-process-response-routing-w12624

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

  • classify JSON-RPC responses and errors before entering the in-process event-capacity path
  • give in-process responses and events independent bounded ingress, routing, and delivery ownership while preserving shared routing for stdio and WebSocket transports
  • add a capacity-one regression that blocks the real event router, delivers a normal success and error first, then verifies event FIFO and write-completion ownership

This supersedes the response-liveness routing approach in #654. It intentionally does not carry over that pull request's broader client and cancellation changes.

Validation

  • cargo fmt --all
  • git diff --check
  • Rust compilation and tests are left to hosted checks

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request splits outbound message routing into separate event and response lanes to prevent saturated event routing from blocking response delivery. The review feedback highlights critical issues with loop termination logic: it is recommended to break the event delivery loop when the consumer is closed to prevent log spam, and conversely, to avoid breaking the delivery loops upon receiving unexpected message types, as doing so permanently halts subsequent message delivery.

Comment thread codex-rs/app-server/src/in_process.rs Resolved
Comment thread codex-rs/app-server/src/in_process.rs Resolved
Comment thread codex-rs/app-server/src/in_process.rs Resolved
@GraciousGazelles
GraciousGazelles marked this pull request as ready for review August 23, 2026 12:42
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Aug 23, 2026
Merged via the queue into main with commit 169b184 Aug 23, 2026
119 of 122 checks passed
@GraciousGazelles
GraciousGazelles deleted the fix/in-process-response-routing-w12624 branch August 23, 2026 12:55
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.

2 participants