Skip to content

fix(app-server): preserve bounded event delivery - #729

Closed
GraciousGazelles wants to merge 6 commits into
mainfrom
successor/pr605-delivery-core-a-20260903
Closed

GraciousGazelles wants to merge 6 commits into
mainfrom
successor/pr605-delivery-core-a-20260903

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

  • preserve FIFO custody for required app-server notifications and server requests under bounded consumer backpressure
  • isolate event forwarding from the facade command loop so requests, cancellation, and shutdown remain responsive while events are undrained
  • report best-effort event loss with bounded Lagged markers and release blocked delivery on consumer closure
  • reject unsupported in-process auth refresh requests through a bounded async response path

Validation

  • cargo fmt --manifest-path codex-rs/Cargo.toml --all -- --check
  • git diff --check
  • cargo metadata --manifest-path codex-rs/Cargo.toml --no-deps --format-version 1

Focused and required hosted checks are still needed for this exact head.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 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-03T12:37:23.512283Z 0b1bd4f 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 in-process app-server client and runtime to improve backpressure handling and event delivery. It introduces a dedicated bounded sequencer for public event delivery, ensuring that required notifications and server requests retain FIFO custody and are not dropped during queue saturation, while best-effort events report loss via a lagged marker. The shutdown sequence is also improved to prevent deadlocks. The review feedback correctly points out two instances of the unstable let_chains feature (&& let) in lib.rs that will fail to compile on stable Rust toolchains, recommending standard nested if let or direct pattern matching instead.

Comment thread codex-rs/app-server-client/src/lib.rs Resolved
Comment thread codex-rs/app-server-client/src/lib.rs Resolved

Copy link
Copy Markdown
Collaborator Author

Current-main rehydration is blocked on the existing reviewed product-choice gate: prior Luna review proved strict bounded in-memory custody, lossless/FIFO required events, and indefinite producer/later-request progress are mutually incompatible for an indefinitely undrained consumer. The canonical Ops item w12443 remains preserved/blocked pending an explicit choice: Option 1 bounded-backpressure, Option 2 progress-first unbounded facade (upstream openai#38381 style), or separately authorized Option 3 durable spool. No branch mutation or queue/merge action is safe until that contract is selected.

Copy link
Copy Markdown
Collaborator Author

Read-only current-main rehydration: origin/main is ee28646 (tree 41023adf850563c0daec00792ca2e665131da150); PR head remains 3c3cfc2 (tree 4a203d47cbb3a2d9928919b8a2fabd97bf706f51). A no-write merge-tree simulation is clean (prospective tree c84497276831e9594f0a8b560fef565bfc4575cd). Branch refresh was intentionally not applied because the existing exact Luna gate still requires explicit selection of bounded-backpressure, progress-first unbounded facade, or durable-spool product semantics.

@GraciousGazelles

Copy link
Copy Markdown
Collaborator Author

Superseded by #747

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