1.6 KiB
Restore the checker formatting gate
Type: task Status: resolved
Question
Apply the repository's configured rustfmt output to the currently reported
Rust files, verify that no semantic changes are introduced, and restore
cargo fmt --all --check so the checker CI gate is green.
Answer
The exact CI command failed deterministically on seven Rust files and an
isolated single-file rustfmt check reproduced the same output. The source
changes were formatting-only, but the underlying gate was not reproducible:
the repository had no rust-toolchain.toml and checker CI installed floating
stable, so local rustfmt, clippy and CI could change independently.
The checker toolchain is now pinned to Rust 1.92.0 with rustfmt and clippy
in both rust-toolchain.toml and the Gitea workflow. The seven files were
formatted with that toolchain. Running the complete CI path then surfaced three
test helpers accepting &PathBuf instead of &Path and a Clippy name collision
between Shell and PowerShell; those were corrected without changing CLI
values or behavior.
Verification:
cargo fmt --all --check PASS (twice)
cargo clippy --all-targets --all-features -- -D warnings
PASS
cargo test --all-features --workspace PASS (53 tests)
cph completions zsh / power-shell PASS
The final Rust diff consists of rustfmt layout plus four borrowed-Path
signature generalizations and the internal Shell → CompletionTarget type
rename. No expression, string value, command behavior, or public Rust API was
changed.