Skip to content

test: remove TestAppServer constructors#31452

Merged
anp-oai merged 3 commits into
mainfrom
codex/test-app-server-builder-remove-constructors
Jul 8, 2026
Merged

test: remove TestAppServer constructors#31452
anp-oai merged 3 commits into
mainfrom
codex/test-app-server-builder-remove-constructors

Conversation

@anp-oai

@anp-oai anp-oai commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Why

Finish the TestAppServer builder migration after every caller has moved off the compatibility constructors.

What

  • remove the obsolete public TestAppServer constructors
  • leave TestAppServer::builder() as the only fixture construction API

Validation

  • cargo check -p codex-app-server --tests

Cleanup stack

  1. #31425 test: add TestAppServer builder
  2. #31451 test: migrate TestAppServer callers to builder
  3. this PR

@anp-oai anp-oai force-pushed the codex/test-app-server-builder-callers branch 2 times, most recently from dce1084 to 50462a1 Compare July 7, 2026 18:35
@anp-oai anp-oai force-pushed the codex/test-app-server-builder-remove-constructors branch from 32d3544 to ff0feeb Compare July 7, 2026 18:36
@anp-oai anp-oai force-pushed the codex/test-app-server-builder-callers branch from 50462a1 to 87b5a6a Compare July 7, 2026 19:04
@anp-oai anp-oai force-pushed the codex/test-app-server-builder-remove-constructors branch from ff0feeb to 1df264a Compare July 7, 2026 19:05
anp-oai added a commit that referenced this pull request Jul 7, 2026
## Why

Test callers need one composable way to create app-server fixtures
instead of a growing family of overlapping constructor implementations.

## What

- add a feature-complete TestAppServer::builder()
- make the default builder own a temporary CODEX_HOME and select the
automatic test environment
- expose builder knobs for no automatic environment, explicit
CODEX_HOME, program, arguments, plugin startup tasks, environment
overrides, managed config, and JSON logging
- keep the existing public constructor surface, but route every
constructor through the builder so the new path is exercised immediately
- remove the redundant private constructor ladders; caller migration and
public constructor removal live in the optional cleanup stack

## Validation

- just test -p codex-app-server (940/941 before updating the expected
builder error wording)
- just test -p codex-app-server
auto_env_rejects_explicit_environment_config
- just fix -p codex-app-server
- just fmt

## Follow-up stacks

Cleanup, optional for the benchmark work:

1. [#31451 test: migrate TestAppServer callers to
builder](#31451)
2. [#31452 test: remove TestAppServer
constructors](#31452)

Benchmark infrastructure:

1. [#31427 test: add delayed exec-server
transport](#31427)
2. [#31295 bench: add cold skill load
macrobenchmark](#31295)
3. [#31428 bench: add e2e benchmark
entrypoints](#31428)
4. [#31429 ci: smoke Bazel e2e
benchmarks](#31429)
@anp-oai anp-oai force-pushed the codex/test-app-server-builder-callers branch from 87b5a6a to 035504b Compare July 7, 2026 22:54
@anp-oai anp-oai force-pushed the codex/test-app-server-builder-remove-constructors branch from 1df264a to 2712ad9 Compare July 7, 2026 22:55
@anp-oai anp-oai force-pushed the codex/test-app-server-builder-callers branch from 035504b to 5d76622 Compare July 7, 2026 23:01
@anp-oai anp-oai force-pushed the codex/test-app-server-builder-remove-constructors branch from 2712ad9 to 94846ae Compare July 7, 2026 23:01
@anp-oai anp-oai marked this pull request as ready for review July 7, 2026 23:57

@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: 94846aef93

ℹ️ 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/test_app_server.rs
anp-oai added a commit that referenced this pull request Jul 8, 2026
@anp-oai anp-oai force-pushed the codex/test-app-server-builder-callers branch from 5d76622 to ed08452 Compare July 8, 2026 00:02
anp-oai added a commit that referenced this pull request Jul 8, 2026
## Why

Keep the TestAppServer builder API change reviewable by moving the
repository-wide caller migration into a mechanical follow-up.

## What

- replace TestAppServer constructor callsites with equivalent builder
chains
- preserve each caller's automatic-environment, args, program, env,
managed-config, plugin-startup, and JSON-logging behavior
- make no TestAppServer implementation changes

## Validation

- cargo check -p codex-app-server --tests

## Cleanup stack

1. [#31425 test: add TestAppServer
builder](#31425)
2. [#31451 test: migrate TestAppServer callers to
builder](#31451)
3. [#31452 test: remove TestAppServer
constructors](#31452)
Base automatically changed from codex/test-app-server-builder-callers to main July 8, 2026 00:15
anp-oai added a commit that referenced this pull request Jul 8, 2026
@anp-oai anp-oai force-pushed the codex/test-app-server-builder-remove-constructors branch from 9b8e165 to 9d02706 Compare July 8, 2026 01:01
@anp-oai

anp-oai commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@anp-oai anp-oai force-pushed the codex/test-app-server-builder-remove-constructors branch from 9d02706 to c2e6259 Compare July 8, 2026 17:39
@anp-oai anp-oai enabled auto-merge (squash) July 8, 2026 17:39
@anp-oai anp-oai merged commit f73a072 into main Jul 8, 2026
35 checks passed
@anp-oai anp-oai deleted the codex/test-app-server-builder-remove-constructors branch July 8, 2026 17:50
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 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