mirror of
https://github.com/openai/codex.git
synced 2026-10-31 19:28:49 +00:00
Include shared histories in rollout compression (#42039)
## What changed - Make `local_thread_store_compression` compress cold rollout files across shared and forked histories without a separate compression mode. - Retire `local_thread_store_shared_compression` while continuing to accept it in strict configuration without changing compression behavior. - Read rollout files through the compressed-rollout reader when `codex exec resume` determines the latest turn's working directory. ## Testing - Cover compression and restoration of an archived fork chain. - Cover cwd-based resume selection when only the compressed rollout remains. - Cover the removed compatibility key in strict configuration. GitOrigin-RevId: 8edebf61eccc1f79cabb8e641f8982c76f337bf1
This commit is contained in:
@@ -67,7 +67,6 @@ use codex_protocol::protocol::TurnAbortReason;
|
||||
use codex_protocol::protocol::TurnAbortedEvent;
|
||||
use codex_protocol::protocol::TurnEnvironmentSelection;
|
||||
use codex_protocol::protocol::W3cTraceContext;
|
||||
use codex_rollout::RolloutCompressionMode;
|
||||
use codex_rollout::state_db::StateDbHandle;
|
||||
use codex_skills_extension::HostSkillsService;
|
||||
use codex_thread_store::InMemoryThreadStore;
|
||||
@@ -385,14 +384,6 @@ pub fn thread_store_from_config(
|
||||
let compression_enabled = config
|
||||
.features
|
||||
.enabled(Feature::LocalThreadStoreCompression);
|
||||
let compression_mode = if config
|
||||
.features
|
||||
.enabled(Feature::LocalThreadStoreSharedCompression)
|
||||
{
|
||||
RolloutCompressionMode::IncludeShared
|
||||
} else {
|
||||
RolloutCompressionMode::Standalone
|
||||
};
|
||||
let background_migration_enabled = config
|
||||
.features
|
||||
.enabled(Feature::BackgroundPaginatedRolloutMigration);
|
||||
@@ -409,17 +400,11 @@ pub fn thread_store_from_config(
|
||||
warn!("failed to migrate legacy rollouts on startup: {err}");
|
||||
}
|
||||
if compression_enabled {
|
||||
codex_rollout::spawn_rollout_compression_worker(
|
||||
codex_home,
|
||||
compression_mode,
|
||||
);
|
||||
codex_rollout::spawn_rollout_compression_worker(codex_home);
|
||||
}
|
||||
});
|
||||
} else if compression_enabled {
|
||||
codex_rollout::spawn_rollout_compression_worker(
|
||||
config.codex_home.to_path_buf(),
|
||||
compression_mode,
|
||||
);
|
||||
codex_rollout::spawn_rollout_compression_worker(config.codex_home.to_path_buf());
|
||||
}
|
||||
store
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user