Skip to content

fix: clean up rust-preview compiler and Clippy warnings - #7122

Merged
M4n5ter merged 7 commits into
rust-previewfrom
fix/rust-preview-lints-uoOLk4
Nov 21, 2026
Merged

M4n5ter merged 7 commits into
rust-previewfrom
fix/rust-preview-lints-uoOLk4

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Clean up the workspace compiler/Clippy findings without adding lint suppressions or changing CI routing. The root workspace does not select vendored crates for linting; Biome remains the existing format-only check.

  • Drop redundant struct updates/copies and parameters with only one possible value, give the Git tree diff a name, and group history projection inputs by run. Shrink oversized enum alternatives without changing their wire values.
  • Compile preview helpers, encoded captures, and command binding only for their actual consumers. The bridge and native desktop builds keep their separate implementations; no Windows/Linux-only handler is removed.
  • Delete the transport integration target that contained zero tests and its wholly unused fixture. Real CLI test helpers remain shared by their test binaries. Release the test mutex before awaiting and report AppKit's failed window exit status, like the Direct2D shell does.
  • An independent commit fixes a pre-existing macOS test assumption reproduced on b499e516b: an unbundled CLI PID may not have an NSRunningApplication. The test still checks the exact refusal, bindability and inventory identity.
  • Linux: initialize the desktop test policy directly, remove the orphaned X11 wheel fixture and its dev dependency, and scope the Host shell's libc dependency to macOS.
  • Windows: compile Unix-only task proofs, publication helpers and Antigravity execution code only for their consumers. Keep the Direct2D shell off the reconnect path and use the existing Windows native owner instead of unused embedded-session wrappers.

Verification

  • macOS: cargo clippy --locked --workspace --all-targets --all-features -- -D warnings, plus maka-computer-use --all-targets --no-default-features -- -D warnings.
  • cargo fmt --all -- --check, git diff --check, and node scripts/ci.mjs run tooling (336 tests, Biome format, licenses). node scripts/ci.mjs run contracts confirms the generated contracts and TypeScript consumers are unchanged.
  • 685 affected-crate unit tests, 19 workspace-files behavior tests, and 30 computer-use bridge tests passed in temporary HOME/TMPDIRs; 5 opt-in tests were skipped.
  • The macOS linker still prints its compact-unwind size advisory for large debug builds; stable rustfmt still prints the vendored NSH nightly-option advisory. These are not first-party Rust lint diagnostics, and the toolchain/vendor settings are unchanged.
  • Shared Linux (x86_64): cargo clippy --locked --workspace --all-targets -- -D warnings, -p maka-computer-use --all-targets --no-default-features, and -p maka-cli --features desktop-tests --test native-desktop with -D warnings all passed. The excluded NSH Linux dependency still emits its two existing dead_code warnings.
  • Windows 11 VM (x86_64 MSVC): cargo clippy --locked --workspace --all-targets -- -D warnings, -p maka-computer-use --all-targets --no-default-features, and -p maka-cli --features desktop-tests --test native-desktop with -D warnings all passed. The isolated maka-process --all-targets strict lint also passed; all 28 bridge lib tests passed with default features off. The previous first-party io_error, mutation_io, and unconfirmed warnings are absent. The excluded gix-discover dependency still prints its existing Windows metadata dead-code warning.
  • The reproduced desktop session-link test is fixed separately in test(desktop): wait for pane and popover layout before clicking #7124; no desktop interaction changes are included here.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Maka (OpenAI) scanned and reviewed compiler/Clippy findings, edited the source and fixtures, and ran verification. All commits have a Generated-by trailer.

Checklist

  • Relevant existing tests and contracts cover the changes
  • Format, strict Clippy, tooling, contracts and the affected macOS suites pass locally

Does this PR entail a change in behavior?

  • Yes — a failed AppKit window exit is now propagated after the existing cleanup; no wire schema changes.
  • No

No tests used the transport fixture module, including the CLI integration test that imported it. Remove both unused entry points and the dev-only dependencies.

Generated-by: Maka (OpenAI)
Keep native preview producers behind their actual feature gates. Simplify redundant data and arguments, bound enum payload sizes without changing wire schemas, and make the AppKit shell observe its exit status. Keep test support reachable from the harnesses that share it.

Generated-by: Maka (OpenAI)
An unbundled CLI test process may have no NSRunningApplication at all. Check the exact refusal for the actual AppKit precondition; either way the window remains unbindable and its inventory identity is preserved.

Generated-by: Maka (OpenAI)
Remove the unreferenced X11 wheel fixture left after its tests were retired, initialize the Linux desktop test policy directly, and keep the macOS Host shell dependency off other platforms.

Generated-by: Maka (OpenAI)
Windows does not use Unix closure records or directory descriptor readers. Keep their existing Unix implementations and the Windows unsupported symlink path, without compiling unreachable code or unused state.

Generated-by: Maka (OpenAI)
Keep publication validation available on Windows, compile the existing Unix publication and ACP execution helpers only where consumed, and exclude reconnect fields from the Direct2D shell.

Generated-by: Maka (OpenAI)
Use the existing Windows owner directly without the unused embedded-session wrappers. Carry the native coordinate frame together with its expected generation and preserve the existing admission and settlement order.

Generated-by: Maka (OpenAI)
@M4n5ter
M4n5ter merged commit d1aed67 into rust-preview Nov 21, 2026
18 of 21 checks passed
@M4n5ter
M4n5ter deleted the fix/rust-preview-lints-uoOLk4 branch November 21, 2026 10:15
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