Repository navigation
feat(ci): add resolve-toolchain and setup-devkit-toolchain composite actions - #1002
Merged
c-vigo merged 5 commits intoJul 13, 2026
Merged
Conversation
Assert the two new mode-aware composites — resolve-toolchain and setup-devkit-toolchain — ship in every rendered mode tree, SHA-pin every action reference, and wire each mode branch (container in-image env, direnv Nix dev-shell + skew guard, bare uv/vig-utils install, host-mode retry shim, explicit empty image for host modes). Refs: #994
Two mode-aware composite actions scaffolded into every workspace mode: resolve-toolchain (evolves resolve-image, which stays for now) reads .vig-os with the same tolerant KEY=VALUE parsing and emits mode + image + image-tag. Container-ish modes (devcontainer/both) get the ghcr devcontainer image and keep the docker manifest-inspect accessibility probe; host modes (direnv/bare) get an explicit empty image so the downstream job runs on the host runner (Option A, docs/rfcs/ADR-conditional-container-toolchain.md). Missing DEVKIT_MODE defaults to both. setup-devkit-toolchain is the single step-level toolchain preamble, gated per DEVKIT_MODE and safe as the first step after checkout in every job: - devcontainer/both: export UV_PROJECT_ENVIRONMENT + PREK_HOME, apply the git safe.directory fix, run the prek version-skew guard (#854). - direnv: install-nix + vig-os Cachix substituter, build the repo's own flake dev-shell once and prepend its bin dirs to PATH (mirrors setup-env, filtering podman/python3 and forwarding UV_PYTHON_DOWNLOADS_JSON_URL); host-side skew guard points at nix flake update vigos. - bare: setup-uv + pinned uv tool install of rust-just, prek, and vig-utils pinned to the devkit-version input (#993). - direnv + bare: embed a self-contained retry shim via BASH_ENV (in-container jobs use the image-baked retry binary). Refs: #994
A typo'd manifest mode must fail the resolve step loudly instead of being silently classified as a host mode (empty image), matching the init-workspace.sh corrupt-persisted-mode guard. Refs: #994
An unrecognized manifest mode previously fell through the catch-all image branch and was silently treated as a host mode (empty image), flipping a container repo's CI onto host runners. Validate the mode after the default is applied — failing loudly like the init-workspace.sh persisted-mode guard — and close the image case statement with an explicit direnv|bare arm. Refs: #994
…-devkit-toolchain
c-vigo
added a commit
that referenced
this pull request
Jul 13, 2026
…997) One release choreography, mode-aware toolchain provisioning: resolve-toolchain + setup-devkit-toolchain composites (ADR Option A), single mode-aware ci.yml, all release/automation workflows container-free in direnv/bare, opt-in .devcontainer/ prune, vig-utils host-side, actionlint. Sub-PRs: #998 #999 #1000 #1001 #1002 #1005 #1006 #1007. Refs: #988
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.
Summary
Adds the two shared mode-aware composite actions from #994, scaffolded (managed)
into every workspace mode under
assets/workspace/.github/actions/. Provisioningis separated from image selection per the #992 spike verdict
(
docs/rfcs/ADR-conditional-container-toolchain.md, Option A adopted): aworkflow-level
resolve-toolchainjob selects the image; the step-levelsetup-devkit-toolchaincomposite handles the toolchain preamble.resolve-imageis left untouched (retired later by #991/#989). No workflow isconverted here — that is #991.
How each mode branch works
resolve-toolchain/action.yml— reads.vig-oswith the same tolerantKEY=VALUEparsing asresolve-image(DEVKIT_MODE + DEVKIT_VERSION with legacyDEVCONTAINER_VERSION fallback). Outputs:
mode—devcontainer|direnv|both|bare; a manifest-bearing repo with noDEVKIT_MODEdefaults toboth(today's container behavior).image—ghcr.io/vig-os/devcontainer:<tag>for container-ish modes; anexplicit empty string for
direnv/bare(always emitted, never omitted,per the ADR — empty image makes the downstream job run on the host).
image-tag— the bare resolved version tag (logging/compat; doubles as thedevkit-versionto plumb into the bare branch).Container-ish modes keep the
docker manifest inspectaccessibility probe(auth-vs-missing classification preserved); host modes skip it via
if: steps.resolve.outputs.image != ''.setup-devkit-toolchain/action.yml— single step-level preamble, gated permodeinput, safe as the first step after checkout in every job:UV_PROJECT_ENVIRONMENT+PREK_HOMEto$GITHUB_ENV,git config --global --add safe.directory, andthe [FEATURE] Nix-direct (direnv-mode) CI lane + version-skew hardening for shipped workflows #854 prek version-skew guard. No retry shim (image-baked
retrybinary).install-nix-action+ vig-os Cachix substituter (verbatimfrom the direnv
ci.yml), optional consumercachix-action, then build therepo's own flake dev-shell once via
nix develop --profileand prependits bin dirs to
$GITHUB_PATH(mirrors this repo'ssetup-env: filterspodman/python3, forwards
UV_PYTHON_DOWNLOADS_JSON_URL). Skew guard resolvesprekoff the exported PATH and points atnix flake update vigos.setup-uv+uv tool install rust-just==1.51.0,prek==0.3.11, andvig-utils @ git+…@${DEVKIT_VERSION}#subdirectory=packages/vig-utils(Expose vig-utils console scripts host-side (dev-shell + pinned uv-tool path) #993);
uv tool dir --bin >> $GITHUB_PATH.retryshim viaBASH_ENV(the scaffold cannot source the devkit-internalretry.sh, so thefunction is inlined).
Design decisions
resolve-toolchainresolves the.vig-osversion pin intoimage-tagin all modes (not just container),so CI + release workflows hard-coupled to the container image regardless of DEVKIT_MODE #991 passes
devkit-version: ${{ needs.resolve-toolchain.outputs.image-tag }}to
setup-devkit-toolchain. The bare install step fails fast with anactionable message if
devkit-versionis empty..github/scripts/retry.sh) rather than referenced, because scaffoldedconsumer repos have no access to devkit-internal scripts. Chains any
pre-existing
BASH_ENV. Validated end-to-end (heredoc de-indents correctly andthe function is callable).
Evidence
bats tests/bats/init-workspace.bats— 136 tests pass, including 9 new#994render/structural assertions (both actions ship in every mode tree,every
uses:SHA-pinned, per-mode branch wiring, explicit empty host image).prek run --all-files— all hooks green (yamllint, shellcheck,check-action-pins, sync-manifest all pass; CHANGELOG synced to
.devcontainer/CHANGELOG.md).retry()shim executed in a simulated runner env — defined andfunctional.
actionlintdoes not lint standalone compositeaction.ymlmetadata(it parses them as workflows and mis-reports); the permanent hook lands in
Adopt actionlint for authored and per-mode rendered workflow templates #995. Run scripts were shellchecked ad hoc — only intentional
SC2016(info)on the
nix develop --command bash -c 'printf … $PATH'idiom, identical to theexisting
setup-envaction.Open questions for #991 (workflow conversion)
devkit-version(all that touchvig-utils scripts, i.e. the changelog jobs)?
credentials:block stays unconditional on scaffolded jobs(proven inert on empty image by the [SPIKE] Conditional job-level container: — validate empty-image semantics, decide Option A vs B #992 spike) when threading
needs.resolve-toolchain.outputs.image.ci.yml's three per-mode overlays collapse to one file in this epicor a follow-up.
How #991 consumes the two actions
No automated CI runs on PRs into the epic branch; evidence is local (above).
Refs: #994