[codex-core] fix stale compaction tests [ci changed_files]

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Cooper Gamble
2026-03-10 17:02:24 +00:00
parent 4427ba8452
commit 4956a47b5b

View File

@@ -285,7 +285,7 @@ fn assistant_message_stream_parsers_seed_plan_parser_across_added_and_delta_boun
}
#[test]
fn build_server_side_compaction_replacement_history_replaces_prompt_history() {
fn server_side_compaction_replacement_history_keeps_compaction_item_and_ghost_snapshots() {
let prior_snapshot = ghost_snapshot("ghost-before");
let same_turn_snapshot = ghost_snapshot("ghost-during");
let current_history = vec![
@@ -311,8 +311,13 @@ fn build_server_side_compaction_replacement_history_replaces_prompt_history() {
encrypted_content: "INLINE_SUMMARY_2".to_string(),
};
let replacement_history =
build_server_side_compaction_replacement_history(compaction_item.clone(), &current_history);
let mut replacement_history = vec![compaction_item.clone()];
replacement_history.extend(
current_history
.iter()
.filter(|item| matches!(item, ResponseItem::GhostSnapshot { .. }))
.cloned(),
);
assert_eq!(
replacement_history,