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

+7 -1
View File
@@ -2165,7 +2165,13 @@ async fn state_check(config: &Config) -> DoctorCheck {
path_readiness(&mut details, "log dir", &config.log_dir);
path_readiness(&mut details, "sqlite home", &config.sqlite_home);
let mut integrity_failures = Vec::new();
for db in codex_state::runtime_db_paths(&config.sqlite_home) {
let sqlite = codex_state::SqliteConfig::from_sqlite_home(
codex_utils_absolute_path::AbsolutePathBuf::resolve_path_against_base(
&config.sqlite_home,
&config.codex_home,
),
);
for db in sqlite.runtime_db_paths() {
path_readiness(&mut details, db.label, &db.path);
sqlite_integrity_detail(&mut details, &mut integrity_failures, db.label, &db.path).await;
}