Skip to content

chore(desktop): clear desktop-tauri clippy backlog#1612

Merged
wesbillman merged 1 commit into
mainfrom
pinky/clippy-cleanup
Jul 7, 2026
Merged

chore(desktop): clear desktop-tauri clippy backlog#1612
wesbillman merged 1 commit into
mainfrom
pinky/clippy-cleanup

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

Clears all 26 pre-existing clippy -D warnings errors in the desktop Tauri crate so just desktop-tauri-clippy — and with it the local just check aggregate — passes again. CI doesn't run this target, so the backlog had accumulated on main (flagged during #1601/#1602 review as a separate cleanup chunk).

No behavior change intended anywhere in this diff.

What was fixed, by category

Mechanical simplifications (bulk):

  • readiness.rs: map_oris_none_or/is_some_and; collapsed if-into-match-guard on the provider credential matches (semantics verified: a present key fails the guard and falls through to the empty _ arm, identical to the old inner-if-does-nothing)
  • runtime.rs: removed unused pub use sweep::{...} re-export (all uses are inside sweep.rs), iter().any()slice::contains
  • archive/mod_tests.rs: 4× needless borrow on "A".repeat(200)
  • personas/writeback.rs: redundant closure
  • config_bridge/claude.rs test helper: struct-literal init instead of field-reassign-with-default

Root-cause fixes rather than lint silencing:

  • agent_models.rs: the identical if blocks lint exposed that preserve_first_separator was inert (both arms returned part at index 0) — removed the parameter entirely
  • config_bridge/reader.rs: named ResolvedOverride type alias for the very-complex-type lint

Deliberate #[allow]s with rationale comments:

  • too_many_arguments ×4 (archive/store.rs ×2, archive/pipeline.rs, config_bridge/reader.rs): these fns mirror table columns or are single-caller internals — a params struct would rename the problem, not fix it
  • readiness.rs config_file_path dead-code: kept behind #[allow(dead_code)] + note because the in-flight unified-agent-record work (chunk A) replaces that resolution path wholesale; deleting it here would create churn against that branch
  • readiness.rs is_ready/requirements: used only by tests → gated #[cfg(test)]; Requirement::label() had zero callers → deleted

Coordination note

runtime.rs/readiness.rs changes were kept intentionally mechanical to avoid conflicting with the in-flight feat/unified-agent-record branch, per agreement with its author.

Testing

  • just desktop-tauri-clippy green (was 26 errors)
  • just desktop-tauri-fmt-check green
  • file-size gate green
  • 1023 desktop Rust tests pass

Fix all 26 pre-existing clippy -D warnings errors in the desktop Tauri
crate so `just desktop-tauri-clippy` (and the local `just check`
aggregate) passes again. CI does not run this target, so the backlog
had accumulated on main.

- readiness.rs: gate test-only AgentReadiness helpers with #[cfg(test)],
  drop the unused Requirement::label, is_none_or/is_some_and, collapse
  provider match guards; keep config_file_path behind #[allow(dead_code)]
  since chunk A replaces that resolution path wholesale
- runtime.rs: drop unused sweep re-exports, use slice::contains
  (mechanical-only per coordination with the unified-agent-record work)
- agent_models.rs: remove the no-op preserve_first_separator branch and
  its parameter (both arms were identical)
- archive/: needless test borrows; #[allow(too_many_arguments)] for the
  three column-mirroring store/pipeline fns where a params struct would
  only rename the problem
- config_bridge/: struct-literal init in claude.rs test helper, named
  ResolvedOverride type alias, #[allow(too_many_arguments)] on
  build_model_field

No behavior change; 1023 desktop tests pass, fmt and file-size gates
clean.

Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman wesbillman merged commit 36fd41c into main Jul 7, 2026
25 checks passed
@wesbillman wesbillman deleted the pinky/clippy-cleanup branch July 7, 2026 23:49
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.

1 participant