codex: rename rollout request id field

Rename the response stream field that carries an early request ID for rollout persistence so its purpose is explicit.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-06 01:25:25 -08:00
parent 24eebd7d5c
commit 5d846acf72
6 changed files with 9 additions and 9 deletions

View File

@@ -249,7 +249,7 @@ pub fn create_text_param_for_request(
pub struct ResponseStream {
pub rx_event: mpsc::Receiver<Result<ResponseEvent, ApiError>>,
pub initial_request_id: Option<String>,
pub rollout_request_id: Option<String>,
}
impl Stream for ResponseStream {

View File

@@ -271,7 +271,7 @@ impl ResponsesWebsocketConnection {
// Websocket upgrade response headers are scoped to the connection, not
// individual `stream_request` calls, so they cannot be used as per-turn
// request IDs in rollout metadata.
initial_request_id: None,
rollout_request_id: None,
})
}
}

View File

@@ -49,7 +49,7 @@ pub fn stream_from_fixture(
tokio::spawn(process_sse(Box::pin(stream), tx_event, idle_timeout, None));
Ok(ResponseStream {
rx_event,
initial_request_id: None,
rollout_request_id: None,
})
}
@@ -104,7 +104,7 @@ pub fn spawn_response_stream(
ResponseStream {
rx_event,
initial_request_id: request_id,
rollout_request_id: request_id,
}
}
@@ -895,7 +895,7 @@ mod tests {
};
let stream = spawn_response_stream(stream_response, idle_timeout(), None, None);
assert_eq!(stream.initial_request_id.as_deref(), Some("req_123"));
assert_eq!(stream.rollout_request_id.as_deref(), Some("req_123"));
}
#[tokio::test]

View File

@@ -1100,7 +1100,7 @@ fn map_response_stream(
) -> (ResponseStream, oneshot::Receiver<LastResponse>) {
let (tx_event, rx_event) = mpsc::channel::<Result<ResponseEvent>>(1600);
let (tx_last_response, rx_last_response) = oneshot::channel::<LastResponse>();
let initial_request_id = api_stream.initial_request_id.clone();
let rollout_request_id = api_stream.rollout_request_id.clone();
tokio::spawn(async move {
let mut logged_error = false;
@@ -1171,7 +1171,7 @@ fn map_response_stream(
(
ResponseStream {
rx_event,
initial_request_id,
rollout_request_id,
},
rx_last_response,
)

View File

@@ -223,7 +223,7 @@ pub(crate) mod tools {
pub struct ResponseStream {
pub(crate) rx_event: mpsc::Receiver<Result<ResponseEvent>>,
pub(crate) initial_request_id: Option<String>,
pub(crate) rollout_request_id: Option<String>,
}
impl Stream for ResponseStream {

View File

@@ -6340,7 +6340,7 @@ async fn try_run_sampling_request(
}
Err(codex_async_utils::CancelErr::Cancelled) => return Err(CodexErr::TurnAborted),
};
if let Some(request_id) = stream.initial_request_id.clone() {
if let Some(request_id) = stream.rollout_request_id.clone() {
sess.send_event(
&turn_context,
EventMsg::ResponseMetadata(ResponseMetadataEvent {