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

@@ -1095,7 +1095,7 @@ mod tests {
let path =
write_session_file(home.path(), "2025-01-03T18-30-00", uuid).expect("session file");
let runtime = codex_state::StateRuntime::init(
config.sqlite_home.clone(),
config.sqlite.home().to_path_buf(),
config.default_model_provider_id.clone(),
)
.await
@@ -1200,7 +1200,7 @@ mod tests {
let home = TempDir::new().expect("temp dir");
let config = test_config(home.path());
let runtime = codex_state::StateRuntime::init(
config.sqlite_home.clone(),
config.sqlite.home().to_path_buf(),
config.default_model_provider_id.clone(),
)
.await
@@ -1243,7 +1243,7 @@ mod tests {
let home = TempDir::new().expect("temp dir");
let config = test_config(home.path());
let runtime = codex_state::StateRuntime::init(
config.sqlite_home.clone(),
config.sqlite.home().to_path_buf(),
config.default_model_provider_id.clone(),
)
.await
@@ -1298,7 +1298,7 @@ mod tests {
let home = TempDir::new().expect("temp dir");
let config = test_config(home.path());
let runtime = codex_state::StateRuntime::init(
config.sqlite_home.clone(),
config.sqlite.home().to_path_buf(),
config.default_model_provider_id.clone(),
)
.await
@@ -1356,7 +1356,7 @@ mod tests {
let home = TempDir::new().expect("temp dir");
let config = test_config(home.path());
let runtime = codex_state::StateRuntime::init(
config.sqlite_home.clone(),
config.sqlite.home().to_path_buf(),
config.default_model_provider_id.clone(),
)
.await