feat: simplify DB further (#13771)

This commit is contained in:
jif-oai
2026-03-07 12:48:36 +01:00
committed by GitHub
parent 5ceff6588e
commit cf143bf71e
28 changed files with 147 additions and 297 deletions

View File

@@ -556,12 +556,9 @@ sqlite = true
// `thread/list` only applies `search_term` on the sqlite path. In this test we
// create rollouts manually, so we must also create the sqlite DB and mark backfill
// complete; otherwise app-server will permanently use filesystem fallback.
let state_db = codex_state::StateRuntime::init(
codex_home.path().to_path_buf(),
"mock_provider".into(),
None,
)
.await?;
let state_db =
codex_state::StateRuntime::init(codex_home.path().to_path_buf(), "mock_provider".into())
.await?;
state_db.mark_backfill_complete(None).await?;
let mut mcp = init_mcp(codex_home.path()).await?;

View File

@@ -428,8 +428,7 @@ async fn thread_metadata_update_can_clear_stored_git_fields() -> Result<()> {
}
async fn init_state_db(codex_home: &Path) -> Result<Arc<StateRuntime>> {
let state_db =
StateRuntime::init(codex_home.to_path_buf(), "mock_provider".into(), None).await?;
let state_db = StateRuntime::init(codex_home.to_path_buf(), "mock_provider".into()).await?;
state_db.mark_backfill_complete(None).await?;
Ok(state_db)
}

View File

@@ -321,12 +321,8 @@ stream_max_retries = 0
.join("\n")
+ "\n",
)?;
let state_db = StateRuntime::init(
codex_home.path().to_path_buf(),
"mock_provider".into(),
None,
)
.await?;
let state_db =
StateRuntime::init(codex_home.path().to_path_buf(), "mock_provider".into()).await?;
state_db.mark_backfill_complete(None).await?;
let mut mcp = McpProcess::new(codex_home.path()).await?;