mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
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:
@@ -257,7 +257,6 @@ impl<H: ReviewHost> SynchronousApprovalReviewer for ReviewRequest<'_, H> {
|
||||
ErrorEvent {
|
||||
message,
|
||||
codex_error_info: Some(CodexErrorInfo::TooManyDenials),
|
||||
rejected_audio_file_ids: Vec::new(),
|
||||
misalignment: None,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -377,7 +377,11 @@ fn review_original(
|
||||
}
|
||||
message.complete
|
||||
}
|
||||
RolloutItem::SessionMeta(_) | RolloutItem::EventMsg(EventMsg::ThreadRolledBack(_)) => {
|
||||
RolloutItem::SessionMeta(_)
|
||||
| RolloutItem::EventMsg {
|
||||
event: EventMsg::ThreadRolledBack(_),
|
||||
..
|
||||
} => {
|
||||
anyhow::bail!("evidence history was replaced");
|
||||
}
|
||||
RolloutItem::RetainedContext(RetainedContextEvent::AcceptedFileAudio { .. })
|
||||
@@ -389,7 +393,7 @@ fn review_original(
|
||||
| RolloutItem::TokenUsageRecord(_)
|
||||
| RolloutItem::WorldState(_)
|
||||
| RolloutItem::SecurityRiskScore(_)
|
||||
| RolloutItem::EventMsg(_)
|
||||
| RolloutItem::EventMsg { .. }
|
||||
| RolloutItem::RealtimeItem(_) => false,
|
||||
};
|
||||
if !include {
|
||||
|
||||
Reference in New Issue
Block a user