Streamline thread mutation handlers#19493
Conversation
da2717b to
b8828ca
Compare
9cfedc6 to
2a102a7
Compare
There was a problem hiding this comment.
💡 Codex Review
https://github.com/openai/codex/blob/b8828ca551be17490e325cd0724db7ee861f3186/codex-rs/app-server/src/codex_message_processor.rs#L3555
Make thread_list_response return a proper Result
thread_list now delegates to thread_list_response, but this helper still calls send_error(request_id, ...) and uses bare return;. In this function, request_id is out of scope and the control flow no longer returns Result<ThreadListResponse, JSONRPCErrorError>. This introduces a build-breaking regression in the thread/list path.
ℹ️ 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".
b8828ca to
558676d
Compare
2a102a7 to
2d38a30
Compare
558676d to
8f1b0a0
Compare
2ecea71 to
a6f9880
Compare
e89693c to
c4b7cab
Compare
37de240 to
c641ef2
Compare
c4b7cab to
6001c85
Compare
571c6c6 to
559a855
Compare
6001c85 to
016897c
Compare
016897c to
869e8b6
Compare
Why
Thread mutation handlers had many short error branches whose only job was to emit a JSON-RPC error and stop. This slice keeps those errors visible, but lets each handler build a result and return early from validation helpers instead of nesting the main path.
What Changed
codex-rs/app-server/src/codex_message_processor.rs.codex-rs/app-server/src/bespoke_event_handling.rsfor rollback-related request failures.send_errorcalls where they remain the simplest boundary for pending async event responses.Verification
cargo check -p codex-app-servercargo test -p codex-app-server --test all v2::thread_rollback -- --test-threads=1