Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: flaky test (#11428)

jif-oai2c5eeb6b1fb3
diff --git a/codex-rs/state/src/runtime.rs b/codex-rs/state/src/runtime.rs
index dcb472022b..541e02ad38 100644
--- a/codex-rs/state/src/runtime.rs
+++ b/codex-rs/state/src/runtime.rs
@@ -1272,7 +1272,6 @@ WHERE id = 1
}
#[tokio::test]
- #[ignore = "TODO(jif): flaky"]
async fn stage1_concurrent_claims_respect_running_cap() {
let codex_home = unique_temp_dir();
let runtime = StateRuntime::init(codex_home.clone(), "test-provider".to_string(), None)
diff --git a/codex-rs/state/src/runtime/memories.rs b/codex-rs/state/src/runtime/memories.rs
index e321622213..def408c6e2 100644
--- a/codex-rs/state/src/runtime/memories.rs
+++ b/codex-rs/state/src/runtime/memories.rs
@@ -174,7 +174,7 @@ LIMIT ?
let thread_id = thread_id.to_string();
let worker_id = worker_id.to_string();
- let mut tx = self.pool.begin().await?;
+ let mut tx = self.pool.begin_with("BEGIN IMMEDIATE").await?;
let existing_output = sqlx::query(
r#"
@@ -424,7 +424,7 @@ WHERE kind = ? AND job_key = ?
let ownership_token = Uuid::new_v4().to_string();
let worker_id = worker_id.to_string();
- let mut tx = self.pool.begin().await?;
+ let mut tx = self.pool.begin_with("BEGIN IMMEDIATE").await?;
let existing_job = sqlx::query(
r#"