Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

chore: do not clean the DB anymore (#10232)

jif-oai887bec0dee62
diff --git a/codex-rs/core/src/rollout/recorder.rs b/codex-rs/core/src/rollout/recorder.rs
index 8157133165..501b46271f 100644
--- a/codex-rs/core/src/rollout/recorder.rs
+++ b/codex-rs/core/src/rollout/recorder.rs
@@ -428,7 +428,7 @@ impl RolloutRecorder {
}
},
Err(e) => {
- warn!("failed to parse rollout line: {v:?}, error: {e}");
+ warn!("failed to parse rollout line: {e}");
parse_errors = parse_errors.saturating_add(1);
}
}
diff --git a/codex-rs/core/src/state_db.rs b/codex-rs/core/src/state_db.rs
index 0804273bba..3e5beaa87e 100644
--- a/codex-rs/core/src/state_db.rs
+++ b/codex-rs/core/src/state_db.rs
@@ -33,12 +33,6 @@ pub(crate) async fn init_if_enabled(
) -> Option<StateDbHandle> {
let state_path = config.codex_home.join(STATE_DB_FILENAME);
if !config.features.enabled(Feature::Sqlite) {
- // We delete the file on best effort basis to maintain retro-compatibility in the future.
- let wal_path = state_path.with_extension("sqlite-wal");
- let shm_path = state_path.with_extension("sqlite-shm");
- for path in [state_path.as_path(), wal_path.as_path(), shm_path.as_path()] {
- tokio::fs::remove_file(path).await.ok();
- }
return None;
}
let existed = tokio::fs::try_exists(&state_path).await.unwrap_or(false);