Skip to content

test: add app-server auto environment helper - #29746

Merged
anp-oai merged 1 commit into
mainfrom
codex/app-server-auto-env
Jun 24, 2026
Merged

test: add app-server auto environment helper#29746
anp-oai merged 1 commit into
mainfrom
codex/app-server-auto-env

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Why

Start moving towards app-server tests defaulting to running against remote & foreign OS executors. To do so we need a point of indirection similar to core integration tests' build_with_auto_env, but with the flexibility of letting tests control environment registration if they need to.

What

This adds:

  • TestAppServer::new_with_auto_env() for constructing an app server with a default environment defined by the test runner (e.g. bazel)
  • TestAppServer::auto_env_params() for tests to easily acquire turn env params tailored to the automatic environment
  • TestAppServer::send_thread_start_request_with_auto_env() to make it easy for tests to start a thread using the automatic environment

The above methods all fail if the test calling them has set up an environment where the automatic environment configuration conflicts with test-created state.

Validation

Adds a couple of basic smoke tests to the app-server test suite. Follow-ups will migrate more tests to use it.

@anp-oai
anp-oai marked this pull request as ready for review June 24, 2026 00:14
@anp-oai
anp-oai requested a review from a team as a code owner June 24, 2026 00:14
@anp-oai

anp-oai commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3f3ba3abe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/app-server/tests/common/Cargo.toml
@anp-oai
anp-oai force-pushed the codex/app-server-auto-env branch from f3f3ba3 to ad6bb9b Compare June 24, 2026 00:48
@anp-oai
anp-oai enabled auto-merge (squash) June 24, 2026 00:49
@anp-oai
anp-oai merged commit 283bc4c into main Jun 24, 2026
31 checks passed
@anp-oai
anp-oai deleted the codex/app-server-auto-env branch June 24, 2026 01:06
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 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