core: fix rollout reconstruction tests

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-24 13:54:08 -07:00
co-authored by Codex
parent 5bffcae9e0
commit 52de1b16ec
2 changed files with 10 additions and 4 deletions
@@ -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")
);