mirror of
https://github.com/openai/codex.git
synced 2026-05-02 12:21:26 +03:00
[codex-core] Fix inline compaction checkpoint history layout [ci changed_files]
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -516,6 +516,10 @@ async fn auto_server_side_compaction_uses_inline_context_management() -> Result<
|
||||
post_inline_request.body_contains_text(&inline_summary),
|
||||
"expected subsequent request to reuse inline compaction item"
|
||||
);
|
||||
assert!(
|
||||
post_inline_request.body_contains_text("<permissions instructions>"),
|
||||
"expected subsequent request to preserve canonical context after inline compaction"
|
||||
);
|
||||
assert!(
|
||||
!post_inline_request.body_contains_text(first_turn_text),
|
||||
"expected pre-compaction user history to be dropped after inline compaction"
|
||||
@@ -586,10 +590,15 @@ async fn auto_server_side_compaction_keeps_current_turn_inputs_for_follow_ups()
|
||||
);
|
||||
|
||||
let follow_up_request = &requests[2];
|
||||
let follow_up_body = follow_up_request.body_json().to_string();
|
||||
assert!(
|
||||
follow_up_request.body_contains_text(&inline_summary),
|
||||
"expected same-turn follow-up to include the inline compaction item"
|
||||
);
|
||||
assert!(
|
||||
follow_up_request.body_contains_text("<permissions instructions>"),
|
||||
"expected same-turn follow-up to preserve canonical context after inline compaction"
|
||||
);
|
||||
assert!(
|
||||
follow_up_request.body_contains_text(second_turn_text),
|
||||
"expected same-turn follow-up to retain the current turn user input"
|
||||
@@ -598,6 +607,15 @@ async fn auto_server_side_compaction_keeps_current_turn_inputs_for_follow_ups()
|
||||
!follow_up_request.body_contains_text(first_turn_text),
|
||||
"expected same-turn follow-up to drop pre-compaction history"
|
||||
);
|
||||
assert!(
|
||||
follow_up_body
|
||||
.find(second_turn_text)
|
||||
.expect("current turn text in follow-up request")
|
||||
< follow_up_body
|
||||
.find("INLINE_SERVER_SUMMARY")
|
||||
.expect("inline compaction marker in follow-up request"),
|
||||
"expected current-turn items to remain ahead of the inline compaction item"
|
||||
);
|
||||
assert!(
|
||||
follow_up_request
|
||||
.function_call_output_text("call-inline-mid-turn")
|
||||
|
||||
Reference in New Issue
Block a user