Streamline account and command handlers#19491
Conversation
633d4a6 to
13c6797
Compare
a35af4e to
91f4e5d
Compare
91f4e5d to
b4c0c48
Compare
13c6797 to
244a3ff
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91f4e5d250
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .exec_one_off_command_inner(request_id.clone(), params) | ||
| .await | ||
| .map(|()| None::<serde_json::Value>); | ||
| self.send_optional_result(request_id, result).await; |
There was a problem hiding this comment.
Replace undefined send_optional_result call
exec_one_off_command now calls self.send_optional_result(...), but this commit does not define that method on CodexMessageProcessor or import any trait that provides it. This makes codex_message_processor.rs fail to compile when type-checking this function, blocking the app-server build.
Useful? React with 👍 / 👎.
35256b6 to
212b3b9
Compare
244a3ff to
c6c2d92
Compare
212b3b9 to
abf4831
Compare
c6c2d92 to
a09b616
Compare
abf4831 to
8419a48
Compare
8419a48 to
4355894
Compare
Why
Account login/logout and command exec handlers were doing local error sends in the middle of each handler. That made these request flows branch heavily even though most of the logic is validate, perform the operation, and return the response.
What Changed
codex-rs/app-server/src/codex_message_processor.rsto computeResultvalues and send them once at the request boundary.Verification
cargo check -p codex-app-servercargo test -p codex-app-server --test all v2::account -- --test-threads=1cargo test -p codex-app-server --test all v2::command_exec -- --test-threads=1