From 3be462a6dd418960cfcb7c5a6626b28b77be89f7 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Fri, 17 Apr 2026 09:27:45 -0700 Subject: [PATCH] fix: remove unused imports that got past CI --- .github/scripts/run-bazel-ci.sh | 8 ++++---- .github/workflows/bazel.yml | 11 ++++++++--- codex-rs/core/tests/suite/unified_exec.rs | 3 ++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/scripts/run-bazel-ci.sh b/.github/scripts/run-bazel-ci.sh index a1d42a0576..cea51496d7 100755 --- a/.github/scripts/run-bazel-ci.sh +++ b/.github/scripts/run-bazel-ci.sh @@ -178,10 +178,10 @@ if [[ "${RUNNER_OS:-}" == "Windows" && $windows_msvc_host_platform -eq 1 ]]; the done if [[ $has_host_platform_override -eq 0 ]]; then - # Keep Windows Bazel targets on `windows-gnullvm` for cfg coverage, but opt - # specific jobs into an MSVC exec platform when they need helper binaries - # like Rust test wrappers and V8 generators to resolve a compatible host - # toolchain. + # Use the MSVC Windows platform for jobs that need helper binaries like + # Rust test wrappers and V8 generators to resolve a compatible toolchain. + # Callers that need a different Windows target platform should pass an + # explicit `--platforms=...` flag. post_config_bazel_args+=("--host_platform=//:local_windows_msvc") fi fi diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 0328ac2073..fba52247de 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -161,10 +161,14 @@ jobs: --build_metadata=COMMIT_SHA=${GITHUB_SHA} --build_metadata=TAG_job=clippy ) + bazel_wrapper_args=() if [[ "${RUNNER_OS}" == "Windows" ]]; then - # Some explicit targets pulled in through //codex-rs/... are - # intentionally incompatible with `//:local_windows`, but the lint - # aspect still traverses their compatible Rust deps. + # Keep this aligned with the Windows Bazel test job. With the + # default `//:local_windows` host platform, Windows `rust_test` + # targets such as `//codex-rs/core:core-all-test` can be skipped + # by `--skip_incompatible_explicit_targets`, which hides clippy + # diagnostics from integration-test modules. + bazel_wrapper_args+=(--windows-msvc-host-platform) bazel_clippy_args+=(--skip_incompatible_explicit_targets) fi @@ -175,6 +179,7 @@ jobs: done <<< "${bazel_target_lines}" ./.github/scripts/run-bazel-ci.sh \ + "${bazel_wrapper_args[@]}" \ -- \ build \ "${bazel_clippy_args[@]}" \ diff --git a/codex-rs/core/tests/suite/unified_exec.rs b/codex-rs/core/tests/suite/unified_exec.rs index 77a15e92c0..6a0d998853 100644 --- a/codex-rs/core/tests/suite/unified_exec.rs +++ b/codex-rs/core/tests/suite/unified_exec.rs @@ -5,7 +5,6 @@ use std::sync::OnceLock; use anyhow::Context; use anyhow::Result; -use codex_config::Constrained; use codex_exec_server::CreateDirectoryOptions; use codex_features::Feature; use codex_protocol::permissions::FileSystemAccessMode; @@ -2349,6 +2348,8 @@ async fn unified_exec_runs_under_sandbox() -> Result<()> { #[cfg(unix)] #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn unified_exec_enforces_glob_deny_read_policy() -> Result<()> { + use codex_config::Constrained; + skip_if_no_network!(Ok(())); skip_if_sandbox!(Ok(()));