Keep rejected audio file IDs out of protocol events (#63667)

## Why

Codex needs rejected audio file IDs when reconstructing a session so
later model requests can omit those attachments. Clients only need the
turn error.

## What changed

Store rejected audio file IDs as rollout metadata and restore them from
that metadata when replaying history. Keep the existing JSONL layout
under `error.rejected_audio_file_ids` so older versions can still read
newly written rollouts.

## Testing

Add a regression test that round-trips a legacy rollout entry and
verifies that serializing the protocol event omits the rejected IDs.

GitOrigin-RevId: 982dd85d0037cebee056caf61d70988762e42767
This commit is contained in:
ioanbudea-OAI
2026-11-24 16:14:00 +00:00
committed by copyberry
parent cba3c40cf7
commit 77acaa207f
91 changed files with 1025 additions and 513 deletions
+1 -1
View File
@@ -423,7 +423,7 @@ mod job {
| RolloutItem::WorldState(_)
| RolloutItem::RetainedContext(_)
| RolloutItem::SecurityRiskScore(_)
| RolloutItem::EventMsg(_) => None,
| RolloutItem::EventMsg { .. } => None,
})
.collect::<Vec<_>>();
let serialized = serde_json::to_string(&filtered).map_err(|err| {
+1 -1
View File
@@ -122,7 +122,7 @@ pub(crate) fn serialize_tiered_input(
| RolloutItem::SecurityRiskScore(_)
| RolloutItem::TokenUsageRecord(_)
| RolloutItem::RetainedContext(_)
| RolloutItem::EventMsg(_) => None,
| RolloutItem::EventMsg { .. } => None,
};
let Some(mut item) = item else { continue };
if let ResponseItem::Message { content, .. } = &mut item {