mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Preserve item timestamps in thread history projections (#35689)
## What changed - Add optional start and completion timestamps to `ThreadHistoryItemChange`. - Populate them from canonical `ItemCompleted` records during stateless thread history projection. - Treat a zero completion timestamp as absent, and leave timestamps unset for legacy builder events that do not provide them. ## Testing - Cover projected item timestamps, including missing start times and zero completion times. GitOrigin-RevId: 2187530f489ad3d86b6ab65faaaab1eab5357f1b
This commit is contained in:
1 parent
8c72d61727
commit
8d6a91b1ff
4 files changed
+61
-4
No files matched your search
@@ -70,6 +70,8 @@ pub fn project_rollout_line(line: &RolloutLine) -> ThreadHistoryChangeSet {
|
||||
changed_items: vec![ThreadHistoryItemChange {
|
||||
turn_id: event.turn_id.clone(),
|
||||
item: ThreadItem::from(event.item.clone()),
|
||||
started_at_ms: event.started_at_ms,
|
||||
completed_at_ms: (event.completed_at_ms != 0).then_some(event.completed_at_ms),
|
||||
}],
|
||||
..Default::default()
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user