chore: zero out workspace clippy debt + add clippy CI guard#533
Merged
Conversation
…ings 12 assumptions verified, 2 falsified and fixed, 1 accepted with mitigation: - Pin CI toolchain to 1.96.0 (current stable 1.97.1 adds default-warn lints; floating @stable breaks green-local => green-CI). - Add Task 9 Step 5: make the clippy check required via ruleset 14473229 (the workflow alone would be advisory - required checks are an explicit allowlist containing only typecheck-client today). - Record the verified green test baseline (1763/0/4 across 70 suites) and add repeated post-migration lib-test runs (residual timing risk of the std->tokio Mutex swap). - Corrections: 36 errors (not 34), 328 freshell-server bin-unit tests (not 332), branch is chore/clippy-debt; cite validation evidence for the inventory, tokio API probe, dead-code census, CI apt set, and Actions policy.
Fixes 22 clippy::await_holding_lock errors and deletes the 7 existing #[allow(clippy::await_holding_lock)] suppressions guarding the same pattern. Matches the convention already used by freshell-ws/tests/freshagent_claude_kill_interrupt.rs. Behavior preserved: same whole-test-body env serialization; tokio's non-poisoning lock is exactly what unwrap_or_else(into_inner) was hand-rolling. Sync tests use blocking_lock().
Fixes the 5 remaining clippy::await_holding_lock errors. Same transform and rationale as the codex ENV_LOCK migration; the sync sidecar-entry test uses blocking_lock().
…clippy let_and_return)
…adata - Delete DEFAULT_CLI_DETECTION_SPECS: dead since 24ecdb8 deleted its only consumer as a parity fix; live specs come from extension manifests. De-link the rustdoc reference to it. - Delete has_cli (production caller deleted in the same commit); re-point its one test assert at the live discovered_cli_names() with a strictly stronger assertion. - Gate SessionMetadataStore::{get,get_all} (+ HashMap import) to #[cfg(test)]: faithful-port read API whose JS-side callers (session-indexer getAll join) are not ported yet.
…ref in tests Workspace 'cargo clippy --workspace --all-targets -- -D warnings' is now fully green. last_emitted_line's rfind rewrite is semantically identical (rfind == filter(pred).next_back() on a DoubleEndedIterator) and pinned by the existing terminals tests. 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
The Rust workspace previously had zero CI coverage; this guard keeps 'cargo clippy --workspace --all-targets -- -D warnings' (plus fmt and the default-off real-transport features) from silently regrowing debt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test Plan
cargo clippy --workspace --all-targets -- -D warningsexit 0--features real-transporton freshell-codexcargo test --workspace1763 passing (matches baseline)cargo fmt --check)