Repository navigation
chore: release 1.4.1 - #1247
Merged
Merged
chore: release 1.4.1#1247
Conversation
Syncs `dev` with `main` (sync-main-to-dev workflow).
Syncs `dev` with `main` (sync-main-to-dev workflow).
Extend the trunk render suite to require that a trunk-scaffolded ci.yml, codeql.yml, and sync-issues.yml carry no stray `dev` prose: the trigger-header comments, the origin/dev commit-gate rationale, and the sync-issues target-branch example must retarget dev -> main like the functional literals already do. Targeted string assertions avoid tripping on legit devkit/dev-shell tokens. Fails until render_workflow_model rewrites these prose spots. Refs: #1226
render_workflow_model retargeted only functional literals, so trunk consumers shipped comments still naming `dev`. Extend the anchored render to rewrite the inert prose too (comments/descriptions only, no behavior change), matching the prepare-release precedent (#1208): - ci.yml / codeql.yml trigger-header comment: drop `dev` from the "Pull requests to …" list. - ci.yml origin/dev commit-gate rationale comment: dev -> main. - sync-issues.yml target-branch input description example: dev -> main. gitflow is unaffected (the render is a no-op there); the templates are untouched so gitflow output stays byte-identical. Refs: #1226
Add a trunk-mode flake-hooks case to the workflow-model coverage: build mkProjectShell with workflow = trunk and assert the generated no-commit-to-branch guard drops the (?!dev$) clause while keeping (?!main$), mirroring render_workflow_model's scaffolded-path render. The seam does not exist yet, so the trunk build fails on an unexpected workflow argument (RED). Refs: #1224
Add the render matrix (workflow model x target/schedule), guard failures (bad branch name, bad cron), bootstrap-step injection, and manifest writeback for the two new sync-issues knobs. RED against the current scaffold: the keys, render_sync_settings, and guards do not exist yet. Refs: #1228
Two optional .vig-os keys, realized at scaffold time in init-workspace.sh, that steer the scaffolded sync-issues.yml: - DEVKIT_SYNC_TARGET overrides the branch the sync job commits to (default stays workflow-model-aware: dev gitflow / main trunk). A protected-main consumer points it at an unprotected mirror branch so the sync job's direct API push is no longer refused by a require-PR main ruleset (#1227); the job gains a bootstrap step that creates the branch from the default branch head if absent. - DEVKIT_SYNC_SCHEDULE overrides the schedule trigger's 5-field cron. Both are guarded loudly at scaffold time (git ref-format for the branch, a 5-field cron check) and written back to .vig-os like DEVKIT_CI_RUNNER, so upgrades preserve them. Unset => byte-for-byte unchanged. Refs: #1228
The scaffolded .pre-commit-config.yaml drops the (?!dev\$) protect-clause for DEVKIT_WORKFLOW=trunk (render_workflow_model), but a direnv consumer on flake-generated hooks (#1167) gets its branch guard from mkProjectShell, which was not workflow aware — after switching to trunk it kept ^(?!main\$)(?!dev\$)…, guarding a dev branch a trunk repo does not have. Add a workflow argument to mkProjectShell (gitflow default | trunk, validated) and thread it to the nix/hooks.nix consumer render, which drops the (?!dev\$) clause for trunk via a single branchNamePatternFor helper — mirroring exactly the scaffold render. gitflow is a no-op, so the generated config stays byte-identical for existing consumers. Refs: #1224
The workflow-model matrix covered only the scaffolded-file path. Add a trunk-mode flake-hooks case: a trunk direnv consumer gets its branch guard from mkProjectShell, so the scaffolded flake.nix must read DEVKIT_WORKFLOW from .vig-os and forward it as the workflow argument. The template does not yet forward it, so the assertion fails (RED). Refs: #1224
Add a "Point sync-issues at an unprotected mirror branch" subsection to the MIGRATION.md Workflow models section: the require-PR-main failure (#1227), the rejected commit-App ruleset bypass, DEVKIT_SYNC_TARGET + the branch bootstrap, DEVKIT_SYNC_SCHEDULE, the provisioning note, and the deliberate deferral of PR-based sync mode. Add both keys to the .vig-os manifest table and a CHANGELOG Unreleased entry (mirrored into the devcontainer template by sync-manifest). Refs: #1228, #1227
A fresh direnv consumer defaults to flake-generated hooks (#1167), whose branch guard comes from mkProjectShell rather than the scaffolded .pre-commit-config.yaml. Have the scaffolded flake.nix read DEVKIT_WORKFLOW from .vig-os (via self, lazy + pathExists-guarded) and forward it as the workflow argument, so a trunk workspace generates a guard without the (?!dev\$) clause out of the box. gitflow and an absent/blank value resolve to gitflow, so existing consumers are unaffected. Refs: #1224
## Summary The scaffolded `.pre-commit-config.yaml` is workflow-model aware — `render_workflow_model` (assets/init-workspace.sh) drops the `(?!dev$)` protect-clause for `DEVKIT_WORKFLOW=trunk`. But a direnv consumer on flake-generated hooks (#1167, the default) gets its branch guard from `mkProjectShell`'s `nix/hooks.nix` consumer render, which was **not** workflow aware: after switching to trunk it kept `^(?!main$)(?!dev$)…`, guarding a `dev` branch a trunk repo does not have. Impact is inert (the residual clause guards a non-existent branch; `main` protection and the type prefixes still work), but the pattern must follow the workflow model for correctness. Found during the first live trunk switches (exo-pet/vault#31). Closes #1224. ## Fix Two seams, mirroring the scaffold render exactly: 1. **`nix/hooks.nix`** — the branch-guard regex is now produced by a single `branchNamePatternFor <workflow>` helper; the `(?!dev$)` clause is emitted only for non-trunk. The top-level `consumer` render takes a `workflow` and drops the clause for `trunk` via a targeted `no-commit-to-branch` override (`lib.optionalAttrs`), so **gitflow is a no-op** and the generated config stays byte-identical for existing consumers. The committed runner/scaffold YAML keeps the gitflow pattern (its trunk render remains the scaffold path's job). 2. **`flake.nix`** — `mkProjectShell` gains a `workflow ? "gitflow"` argument (validated: `gitflow | trunk`), threaded into the consumer render. 3. **`assets/workspace/flake.nix`** (scaffold template) — reads `DEVKIT_WORKFLOW` from `.vig-os` (via `self`, lazy + `pathExists`-guarded) and forwards it as `workflow`, so a fresh trunk direnv consumer's generated guard follows the model out of the box. gitflow / absent / blank all resolve to `gitflow`. ### Decisions (autonomous) - **Argument, not impure read.** `mkProjectShell` cannot purely read the consumer's `.vig-os` (a devkit-flake path literal resolves to devkit's own tree). So the seam accepts a `workflow` argument and the consumer flake — which has `self` — does the read. This is the issue's second suggested option. - **Reach for existing consumers.** A consumer's `flake.nix` is preserved (never overwritten), so an already-scaffolded trunk repo needs its `flake.nix` re-scaffolded or a one-line `workflow = "trunk";` to benefit; fresh trunk direnv scaffolds get it automatically. The bug is inert, so this is acceptable. - **Test placement.** The flake-eval half lives in `tests/test_flake_hooks.py` (reusing that suite's `nix build` fixtures); the scaffold-path half (the template forwards the value) lives in `tests/test_workflow_model.py`, per the issue's ask to extend that matrix. ## Test evidence - New `tests/test_flake_hooks.py::TestWorkflowModelBranchGuard` (4 tests): gitflow consumer keeps `(?!dev$)`; trunk consumer drops it while keeping `(?!main$)`; trunk guard == gitflow guard minus the exact `(?!dev$)` deletion; invalid `workflow` rejected at eval. - New `tests/test_workflow_model.py::test_trunk_flake_forwards_workflow_to_hooks`: a trunk scaffold's `flake.nix` reads `DEVKIT_WORKFLOW` and forwards `workflow`, and its `.vig-os` declares `trunk`. - `tests/test_flake_hooks.py` + `tests/test_workflow_model.py`: **56 passed**. - `tests/test_flake_devshell.py test_downstream_flake.py test_flake_checks.py test_flake_modules.py`: **41 passed, 1 skipped** (drift gate + zero-hooks parity intact). - `bats tests/bats/init-workspace.bats`: **232 passed** (flake-hooks activation + template stub unaffected). - `prek run --all-files`: **all green**. Refs: #1224
git check-ref-format alone accepts quotes, dollar, backticks, semicolons, pipes, and hashes: such values render invalid YAML, crash the render seds with a raw sed error, or inject commands into the bootstrap step's double-quoted shell assignment at sync runtime with the App token in scope. RED: nine hostile values (foo'bar, x$(id)y, backticks, |, #, ;, double quote, &, braces) currently pass the guard. Refs: #1228
The target value is spliced into single-quoted YAML, sed replacement text, and the bootstrap step's double-quoted shell assignment executed at sync runtime with the App token in scope. git check-ref-format alone accepts quotes, dollar, backticks, semicolons, pipes, and hashes, so a hostile value could render invalid YAML, crash the render seds, or inject commands. Gate on a strict [A-Za-z0-9._/-] allowlist first and keep the ref-format check for git-illegal shapes the allowlist admits. Also drop the unsupported Quartz `?` from the cron field charset. Refs: #1228
## Summary Both live trunk switches (vig-os/org-config#64, exo-pet/exo-fleet#230) flagged cosmetic residue: `render_workflow_model()` retargeted only functional literals, so a `trunk` consumer still shipped comments naming `dev`. This extends the anchored render to rewrite the four inert prose spots too — **comments and input descriptions only, no functional change**. gitflow is unaffected (the render is a no-op there) and the templates are untouched, so gitflow output stays byte-identical. Follows the `prepare-release.yml` precedent (#1208), which already rewrites inert `dev` step-names/comments to `main` for trunk in the same function. ## Before / after (trunk-rendered) | File | Before | After | |------|--------|-------| | `ci.yml` header | `# - Pull requests to dev, release/**, and main` | `# - Pull requests to release/** and main` | | `ci.yml` commit-gate rationale | `# … reachable from origin/dev — a no-op on a dev PR` / `# (its base IS dev) …` | `# … reachable from origin/main — a no-op on a main PR` / `# (its base IS main) …` | | `codeql.yml` header | `# - Pull requests to dev, release/**, and main` | `# - Pull requests to release/** and main` | | `sync-issues.yml` `target-branch` description | `… (e.g., dev, release/x.y.z).` | `… (e.g., main, release/x.y.z).` | A trunk scaffold now contains no stray `dev` workflow-branch prose in these files (legit `devkit` / `dev-shell` tokens are untouched). ## Test evidence - Extended `tests/test_workflow_model.py` (targeted string assertions, no over-assert) in `test_trunk_ci_pr_filter_excludes_dev`, `test_trunk_codeql_pr_filter_excludes_dev`, and `test_trunk_sync_issues_default_main`. TDD: assertions committed failing first (`test:`), then the render fix made them pass (`fix:`). - `uv run pytest tests/test_workflow_model.py` → **19 passed**. - `prek run --all-files` → **all hooks green**. - The two pre-existing `TestVersionCheckInitWorkspace` failures are unrelated (reproduce on the base release commit `d16541f5`; environment-specific). ## Concurrency note Issue #1228 concurrently adds functional sync-target knobs to the `sync-issues.yml` template and render function. This PR touches the `sync-issues.yml` block of `render_workflow_model` (one added comment-only sed line) and may need a trivial rebase after the #1228 PR lands (or vice versa). Changes here are strictly comments/descriptions. Refs: #1226
…1232) ## Summary Add two optional `.vig-os` knobs, realized entirely at scaffold time, that steer the scaffolded `sync-issues.yml`. They remediate #1227: trunk consumers whose `main` carries a require-PR ruleset cannot let the sync job's direct API push land on `main`. - **`DEVKIT_SYNC_TARGET`** — the branch the sync job commits to. Default stays **workflow-model-aware** (`dev` gitflow / `main` trunk), byte-for-byte unchanged when unset. A protected-`main` consumer points it at an unprotected mirror branch (e.g. `sync/issue-mirror`); the scaffolded job then gains a **bootstrap step** that creates the branch from the default branch head if absent. The mirror diverges permanently and is never merged back — each sync regenerates full state. - **`DEVKIT_SYNC_SCHEDULE`** — cron override for the schedule trigger (default `0 2 * * *`). Realized at scaffold time because schedule triggers cannot take inputs. Both are guarded loudly at scaffold time (git ref-format for the branch, a 5-field cron check) and written back to `.vig-os` like `DEVKIT_CI_RUNNER`, so upgrades preserve them with no flags. ## Design recap - **No ruleset bypass for the commit App** (rejected for security — a bot that writes a protected `main` can change whatever that branch controls, e.g. applied org config). The mirror-branch approach keeps the App off protected `main`. - Realized at **scaffold time** mirroring `DEVKIT_WORKFLOW`/`DEVKIT_CI_RUNNER`: read before the template overwrite, guarded, rendered, written back. `render_sync_settings()` runs **after** `render_workflow_model()`, so a custom target overrides the workflow-model default already in the file; both are no-ops when unset. - **Bootstrap step** is injected only when a custom target is set (via `sed r` after the unique app-token `private-key:` line, before the sync-job checkout), so an unconfigured workspace is unchanged. It uses the App token (same as the commit push) and `gh api .../git/refs`; rendered output validated with `actionlint`. - **Deliberate exclusion — PR-based sync mode** (#1227 option (b)): evaluated and deferred (inherent approval toil against a review-requiring ruleset, ruleset-dependent safety value, needs Renovate-class stale-PR machinery, zero consumers asking). Recorded in the docs using the established "deliberate exclusion" pattern. ## Decisions / deviations from the issue spec - **`install.sh` unchanged.** These are pure `.vig-os` keys with no CLI flag (schedule triggers can't take inputs), so — exactly like `DEVKIT_CI_RUNNER` / `DEVKIT_TAG_PREFIX` — they are resolved end-to-end in `init-workspace.sh`, which reads the consumer's `.vig-os` directly. `install.sh` only handles keys it needs for its own flags (mode/workflow) or identity; adding handling there would be dead code against precedent. The issue mentioned "the install script", but following the real precedent keeps the diff minimal and consistent. - **Docs placement of the PR-sync exclusion.** The issue asked to record it "in the same docs section that carries the docs-module v1 exclusions pattern" (the nix `docs` module in `NIX.md`). Placing a sync-mode note there is topically wrong, so I applied the *pattern* (a "Deliberate exclusion" note) in the topically-correct new MIGRATION.md sync subsection. - **Bats + Python tests.** Followed the #1205 precedent of covering a scaffold-time knob with both the Python executed-bash suite (render matrix, guards, bootstrap, writeback) and a focused bats set. ## Test evidence - `tests/test_sync_settings.py` — 14 passed (RED first: 12 failed / 2 unset-preservation passed before implementation). - No regressions: `test_workflow_model.py`, `test_ci_runner.py`, `test_install_script.py`, `test_scaffold_lint.py`, `test_workflow_sync_checkout.py`, and more — 174 passed together. - `tests/bats/init-workspace.bats` — 237 passed (was 232; +5 for #1228). - Rendered mirror-target `sync-issues.yml`: valid YAML + `actionlint` clean; bootstrap step sits after the app-token step, before the sync-job checkout. - `prek run --all-files` — green. `shellcheck assets/init-workspace.sh` — clean. Target release: **1.4.1** Refs: #1228 Refs: #1227
The direnv-mode smoke lane (devkit-smoke-test PR #286) lives in the smoke repo's .github/workflows/, but every --smoke-test deploy regenerates the repo via rsync --delete from the template plus the assets/smoke-test/ overlay — so the lane would be wiped on the next release deploy. Ship it in the overlay (the repository-dispatch.yml pattern) so it survives, and document it in the overlay README. Refs: #1194
The overlay actionlint bats test covered only repository-dispatch.yml and its comment claimed a single standalone workflow; with direnv-smoke.yml now shipping in the overlay — outside the repo actionlint hook's ^.github/workflows/ scope — the persisted lane had no actionlint regression coverage in the devkit. Lint both overlay workflows. Refs: #1194
## Summary Companion to [devkit-smoke-test#286](vig-os/devkit-smoke-test#286) (the direnv-mode smoke lane, #1194): every `--smoke-test` deploy regenerates the smoke repo via `rsync --delete` from the template + the `assets/smoke-test/` overlay, so a workflow that exists only in the smoke repo is wiped on the next release deploy. This PR ships `direnv-smoke.yml` in the overlay — the same persistence mechanism `repository-dispatch.yml` uses — and documents the lane in the overlay README. The workflow file is byte-identical to the one proven green on devkit-smoke-test PR #286 (run [29813431342](https://github.com/vig-os/devkit-smoke-test/actions/runs/29813431342): fresh-install leg exercises the install-nix-action branch, preinstalled leg the #1192 host-Nix branch, both verify the #1189 shellHook env forward). ## Test evidence - `prek run --all-files` green (full suite, includes actionlint/yamllint on the new workflow). - No changelog entry: `ci` type, smoke-gate internal (not consumer-visible). Refs: #1194
Weekly referrer-aware sweep of the vig-os/devcontainer org package: delete-untagged reaps orphaned nix-dev discovery generations, delete-orphaned-images reaps dangling attestation referrers left by the promote-release RC prune. Config-only change (no TDD surface); validated by three local dry-runs of the pinned action against the live package — no release, floating, or cosign tag and no live attestation referrer in any delete set. Refs: #1238
Closes #1238 ## What Adds a devkit-only scheduled workflow `.github/workflows/ghcr-cleanup.yml` (weekly Mon 04:00 UTC + `workflow_dispatch` with `dry-run` defaulting to **true** for safe manual previews) that prunes stale versions of the `vig-os/devcontainer` org package using `dataaxiom/ghcr-cleanup-action` v1.2.2 (SHA-pinned; Renovate's `github-actions` manager will keep it fresh): - `delete-untagged: true` — orphaned `nix-dev*` discovery generations (~3 per dev/epic push). - `delete-orphaned-images: true` — dangling attestation referrers + orphaned `sha256-*` referrer tags left behind by the promote-release RC prune. - `older-than: 7 days` age guard, `validate: true` manifest integrity check. - Default `GITHUB_TOKEN` with job-scoped `packages: write` — same mechanism as the existing promote-release GHCR prune step. Not scaffolded to consumers (root workflows only; not in `assets/workspace/` or the sync manifest), so outside the zizmor-managed audit scope; covered by actionlint/yamllint/shellcheck pre-commit hooks. No CHANGELOG entry per repo rules (`ci`-internal). ## Validation evidence (pre-merge, acceptance criteria of #1238) Ran the pinned action locally (`node dist/index.js` at `d52806a0`, Node 24) against the **live package**, three configurations, all `dry-run=true` (587 versions loaded each run): | Run | Options | Would delete | Kept | |---|---|---|---| | 1 | `delete-untagged` + `older-than: 7 days` | 298 | 289 | | 2 | `delete-untagged` only | 382 | 205 | | 3 | run 2 + `delete-orphaned-images` | 423 | 164 | - **Keep-safety PASS**: zero live tagged versions in any delete set. Explicitly verified kept: `1.4.0`/`latest`, `1.3.1`, `1.3.0`, current `nix-dev*` trio, all `sha256-*` cosign/referrer tags of live releases, and the untagged attestation children of 1.4.0/1.3.1/1.3.0 (cross-checked against live referrer indexes fetched from GHCR). - **Delete-effectiveness PASS**: old orphaned `nix-dev` generations (index + arch children) and dangling attestation manifests (subject digest gone) land in the delete set; the dangling ones specifically require `delete-orphaned-images` (run 3), hence that option. - `validate` mode: 107 warnings (existing dangling-referrer debt this workflow removes), 0 errors, no ghost/partial images. ## Notes - First scheduled run executes from the default branch after merge/promotion; a manual `workflow_dispatch` (dry-run preview) can be exercised any time after merge as a final live check. - TDD skipped: config-only workflow, no testable script surface (selection logic lives in the pinned action).
gawk 5.4.1 (the fix for the CVE-2026-40467/-40468/-40469/-40553 batch) is still only on nixpkgs staging and has not reached the pinned nixos-26.05 channel, so the planned rev-advance is not yet possible. Extend the .vulnixignore exception from 2026-07-28 to 2026-08-18 to force a near-term re-check while the staging merge propagates. Refs: #1240
The trunk render leaves the two `sync-main-to-dev` parenthetical comments in promote-release.yml (the header step list + the Summary echo), naming a workflow that is copy-excluded in trunk. Require the trunk-scaffolded promote-release.yml to carry no `sync-main-to-dev` mention, and register the file in the gitflow byte-identical guard (placeholder-free, render-only). Fails until render_workflow_model rewrites these prose spots. Refs: #1233
The nix-image.yml dev push trigger only watched flake.nix, flake.lock, and the workflow file, but the image bakes broader repo content at build time (the assets/ scaffold tree, docs/MIGRATION.md, the packages/vig-utils console scripts, the nix/home environment, scripts/). A dev push touching only baked content left the mutable nix-dev discovery tag stale with no rebuild. A precise allowlist tracking every baked input is fragile, so drop the paths filter and let every push to dev (or the epic branch) rebuild, test, and repush the tag. Cachix/eval caching keeps a no-op rebuild of an unchanged closure cheap. Refs: #1236
render_workflow_model rewrote the inert dev prose in prepare-release.yml, ci.yml, codeql.yml and sync-issues.yml (#1208, #1226) but never touched promote-release.yml. Its header step list and Summary echo each name sync-main-to-dev, a workflow copy-excluded in trunk (EXCLUDE_ARGS), so a trunk consumer shipped comments referencing a workflow absent from its repo. Extend the anchored trunk render to drop both parentheticals. Comments only, no behavior change; the template is untouched so gitflow output stays byte-identical (the render is a no-op for gitflow). Refs: #1233
A release train's changelog-freeze push to dev starts a discovery build whose baked-CHANGELOG checksum mismatch is guaranteed red until the manifest-sync push lands one minute later. Group runs per ref with cancel-in-progress so the sync build supersedes the doomed freeze build instead of painting a red run every train; distinct refs stay independent. Refs: #1250
… restructure The #1167 activate_flake_hooks_default awk anchors on the template's extraPackages line at its exact indentation; the #1249 guard restructure re-indented the mkProjectShell attrset 10->12 spaces, so the insert silently no-opped and direnv scaffolds lost their generated hooks (caught by the init-workspace bats e2e in PR CI). Refs: #1249
…ser-owned (#1253) ## Summary The #1235 ownership repair keyed on the runtime CLI *name* (`RUNTIME = docker`). On hosts where `docker` is the rootless-podman compat shim, the scaffold output is already correctly owned, and the in-container `chown` to the host UID maps to an unmapped subuid — flipping a working tree to `UNKNOWN`-owned and breaking the git phase (a regression of the #1235 fix; 1.4.0 worked). The repair now keys on the OBSERVED post-scaffold state: it runs only when the tree contains files not owned by the invoking user (`find ! -user` probe, portable across GNU/BSD — no GNU-only `stat -c`). RUNTIME is out of the condition entirely; real docker's root-owned output still triggers the repair, and any rootless-podman flavor skips it. Warn-not-fail posture and messages unchanged. Closes #1248 Refs #1248 ## Verification - TDD: new bats test red-first (docker runtime + user-owned tree → no repair container); existing #1235 tests keep asserting the repair on root-owned output via a stubbed ownership probe - `bats tests/bats/install.bats`: 103/103 ok; full pre-commit suite green (51 hooks) - **Live proof on a rootless-podman shim host**: rc1 installer breaks (`UNKNOWN`-owned, no git repo); this branch's installer with identical flags yields a user-owned, git-initialized tree — matching the 1.4.0 baseline
## Summary Adds a workflow-level per-ref `concurrency` block with `cancel-in-progress: true` to `nix-image.yml`, so a release train's manifest-sync push cancels the guaranteed-red build started by the changelog-freeze push one commit earlier (visible since #1236 dropped the `paths:` filter). Per-ref grouping keeps the epic branch and dispatches on other refs independent; cancelled runs only produce disposable `nix-dev*` discovery tags and idempotent Cachix paths, both fully regenerated by the superseding run. Structure asserted test-first in `tests/test_workflow_cachix.py` (RED confirmed before the fix). Closes #1250 Refs #1250 ## Verification - `actionlint` clean; zizmor finding-set diff shows zero new findings (removes one pedantic `concurrency-limits` finding) - Full pre-commit suite green; `tests/test_workflow_cachix.py` 5/5
…#1252) ## Summary The scaffolded `flake.nix` forwards the new `workflow` argument (#1224) unconditionally, but its `vigos` input deliberately floats on the default branch — so until 1.4.1 promotes, a fresh scaffold resolves devkit `main` (1.4.0) and dies on first shell entry with `called with unexpected argument 'workflow'`. This is what broke devkit-smoke-test PR #288's Direnv Smoke jobs and the smoke rc1 dispatch, deadlocking the promote precondition. The call site now gates `inherit workflow;` behind `builtins.functionArgs vigos.lib.mkProjectShell ? workflow` via `optionalAttrs`, so older builders degrade to their gitflow default instead of failing eval. All template comments preserved; upgrades were never affected (`flake.nix` is scaffold-once). Closes #1249 Refs #1249 ## Verification - TDD: guard asserted red-first in `tests/test_workflow_model.py` - `tests/test_workflow_model.py` 22/22, `test_scaffold_lint.py` + `test_flake_hooks.py` + `test_downstream_flake.py` green; full pre-commit suite green (51 hooks) - **Live proof**: fixed template + `.vig-os` `DEVKIT_WORKFLOW=trunk` enters the shell against BOTH `github:vig-os/devkit` (main = 1.4.0, previously fatal) and `?ref=1.4.1-rc1` - Smoke-test PR #288 Direnv Smoke going green on the rc2 respin is the final live gate
…abels (#1256) ## Summary `setup-labels` now discovers an optional, non-managed `.github/label-taxonomy.local.toml` (same `[[labels]]` schema) and merges it into the effective taxonomy before reconcile/prune: extension labels are created/updated normally, `--prune` only deletes labels absent from BOTH files, and on a name collision the local entry wins (justfile-layering convention). Absent file = byte-identical behavior. Headers of both taxonomy copies, the vig-utils README, and the changelog document the extension. Targeted at `release/1.4.1` per maintainer decision (semver:minor feature folded into the patch train). Closes #1254 Refs #1254 ## Verification - TDD red-first; `test_shell_entrypoints.py` 24/24 (extension reconcile, prune-spares-union, local-wins single edit, absent-file byte-identical baseline, dry-run preview) - Full pre-commit suite green (51 hooks) - **Live acceptance (dry-run) against vig-os/org-config**: canonical 25 + extension 4 → 29 effective; `drift`/`critical`/`change-request` update, `inventory` creates, none pruned. Counterfactual without the extension shows all of them as prune deletions — exactly the motivating bug. - Local file confirmed unmanaged: exact-path manifest entry only, consumer rsync runs without `--delete`
…rated hooks Refs: #1255
…6-08-15 The curl 8.20.0 advisory batch (.vulnixignore) lapsed on 2026-07-22 and reddened the nightly Scheduled Security Scan at the check-expirations gate. curl 8.21.0 and openssh 10.4p1 fix the findings upstream but have not reached the pinned nixos-26.05 channel (still curl 8.20.0 / openssh 10.3p1), so the rev-advance lever has nowhere to land; renew both exceptions with a short window pending backport propagation. Refs: #1257
#1258) ## Summary The nightly Scheduled Security Scan went red on 2026-07-23 ([run 29988472212](https://github.com/vig-os/devkit/actions/runs/29988472212)) at the `check-expirations` gate: the **curl 8.20.0** advisory batch in `.vulnixignore` (18 CVEs, `Expiration: 2026-07-22`) lapsed. This renews it, and pre-emptively renews the **openssh** `CVE-2026-60002` block (`Expiration: 2026-07-24`, which lapses tomorrow), to a fresh short window of **2026-08-15**. Not a new/regressed vulnerability — two time-boxed risk acceptances that ran out. ## Why renew rather than rev-advance - **curl:** 8.21.0 (2026-06-24) fixes the whole batch and is in `nixpkgs-unstable`, but the pin (`nixos-26.05`) still ships **8.20.0** — verified. - **openssh:** 10.4p1 (2026-07-06) fixes it, but `nixos-26.05` still ships **10.3p1** — verified. Both fixes are stuck in the 26.05 staging pipeline and haven't reached the pinned channel, so the rev-advance lever has nowhere to land. Each block gets a dated re-verification note; flip to a pin bump the moment the fixed version lands in `nixos-26.05`. ## Placement Based on `release/1.4.1` so the renewal ships with the promote-ready train and reaches `main` at promote (which un-reds the nightly). Mirrors the #1240 gawk-extension precedent (`chore(security)` + `### Security` changelog entry, sync-manifest auto-mirror). ## Verification - `uv run check-expirations .vulnixignore` → *Validated 57 exception(s)*. - Full `just precommit` suite green locally. ## Out of scope The tracking-issue automation didn't fire (its guard keys on `vulnix-gate.outcome`, but the run died at the earlier `check-expirations` step). Widening that guard is a separate follow-up. Closes #1257
…rated hooks (#1259) ## Summary An `install.sh --force` upgrade on a flake-hooks consumer deployed the scaffold template `.pre-commit-config.yaml` whenever the file was absent from the tree. On such a consumer the config is flake-GENERATED (#1167/#883): a gitignored `/nix/store` symlink that only materializes on shell entry, so a fresh checkout/worktree legitimately has no file for the preserve list to protect. The deployed template then SHADOWED the generated config — git-hooks.nix refuses to overwrite an existing file — silently dropping the consumer's `hooks`/`hooksExcludes` customizations (observed on commit-action: typos ran against the committed `dist/` bundle). ## Fix The opt-in is detectable without the file: an ACTIVE (uncommented) `hooks`/`hooksExcludes` argument in the preserved `flake.nix` — exactly `mkProjectShell`'s generation trigger (`hooks != null || hooksExcludes != [ ]`); the template's commented opt-in block never matches. - When detected and the config is absent, `.pre-commit-config.yaml` joins `MODE_CONFIG_EXCLUDES` (the #1196 SSoT), so the rsync copy and the `--preview` report skip it consistently; the report says why. - The #1092 gitignore seed also fires for this case, so the regenerated root `.gitignore` keeps the `.pre-commit-config.yaml` entry (previously it was dropped whenever neither the store symlink nor the #1167 fresh-scaffold default applied). - Present-config paths are untouched: a store symlink stays PRESERVED (#1117), and a committed regular YAML (hand-managed or mid-migration) keeps today's behavior, including no ignore seed. Targeted at `release/1.4.1`: pre-existing since 1.4.0, but it bites every fresh-worktree upgrade of the direnv lanes, so it rides the patch train. ## Verification - New bats coverage (5 tests): upgrade with absent generated config deploys no template YAML and keeps the gitignore entry; `hooksExcludes`-only opt-in is detected; a flake with only the COMMENTED template opt-in still receives the template YAML; `--preview` no longer advertises the file as ADDED. - Full `tests/bats/init-workspace.bats` suite: 243/243 green. - `just precommit`: all hooks green except the pre-existing, unrelated `check-expirations` failure (curl 8.20.0 batch expired 2026-07-22 — filed separately; it will also fail this PR's CI until resolved). Closes #1255
c-vigo
approved these changes
Jul 23, 2026
Set release date to 2026-07-23 and regenerate release docs. Refs: #1247
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.
Release 1.4.1 - 2026-07-23
This PR prepares release 1.4.1 for merge to main.
1.4.1 - 2026-07-23
Added
setup-labels: repo-local taxonomy extension file (#1254).github/label-taxonomy.local.toml(same[[labels]]schema) lets a consuming repo declare repo-specific labelsthat survive devkit upgrades.
setup-labelstreats the union of both files as the effective taxonomy:extension labels are created/updated in the normal reconciliation pass, and
--pruneonly deletes labels absent from both files.nameoverrides the canonical color/description.
Scheduled security scan now covers
devas well asmain(#1237)security-scan.ymlgains arefmatrix (main,dev) so the nightlyvulnix gate scans the
devimage closure alongside the default-branch one.A weekly
nixpkgsbump or an expiring.vulnixignoreexception ondevnowsurfaces as an ordinary tracking issue days early, instead of first tripping
the gate mid-release-train. Each leg reuses the existing machinery unchanged
(
check-expirations,devkitImageEnvclosure build, vulnix via thenvd-mirror,
vulnix-gate, deduplicated tracking issue) through its checkoutref, files a ref-distinct tracking issue so the lanes never collide ondedup, and runs with
fail-fast: falseso one lane never cancels the other.sync-issuestarget-branch and schedule knobs (#1228).vig-oskeyDEVKIT_SYNC_TARGEToverrides the branch thescaffolded sync-issues job commits to. Default stays workflow-model-aware
(
devgitflow /maintrunk), so existing consumers are unchanged.trunkrepo whosemaincarries a require-PR ruleset (which refuses thesync job's direct API push, #1227)
sets an unprotected mirror branch, e.g.
sync/issue-mirror; the jobbootstraps it from the default branch head if absent. No ruleset bypass for
the commit App is added (rejected for security).
.vig-oskeyDEVKIT_SYNC_SCHEDULEoverrides the sync scheduletrigger's cron (default
0 2 * * *). Both keys are validated loudly atscaffold time (git ref-format for the branch, a 5-field cron check) and
persisted across re-scaffolds.
Fixed
.pre-commit-config.yamlover flake-generated hooks (#1255)the generated config is a gitignored
/nix/storesymlink that onlymaterializes on shell entry, so a fresh checkout/worktree has no file for
the preserve list to protect — an
install.sh --forceupgrade thendeployed the scaffold template YAML, which silently shadowed the generated
config (git-hooks.nix refuses to overwrite an existing file) and dropped
the consumer's
hooks/hooksExcludescustomizations. Pre-existing since1.4.0; gitignored, so CI and PRs were unaffected.
flake.nixitself(an active
hooks/hooksExcludesargument — exactlymkProjectShell'sgeneration trigger), skips the template YAML in both the copy and the
--previewreport, and still seeds the.pre-commit-config.yamlgitignoreentry so the regenerated root
.gitignorestays correct.mkProjectShell:extraPackagesPython env no longer silently shadowed (#1230)pythonXX.withPackagesenv passed throughextraPackages— thedocumented way to add Python libraries to a project shell — was shadowed on
PATHbyvig-utils's propagated pinned 3.14 interpreter, so the consumergot the bare interpreter with none of their libraries and only hit a
ModuleNotFoundErrorlater. The builder now prepends any such env in theshellHook (the same PATH-order mechanism the
pythonoverride uses), so theconsumer's interpreter and its
site-packagesownpython3/python.sync-main-to-devprose frompromote-release.yml(#1233)render_workflow_modeldid not touch: thepromote-release.ymlheader steplist and the Summary echo each named
sync-main-to-dev, a workflow that iscopy-excluded in
trunk. The trunk render now drops both parentheticals, soa
trunkconsumer no longer ships comments referencing a workflow absentfrom its repo. Comments only — no functional change; gitflow is unaffected.
nix-devdiscovery image no longer drifts stale on baked-content pushes (#1236)nix-image.ymldevpush trigger only watchedflake.nix,flake.lock, and the workflow file, but the image bakes broader repo contentat build time (the
assets/scaffold tree,docs/MIGRATION.md, thepackages/vig-utilsconsole scripts, thenix/homeenvironment,scripts/).A
devpush touching only baked content left the mutablenix-devtag stalewith no rebuild. Dropped the fragile
paths:allowlist so every push todev(or the epic branch) rebuilds, tests, and repushes the tag; Cachix/evalcaching keeps no-op rebuilds cheap.
devprose from scaffolded workflows (#1226)render_workflow_modelnow retargets the inertdevmentions in commentsand input descriptions as well as the functional literals, so a
trunkconsumer no longer ships slightly-lying comments: the
ci.ymlandcodeql.ymltrigger-header comments, theorigin/devcommit-gate rationalein
ci.yml, and thesync-issues.ymltarget-branchexample descriptionall read
maininstead ofdev. Comments/descriptions only — no functionalchange; gitflow is unaffected.
render_workflow_modeldrops the(?!dev$)clause from the scaffolded.pre-commit-config.yamlforDEVKIT_WORKFLOW=trunk, but a direnv consumeron flake-generated hooks (direnv-mode scaffold ships hand-managed pre-commit config whose pymarkdown hook cannot run on host runners #1167) gets its branch guard from
mkProjectShell,which was not workflow-aware — after switching to trunk it kept
^(?!main$)(?!dev$)…, guarding adevbranch a trunk repo does not have.mkProjectShellnow takes aworkflowargument (gitflow default | trunk)threaded into the
nix/hooks.nixconsumer render, which drops the(?!dev$)clause for trunk — mirroring the scaffold render exactly. Thescaffolded
flake.nixreadsDEVKIT_WORKFLOWfrom.vig-osand forwardsit, so a trunk direnv consumer's generated guard follows the model out of
the box. gitflow is a no-op, leaving existing consumers unchanged.
workflowonly when the resolved builder accepts it(#1249): the
vigosinputdeliberately floats on the default branch, so a fresh scaffold can resolve
a devkit
mainthat predates the argument — unconditional forwarding thenfailed eval on first shell entry (
called with unexpected argument 'workflow'). The call site now gatesinherit workflow;behind abuiltins.functionArgs … ? workflowcheck, so older builders fall back totheir gitflow default instead of breaking the scaffold.
install.sh --dockerrestores scaffold ownership before the git phase, keyed on the observed post-scaffold state (#1235, #1248)output landed root-owned on the host and the host-side git phase
(
setup_git_repo, warn-not-fail by design) could not write to it — theinstaller "succeeded" but left a root-owned, git-less tree that every docker
caller had to repair by hand.
install.shnow reuses the image in athrowaway container to
chownthe tree back to the invoking user before thegit phase, so the git setup succeeds normally.
runtime CLI name: it runs only when the scaffolded tree contains files not
owned by the invoking user. Rootless podman — in any flavor, including a
dockercompat shim — maps container-root to the invoking user, so itsoutput is already correctly owned and an unconditional in-container
chownwould have flipped the tree to an unmapped subuid, breaking the git phase.
Security
Extend gawk 5.4.0 CVE exception expiry to 2026-08-18 (#1240)
.vulnixignoreexception for the gawk 5.4.0 CERT-PL batch(
CVE-2026-40467/-40468/-40469/-40553, from #1071)is extended from 2026-07-28 to 2026-08-18. The upstream fix (gawk 5.4.1) is
still only on nixpkgs
stagingand has not reached the pinnednixos-26.05channel, so the planned rev-advance remains unavailable.
Renew lapsed curl + openssh
.vulnixignoreexceptions (#1257)and the openssh
CVE-2026-60002client use-after-free (from #963)exceptions are extended to 2026-08-15 after the curl block lapsed on
2026-07-22 and reddened the nightly scan. The fixes (curl 8.21.0, openssh
10.4p1) exist upstream but have not reached the pinned
nixos-26.05channel(still curl 8.20.0 / openssh 10.3p1), so the planned rev-advance remains
unavailable.