Centralize SQLite connection configuration (#34808)

## What changed

- Add `SqliteConfig` to own the resolved SQLite home, runtime database paths,
  and shared read/write and read-only pool settings.
- Pass the configuration through state and local thread-store consumers,
  replacing standalone path helpers and duplicated connection setup.

GitOrigin-RevId: 7351b08da94b5c8b6c0bbe492f86aeeca0699d3c
This commit is contained in:
Adam Perry @ OpenAI authored and copyberry committed 2026-07-22 18:45:47 +00:00
1 parent a59a419afa
commit 946ed315a4
35 files changed
+445 -397

No files matched your search

+4 -2
View File
@@ -26,8 +26,8 @@ use codex_execpolicy::ExecPolicyCheckCommand;
use codex_responses_api_proxy::Args as ResponsesApiProxyArgs;
use codex_rollout_trace::REDUCED_STATE_FILE_NAME;
use codex_rollout_trace::replay_bundle;
use codex_state::SqliteConfig;
use codex_state::StateRuntime;
use codex_state::memories_db_path;
use codex_tui::AppExitInfo;
use codex_tui::Cli as TuiCli;
use codex_tui::ExitReason;
@@ -2052,7 +2052,9 @@ async fn run_debug_clear_memories_command(
.build()
.await?;
let memories_path = memories_db_path(config.sqlite_home.as_path());
let sqlite_home =
AbsolutePathBuf::resolve_path_against_base(&config.sqlite_home, &config.codex_home);
let memories_path = SqliteConfig::from_sqlite_home(sqlite_home).memories_db_path();
let cleared_memories_db =
StateRuntime::clear_memory_data_in_sqlite_home(config.sqlite_home.as_path()).await?;