mirror of
https://github.com/openai/codex.git
synced 2026-05-19 02:33:10 +00:00
## Why The in-process `app-server-client` tests were still building their configs from the ambient `codex_home` and letting the embedded app server create its own state DB when `state_db` was absent. That matters because in-process startup falls back to `init_state_db_from_config(...)` in that case, so tests can otherwise share persisted state instead of getting isolated fixtures: [`app-server/src/in_process.rs`](a98623511b/codex-rs/app-server/src/in_process.rs (L368-L373)). ## What changed - Give each in-process test client its own temporary `codex_home`. - Initialize the matching state DB from that per-client config and pass it into the client explicitly. - Keep the temp directory alive for the lifetime of the test client through a small `TestClient` wrapper. - Add `tempfile` as a dev dependency for the new harness. The updated setup lives in [`app-server-client/src/lib.rs`](35c1133d45/codex-rs/app-server-client/src/lib.rs (L982-L1055)). ## Testing - Existing `codex-app-server-client` tests continue to exercise the updated in-process client path through the isolated helper.