You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(fleet): fleet-command Run step lacks the toolchain on PATH — dispatched cargo commands fail 127 #13170
A dispatched cargo command fails on the fleet-command runner with
exit 127 before doing any work:
Run command step (cwd $GITHUB_WORKSPACE/target):
bash -euo pipefail -c "$FLEET_RUN_COMMAND"
FLEET_RUN_COMMAND: cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --features client,queue-broker
-> bash: line 1: cargo: command not found
Evidence: run 45150362527 on dezren39/fleet (job 137609977212),
dispatched 2026-11-23 for the #13146 verification; the identical
command with export PATH=$CARGO_HOME/bin:$PATH; prefixed runs
(run 45151395564).
Why
The workflow's Run command step executes on the runner host (not
in the fleet-build container) with CARGO_HOME / RUSTUP_HOME
pointed at the restored dependency cache — the rustup shims live
in $CARGO_HOME/bin — but the step never adds that directory to PATH. Shell built-ins and git work, so trivial probe commands
(the only kind exercised in the first dispatch verifications)
pass; any cargo/go toolchain command fails 127. The runbook
(pkgs/fleet/doc/agents/remote-build-and-test.md) shows bare --command 'cargo test --workspace', which hits this on its
first real use.
Fix shapes (either, or both)
Workflow: in the Run command step of fleet-command.yml (all
fleet runner repos), prepend $CARGO_HOME/bin (and the Go
equivalent) to PATH before executing FLEET_RUN_COMMAND.
Runbook: document the PATH prefix as part of the dispatched
command until (1) lands everywhere.
Acceptance
A bare --command 'cargo --version' dispatch succeeds on each
active surface without a caller-side PATH prefix.
Oracle: the dispatched run's log shows the cargo version line
and exit 0.
Probe evidence (dispatch runs 45152996653 and 45153741326, 2026-11-23):
The Run command step executes INSIDE the fleet-build container with PATH=/home/vscode/.nix-profile/bin:/usr/local/go/bin:... — Go works out of the box; Rust does not.
/home/vscode/.nix-profile/bin contains only nix itself.
$CARGO_HOME/bin does not exist in the restored dependency cache (the cache CARGO_HOME holds registry/git data only, no shims) — so the caller-side PATH prefix does NOT fix it; run 45151395564 with the prefix failed 127 identically.
A rustup toolchain exists in the image only as a nix store path: /nix/store/mn67k9rqg1vkfvdhfim1x1dgvxqd9fai-cargo-1.99.1-x86_64-unknown-linux-gnu (bin/cargo under it), not linked from RUSTUP_HOME's cache dir in any way a command can rely on.
So the fix has to put a stable cargo on PATH in the image or the workflow (e.g. link the toolchain bin into the nix profile, or export PATH with the toolchain dir in the Run step). Until then, dispatched cargo commands need a store-glob prefix, which is hash-dependent and brittle.
Activity
developing-today commentedon Nov 23, 2026
CODE-4803
dezren39 commentedon Nov 23, 2026
Probe evidence (dispatch runs 45152996653 and 45153741326, 2026-11-23):
So the fix has to put a stable cargo on PATH in the image or the workflow (e.g. link the toolchain bin into the nix profile, or export PATH with the toolchain dir in the Run step). Until then, dispatched cargo commands need a store-glob prefix, which is hash-dependent and brittle.