|
| 1 | +--- |
| 2 | +id: TASK-300 |
| 3 | +title: Debug cargo-binstall PATH issue for tarpaulin in CI |
| 4 | +status: To Do |
| 5 | +assignee: [] |
| 6 | +created_date: '2026-03-19 04:00' |
| 7 | +updated_date: '2026-03-19 04:02' |
| 8 | +labels: |
| 9 | + - ci |
| 10 | + - bug |
| 11 | +dependencies: [] |
| 12 | +references: |
| 13 | + - >- |
| 14 | + https://github.com/pythoninthegrass/mt/actions/runs/23278515091/job/67686711086 |
| 15 | + - .github/workflows/ci.yml |
| 16 | +priority: high |
| 17 | +--- |
| 18 | + |
| 19 | +## Description |
| 20 | + |
| 21 | +<!-- SECTION:DESCRIPTION:BEGIN --> |
| 22 | +## Problem |
| 23 | + |
| 24 | +After switching to `cargo-binstall` for installing `cargo-tarpaulin` in CI (commit `cf09f50`), the "Build & Rust Tests" job fails with: |
| 25 | + |
| 26 | +``` |
| 27 | +error: no such command: `tarpaulin` |
| 28 | +``` |
| 29 | + |
| 30 | +The `cargo binstall --no-confirm cargo-tarpaulin` step succeeds — it reports `cargo-tarpaulin v0.35.2 is already installed` (from cache). However, the subsequent `cargo tarpaulin` command cannot find the binary. |
| 31 | + |
| 32 | +## Root Cause (Suspected) |
| 33 | + |
| 34 | +PATH / CARGO_HOME mismatch. The `cargo-binstall` action installs the binary to one location, but `cargo` looks for subcommands in a different directory. Key observations from the logs: |
| 35 | + |
| 36 | +- `CARGO_HOME=/Users/lance/.cargo` (set by binstall action) |
| 37 | +- PATH includes `/Users/lance/.cargo/bin` (set by Tauri build environment step) |
| 38 | +- binstall reports the binary is "already installed" — likely cached from a previous `cargo install` run and sitting in a different bin dir than where binstall would place it |
| 39 | +- The self-hosted runner may have stale cached binaries in a location no longer on PATH |
| 40 | + |
| 41 | +## Relevant CI Config |
| 42 | + |
| 43 | +- Workflow: `.github/workflows/ci.yml` |
| 44 | +- Steps: "Run cargo-bins/cargo-binstall@main" → "Install cargo-tarpaulin" → "Run Rust tests with coverage" |
| 45 | +- Runner: self-hosted macOS (ARM64) |
| 46 | + |
| 47 | +## Failed Run |
| 48 | + |
| 49 | +https://github.com/pythoninthegrass/mt/actions/runs/23278515091/job/67686711086 |
| 50 | +<!-- SECTION:DESCRIPTION:END --> |
| 51 | + |
| 52 | +## Acceptance Criteria |
| 53 | +<!-- AC:BEGIN --> |
| 54 | +- [ ] #1 cargo-tarpaulin installs and runs successfully via cargo-binstall in CI |
| 55 | +- [ ] #2 Coverage report is generated and uploaded as artifact |
| 56 | +- [ ] #3 CI pipeline passes end-to-end on self-hosted macOS runner |
| 57 | +<!-- AC:END --> |
| 58 | + |
| 59 | +## Implementation Notes |
| 60 | + |
| 61 | +<!-- SECTION:NOTES:BEGIN --> |
| 62 | +## Investigation Findings |
| 63 | + |
| 64 | +- **Build & Rust Tests** ran on runner `mini` (Mac Mini), NOT `studio` (Mac Studio) |
| 65 | +- **Playwright E2E Tests** ran on runner `studio` |
| 66 | +- The Mac Mini may not have cargo-binstall installed at the same paths, or may have a stale cached tarpaulin binary in a location not on PATH |
| 67 | +- binstall reported "cargo-tarpaulin v0.35.2 is already installed" — this means it found a metadata record but the actual binary may not be where cargo looks for it |
| 68 | +- Key question: does the Mac Mini have the same CARGO_HOME / PATH setup as the Studio? The previous `cargo install` approach may have placed tarpaulin in a different bin directory than where binstall expects it |
| 69 | + |
| 70 | +## Debug Steps |
| 71 | + |
| 72 | +1. SSH into Mac Mini and check `which cargo-tarpaulin`, `ls ~/.cargo/bin/cargo-tarpaulin` |
| 73 | +2. Compare CARGO_HOME and PATH between Mini and Studio runners |
| 74 | +3. Consider adding `--force` flag to binstall to ensure fresh install to correct location |
| 75 | +4. Add `which cargo-tarpaulin` and `echo $PATH` debug steps to CI workflow |
| 76 | +<!-- SECTION:NOTES:END --> |
0 commit comments