mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Propagate response tickets to Guardian reviews (#42758)
## What changed - Request and parse server-issued Guardian tickets for eligible Codex backend responses. - Scope each ticket to the response that produced a Guardian review or classifier request, including HTTP and WebSocket retries, without adding it to model-visible or persisted context. - Validate ticket shape, reserve its metadata keys, redact it from debug and request-body logging, and attach it only at the Guardian transport boundary. ## Testing - Cover ticket parsing, endpoint and authentication routing, retry scoping, classifier retries, and redaction for compressed and uncompressed requests. GitOrigin-RevId: 6219dd15c9f19ed3387de516aac1b8e7c9cdb0e3
This commit is contained in:
1 parent
97e46694e1
commit
cc4b8bdeb8
32 files changed
+562
-44
No files matched your search
@@ -844,7 +844,9 @@ async fn response_stream_records_last_model_feedback_ids() {
|
||||
.set_default();
|
||||
|
||||
let api_stream = futures::stream::iter([
|
||||
Ok(ResponseEvent::Created),
|
||||
Ok(ResponseEvent::Created {
|
||||
guardian_ticket: None,
|
||||
}),
|
||||
Ok(ResponseEvent::Completed {
|
||||
response_id: "resp-123".to_string(),
|
||||
token_usage: None,
|
||||
@@ -1060,7 +1062,9 @@ async fn dropped_backpressured_response_stream_traces_cancelled_partial_output()
|
||||
let backpressured_item_yielded = Arc::new(Notify::new());
|
||||
let mut events = VecDeque::new();
|
||||
for _ in 0..super::RESPONSE_STREAM_CHANNEL_CAPACITY {
|
||||
events.push_back(ResponseEvent::Created);
|
||||
events.push_back(ResponseEvent::Created {
|
||||
guardian_ticket: None,
|
||||
});
|
||||
}
|
||||
events.push_back(ResponseEvent::OutputItemDone(output_message(
|
||||
"1",
|
||||
|
||||
Reference in new issue
Block a user