cargo fmt --check fails on main (one import line in executors/copilot.rs, from #3454)

Author: rafaelfiguereod-stackCreated Sep 23, 2026Updated Sep 26, 2026

cargo fmt --all -- --check currently fails on main, on one line in one file.

Reproduce

cargo fmt --all -- --check

on main at d5cbb5380fa0b32e98ef9b8d987f63decce4be3a:

Diff in crates/executors/src/executors/copilot.rs:10:
 pub use super::acp::AcpAgentHarness;
 use crate::{
     approvals::ExecutorApprovalService,
-    command::{apply_overrides, CmdOverrides, CommandBuildError, CommandBuilder},
+    command::{CmdOverrides, CommandBuildError, CommandBuilder, apply_overrides},
     env::ExecutionEnv,

I ran this on nightly-2025-12-04, the same toolchain RUST_TOOLCHAIN pins in .github/workflows/test.yml, so it is not a toolchain mismatch on my end. rustfmt.toml sets edition = "2024", and the 2024 style edition sorts lowercase items after uppercase ones, which is why apply_overrides belongs last.

Where it came from

The file was correctly formatted before. #3454 ("bump copilot version to 1.0.83", 7440d3364, 2026-09-15) reverted the ordering alongside the actual version bump:

-    command::{CmdOverrides, CommandBuildError, CommandBuilder, apply_overrides},
+    command::{apply_overrides, CmdOverrides, CommandBuildError, CommandBuilder},

That looks like an editor auto-import or a local rustfmt running under a different style edition, rather than anything intentional. The @github/[email protected] to @1.0.83 change in the same commit is the real content.

Why CI did not catch it

The backend-clippy job runs cargo fmt --all -- --check, so it would have failed. Actions has not been starting jobs on this repo recently. Runs complete as failures with no jobs created, annotated "The job was not started because your account is locked due to a billing issue", so the fmt regression has been able to sit on main unnoticed. Once Actions is running again, backend-clippy will fail on main until this line is fixed.

Fix

One line, reverting to what rustfmt wants:

rust
    command::{CmdOverrides, CommandBuildError, CommandBuilder, apply_overrides},

Happy to open a PR for it if that is easier, just say so. I found this while verifying an unrelated PR of mine locally, since CI could not run it.

Rafael