mirror of
https://github.com/openai/codex.git
synced 2026-05-02 04:11:39 +03:00
Keep only user+compaction items in compacted history
This commit is contained in:
@@ -2961,11 +2961,6 @@ async fn auto_compact_counts_encrypted_reasoning_before_last_user() {
|
||||
"second turn should not include compacted history"
|
||||
);
|
||||
let third_request_body = requests[2].body_json().to_string();
|
||||
assert!(
|
||||
third_request_body.contains("REMOTE_COMPACT_SUMMARY")
|
||||
|| third_request_body.contains(FINAL_REPLY),
|
||||
"third turn should include compacted history"
|
||||
);
|
||||
assert!(
|
||||
third_request_body.contains("ENCRYPTED_COMPACTION_SUMMARY"),
|
||||
"third turn should include compaction summary item"
|
||||
|
||||
@@ -1051,11 +1051,15 @@ async fn remote_compact_persists_replacement_history_in_rollout() -> Result<()>
|
||||
)
|
||||
});
|
||||
|
||||
if has_compacted_user_summary && has_compaction_item && has_compacted_assistant_note {
|
||||
if has_compacted_user_summary && has_compaction_item {
|
||||
assert!(
|
||||
!has_permissions_developer_message,
|
||||
"manual remote compact rollout replacement history should not inject permissions context"
|
||||
);
|
||||
assert!(
|
||||
!has_compacted_assistant_note,
|
||||
"manual remote compact rollout replacement history should drop assistant notes"
|
||||
);
|
||||
saw_compacted_history = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user