mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
[codex-core] fix stale compaction tests [ci changed_files]
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -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(), ¤t_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,
|
||||
|
||||
Reference in New Issue
Block a user