Skip to content

Preserve remote event custody under consumer backpressure - #806

Merged
GraciousGazelles merged 13 commits into
mainfrom
fix/remote-delivery-isolation
Sep 10, 2026
Merged

GraciousGazelles merged 13 commits into
mainfrom
fix/remote-delivery-isolation

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

Keep required remote events in FIFO custody when the consumer queue is full, while allowing request and control writes to progress. Deliver pending required events and lag notifications before a terminal disconnect, and preserve the existing inbound request-ID lifetime and exhaustion limits.

This integrates the remote-client work from #650 with the current request-ID ledger and in-process client facade. The change is limited to the remote client and its focused library tests.

Validation

Source review completed. Added coverage for backpressure, request-control progress, shutdown, and write-failure event ordering. Full library tests and required checks must pass on GitHub-hosted runners before merging; local builds and tests have not been run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 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
🔒 Security Review ✅ Completed 2026-09-07T06:33:58.896203Z 4e71b51 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.

@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 refactors the remote app server client's event delivery and connection state management, introducing a new event-forwarding mechanism and adding comprehensive integration tests for edge cases like write failures and shutdowns. The review feedback highlights a critical backpressure bug where the skipped_events == 0 guard on stream.next() causes head-of-line blocking on best-effort events, halting the WebSocket reader when the consumer queue is full. To resolve this, it is recommended to allow polling to continue and update try_deliver_event to handle events when skipped_events > 0 while preserving FIFO order. Additionally, the single-line formatting applied to InboundServerRequestLedger violates standard Rust style guidelines and should be reverted to standard multi-line formatting for readability.

@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit 7f46fc6 Sep 10, 2026
98 checks passed
@GraciousGazelles
GraciousGazelles deleted the fix/remote-delivery-isolation branch September 10, 2026 10:39
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