Skip to content

build(devkit): adopt vigOS devkit 1.4.0 (direnv) — validates 1.4.0-rc2 - #143

Merged
c-vigo merged 5 commits into
devfrom
feature/142-adopt-devkit-1-4-0
Jul 20, 2026
Merged

c-vigo merged 5 commits into
devfrom
feature/142-adopt-devkit-1-4-0

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-scaffolds this repo onto vigOS devkit 1.4.0 (from 1.3.1, direnv mode).

RC validation: the vigos flake input is pinned to ?ref=1.4.0-rc2 to
validate the release ahead of the final 1.4.0 tag. This PR is the live
consumer proof for the 1.4.0 release train; the pin is bumped to ?ref=1.4.0
(and flake.lock re-locked) before merge. Do not merge while pinned to rc2.

Refs: #142 · follows the 1.3.1 adoption (#139).

Commits

  1. build(devkit): adopt vigOS devkit 1.4.0 in direnv mode — installer
    re-scaffold + flake pin/lock + CHANGELOG.

Managed-file deltas (all rendered by init-workspace.sh)

  • zizmor baseline (vig-os/devkit#1182) — new managed zizmor.yml (devkit-owned baseline; every entry scoped to a managed-workflow basename, so a consumer-authored workflow never inherits an exemption) plus the upstream fixes: persist-credentials: false on the read-only checkouts (ci.yml resolve/lint/test/dependency-review, codeql.yml, renovate-changelog-build.yml, sync-issues.yml) and the sync-main-to-dev.yml template-injection fix (release-app token moved into step env:). Behavior-preserving. zizmor is not in this repo's flake hook set or CI, so the baseline ships as an inert config file here.
  • CI runner knob (vig-os/devkit#1173) — resolve-toolchain emits a new runner-json output from the optional .vig-os DEVKIT_CI_RUNNER key; ci.yml toolchain jobs (lint, test, commit-checks, summary) resolve runs-on: ${{ fromJSON(...) }}. The key is absent here, so runner-json defaults to ["ubuntu-24.04"] — no runner change.
  • direnv CI shellHook env forward (vig-os/devkit#1180) — setup-devkit-toolchain now diffs the dev-shell env and forwards shellHook vars to GITHUB_ENV.
  • with-native-libs recipe (vig-os/devkit#1181) — base justfile gains a helper wrapping a command with a scoped LD_LIBRARY_PATH for uvx native wheels.

Fix-signature evidence

  • Flake pin bumped + re-locked — flake.nix now vigos.url = "github:vig-os/devkit?ref=1.4.0-rc2"; flake.lock vigos re-locked to rev 6fe5f770 (= the 1.4.0-rc2 tag commit) with original.ref = "1.4.0-rc2". Follows-inputs (nixpkgs/flake-utils) unchanged. .vig-os DEVKIT_VERSION=1.4.0-rc2, DEVKIT_MODE=direnv, DEVKIT_TAG_PREFIX=v, DEVKIT_FLOATING_TAGS=major,minor preserved; new DEVKIT_CI_RUNNER= (empty) added.

Landmines preserved

  • release-extension.yml untouched — the build-provenance attestation seam migrated in chore(devkit): bump to 1.3.1 + migrate attestation into release-extension seam #139 (final-release attest job) and the verify-dist backstop both survive byte-for-byte (not in the diff; it is consumer-owned, not a managed file).
  • Integration-test matrix untouched — integration-*.yml, js-quality.yml, published-tag-smoke.yml, prepare-release-extension.yml are consumer-owned and unchanged.
  • justfile.project, .envrc, flake.nix customizations preserved — hooksExcludes = [ "^dist/" ] and extraPackages kept; only the base justfile (managed) changed.

Verification

  • direnv exec . just precommit — full suite green (dev-shell rebuilt on the 1.4.0-rc2 toolchain; pymarkdown now runs as the flake language: system hook per vig-os/devkit#1170, the nix hooks deadnix/statix/nixfmt per vig-os/devkit#1171).
  • direnv exec . npm test — 138/138 jest tests pass.

Notes for the reviewer

  • CODEOWNERS: the re-scaffold re-seeded an inert (fully commented) .github/CODEOWNERS placeholder; removed to honor the deliberate removal in [CHORE] Adopt vigOS devkit 1.3.0 (direnv) — replace bespoke CI/release stack #106/chore(devkit): bump to 1.3.1 + migrate attestation into release-extension seam #139 (net-zero git change).
  • .pre-commit-config.yaml scaffold quirk (worktree-order, not a devkit defect): scaffolding into a fresh worktree before the direnv dev-shell had been loaded meant the flake-generated /nix/store symlink did not yet exist, so init-workspace.sh (which treats .pre-commit-config.yaml as a preserved file) saw it absent and copied the hand-managed template. The new direnv flake-hooks opt-in guard (#1167) then correctly refused to clobber it. Resolved exactly as the guard instructs (remove the gitignored file → flake regenerates the symlink), yielding the same flake-generated .pre-commit-config.yaml symlink the 1.3.1 checkout carries. The gitignored file is not part of this PR.
  • Do not merge — CODEOWNERS/review gate; left ready + green. Bump rc2 → final 1.4.0 before merge.

Re-scaffold from devkit 1.3.1 to 1.4.0 (direnv mode) and pin the vigos
flake input to ?ref=1.4.0-rc2 for release-candidate validation ahead of
the final 1.4.0 tag (bumped to ?ref=1.4.0 before merge).

Managed-file deltas, all rendered by init-workspace.sh:

- zizmor baseline (vig-os/devkit#1182): new managed zizmor.yml plus the
  upstream fixes — persist-credentials: false on the read-only checkouts
  (ci.yml resolve/lint/test/dependency-review, codeql.yml,
  renovate-changelog-build.yml, sync-issues.yml) and the
  sync-main-to-dev.yml template-injection fix (release-app token moved
  into step env).
- CI runner knob (vig-os/devkit#1173): ci.yml toolchain jobs resolve
  runs-on from resolve-toolchain's new runner-json output (optional
  .vig-os DEVKIT_CI_RUNNER; absent => ubuntu-24.04).
- direnv CI shellHook env forward (vig-os/devkit#1180) and the base
  justfile with-native-libs recipe (vig-os/devkit#1181).

Consumer-owned files untouched: release-extension.yml (attestation seam
+ verify-dist), the integration-test workflows, justfile.project. The
re-seeded inert .github/CODEOWNERS placeholder was removed to honor the
deliberate removal in #106/#139 (net-zero). flake.lock re-locked; the
follows-inputs (nixpkgs/flake-utils) are unchanged.

Refs: #142
c-vigo added a commit to vig-os/devkit that referenced this pull request Jul 17, 2026
## Summary

1.4.0-rc2 consumer validation failed on every direnv-mode host CI job
(org-config vig-os/org-config#54, sync-issues-action
vig-os/sync-issues-action#143) at "Set up devkit toolchain":

```
##[error]Unable to process file command 'env' successfully.
##[error]Invalid format 'devcontainer dev environment loaded (nix)'
```

The #1180 shellHook env forward captured the **whole stdout of `nix
develop`** as the env dump, so the scaffolded flake's shellHook banner
glued onto the first NUL-delimited record and produced an invalid
GITHUB_ENV heredoc name. Both banner and action are devkit-managed —
every direnv consumer breaks and cannot fix it locally. rc2's smoke test
missed it because the smoke-test consumer is container-mode.

## Fix (TDD)

- `dcbcbd02` **test (RED)**: stub `nix` now echoes the banner on stdout
on every invocation, exactly like the real flake; asserts the banner
never reaches GITHUB_ENV and the first env record survives. Reproduced
the exact live corruption.
- `20b6d58b` **fix (GREEN)**: dump the env to a file *inside* the shell
command (`--command bash -c 'env -0 > "$1"' _ <file>`) so shellHook
stdout stays on the job log; plus defense in depth — skip any record
whose name is not a valid env identifier. 19/19 tests green.

The step's other two stdout captures (PATH, UV download URL) are already
banner-safe via their `grep` filters; the env dump was the only raw
capture.

Note: 4 unrelated local pytest failures against the stale local `:dev`
image (missing DOWNSTREAM_RELEASE.md / 1.4.0 devtools) — CI builds
fresh.

Per the RC-validation runbook this targets `release/1.4.0`; rc3 follows.
Second rc finding after #1187.

Refs: #1189
Re-scaffold from the 1.4.0-rc3 image and re-lock the vigos flake input
(annotated tag peels to commit b533ef98). The only content delta vs rc2
is the vig-os/devkit#1189 fix in the managed setup-devkit-toolchain
action: the dev-shell env dump now runs inside the shell command
(--command bash -c 'env -0 > "$1"' _ <file>) so shellHook stdout — the
scaffolded banner — can no longer glue onto the first NUL record and
corrupt GITHUB_ENV, plus a malformed-record-name guard. This was the rc2
finding that failed every toolchain job on this PR's CI.

Refs: #142
c-vigo added 3 commits July 20, 2026 13:18
Re-scaffold from the 1.4.0-rc5 image and re-lock the vigos flake input
(annotated tag peels to commit 5851a6a2). Content deltas vs rc3:

- setup-devkit-toolchain: the direnv toolchain now detects a preinstalled
  host Nix and, when present, skips install-nix-action (which would abort on
  self-hosted runners and leave NIX_CONFIG malformed) and instead exports the
  same settings via a well-formed multi-line NIX_CONFIG, kept in lockstep with
  extra_nix_config (vig-os/devkit#1192, #1198).
- .vig-os gains the DEVKIT_WORKFLOW key (workflow model: gitflow default |
  trunk), written empty here since this repo stays on gitflow — no trunk
  writeback (vig-os/devkit#1205).
- docs/DOWNSTREAM_RELEASE.md documents the workflow models and that
  sync-main-to-dev.yml runs only under gitflow (vig-os/devkit#1205).

The re-scaffold re-seeded an inert .github/CODEOWNERS (comments only); removed
again to keep the net diff scaffold-faithful.

Refs: #142
Re-scaffold from the 1.4.0-rc6 image and re-lock the vigos flake input
(annotated tag peels to commit af008a15). Content delta vs rc5:

- setup-devkit-toolchain: the Detect host Nix probe now runs `nix --version`
  under `env -u NIX_CONFIG` so a self-hosted runner's malformed ambient
  NIX_CONFIG can no longer make nix error on the config before printing the
  version, which would defeat the diagnostic (vig-os/devkit#1216).
- flake.lock: vigos advances rc5 -> rc6; the transitive nixpkgs-unstable input
  moves with devkit's own relock (vig-os/devkit#1214). No other nodes change.

The re-scaffold re-seeded an inert .github/CODEOWNERS (comments only); removed
again to keep the net diff scaffold-faithful.

Refs: #142
Re-scaffold from the promoted 1.4.0 image and restore the floating vigos
flake input now that the final release is out. The rc-only `?ref=` pin
existed solely to track release candidates; per the NIX.md versioning
policy the scaffold floats on the default branch, so the input reverts to
`github:vig-os/devkit` and re-locks to devkit main (d16541f5, the promoted
1.4.0 tree). No managed-file deltas vs rc6: the final promotion carried the
same tree, so only .vig-os (rc6 -> 1.4.0), flake.nix (pin removal) and the
flake.lock vigos relock change. The release-extension seam (dist-check +
build-provenance attest) is unchanged.

The re-scaffold re-seeded an inert .github/CODEOWNERS (comments only);
removed again to keep the net diff scaffold-faithful.

Refs: #142
@c-vigo
c-vigo marked this pull request as ready for review July 20, 2026 16:21
@c-vigo
c-vigo merged commit cb31016 into dev Jul 20, 2026
22 checks passed
@c-vigo
c-vigo deleted the feature/142-adopt-devkit-1-4-0 branch July 20, 2026 16:29
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