Repository navigation
fix(ci): install Rust via rustup on the self-hosted ADF lane - #971
Open
AlexMikhalev wants to merge 4 commits into
Open
AlexMikhalev wants to merge 4 commits into
AlexMikhalev wants to merge 4 commits into
Conversation
added 4 commits
October 9, 2026 21:13
The nightly ADF Agent Validation workflow has failed on every scheduled run since 4 October. The job dies during "Prepare all required actions" with "Unable to resolve action dtolnay/rust-action, repository not found": the action does not exist. Install the toolchain through rustup instead, matching the pattern release-lsp.yml already uses on its self-hosted lane. The runners share a kache-backed CARGO_HOME whose build dir holds read-only hard-linked artefacts, so a third-party toolchain action that injects its own cache and rustc wrapper fights that setup. Pin 1.96 rather than stable: the repo root rust-toolchain.toml pins channel 1.96 (fleet standard, ADR-0006), and installing stable would drift from that pin and rewrite the shared stable toolchain on the host. The pin already selects the toolchain, so no rustup override is set. Verified the step's commands under the runner's real environment (RUSTUP_HOME=/home/alex/.rustup-runner-2a): the install is a no-op, exit 0, with rustfmt and clippy present, and rustc/cargo resolve to 1.96.1.
The verification run on this branch (37978805868) proved the rustup
install works: "Install Rust" now succeeds and the job advances past
the action-resolution failure. It then died in "Build adf binary":
error: could not execute process `kache .../bin/rustc -vV`
(never executed)
Caused by: No such file or directory (os error 2)
The runner host sets rustc-wrapper = "kache" in ~/.cargo/config.toml,
and kache is not on the runner PATH. release-lsp.yml clears
RUSTC_WRAPPER and RUSTC_WORKSPACE_WRAPPER on its self-hosted lane for
exactly this reason; do the same here, before the build step.
The prior commit cleared RUSTC_WRAPPER to get past the build failure.
That is the wrong fix: it discards kache's content-addressed cache,
which is the reason the wrapper is configured in the first place, and
slows every self-hosted build.
The real fault is PATH. kache lives in ~/.local/bin and works fine
(v0.12.0, daemon active, wrapper executes), but the terraphim-ai runner
.env sets a PATH without that directory:
PATH=/home/alex/.cargo-runner-5/bin:
/home/alex/.rustup-runner-5/toolchains/stable-.../bin:
/usr/local/bin:/usr/bin:/bin
Compare the zestic runner, which does include ~/.local/bin.
Add ~/.local/bin via GITHUB_PATH so the existing rustc-wrapper resolves
and the build keeps the cache. Drop the wrapper-clearing step.
The previous commit failed at run 37979446951 with "kache: command not found" (exit 127). The PATH write was correct; the verification line ran in the same step, and GITHUB_PATH only affects subsequent steps. Call the binary by absolute path for the assertion.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The nightly ADF Agent Validation workflow failed on every scheduled run since 4 October (9 consecutive failures, latest
37907419012). Two independent faults, the second hidden behind the first.1. Unresolvable action
The job died during "Prepare all required actions", before any Rust step ran:
dtolnay/rust-actiondoes not exist. Install throughrustupinstead, matching the patternrelease-lsp.ymlalready uses on its self-hosted lane. Pinned to1.96to follow the repo rootrust-toolchain.toml(fleet standard, ADR-0006);stablewould drift from that pin.2. kache missing from PATH
With the action fixed, the build died:
The host sets
rustc-wrapper = "kache"in~/.cargo/config.tomland the kache daemon runs, but the binary lives in~/.local/bin, which the terraphim-ai runner.envomits:The terraphim-ai runners are configured without that directory; the wrapper therefore cannot be found even though the binary is installed and the daemon runs.
Fix the PATH, not the wrapper. Adding
~/.local/binviaGITHUB_PATHlets the existing wrapper resolve and keeps kache's content-addressed cache. ClearingRUSTC_WRAPPERwould also get past the error but would discard the cache the wrapper exists to provide, slowing every self-hosted build. That approach was tried and rejected.Change
Verification
Dispatched the workflow on this branch and the job ran green end to end:
Before the fix, the action step failed within seconds. Two intermediate runs pinned down the second fault:
37978805868(build failed on kache) and37979446951(my initial PATH step calledkachebeforeGITHUB_PATHtook effect — that applies from the next step).Mirrored
terraphim/terraphim-ai#3478on Gitea carries the same squashed change; the file is identical on both lines.Follow-up not in scope
terraphim/gitea-robot#70 reports the same class of problem wider: workflows requestubuntu-latestwhile onlyterraphim-nativeis registered. Separately, other workflows on these same runners may hit the kache PATH fault; a per-workflow PATH step is the portable fix, since the runner.envis managed outside the repo.