Skip to content

fix(build): drop unused std::fs import that fails clippy on main - #5484

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/clippy-unused-fs
Aug 10, 2026
Merged

senamakel merged 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/clippy-unused-fs

Conversation

@M3gA-Mind

@M3gA-Mind M3gA-Mind commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • cargo clippy -- -D warnings fails on a clean main, so the pre-push hook (pnpm rust:clippy) blocks every contributor's push regardless of what they changed.
  • One unused import, one line.

Problem

On main at c7e15ba04:

error: unused import: `std::fs`
  --> src/process_recovery.rs:14:9
   |
14 |     use std::fs;
   |         ^^^^^^^
   = note: `-D unused-imports` implied by `-D warnings`

The import is inside the #[cfg(target_os = "macos")] mod imp block at process_recovery.rs:11. The std::fs:: calls further down the file (:484, :498, :537) live in the #[cfg(target_os = "linux")] block at :389 and are fully qualified, so nothing in the macOS block ever used it.

It became unused in 1843706c3 — the CEF → Wry swap in #5456 — which removed the macOS reap path that read the filesystem.

.husky/pre-push runs pnpm rust:clippy, and that step has no auto-fix path, so the hook fails for anyone pushing anything until this is removed.

Solution

Delete the import.

Submission Checklist

  • Tests added or updated — N/A: removing an unused import changes no behaviour and has no failure path to cover.
  • Diff coverage ≥ 80%N/A: one deleted line, no changed executable lines.
  • Coverage matrix updated — N/A: no feature rows affected.
  • All affected feature IDs listed — N/A: no feature IDs.
  • No new external network dependencies introduced — deletion only.
  • Manual smoke checklist updated — N/A: no user-facing surface.
  • Linked issue closed via Closes #NNNN/A: no issue filed; found while working #5478.

Impact

Build/CI only. No runtime change on any platform — the import was unused in the only configuration that compiled it.

Unblocks the pre-push hook repo-wide.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: fix/clippy-unused-fs
  • Commit SHA: ef9b9b357d1ef17eab347c415dba747caba455df

Validation Run

  • pnpm --filter openhuman-app format:checkN/A: no frontend files touched.
  • pnpm typecheckN/A: no TypeScript touched.
  • Focused tests: N/A: no behaviour to test.
  • Rust fmt/check (if changed): cargo fmt --manifest-path app/src-tauri/Cargo.toml --all --check clean.
  • Tauri fmt/check (if changed): cargo clippy --manifest-path app/src-tauri/Cargo.toml -- -D warnings → 0 errors (fails with 1 error on upstream/main, verified by clean checkout before and after).

Validation Blocked

  • command: N/A
  • error: N/A
  • impact: N/A

Behavior Changes

  • Intended behavior change: none.
  • User-visible effect: none.

Parity Contract

  • Legacy behavior preserved: entirely — the removed import had no users.
  • Guard/fallback/dispatch parity checks: grep -n "fs::" app/src-tauri/src/process_recovery.rs shows only fully-qualified std::fs:: calls in the Linux block.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): N/A
  • Canonical PR: this PR
  • Resolution: N/A

Summary by CodeRabbit

  • Chores
    • Removed unused internal code with no changes to application behavior.

`cargo clippy -- -D warnings` fails on a clean `main`:

    error: unused import: `std::fs`
      --> src/process_recovery.rs:14:9

The import sits in the macOS `mod imp` block. The `std::fs::` calls
elsewhere in the file are in the Linux block and fully qualified, so
nothing in the macOS block uses it.

It became unused in 1843706 (the CEF -> Wry swap, tinyhumansai#5456), which
removed the macOS reap path that read the filesystem.

The pre-push hook runs `pnpm rust:clippy`, so this currently blocks
every contributor's push regardless of what they changed.
@M3gA-Mind
M3gA-Mind requested a review from a team August 10, 2026 14:47
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cfed3b18-7d2a-4c2d-acd6-2ebccc98542c

📥 Commits

Reviewing files that changed from the base of the PR and between c7e15ba and ef9b9b3.

📒 Files selected for processing (1)
  • app/src-tauri/src/process_recovery.rs
💤 Files with no reviewable changes (1)
  • app/src-tauri/src/process_recovery.rs

📝 Walkthrough

Walkthrough

The macOS process-recovery implementation removes an unused std::fs import. Runtime behavior remains unchanged.

Changes

Process recovery cleanup

Layer / File(s) Summary
Remove unused filesystem import
app/src-tauri/src/process_recovery.rs
The macOS implementation removes the unused std::fs import.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A rabbit hops through tidy code,
One unused import leaves the road.
No runtime paths will change their tune,
The source looks cleaner under the moon. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the removal of the unused import that fixes the Clippy build failure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@senamakel
senamakel merged commit c82715b into tinyhumansai:main Aug 10, 2026
19 of 24 checks passed

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

$0.0000 · 0 in / 0 out

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Aug 10, 2026
senamakel added a commit to nocstah/openhuman that referenced this pull request Sep 11, 2026
…-fs\n\nfix(build): drop unused std::fs import that fails clippy on main\n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants