Repository navigation
feat(workspace): nix-direct direnv CI lane + version-skew hardening - #923
Merged
Merged
Conversation
Part A — nix-direct CI lane for direnv-mode consumers: - Add assets/workspace-direnv/ overlay with a host-native ci.yml (no resolve-image, no container jobs): install-nix + vig-os Cachix substituter then `nix develop -c just sync|precommit|test`, reusing this repo's own SHA-pinned install-nix/cachix actions and dropping the container-only PREK_HOME/UV_PROJECT_ENVIRONMENT env. - Wire the overlay into init-workspace.sh keyed off DEVKIT_MODE=direnv, same managed-file semantics as the bare overlay. - Document the supported boundary in docs/MIGRATION.md: only ci.yml is converted for direnv; the other shipped workflows stay container-based and devcontainer-mode-only until the full audit rides the devkit rename (#781). Part B — version-skew hardening from the CI-glue audit: 1. CI-wired skew guard: container ci.yml and the direnv ci.yml lint jobs fail fast with an actionable error when prek is absent. 2. prepare-release.yml resolver unified onto the shared resolve-image action (hard-fail) instead of the forked inline awk with a silent `latest` fallback. 4. devc-upgrade honors the consumer's pinned .vig-os DEVCONTAINER_VERSION (script ref + --version) instead of always curling install.sh from main. 5. `set shell := [...pipefail...]` moved from justfile.devc to the root justfile (SSoT) so direnv/bare recipes also get pipefail. 6. docs/container-ci-quirks.md: fix the stale `uv run bandit` pre-commit hook reference (prek, not the removed pre-commit binary). 7. init-precommit.sh derives PROJECT_ROOT from the script location instead of a hard-coded /workspace/{{SHORT_NAME}}. 3/8. MIGRATION callout ties the CI skew guard into the pre-commit→prek upgrade step; the private-image limitation (unauthenticated resolve-image probe + missing container credentials) is documented, first-class fix tracked in #920. Tests: bats coverage for the direnv/container overlays, the prepare-release resolver, devc-upgrade pin honoring, the root-justfile pipefail move, and init-precommit path derivation. Refs: #854
nix develop -c runs an executable, not a shell builtin, so 'nix develop -c command -v prek' would always fail; invoke it through bash -c so the guard detects prek correctly. Refs: #854
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.
Description
Closes #854 — the last issue of milestone 0.5. Delivers Part A (a nix-direct
CI lane for direnv-mode consumers) and the live Part B version-skew hardening
items from the CI-glue audit, with a documented boundary for the deferred work.
Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlytest-- Adding or updating testsChanges Made
Part A — nix-direct CI lane (direnv mode)
assets/workspace-direnv/.github/workflows/ci.ymloverlay: host runner,install-nix+ vig-os Cachix substituter (SHA-pinned actions reused from thisrepo's own lane), then
nix develop -c just sync|precommit|test. Noresolve-image, nocontainer:jobs; container-onlyPREK_HOME/UV_PROJECT_ENVIRONMENTenv dropped.init-workspace.shdeploys the overlay whenDEVKIT_MODE=direnv, mirroringthe existing bare-mode overlay (managed file, re-applied on upgrade).
docs/MIGRATION.md→ "direnv-mode CI"): onlyci.ymlis converted for direnv;
prepare-release,promote-release,release*,sync-issues,renovate-changelog-build,sync-main-to-devstaycontainer-based and devcontainer-mode-only until the full 13-workflow audit
rides the devkit rename ([CHORE] Rename devcontainer → devkit (after publish-cutover #639) #781). Container-independent workflows (
codeql,scorecard,renovate-changelog-commit,release-extension) work in everymode.
Part B — version-skew hardening
prekskew guard::error::prepare-release.ymlforked awk resolver + silentlatestfallbackresolve-imageaction (hard-fail)devc-upgradecurls install.sh frommainregardless of pinDEVCONTAINER_VERSIONfrom.vig-os, upgrades to that ref +--versionset shellpipefail only injustfile.devcjustfile(SSoT), applies in all modesbandit/pre-commitdocdocs/container-ci-quirks.mdinit-precommit.shhard-codes/workspace/{{SHORT_NAME}}credentials:)container-ci-quirks.md; first-class fix filed as #920 (Backlog)Changelog Entry
Added
Fixed
(Full sub-bullets in
CHANGELOG.md; mirror auto-synced toassets/workspace/.devcontainer/CHANGELOG.md.)Testing
Manual Testing Details
prepare-releaseresolver,
devc-upgradepin honoring, root-justfile pipefail move,init-precommitpath derivation (RED→GREEN for the script-level changes).init-workspace.bats(108),install.bats(87),just.bats(43),init-precommit.bats(4); wholetests/bats/*.batsrunexit 0 (358 ok, ~10 skipped, 0 failures).
just precommit— full hook suite green (exit 0), including shellcheck,yamllint, check-action-pins, sync-manifest.
Checklist
CHANGELOG.mdin the[Unreleased]sectionAdditional Notes
Deferred item 8 (private-image support) is split to #920 rather than
half-implemented, per the issue's "don't gold-plate" guidance; the limitation is
documented loudly for consumers who pin a private devkit image today.
Refs: #854