mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
[core] refresh inline compaction comments [ci changed_files]
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -6015,7 +6015,7 @@ async fn run_pre_sampling_compact(
|
||||
.model_info
|
||||
.auto_compact_token_limit()
|
||||
.unwrap_or(i64::MAX);
|
||||
// Compact if the total usage tokens are greater than the auto compact limit
|
||||
// Compact if the total usage tokens are greater than or equal to the auto-compact limit.
|
||||
if total_usage_tokens >= auto_compact_limit {
|
||||
if inline_server_side_compaction_threshold(sess, turn_context).is_some() {
|
||||
record_compaction_metric(
|
||||
|
||||
@@ -178,7 +178,7 @@ pub(crate) async fn handle_output_item_done(
|
||||
_ => ContextCompactionItem::new(),
|
||||
});
|
||||
// Preserve the raw wire event immediately; the caller rewrites local history inline and
|
||||
// then continues appending later same-turn output after the checkpoint item.
|
||||
// then continues appending later same-turn output after the compaction item.
|
||||
debug!(
|
||||
turn_id = %ctx.turn_context.sub_id,
|
||||
"emitting streamed server-side raw compaction item for immediate local checkpoint apply"
|
||||
|
||||
@@ -733,8 +733,8 @@ async fn auto_server_side_compaction_follow_ups_use_compaction_checkpoint() -> R
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn auto_server_side_compaction_retries_without_committing_incomplete_checkpoint() -> Result<()>
|
||||
{
|
||||
async fn auto_server_side_compaction_retries_without_persisting_failed_compaction_item()
|
||||
-> Result<()> {
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let compact_threshold = 120;
|
||||
@@ -805,7 +805,7 @@ async fn auto_server_side_compaction_retries_without_committing_incomplete_check
|
||||
let third_turn_request = &requests[3];
|
||||
assert!(
|
||||
!third_turn_request.body_contains_text(&inline_summary),
|
||||
"failed inline compaction should not rewrite local history before a retry succeeds"
|
||||
"failed inline compaction should not persist its compaction item into later turns"
|
||||
);
|
||||
assert!(
|
||||
third_turn_request.body_contains_text(first_turn_text),
|
||||
|
||||
Reference in New Issue
Block a user