Skip to content

chore: zero out workspace clippy debt + add clippy CI guard - #533

Merged
danshapiro merged 8 commits into
mainfrom
chore/clippy-debt
Jul 25, 2026
Merged

chore: zero out workspace clippy debt + add clippy CI guard#533
danshapiro merged 8 commits into
mainfrom
chore/clippy-debt

Conversation

@danshapiro

Copy link
Copy Markdown
Owner

Summary

  • Zeros out all 36 pre-existing workspace clippy errors through proper fixes (no blanket suppressions)
  • Test env-locks migrated from std to tokio mutexes, fixing real await-holding-lock hazards (deletes 7 existing lint suppressions)
  • Dead-code cleanup in freshell-server
  • Mechanical lint fixes
  • NEW clippy CI workflow pinned to Rust 1.96.0 (deliberately pinned — 1.97.1 adds new default warnings that would break locally-green code)

Test Plan

  • Gates green: cargo clippy --workspace --all-targets -- -D warnings exit 0
  • Also with --features real-transport on freshell-codex
  • cargo test --workspace 1763 passing (matches baseline)
  • Formatting clean (cargo fmt --check)
  • Coordinated JS suite green
  • Both independent reviews passed (plan round 1/3, delta round 1/5, zero blocking)

codex and others added 8 commits July 25, 2026 11:58
…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().
…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.
@danshapiro
danshapiro merged commit c491aee into main Jul 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants