Replace Guardian tickets with parent response IDs (#43002)

## What changed

Capture the ID from `response.created` and pass it as `parent_response_id` in Guardian review and classifier request metadata. Clear the current response ID before sampling retries so tool reviews cannot inherit a failed response's ID.

Request Guardian credits with `guardian_credits_requested` on eligible parent requests. Remove the ticket protocol, transport attachment, and ticket-specific body redaction. Keep ordinary app-server client `parent_response_id` values inside `x-codex-turn-metadata` rather than promoting them to Guardian request metadata.

## Testing

Update coverage for HTTP fallback, WebSocket review reuse, missing response IDs, classifier transport retries, and code-mode yield/resume attribution. Extend app-server tests to verify client metadata placement over HTTP and WebSocket.

GitOrigin-RevId: c1665e56382ecec8d260fc2ca0ecd5e20b0b2391
This commit is contained in:
jif
2026-09-05 13:02:49 +00:00
committed by copyberry
parent a7a4321593
commit dee21ec1bc
32 changed files with 178 additions and 362 deletions
+6 -2
View File
@@ -94,11 +94,15 @@ pub struct MemorySummarizeOutput {
pub memory_summary: String,
}
/// The server response currently being handled, shared with tool-review extensions.
#[derive(Clone, Debug)]
pub struct ResponseId(pub String);
#[derive(Debug)]
pub enum ResponseEvent {
Created {
/// Runtime-only receipt for this exact server response.
guardian_ticket: Option<codex_protocol::guardian_ticket::GuardianTicket>,
/// Existing server response ID, when supplied by the stream.
response_id: Option<String>,
},
SafetyBuffering(SafetyBuffering),
OutputItemDone(ResponseItem),