chore(hooks): route lint/test/perf through soldr instead of uv run cargo#213
Conversation
…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>
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
./lint) and the Stop hook (ci/lint.py+ci/test.py) shell out touv run cargo. On Windows that resolves to a different host triple thansoldr cargo(x86_64-pc-windows-gnuvsx86_64-pc-windows-msvc), so the sametarget/debug/cannot be shared. Every Stop fired a target-triple mismatch cascading across 30+ crates.tool_guard.pyalready blocksuv run cargoin shell tool calls, but it doesn't catch subprocess invocations from inside Python — these four scripts slipped through.cargo/rustfmtcall throughuv run soldr ...so the rustup-managed msvc-host toolchain is the single source of truth fortarget/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🤖 Generated with Claude Code