mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
core: fix rollout reconstruction tests
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
parent
5bffcae9e0
commit
52de1b16ec
@@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
use crate::context_manager::is_user_turn_boundary;
|
||||
use crate::context_manager::ReferenceTurnContextState;
|
||||
use crate::context_manager::is_user_turn_boundary;
|
||||
|
||||
// Return value of `Session::reconstruct_history_from_rollout`, bundling the rebuilt history with
|
||||
// the resume/fork hydration metadata derived from the same replay.
|
||||
|
||||
@@ -693,15 +693,21 @@ async fn reconstruct_history_rollback_counts_inter_agent_assistant_turns() {
|
||||
]
|
||||
);
|
||||
assert_eq!(
|
||||
reconstructed.previous_turn_settings,
|
||||
reconstructed
|
||||
.reference_turn_context_state
|
||||
.previous_turn_settings(),
|
||||
Some(PreviousTurnSettings {
|
||||
model: turn_context.model_info.slug.clone(),
|
||||
realtime_active: Some(turn_context.realtime_active),
|
||||
})
|
||||
);
|
||||
assert_eq!(
|
||||
serde_json::to_value(reconstructed.reference_context_item)
|
||||
.expect("serialize reconstructed reference context item"),
|
||||
serde_json::to_value(
|
||||
reconstructed
|
||||
.reference_turn_context_state
|
||||
.reference_context_item(),
|
||||
)
|
||||
.expect("serialize reconstructed reference context item"),
|
||||
serde_json::to_value(Some(first_context_item))
|
||||
.expect("serialize expected reference context item")
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user