mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Reduce response serialization and rollout scan overhead (#36006)
## What changed - Keep `ClientResponsePayload` typed through the app-server outgoing queue and serialize it at the transport boundary, avoiding an intermediate `serde_json::Value` while preserving the JSON-RPC wire shape. - Return a JSON-RPC internal error when a response cannot be serialized, including over remote control, and skip unserializable analytics responses. - Scan reverse JSONL input a chunk at a time with a larger buffer instead of processing each byte individually. ## Testing - Cover typed response serialization and serialization failures for direct and remote-control transports. - Cover filtering unserializable responses from analytics. GitOrigin-RevId: cc4fd7a43461a273315bb95261bd1ae3ff65fbf7
This commit is contained in:
1 parent
7579a2b413
commit
c41a38dd10
14 files changed
+293
-132
No files matched your search
@@ -641,7 +641,10 @@ async fn start_uninitialized(args: InProcessStartArgs) -> IoResult<InProcessClie
|
||||
match outgoing_message {
|
||||
OutgoingMessage::Response(response) => {
|
||||
if let Some(response_tx) = pending_request_responses.remove(&response.id) {
|
||||
let _ = response_tx.send(Ok(response.result));
|
||||
let result = serde_json::to_value(response.result).map_err(|err| {
|
||||
internal_error(format!("failed to serialize response: {err}"))
|
||||
});
|
||||
let _ = response_tx.send(result);
|
||||
} else {
|
||||
warn!(
|
||||
request_id = ?response.id,
|
||||
|
||||
Reference in new issue
Block a user