Skip to content

tui: remove debug/test-only crate features#16457

Merged
bolinfest merged 1 commit intomainfrom
pr16457
Apr 1, 2026
Merged

tui: remove debug/test-only crate features#16457
bolinfest merged 1 commit intomainfrom
pr16457

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Apr 1, 2026

Why

The remaining vt100-tests and debug-logs features in codex-tui were only gating test-only and debug-only behavior. Those feature toggles add Cargo and Bazel permutations without buying anything, and they make it easier for more crate features to linger in the workspace.

What changed

  • delete vt100-tests and debug-logs from codex-tui
  • always compile the VT100 integration tests in the TUI test target instead of hiding them behind a Cargo feature
  • remove the unused textarea debug logging branch instead of replacing it with another gate
  • add the required argument-comment annotations in the VT100 tests now that Bazel sees those callsites during linting
  • shrink the manifest verifier allowlist again so only the remaining real feature exceptions stay permitted

How tested

  • cargo test -p codex-tui
  • just argument-comment-lint -p codex-tui

bolinfest added a commit that referenced this pull request Apr 1, 2026
## Why

We already enforce workspace metadata and lint inheritance for
`codex-rs` manifests, but we still allow new crate features to slip into
the workspace. That makes it too easy to add more Cargo-only feature
permutations while we are trying to eliminate them.

## What changed

- extend `verify_cargo_workspace_manifests.py` to reject new
`[features]` tables in workspace crates
- reject new optional dependencies that create implicit crate features
- reject new workspace-to-workspace `features = [...]` activations and
`default-features = false`
- add a narrow temporary allowlist for the existing feature-bearing
manifests and internal feature activations
- make the allowlist self-shrinking so a follow-up removal has to delete
its corresponding exception


---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/16455).
* #16457
* #16456
* __->__ #16455
@bolinfest bolinfest force-pushed the pr16456 branch 2 times, most recently from 8056e03 to 8e8429a Compare April 1, 2026 18:51
bolinfest added a commit that referenced this pull request Apr 1, 2026
## Why

`codex-cloud-tasks-client` was mixing two different roles: the real HTTP
client and the mock implementation used by tests and local mock mode.
Keeping both in the same crate forced Cargo feature toggles and Bazel
`crate_features` just to pick an implementation.

This change keeps `codex-cloud-tasks-client` focused on the shared API
surface and real backend client, and moves the mock implementation into
its own crate so we can remove those feature permutations cleanly.

## What changed

- add a new `codex-cloud-tasks-mock-client` crate that owns `MockClient`
- remove the `mock` and `online` features from
`codex-cloud-tasks-client`
- make `codex-cloud-tasks-client` unconditionally depend on
`codex-backend-client` and export `HttpClient` directly
- gate the mock-mode path in `codex-cloud-tasks` behind
`#[cfg(debug_assertions)]`, so release builds always initialize the real
HTTP client
- update `codex-cloud-tasks` and its tests to use
`codex-cloud-tasks-mock-client::MockClient` wherever mock behavior is
needed
- remove the matching Bazel `crate_features` override and shrink the
manifest verifier allowlist accordingly

## How tested

- `cargo test -p codex-cloud-tasks-client`
- `cargo test -p codex-cloud-tasks-mock-client`
- `cargo test -p codex-cloud-tasks`

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/16456).
* #16457
* __->__ #16456
Base automatically changed from pr16456 to main April 1, 2026 19:09
## Why

The remaining `vt100-tests` and `debug-logs` features in `codex-tui` were only selecting debug and test-only behavior. Those are exactly the cases where this repo already accepts `#[cfg(debug_assertions)]` as the Cargo-free substitute.

## What changed

- delete `vt100-tests` and `debug-logs` from `codex-tui`
- gate the VT100 integration tests with `debug_assertions` instead of a Cargo feature
- gate the textarea debug log site with `debug_assertions`
- shrink the manifest verifier allowlist again so only the remaining real feature exceptions stay permitted
@bolinfest bolinfest changed the title tui: replace debug/test-only crate features with debug_assertions tui: remove debug/test-only crate features Apr 1, 2026
@bolinfest bolinfest merged commit d1043ef into main Apr 1, 2026
36 checks passed
@bolinfest bolinfest deleted the pr16457 branch April 1, 2026 19:40
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 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.

1 participant