Skip to content

test: isolate app-server-client in-process test state#21328

Merged
jif-oai merged 1 commit into
mainfrom
jif/app-server-client-test-isolation
May 6, 2026
Merged

test: isolate app-server-client in-process test state#21328
jif-oai merged 1 commit into
mainfrom
jif/app-server-client-test-isolation

Conversation

@jif-oai

@jif-oai jif-oai commented May 6, 2026

Copy link
Copy Markdown
Collaborator

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.

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.

Testing

  • Existing codex-app-server-client tests continue to exercise the updated in-process client path through the isolated helper.

@jif-oai jif-oai changed the title test: isolate app-server-client in-process state test: isolate app-server-client in-process test state May 6, 2026
@jif-oai jif-oai enabled auto-merge (squash) May 6, 2026 09:19
@jif-oai jif-oai merged commit b5e965e into main May 6, 2026
26 checks passed
@jif-oai jif-oai deleted the jif/app-server-client-test-isolation branch May 6, 2026 09:21
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants