mirror of
https://github.com/openai/codex.git
synced 2026-11-10 08:43:33 +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:
1 parent
2e5ee418ad
commit
9d0eae74cd
13 files changed
+137
-305
No files matched your search
@@ -779,6 +779,37 @@ foo = true"#;
|
||||
assert_eq!(config_error.range.start.column, 1);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn strict_config_accepts_removed_shared_compression_key_without_changing_compression() {
|
||||
for enabled in [false, true] {
|
||||
let tmp = tempdir().expect("tempdir");
|
||||
let removed = !enabled;
|
||||
std::fs::write(
|
||||
tmp.path().join(CONFIG_TOML_FILE),
|
||||
format!(
|
||||
"[features]\nlocal_thread_store_compression = {enabled}\nlocal_thread_store_shared_compression = {removed}\n"
|
||||
),
|
||||
)
|
||||
.expect("write config");
|
||||
|
||||
let config = ConfigBuilder::default()
|
||||
.codex_home(tmp.path().to_path_buf())
|
||||
.fallback_cwd(Some(tmp.path().to_path_buf()))
|
||||
.loader_overrides(LoaderOverrides::without_managed_config_for_tests())
|
||||
.strict_config(/*strict_config*/ true)
|
||||
.build()
|
||||
.await
|
||||
.expect("removed feature remains accepted");
|
||||
|
||||
assert_eq!(
|
||||
config
|
||||
.features
|
||||
.enabled(Feature::LocalThreadStoreCompression),
|
||||
enabled
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strict_config_points_to_unknown_nested_key() {
|
||||
let tmp = tempdir().expect("tempdir");
|
||||
|
||||
Reference in new issue
Block a user