mirror of
https://github.com/openai/codex.git
synced 2026-11-20 07:06:24 +00:00
[codex] Compress cold active rollouts (#28338)
## Why The local rollout compression worker currently scans only `archived_sessions`, so cold unarchived thread history remains expanded indefinitely. ## What changed - Scan `sessions` after `archived_sessions` within the existing worker runtime budget. - Update rollout compression coverage to require both cold active and archived rollouts to be compressed while fresh active rollouts remain plain. The worker remains behind the disabled-by-default `local_thread_store_compression` feature, and the existing seven-day cold-file threshold is unchanged. ## Validation - `just test -p codex-rollout` (69 passed) - `just fmt` - `git diff --check`
This commit is contained in:
2 files changed
+11
-6
No files matched your search
@@ -362,9 +362,14 @@ mod worker {
|
||||
let result = async {
|
||||
cleanup_stale_temps(codex_home.as_path()).await?;
|
||||
let mut stats = CompressionStats::default();
|
||||
if started_at.elapsed() < WORKER_MAX_RUNTIME {
|
||||
let archived_root = codex_home.join(ARCHIVED_SESSIONS_SUBDIR);
|
||||
compress_rollouts_in_root(archived_root.as_path(), started_at, &mut stats).await?;
|
||||
for root in [
|
||||
codex_home.join(ARCHIVED_SESSIONS_SUBDIR),
|
||||
codex_home.join(SESSIONS_SUBDIR),
|
||||
] {
|
||||
if started_at.elapsed() >= WORKER_MAX_RUNTIME {
|
||||
break;
|
||||
}
|
||||
compress_rollouts_in_root(root.as_path(), started_at, &mut stats).await?;
|
||||
}
|
||||
Ok::<_, io::Error>(stats)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user