chore(rust): enforce warning-free Clippy baseline - #640
Open
Harry19081 wants to merge 2 commits into
Open
Conversation
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.
Problem
The Rust workspace emitted 37 warnings under default-target Clippy plus additional test-target warnings under
--all-targets. CI rancargo clippy --workspacewith advisory warnings, so warning regressions, duplicate test-module registration, and test-only lint debt could accumulate without failing the build. Rust 1.97 also introduced additional lint coverage that the prior 1.96 local baseline did not expose.Solution
test-runnerandperf-utilswhile keeping each suite registered at its owning module.PushRequestinto the private Git push helper instead of forwarding eight individual fields; the HTTP request and response shape is unchanged.question_mark,for_kv_map, anduseless_borrows_in_formattingfindings.cargo clippy --workspace --all-targets -- -D warningsin CI.The resulting invariant is that all workspace-owned Rust targets compile without Clippy warnings under the exact CI command and current CI toolchain.
Potential risks
The private Git push helper now receives the canonical request DTO directly, so a regression there could affect remote, branch, force, upstream, or authentication forwarding. The Git API library suite passed, and the public route payload is unchanged. Test modules moved within source files and duplicate registrations were removed, which changes test discovery structure but not the test bodies; the affected suites passed exactly once. The stricter CI gate can expose newly introduced compiler lints after a Rust toolchain update, which is intentional but may require follow-up maintenance.
Cargo still reports the transitive
block v0.1.6future-incompatibility notice throughtauri-plugin-liquid-glass -> cocoa. The latest published plugin and its current upstream main branch remain at 0.1.6 and explicitly retain the legacy Cocoa stack, so there is no safe dependency-only upgrade to land in this PR. Removing that notice requires an upstream migration or a separately reviewed local fork. Rollback is a direct revert of these commits; there are no data, persistence, configuration, or public wire migrations.Architecture audit
Covered compilation and warning boundaries, structural test registration, naming, and source clarity (layers 1, 2, 3, and 7). Semantic behavior, wire schemas, initialization ownership, resolver boundaries, serialization, and test-contract redesign (layers 4-6 and 8-10) were intentionally left unchanged. Tauri command and trait callback signatures remain stable.
Verification
CARGO_TARGET_DIR=/private/tmp/orgii-clippy-1-97-target-20260801 cargo +1.97.0 clippy --workspace --all-targets -- -D warningsagent_core,browser,key_vault,lsp, andorgtrack_core— 4,141 passed, 0 failed, 9 ignoredorg2session-directory display suite — 12 passed, 0 failedrustfmt --edition 2021 --checkgit diff --checkand added-line scan for secrets, personal paths, debug macros, and generated artifactsCARGO_TARGET_DIR=/private/tmp/orgii-clippy-warning-cleanup-target-20260801 cargo test --workspace --lib --no-fail-fast -- --quietran every workspace library target. Every target passed exceptorg2 --lib, where 1,020 tests passed, 2 failed, and 1 was ignored.orgtrack::history_commands::tests::reduced_prewarm_never_displaces_full_projection_and_is_invisible_to_full_readersorgtrack::session_provenance::tests::codex_lifecycle_maps_actor_to_independently_loadable_transcriptb800b7810; neither failing source file is changed by this PR. The same two failures remained after integration onto latestdevelop(b231b4c5b)..husky/_/husky.shwas absent; commits used a one-command hook bypass after the direct checks above passed.