Skip to content

chore(hooks): route lint/test/perf through soldr instead of uv run cargo#213

Merged
zackees merged 1 commit into
mainfrom
chore/hooks-route-rust-through-soldr
May 10, 2026
Merged

chore(hooks): route lint/test/perf through soldr instead of uv run cargo#213
zackees merged 1 commit into
mainfrom
chore/hooks-route-rust-through-soldr

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented May 10, 2026

Summary

  • The PostToolUse lint hook (./lint) and the Stop hook (ci/lint.py + ci/test.py) shell out to uv run cargo. On Windows that resolves to a different host triple than soldr cargo (x86_64-pc-windows-gnu vs x86_64-pc-windows-msvc), so the same target/debug/ cannot be shared. Every Stop fired a target-triple mismatch cascading across 30+ crates.
  • tool_guard.py already blocks uv run cargo in shell tool calls, but it doesn't catch subprocess invocations from inside Python — these four scripts slipped through.
  • Routes every cargo/rustfmt call through uv run soldr ... so the rustup-managed msvc-host toolchain is the single source of truth for target/debug/.

Test plan

  • uv run --script ci/lint.py — clean post-patch (workspace clippy -D warnings)
  • uv run --script ci/test.py -p fbuild-library-select — 16/16 passing
  • CI green on Linux + macOS + Windows

🤖 Generated with Claude Code

…argo`

The PostToolUse lint hook (`ci/hooks/lint.py` -> `./lint`) and the Stop
hook (`ci/hooks/check-on-stop.py` -> `ci/lint.py` + `ci/test.py`)
shelled out to `uv run cargo`, which on Windows resolves to a different
host triple than `soldr cargo` (`x86_64-pc-windows-gnu` vs
`x86_64-pc-windows-msvc`). Same `target/debug/` cannot be shared
between hosts, so every Stop fired a target-triple mismatch
("couldn't find crate ... with expected target triple
x86_64-pc-windows-gnu") cascading across 30+ crates.

`tool_guard.py` already blocks `uv run cargo` in shell tool calls but
doesn't catch subprocess invocations from inside Python — these hooks
slipped through. Patch every `cargo`/`rustfmt` call in the four scripts
to use `uv run soldr cargo|rustfmt` so the rustup-managed msvc-host
toolchain is the single source of truth for `target/debug/`:

- `ci/lint.py` — clippy + fmt
- `ci/test.py` — cargo test
- `lint` (root) — clippy + fmt
- `perf` (root) — cargo test

Verified post-patch: `uv run --script ci/lint.py` finishes clean and
`uv run --script ci/test.py -p fbuild-library-select` passes 16/16.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

Warning

Rate limit exceeded

@zackees has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 1 second before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bcc8aef4-72b2-4729-a160-7b68d0fb8965

📥 Commits

Reviewing files that changed from the base of the PR and between c1a267c and 4cbd092.

📒 Files selected for processing (4)
  • ci/lint.py
  • ci/test.py
  • lint
  • perf
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/hooks-route-rust-through-soldr

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 and usage tips.

@zackees zackees merged commit f58e8d8 into main May 10, 2026
75 of 78 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.

1 participant