Skip to content

Deploy Docs has been failing on main: one shared PTX toolchain action instead of five copies - #256

Merged
bsbodden merged 4 commits into
mainfrom
fix/docs-ptx-toolchain
Oct 10, 2026
Merged

bsbodden merged 4 commits into
mainfrom
fix/docs-ptx-toolchain

Conversation

@bsbodden

Copy link
Copy Markdown
Member

The failure

Deploy Docs has failed on main for every run since 2026-10-09:

error: ".../nightly-2026-09-17-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/..."
> Task :backend-cuda:compilePtx FAILED

:backend-cuda:compilePtx pins its own nightly and builds with -Zbuild-std, so it needs rust-src and links through llvm-bitcode-linker. A toolchain rustup auto-installs on first use arrives with the minimal profile and none of that.

Why only docs

Five workflows reach compilePtx. ci, codeql, model-determinism and release each carried their own copy of the install step. docs had no Rust setup at all.

Four green, one red, and nothing connected the two facts. Same shape as two other defects found today: a step copied into N places gets fixed in N−1 of them.

The fix

All five now use .github/actions/ptx-toolchain, a single composite action. The toolchain is an input defaulting to the pinned nightly, so it can be overridden without re-copying the step.

scripts/integrity/check-workflow-duplication.py fails if any workflow installs the pinned nightly, rust-src or the nvptx64 target itself, and it has a mutation in mutation-check.py — proven to fail when the step is copied back inline, not just asserted to.

Six guards now pass on a clean tree and fail on their own defect.

Deploy Docs has failed on main for every run since 2026-10-09 with
  error: .../nightly-2026-09-17-.../lib/rustlib/src/rust/library/... (rust-src absent)
  > Task :backend-cuda:compilePtx FAILED

:backend-cuda:compilePtx pins its own nightly and builds with -Zbuild-std, so it
needs rust-src and links through llvm-bitcode-linker. A toolchain rustup
auto-installs on first use arrives with the minimal profile and none of that, so
every workflow reaching compilePtx must install the components explicitly.

Five workflows reach it. ci, codeql, model-determinism and release each carried
their own copy of the install step; docs had no Rust setup at all. Four green, one
red, same root cause as two other defects today: a step copied into N places gets
fixed in N-1 of them.

All five now use .github/actions/ptx-toolchain, which is the single definition.
The toolchain is an input defaulting to the pinned nightly so it can still be
overridden without re-copying the step.
The PTX toolchain install existed in five copies and the one that was missing a
component was the one nobody noticed, because the other four were green. That is
the third defect today with the same shape: a change applied in N-1 of N places.

check-workflow-duplication.py fails if any workflow installs the pinned nightly,
rust-src or the nvptx64 target itself instead of using the shared action, and it
has a mutation in mutation-check.py so it is proven to fail when the step is
copied back inline. Six guards now pass clean and fail on their own defect.
…e checkout

The shared action broke every workflow that used it:

  Can't find 'action.yml' ... under '/home/runner/work/models/models/.github/actions/ptx-toolchain'

`uses: ./` resolves from the workspace root. All five of these workflows check
the repository out with `path: models`, so the action is one level down and the
reference has to be ./models/.github/actions/ptx-toolchain. I wrote the repo-
relative path, which is what it looks like it should be and is not.

Corrected in all five. The duplication check matches the repo-relative tail so it
is independent of that prefix, and its comment now records why the prefix exists.

The mutation harness caught its own anchor going stale in the same edit --
reported as 'mutation anchor missing' rather than passing, which is the
fail-closed behaviour it was written for. Six guards green again.
@bsbodden
bsbodden merged commit e1ac68b into main Oct 10, 2026
5 checks passed
@bsbodden
bsbodden deleted the fix/docs-ptx-toolchain branch October 10, 2026 14:23
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