mirror of
https://github.com/openai/codex.git
synced 2026-11-16 06:54:36 +00:00
Include item start times in completion events (#35363)
## What changed - Add an optional `started_at_ms` field to `ItemCompletedEvent`, retaining compatibility with older persisted events that lack it. - Track the first start timestamp for each in-flight item and attach it when emitting and persisting the completion event. If no start was recorded, use the completion timestamp as a fallback. - Emit a complete start/completion lifecycle for subagent activity items. ## Testing - Cover concurrent item timing, repeated starts, turn-boundary cleanup, the missing-start fallback, subagent activity, and persisted web-search events. GitOrigin-RevId: e7cec9c4f1ef6ba67f287e81fb4d7d856fcf87a7
This commit is contained in:
1 parent
3a08af44b2
commit
af7f6f4d34
18 files changed
+183
-8
No files matched your search
@@ -1580,6 +1580,7 @@ mod tests {
|
||||
client_id: None,
|
||||
content: Vec::new(),
|
||||
}),
|
||||
started_at_ms: Some(0),
|
||||
completed_at_ms: 1,
|
||||
}));
|
||||
store
|
||||
|
||||
@@ -569,6 +569,7 @@ fn completed_user_message(turn_id: &str, message: &str) -> RolloutItem {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
}),
|
||||
started_at_ms: Some(0),
|
||||
completed_at_ms: 0,
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -1923,6 +1923,7 @@ fn completed_item(thread_id: ThreadId, turn_id: &str, item: TurnItem) -> Rollout
|
||||
thread_id,
|
||||
turn_id: turn_id.to_string(),
|
||||
item,
|
||||
started_at_ms: Some(0),
|
||||
completed_at_ms: 1,
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user