From 148dbb25f02a9f55c6afb0bb80202cd51d5201f6 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Wed, 1 Apr 2026 14:06:20 -0700 Subject: [PATCH] ci: stop running rust CI with --all-features (#16473) ## Why Now that workspace crate features have been removed and `.github/scripts/verify_cargo_workspace_manifests.py` hard-bans new ones, Rust CI should stop building and testing with `--all-features`. Keeping `--all-features` in CI no longer buys us meaningful coverage for `codex-rs`, but it still makes the workflow look like we rely on Cargo feature permutations that we are explicitly trying to eliminate. It also leaves stale examples in the repo that suggest `--all-features` is a normal or recommended way to run the workspace. ## What changed - removed `--all-features` from the Rust CI `cargo chef cook`, `cargo clippy`, and `cargo nextest` invocations in `.github/workflows/rust-ci-full.yml` - updated the `just test` guidance in `justfile` to reflect that workspace crate features are banned and there should be no need to add `--all-features` - updated the multiline command example and snapshot in `codex-rs/tui/src/history_cell.rs` to stop rendering `cargo test --all-features --quiet` - tightened the verifier docstring in `.github/scripts/verify_cargo_workspace_manifests.py` so it no longer talks about temporary remaining exceptions ## How tested - `python3 .github/scripts/verify_cargo_workspace_manifests.py` - `cargo test -p codex-tui` --- .github/scripts/verify_cargo_workspace_manifests.py | 3 +-- .github/workflows/rust-ci-full.yml | 6 +++--- codex-rs/tui/src/history_cell.rs | 4 ++-- ...command_wraps_with_extra_indent_on_subsequent_lines.snap | 4 ++-- justfile | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/scripts/verify_cargo_workspace_manifests.py b/.github/scripts/verify_cargo_workspace_manifests.py index 6da903ca7..4812e2428 100644 --- a/.github/scripts/verify_cargo_workspace_manifests.py +++ b/.github/scripts/verify_cargo_workspace_manifests.py @@ -6,8 +6,7 @@ Checks: - Crates inherit `[workspace.package]` metadata. - Crates opt into `[lints] workspace = true`. - Crate names follow the codex-rs directory naming conventions. -- Workspace manifests do not introduce new workspace crate feature toggles - while the remaining exceptions are being removed. +- Workspace manifests do not introduce workspace crate feature toggles. """ from __future__ import annotations diff --git a/.github/workflows/rust-ci-full.yml b/.github/workflows/rust-ci-full.yml index 6d36b5f2e..146e57524 100644 --- a/.github/workflows/rust-ci-full.yml +++ b/.github/workflows/rust-ci-full.yml @@ -445,10 +445,10 @@ jobs: set -euo pipefail RECIPE="${RUNNER_TEMP}/chef-recipe.json" cargo chef prepare --recipe-path "$RECIPE" - cargo chef cook --recipe-path "$RECIPE" --target ${{ matrix.target }} --release --all-features + cargo chef cook --recipe-path "$RECIPE" --target ${{ matrix.target }} --release - name: cargo clippy - run: cargo clippy --target ${{ matrix.target }} --all-features --tests --profile ${{ matrix.profile }} --timings -- -D warnings + run: cargo clippy --target ${{ matrix.target }} --tests --profile ${{ matrix.profile }} --timings -- -D warnings - name: Upload Cargo timings (clippy) if: always() @@ -672,7 +672,7 @@ jobs: - name: tests id: test - run: cargo nextest run --all-features --no-fail-fast --target ${{ matrix.target }} --cargo-profile ci-test --timings + run: cargo nextest run --no-fail-fast --target ${{ matrix.target }} --cargo-profile ci-test --timings env: RUST_BACKTRACE: 1 NEXTEST_STATUS_LEVEL: leak diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index 4aadbf06d..f8e496186 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -4057,7 +4057,7 @@ mod tests { #[test] fn multiline_command_wraps_with_extra_indent_on_subsequent_lines() { // Create a completed exec cell with a multiline command - let cmd = "set -o pipefail\ncargo test --all-features --quiet".to_string(); + let cmd = "set -o pipefail\ncargo test -p codex-tui --quiet".to_string(); let call_id = "c1".to_string(); let mut cell = ExecCell::new( ExecCall { @@ -4075,7 +4075,7 @@ mod tests { // Mark call complete so it renders as "Ran" cell.complete_call(&call_id, CommandOutput::default(), Duration::from_millis(1)); - // Small width to force wrapping on both lines + // Small width to keep the wrapped continuation-indent path covered. let width: u16 = 28; let lines = cell.display_lines(width); let rendered = render_lines(&lines).join("\n"); diff --git a/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__multiline_command_wraps_with_extra_indent_on_subsequent_lines.snap b/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__multiline_command_wraps_with_extra_indent_on_subsequent_lines.snap index e8458cfdc..99672e3e0 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__multiline_command_wraps_with_extra_indent_on_subsequent_lines.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__multiline_command_wraps_with_extra_indent_on_subsequent_lines.snap @@ -3,6 +3,6 @@ source: tui/src/history_cell.rs expression: rendered --- • Ran set -o pipefail - │ cargo test - │ --all-features --quiet + │ cargo test -p codex-tui + │ --quiet └ (no output) diff --git a/justfile b/justfile index 1a1295020..7dc6ae100 100644 --- a/justfile +++ b/justfile @@ -46,8 +46,8 @@ install: # --no-fail-fast is important to ensure all tests are run. # # Run `cargo install cargo-nextest` if you don't have it installed. -# Prefer this for routine local runs; use explicit `cargo test --all-features` -# only when you specifically need full feature coverage. +# Prefer this for routine local runs. Workspace crate features are banned, so +# there should be no need to add `--all-features`. test: cargo nextest run --no-fail-fast