Repository navigation
chore: release 1.4.0 - #1186
chore: release 1.4.0#1186
Conversation
Syncs `dev` with `main` (sync-main-to-dev workflow).
The direnv CI lane runs on the bare host runner (resolve-toolchain emits an
empty container image), which lacks the devkit image's FHS loader and C++
runtime that the hand-managed .pre-commit-config.yaml's pymarkdown hook (native
pyjson5) needs — so pymarkdown fails with ImportError: libstdc++.so.6 there.
A fresh direnv scaffold now activates an empty `hooks = { }` in flake.nix and
drops the hand-managed YAML, so the shared flake hook set generates the config
(dropping pymarkdown, which is not in nixpkgs) and runs host-side. The generated
store-symlink config is gitignored from the first scaffold.
Gated on a fresh scaffold: a consumer's own preserved flake.nix or committed
.pre-commit-config.yaml is never rewritten. Container/both keep the hand-managed
YAML (they run inside the image where pymarkdown works). bare is out of scope —
it prunes flake.nix and the consumer owns its own toolchain.
Refs: #1167
) ## Summary Closes #1167. A fresh `direnv` scaffold now defaults to **flake-generated** pre-commit hooks instead of the hand-managed `.pre-commit-config.yaml`. ### Why The `direnv` (and `bare`) CI lanes run on the **bare host runner** — `resolve-toolchain` emits an empty container `image`, so the job runs directly on the runner rather than inside the devkit image. The image ships the FHS dynamic loader + C++ runtime that the scaffolded YAML's `pymarkdown` hook needs (its native `pyjson5`); the host runner does not, so the hook fails with `ImportError: libstdc++.so.6`. Both existing direnv consumers (commit-action, sync-issues-action) had already switched to flake-generated hooks by hand. Observed during the 1.3.1 rollout on `vig-os/org-config`. ### What changed - `assets/init-workspace.sh`: on a **fresh** `direnv` scaffold, activate an empty `hooks = { };` in `flake.nix` (deterministic single insert after the unique `extraPackages` line) and drop the seeded `.pre-commit-config.yaml`. The shared flake hook set then generates the config as a `/nix/store` symlink, which is gitignored from the first scaffold (`render_gitignore` gains a `FLAKE_HOOKS_DEFAULT` path so the ignore is seeded before the symlink exists). - Guarded on a fresh scaffold: a consumer's own **preserved** `flake.nix` or committed `.pre-commit-config.yaml` is never rewritten. - Out of scope by design: `container`/`both` keep the hand-managed YAML (they run inside the image where `pymarkdown` works); `bare` ships no `flake.nix` (it prunes it) and the consumer owns its own toolchain there. - Docs: `docs/MIGRATION.md` pre-commit opt-in section + residual note; `CHANGELOG.md`. ### Testing - TDD: 6 new bats cases in `tests/bats/init-workspace.bats` (drop YAML, activate hooks, gitignore seed; container/both keep YAML + opt-in; consumer files preserved). - Full `init-workspace.bats` suite green (218 tests); `test_scaffold_lint.py` + `test_install_script.py` green. - End-to-end: generated `flake.nix` passes `nix-instantiate --parse` and is `nixfmt --check` clean. - Full `pre-commit run --all-files` green. Refs: #1167
…ers (#1169) ## Summary Closes #1166. Documents the one-time provisioning step that a new **public** consumer needs so the scaffolded `ci.yml` **Dependency Review** gate passes out of the box. ### Why The scaffold's Dependency Review job (added in #1140) reads GitHub's dependency graph. On a public repo the graph is normally on by default, but the `vig-os` org creates new repos with `dependency_graph_enabled_for_new_repositories: false`, so a fresh public consumer's first run **403s** until the graph is enabled. Observed during the 1.3.1 rollout on `vig-os/org-config` and fixed there manually with `gh api -X PUT .../vulnerability-alerts`. Per the review decision this is **documentation only** — no scaffold script enables the graph (the observed repo is `direnv`, which runs no container provisioning script anyway), so the fix lands where every mode sees it: the onboarding doc plus a pointer at the failure site. ### What changed - `docs/MIGRATION.md`: new "Enable the dependency graph on new public consumers" step next to the existing CodeQL/Scorecard private-repo guard notes — the idempotent `gh api -X PUT repos/<owner>/<repo>/vulnerability-alerts` command (the same toggle as *Settings → Security → Dependency graph*), one-time and mode-agnostic. - `assets/workspace/.github/workflows/ci.yml`: a pointer comment on the `dependency-review` job so a maintainer hitting the 403 finds the fix at the failure site. - `CHANGELOG.md`. No code/runtime surface → no TDD; `test_scaffold_lint.py` (34) green and full `pre-commit run --all-files` green. Refs: #1166
…g-os Add optional DEVKIT_CI_RUNNER manifest key so a self-hosted consumer routes the scaffold-managed ci.yml onto its own runners without hand-editing a managed file. resolve-toolchain emits a runner-json JSON array (default ["ubuntu-24.04"]); the lint/test/commit-checks jobs and the summary gate consume it via runs-on fromJSON. resolve-toolchain and dependency-review stay hosted. init-workspace.sh persists the key across re-scaffolds like the tag-scheme keys. Refs: #1173
… linters RED for #1171: a nix-oriented consumer (*.nix beyond the scaffold-managed ./flake.nix) gets the nix gitignore fragment (result/result-*); a flake.nix-only consumer stays undetected (re-scaffold safety); the CodeQL matrix is untouched (nix is not a CodeQL language); statix and deadnix render on the flake-generated consumer surface only, and the scaffolded template flake.nix passes both linters with the configured flags. Refs: #1171
A repo is nix-oriented when it carries *.nix files beyond the scaffold-managed ./flake.nix (excluding .git/, .direnv/, .worktrees/) — flake.nix alone would false-positive on every direnv consumer at re-scaffold time. Detected nix repos append the new assets/gitignore.d/nix.gitignore fragment (result, result-*); the fragment feeds the #1145 managed set via the existing all-fragments glob. nix is not a CodeQL language, so render_codeql_matrix omits the leg (same treatment as rust). Refs: #1171
Define statix and deadnix in nix/hooks.nix hookDefs as consumer-only
language: system hooks (no yaml render, scaffold = false): they appear
in mkProjectShell's flake-generated .pre-commit-config.yaml but never
in the committed hand-managed YAMLs, so existing container-mode
consumers see zero change. statix runs single-target (statix check .,
pass_filenames = false); deadnix runs with --fail --no-lambda-arg
--no-lambda-pattern-names so the scaffolded consumer flake.nix passes
out of the box. Devkit's own authored-flake-scoped checks.{statix,
deadnix} gates keep their strict defaults, untouched.
Refs: #1171
Package pymarkdownlnt (nix/pymarkdown.nix) with its two PyPI-only pure-Python deps not in nixpkgs (application-properties, columnar); pyjson5 comes from nixpkgs. Add it to the toolchain SSoT (nix/devtools.nix) so it reaches the dev-shell, image, and vigos.packages home module. Convert the pymarkdown hookDef in nix/hooks.nix from a runner-only remote-repo hook to a language: system hook rendered in all three artifacts: the committed runner + scaffold YAML, the sandbox checks.pre-commit gate, and the consumer generation surface. All run `-c .pymarkdown fix` with the same excludes; the gate operates on the sandbox source copy so fix never mutates the real tree. Drop the now unused remoteRepos.pymarkdown pin and its repoOrder entry. Refs: #1170
pymarkdown is now packaged in the flake and rendered as a language: system hook in all three artifacts (#1170), so the "not in nixpkgs / drops pymarkdown" rationale is stale. Update the direnv flake-hooks default messaging in assets/init-workspace.sh (and its bats comment), the residual notes in docs/NIX.md and docs/MIGRATION.md, and record the change under CHANGELOG Unreleased -> Added. The direnv default mechanism stays; its rationale is now that the flake set resolves every hook from the Nix store rather than building the committed YAML remote pre-commit repo hook envs per runner. Refs: #1170
…g-os (#1174) ## Summary Closes #1173. Adds an optional `.vig-os` key `DEVKIT_CI_RUNNER` (comma-separated runner labels, e.g. `self-hosted,linux,x64,meatgrinder`). The scaffold `resolve-toolchain` action emits a new `runner-json` output (always a valid JSON array; absent/blank key => `["ubuntu-24.04"]`, so existing consumers are byte-for-byte unchanged), and the scaffolded `ci.yml` routes `lint`, `test`, `commit-checks`, and the `summary` gate through `runs-on: ${{ fromJSON(needs.resolve-toolchain.outputs.runner-json) }}`. - `resolve-toolchain` stays hosted (chicken-and-egg: it produces the output) and `dependency-review` stays hosted (public-repo-only, toolchain-free, reads GitHub's dependency-graph API) — documented as a v1 limitation in `docs/MIGRATION.md`. - `init-workspace.sh` persists `DEVKIT_CI_RUNNER` across re-scaffolds like the #1116 tag-scheme keys, so upgrades don't silently reset a consumer onto hosted runners. - No installer flag (v1 minimal per the issue): consumers set the key by editing `.vig-os`. Motivating consumer: exo-pet/exo-fleet (self-hosted CI per its ADR-0022; `ci.yml` is scaffold-managed so hand-edits are clobbered on upgrade). ## Verification - TDD: RED commit `2ce19443` (11 pytest cases exercising the action's real `run:` bash against temp manifests: default/single/multi-label/whitespace/per-mode + ci.yml wiring assertions; 2 bats cases for template key + upgrade persistence) → GREEN `d967139b` → docs `37991149`. - `uv run pytest tests/test_ci_runner.py -q` → 11 passed; `bats tests/bats/init-workspace.bats --filter 1173` → 2 passed (re-run by the reviewing session, not just the implementing agent). - `actionlint` clean on the touched workflow; full `prek run --all-files` green in the dev shell; working tree clean.
## Summary Closes #1172. Adds `gitleaks` (nixpkgs pin: 8.30.1) to the toolchain SSoT (`nix/devtools.nix` — dev-shell + image + `vigos.packages`) and defines it as an **opt-in, default-disabled** hook on the consumer flake hook surface only: - Consumers enable it with `mkProjectShell { hooks = { gitleaks.enable = true; }; }`; the base hookDef ships `enable = false` (base values are `mkOverride 999`, so a plain consumer `enable = true` wins). - `language: system`, store-path entry `gitleaks git --pre-commit --staged --redact --verbose` (v8.19+ form) — offline, no upstream repo clone/build. This retires the `SKIP=gitleaks` pattern secret-bearing consumers (exo-fleet) use today. - Deliberately absent from devkit's own lanes: no `yaml` (not in the committed runner/scaffold configs — enforced by the existing drift gate + explicit absence tests) and no `check` (not in the sandbox gate), since devkit ships no `.gitleaks.toml` and false-positive tuning is repo-specific. - A repo-root `.gitleaks.toml` is auto-discovered by gitleaks; documented in `docs/NIX.md` ("Opt-in gitleaks secret scanning"). ## Verification - TDD: RED `16d79cbc` (enabled-case eval failed on missing hookDef; absence cases pass) → GREEN `3bc43f52` → docs `4513f7b3`. - `pytest tests/test_flake_hooks.py` → 27 passed (4 new: enabled render contains the hook with the right invocation; default render, committed YAMLs, and sandbox gate all exclude it) — re-run by the reviewing session. - `gitleaks version` → 8.30.1; `gitleaks git --help` confirms the flags. - Full `prek run --all-files` in the dev shell: green, working tree clean (re-run by the reviewing session). ## Notes - No live end-to-end exercise in a secret-bearing consumer yet — that lands with the exo-fleet deployment (its tuned `.gitleaks.toml` is the real test).
… statix/deadnix hooks (#1176) ## Summary Closes #1171. Makes Nix a first-class consumer language in the scaffold (ask-gate cleared by three nix-oriented consumers: exo-pet/exo-fleet, Personal/vigo-nixos, devkit itself): - **Detection** (`assets/init-workspace.sh`): a repo is nix-oriented when it carries `*.nix` files **beyond the scaffold-managed `./flake.nix`** (pruning `.git/`, `.direnv/`, `.worktrees/`). `flake.nix` alone can't be the marker — every direnv scaffold ships one, so naive detection would false-positive on every direnv consumer at re-scaffold. Deterministic and re-scaffold-safe. - **Gitignore fragment** (`assets/gitignore.d/nix.gitignore`): `result`, `result-*`. The #1145 managed set already derives from ALL gitignore.d fragments, so no migration-logic change was needed (existing #1145 tests stay green). - **statix + deadnix on the consumer hook surface** (`nix/hooks.nix`): `language: system` hookDefs with `scaffold = false` and no `yaml` — both committed hand-managed YAMLs are byte-unchanged (guarded by the drift gates + an explicit test); the hooks render only into the flake-generated consumer config. statix runs `check .` repo-wide (single-target CLI, respects .gitignore); deadnix runs `--fail --no-lambda-arg --no-lambda-pattern-names` so the scaffolded template flake.nix (idiomatic `{ self, … }` pattern, `extraPackages = pkgs: [ ]` seed) passes out of the box — proven by a test that runs the *exact rendered hook entries* against a template copy. Devkit's own strict internal gates (`checks.{statix,deadnix}`) are untouched. - **CodeQL**: explicit `nix) : ;;` no-op arm (nix is not a CodeQL language, same as rust), with a bats test proving the matrix stays `['actions']`-only for a pure-nix consumer. ## Verification - TDD: RED `77fb07ac` (1 bats + 4 pytest failing pre-implementation; two deliberate green guards) → `e49d99c8` (detection + fragment) → `492ac467` (hooks). - `bats tests/bats/init-workspace.bats` → 221/221; `pytest tests/test_flake_hooks.py` → 27 passed — both re-run by the reviewing session. - Template proof: `statix check assets/workspace/flake.nix` and `deadnix --fail --no-lambda-arg --no-lambda-pattern-names assets/workspace/flake.nix` both clean. - Full `prek run --all-files` in the dev shell: green, working tree clean (re-run by the reviewing session). ## Notes - Since #1167, fresh direnv scaffolds default to flake hooks, so nix consumers get statix/deadnix immediately; a consumer with pre-existing nix code may see first-run findings — that is the feature working. Consumers can tighten/loosen via `hooks.deadnix.entry` overrides. - Expect CHANGELOG (+ mirror) merge conflicts with sibling PRs #1174/#1175 — union-merge as usual.
## Summary Closes #1170. Packages `pymarkdownlnt` 0.9.23 in the flake (`nix/pymarkdown.nix`: pymarkdownlnt + its two PyPI-only pure-Python deps `application-properties` 0.9.3 and `columnar` 1.4.1; the native `pyjson5` comes from nixpkgs) and promotes the `pymarkdown` hook from a runner-only remote-repo hook to a `language: system` hook across **all three** artifacts (committed runner YAML, sandbox `checks.pre-commit` gate, consumer flake-generated surface). This retires the documented "pymarkdown residual" — the reason direnv consumers lost markdown linting after #1167/#1168 — and unblocks the direnv-only deployment of exo-pet/vault (a markdown documentation vault). - Built against `python314` (toolchain default); all three packages are pure Python and pass `pythonImportsCheck`. - `remoteRepos.pymarkdown` pin and its `repoOrder` entry removed; both committed `.pre-commit-config.yaml`s re-rendered to the system-hook form. - "Drops pymarkdown / not in nixpkgs" messaging retired in `assets/init-workspace.sh`, `docs/NIX.md`, `docs/MIGRATION.md`, and the #1167 bats assertions. - **Deliberate deviation from the issue text:** the sandbox gate mirrors the hook in `fix` mode (on the sandboxed copy, fail-on-modify — same semantics as the ruff/end-of-file-fixer gates and identical to the runner), not `scan`: scan is strictly stricter and would fail the gate on pre-existing MD013 line-length debt, an out-of-scope behavior change. Documented in the hookDef comment. ## Verification - TDD: RED `d76dbcc7` → GREEN `bf1c866a` → docs `98db437e`. - `pymarkdown version` → 0.9.23 in the dev shell; `nix build .#checks.x86_64-linux.pre-commit` → gate builds and passes — re-run by the reviewing session. - `pytest tests/test_flake_hooks.py tests/test_flake_devshell.py` → 40 passed, 1 skipped (re-run by the reviewing session); bats #1167 direnv-hooks tests 6/6. - Full `prek run --all-files` in the dev shell: green (pymarkdown runs over all markdown), working tree clean (re-run by the reviewing session). - Strict `buildEnv` collision probe (pymarkdown + pythonEnv) assembles cleanly; the full image build is left to CI. ## Notes - The NixOS-only `LD_LIBRARY_PATH` libstdc++ shim is no longer strictly needed for pymarkdown but is left in place (general safety net, minimal diff). - Expect CHANGELOG (+ mirror) and `nix/hooks.nix`/test-file merge conflicts with sibling PRs #1174/#1175/#1176 — union-merge as usual.
…1204) ## Summary `justfile.worktree` declares `_wt_repo := \`basename "$(git rev-parse --show-toplevel)"\``, a top-level backtick `just` evaluates **eagerly on every invocation** — so `git rev-parse --show-toplevel` runs for any recipe (`just sync`, `just lint`, …). In a git worktree whose `.git` file points at a gitdir outside a bind mount (the bare-`podman` scaffold context from #1197), git can't resolve the repo and leaks `fatal: not a git repository: (null)` to stderr on every `just` call. The substitution now falls back to `pwd` (`… 2>/dev/null || pwd`), matching the existing `setup-labels.sh` idiom. Split out from #1197 (agent observation) — a separate code path from `print_preserved_template_diff`. ## Scope - **SSoT:** the repo-root `justfile.worktree` is fixed; the scaffolded `.devcontainer/justfile.worktree` is regenerated from it via `scripts/manifest.toml` (both committed, in sync). - CHANGELOG `Fixed` entry added under `[1.4.0]` (unlike the other RC fixes, this corrects **pre-existing, already-released** behavior). ## Test TDD — RED test first, then fix. New `worktree.bats` case runs `just -f justfile.worktree --evaluate _wt_repo` in a foreign-git cwd and asserts no `fatal:` leaks. `bats tests/bats/worktree.bats` → **9 passed** (new case confirmed RED before, GREEN after). Closes #1203
…t-in) (#1212) Implements epic #1205 — a per-consumer `DEVKIT_WORKFLOW` knob selecting the branching/release model. **gitflow stays the unchanged default; trunk is opt-in.** ## What it does - `DEVKIT_WORKFLOW=gitflow|trunk`, **empty ⇒ gitflow** (existing consumers' `.vig-os` stays byte-identical). - **gitflow (default):** unchanged — `dev` integration branch, cut `release/X.Y.Z` from `dev`, RC train, finalize→`main`+tag, `sync-main-to-dev` back-merge. - **trunk:** `feature|bugfix|chore` straight to `main`; releases STILL happen but cut `release/X.Y.Z` **from `main`**, RC on it, merge back **into `main`** + tag. Only the `dev` branch and `sync-main-to-dev.yml` disappear; the whole downstream tag/build/publish/promote chain is unchanged (already `release/* → main`). ## How (design) Realized **entirely at scaffold time** (mirrors `DEVKIT_MODE`) — an anchored `dev→main` render of the scaffolded workflows/skill/pre-commit plus a `sync-main-to-dev.yml` copy-exclude; NO resolve-toolchain runtime wiring, NO workflow twin. Enabled by the verified fact that every `dev` reference in `prepare-release.yml` is a plain branch literal (incl. the #617 read-after-write guard). ADR: `docs/rfcs/ADR-workflow-model.md`. ## Sub-issues delivered (spike #1206 + #1207–#1211) - **#1207** manifest key + resolution + enum/contradiction guards + conditional writeback (trunk only). - **#1208** `render_workflow_model()` in init-workspace.sh + sync-main-to-dev exclude/prune + `--force` preview mirror. - **#1209** `--workflow` flag on install.sh/init-workspace.sh + dev-branch creation gating. - **#1210** trunk coverage across the dev-assuming suites + new bats; `test_workflow_model.py` (19) end-to-end. - **#1211** docs (`RELEASE_CYCLE`/`DOWNSTREAM_RELEASE`/`MIGRATION` "Workflow models", README/CLAUDE), ADR, plan doc. ## Verification - Full hook suite green. - **1094 pytest passed** incl. the new `test_workflow_model.py` and the trunk-extended suites; the **gitflow scaffold is byte-identical to today** (default-path regression guard). bats: install 99 ok, init-workspace 229 ok (#991 template invariants intact). - 2 failures remain (`vig-utils` `TestFindRepoRoot`) — **pre-existing + environmental**, in a package this PR does not touch. ## Notes - The three code sub-issues (#1207–#1209) share `init-workspace.sh`/`install.sh`, so they're consolidated into this one PR (per-sub-issue commits kept for traceability) rather than conflict-prone parallel PRs. - Switching an existing repo between models is refused by a contradiction guard (destructive; a gitflow→trunk switch leaves an orphan remote `dev` — documented cleanup in MIGRATION). - Scope: devkit capability only. Targets 1.5.0; independent of the in-flight 1.4.0 promote. Refs: #1205, #1206, #1207, #1208, #1209, #1210, #1211
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github-backup](https://redirect.github.com/josegonzalez/python-github-backup) | `==0.64.0` → `==0.64.2` |  |  | --- ### Release Notes <details> <summary>josegonzalez/python-github-backup (github-backup)</summary> ### [`v0.64.2`](https://redirect.github.com/josegonzalez/python-github-backup/blob/HEAD/CHANGES.rst#0642-2026-07-18) [Compare Source](https://redirect.github.com/josegonzalez/python-github-backup/compare/0.64.1...0.64.2) *** - Add tests. \[Duncan Ogilvie] - Skip fetching gists that have not been updated. \[Duncan Ogilvie] - Skip retrieving repositories when not necessary. \[Duncan Ogilvie] ### [`v0.64.1`](https://redirect.github.com/josegonzalez/python-github-backup/blob/HEAD/CHANGES.rst#0641-2026-07-17) [Compare Source](https://redirect.github.com/josegonzalez/python-github-backup/compare/0.64.0...0.64.1) - Fix exception when DMCA'd/empty gists were backed up. \[Duncan Ogilvie] </details> --- ### Configuration 📅 **Schedule**: (in timezone Etc/UTC) - Branch creation - "before 9am on monday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/vig-os/devkit). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjUuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI2NS4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2IiwibGFiZWxzIjpbXX0=-->
This deliberately pulls epic #1205 (the per-consumer DEVKIT_WORKFLOW gitflow/trunk model), which was originally targeted at 1.5.0, into the 1.4.0 release, together with the renovate github-backup 0.64.0->0.64.2 bump (#1213). All seven release-branch hardening fixes are preserved and the complete workflow-model feature is composed on top of them. Refs: #1205
…el (#1215) ## Summary Unfreezes release/1.4.0 by merging `dev` into it, deliberately pulling epic #1205 (per-consumer `DEVKIT_WORKFLOW` gitflow/trunk model, merged to dev via #1212) and the renovate `github-backup` 0.64.0→0.64.2 bump (#1213) into the 1.4.0 release. **This deviates from the epic's documented 1.5.0 target** — accepted trade-off: an rc5 was required anyway (the branch is five fixes past rc4), and gitflow consumers get a provable byte-for-byte no-op. ## Gates cleared before this merge - **Dev composite tree proven green**: the merged dev head `4ac2ca90` (feature + renovate bump as one tree) passed a full dispatched `ci.yml` run ([29726877354](https://github.com/vig-os/devkit/actions/runs/29726877354)) — the pre-merge PR checks had only tested stale bases. - **Epic completeness audited**: every acceptance criterion of #1206–#1211 mapped to merged code; gitflow no-op pinned by `test_gitflow_scaffold_matches_default_path` and `test_gitflow_render_files_are_byte_identical_to_template`. Sub-issues remain open only as bookkeeping (dev-PR `Refs:` doesn't auto-close). ## Merge composition Two real conflicts, composed to preserve both sides: - `assets/init-workspace.sh`: kept #1196's `MODE_CONFIG_EXCLUDES` array (supersedes dev's older explicit exclude blocks) **and** appended #1205's trunk-only `sync-main-to-dev.yml` exclude + preview skip-guard; `render_workflow_model()` and its invocation intact. - `tests/bats/init-workspace.bats`: additive union of #1195's chmod-scope test and #1205's six trunk tests. CHANGELOG surgery: dev's two Unreleased entries moved into the `[1.4.0]` section (Added/Changed), `## Unreleased` restored to the empty skeleton (#590 invariant); `assets/workspace/.devcontainer/CHANGELOG.md` re-synced byte-identical (sync-manifest hook green). All seven release-branch hardening fixes (#1190 #1193 #1199 #1200 #1201 #1202 #1204) survive. ## Verification - Targeted suites: 66 passed (`test_workflow_model`, `test_install_script`, `test_workflow_prepare_extension`, `test_workflow_sync_checkout`) - Full pytest: 1098 passed, 28 skipped; 3 failures all environmental/pre-existing (2× `vig-utils` `TestFindRepoRoot` env, 1× `test_manifest_files` stale local image — CI rebuilds) - bats: 331 ok, 0 not ok (`init-workspace.bats`, `install.bats`) - `pre-commit run --all-files`: fully green - Containment: `git log HEAD..origin/dev` empty; diff vs dev = release fixes + changelog structure only ## After merge Cut **rc5** (required regardless of this PR) and extend rc validation with the trunk-render suites + a gitflow-consumer scaffold byte-identity check. Refs: #1205
rc5 validation verdict: PASS — GO for finalizeFull validation of Phase 0 — automated gates
Phase 1 — image sanityBaked VERSION Phase 2 — gitflow no-op + fix spot-checks (throwaway scaffolds)Gitflow render byte-for-byte no-op (default ≡ explicit Phase 3 — trunk render + #1206 spike re-runTrunk render complete and precise: zero Phase 4 — five consumer lanes re-deployed on rc5 (all PRs stay draft)
Every lane: diff = pins + empty Finding (non-blocking, follow-up)#1198's detect step is live (log non-empty) but on meatgrinder it captures a nix config-parse error instead of a version — the runner's ambient Next: finalize ( |
A malformed ambient NIX_CONFIG on a self-hosted runner's service environment makes `nix --version` fail with a config parse error before printing the version, so the detect log captures the error instead of the version the diagnostic aims to record. This test drives the "Detect host Nix" step against a stub `nix` that rejects a malformed NIX_CONFIG, and asserts the log shows the version, not the parse error. Refs: #1216
The direnv-mode "Detect host Nix" step captured `nix --version 2>&1` (#1198) with the runner's ambient NIX_CONFIG in effect. On a self-hosted runner whose service environment carries a malformed NIX_CONFIG (exo-fleet's meatgrinder), nix rejects the config before printing the version, so the detect log recorded a config parse error instead of the version. Run the probe with `env -u NIX_CONFIG` so the captured string is the version even when the runner environment is broken, keeping the `2>&1` fold as a fallback for other failure shapes. Refs: #1216
…1217) ## Summary Fixes #1216 (found during rc5 consumer-lane validation): the direnv-mode "Detect host Nix" step captured `nix --version 2>&1` (#1198) with the runner's ambient `NIX_CONFIG` in effect. On a self-hosted runner whose service env carries a malformed `NIX_CONFIG` (exo-fleet's meatgrinder, live evidence in exo-pet/exo-fleet#230 run 29738048251), nix errors on the config before printing the version, so the log records a parse error instead of the version the probe exists to capture. The probe now runs `env -u NIX_CONFIG nix --version 2>&1` (`env -u` over `NIX_CONFIG=` to stay shellcheck-clean, SC1007), keeping the stderr fold for other failure shapes. Scope: the probe line only — has-nix detection, the gated install, and "Configure host Nix" are untouched. Single action copy (scaffold template; no devkit-own twin, not manifest-synced — verified). ## TDD - RED `238cf1a6`: stub nix errors on malformed ambient NIX_CONFIG before `--version` — reproduces the exact meatgrinder log symptom. - GREEN `fe97f457`: 24/24 in `tests/test_setup_toolchain_env.py`. - Full pre-commit suite green (verified by orchestrator). Requires an rc6 cut after merge; live proof = exo-fleet lane re-bump on meatgrinder. Refs: #1216
Scheduled refresh of the nixpkgs-unstable pin (uv, gh, claude-code via the fastMovers overlay). Full CI on this PR is the merge gate. Refs: #817
rc6 validation verdict: PASS — GO for finalizerc6 delta vs the validated rc5 = the #1216 probe fix (PR #1217) + the #1214 nixpkgs-unstable refresh. Targeted re-validation, all green. Phase 0: Release run 29744590258 all jobs green (vulnix gate clean on the new nixpkgs pin); smoke train green (deploy PR #282 CI/CodeQL + smoke-test's own Release run). Image: VERSION All five lanes re-bumped rc5→rc6, CI green, drafts held:
Every lane's diff was exactly: version pins, the vigos relock moving only The #1216 live proof (Tests job on
#1192's "Configured preinstalled host Nix via NIX_CONFIG." branch confirmed still active. Next: finalize ( |
Closes #1219. Drops the @gerchowl CODEOWNERS entries (`.claude/skills/`, `justfile.worktree`, vig-utils developer tooling). c-vigo is the de-facto sole maintainer; with `require_code_owner_review` on main, those unreachable-owner paths hard-block release finalization whenever a release diff touches them — currently blocking 1.4.0 (#1186 stuck at REVIEW_REQUIRED over `justfile.worktree`, the #1203/#1204 fix). @c-vigo stays on the key control surfaces (workflows, actions, release scripts, renovate configs, CODEOWNERS itself, SECURITY.md). Targets main directly (governance file; CODEOWNERS is evaluated from the PR base branch, so this must land on main to unblock #1186 — a dev-first route would wait a full release cycle). The sync-main-to-dev automation carries it back to dev. Merge requires admin bypass: the author cannot approve their own PR and there is no second code owner — explicitly authorized by the maintainer. Refs: #1219
Brings main's #1220 (CODEOWNERS cleanup, Refs #1219) into release/1.4.0 so the release PR #1186 is no longer BEHIND main — the #1132 promote mergeability gate rejects BEHIND. Governance-only delta (one file, no image/scaffold impact); merge-base is the 1.3.1 branch point and main has moved only by #1220, so the merge is conflict-free. Unblocks the 1.4.0 finalize re-dispatch. Refs: #1219
Set release date to 2026-07-20 and regenerate release docs. Refs: #1186
Release 1.4.0 - 2026-07-20
This PR prepares release 1.4.0 for merge to main.
1.4.0 - 2026-07-20
Added
DEVKIT_WORKFLOW(gitflow | trunk) (#1205).vig-oskeyDEVKIT_WORKFLOW(and matchinginstall.sh/init-workspace.sh--workflowflag) selects a consumer's branching model.Empty/absent resolves to the unchanged
gitflowdefault (long-liveddev+mainwithsync-main-to-dev.yml);trunkopts into a trunk-based flow:feature/bugfix/chore branches merge straight to
main, releases forkrelease/X.Y.Zfrommainand merge back intomain, and thedevbranchand
sync-main-to-dev.ymldisappear (#1207, #1208, #1209).DEVKIT_MODE): an anchoreddev -> mainrender of the scaffolded workflows (prepare-release,ci,codeql,sync-issues), the branch-naming skill and the pre-commit branchguard, plus a
sync-main-to-dev.ymlcopy-exclude and upgrade prune. Noresolve-toolchain runtime wiring and no workflow twin. gitflow is a provable
byte-for-byte no-op, so existing consumers and their
.vig-osare unchanged(the key is written back only for
trunk).workflow switch (an explicit
--workflowthat contradicts the persistedvalue), mirroring the
DEVKIT_MODEguards;--previewshows the would-beswitch first.
docscapability module — typst document toolchain (#1178)docscapability module putstypst(the document compiler) andtypstyle(its formatter) on the dev-shell PATH, so document-orientedconsumers (exo-pet/vault, the future
qmsapp, EXOMA presentations/grants)declare
mkProjectShell { modules = [ "docs" ]; }instead of pinningtypstvia PyPI. It stays out of the base
devToolsand the published image, sonon-doc consumers and the slimmed image are unaffected (opt-in only,
backward compatible). No version option in v1 — nixpkgs carries a single
typst per pin and the module tracks that toolchain pin. Deliberate v1
exclusions (documented in
docs/NIX.md): pandoc/LaTeX (ask-gated), headlessdrawio/excalidraw export (electron-shaped, repo-owned), and Python
doc-processing libraries (
pymupdf4llm,openpyxl) which belong in theconsumer's own
pyproject.tomlvia uv..vig-os(#1173).vig-oskeyDEVKIT_CI_RUNNER(comma-separated runner labellist, e.g.
self-hosted,linux,x64,meatgrinder) lets a self-hosted consumerroute the scaffold-managed
ci.ymlonto its own runners without hand-editinga managed file (hand-edits are clobbered on upgrade).
resolve-toolchainreads the key and emits a
runner-jsonoutput — a JSON array of labels,defaulting to
["ubuntu-24.04"]when the key is absent — which the toolchainjobs (
lint,test,commit-checks) and thesummarygate consume viaruns-on: ${{ fromJSON(needs.resolve-toolchain.outputs.runner-json) }}. Theresolve-toolchainjob itself stays on the hosted default (it produces theoutput), and
dependency-reviewstays hosted (public-repo-only,toolchain-free). Absent key => unchanged behavior for every existing
consumer; the value is persisted across re-scaffolds like the other manifest
keys. Documented in
docs/MIGRATION.md.gitleakssecret-scanning hook (#1172)gitleaksjoins the shared toolchain (nix/devtools.nix→ dev-shell,image, and
vigos.packages) and is defined as alanguage: systempre-commit hook resolved from the pinned nixpkgs binary — no upstream
pre-commit repo clone, works offline. It is default-disabled and lives
only on the
mkProjectShellconsumer generation surface: absent fromdevkit's own committed
.pre-commit-config.yaml, the scaffold copy, and thesandbox
checks.pre-commitgate, so no devkit lane runs it. A secret-bearingconsumer opts in with
mkProjectShell { hooks = { gitleaks.enable = true; }; };the hook runs
gitleaks git --pre-commit --staged --redact --verboseand arepo-root
.gitleaks.tomlis honored automatically. Off by default becausefalse-positive tuning is repo-specific (
docs/NIX.md). Backward compatible:zero behavior change for consumers that do not enable it.
*.nixfilesbeyond the scaffold-managed
./flake.nix(excluding.git/,.direnv/,.worktrees/) —flake.nixalone would false-positive onevery direnv consumer at re-scaffold time, so the beyond-flake.nix rule is
deterministic and re-scaffold-safe.
nixgitignore fragment (result,result-*build symlinks),appended to the managed root
.gitignoreon detection and feeding thenever-migrate managed set like every other fragment.
statixanddeadnixjoin the flake-generated consumer hook surface(
mkProjectShellhooks) aslanguage: systemhooks. They are NOT injectedinto the committed hand-managed
.pre-commit-config.yaml, so existingcontainer-mode consumers see zero change until they opt into flake hooks.
deadnixruns with--no-lambda-arg --no-lambda-pattern-namesso thescaffolded consumer
flake.nix(idiomatic{ self, … }pattern,extraPackages = pkgs: [ ]seed) passes out of the box; devkit's ownstricter internal
nix flake checkgates are unchanged.and push paths omit it (same treatment as rust).
pymarkdownlntis now packaged as a Nix derivation (nix/pymarkdown.nix,with its two PyPI-only pure-Python deps
application-propertiesandcolumnar;pyjson5comes from nixpkgs) and added to the toolchain SSoT(
nix/devtools.nix), so it ships in the dev-shell, the image, and thevigos.packageshome module.pymarkdownhook is promoted from a runner-only remote-repo hook to alanguage: systemhook resolved from PATH — likeshellcheck/typos— inall three hook artifacts: the committed runner + scaffold YAML, the
sandbox
checks.pre-commitgate, and the consumer generation surface. Same-c .pymarkdown fixcommand and README/CONTRIBUTE/TESTING excludes as before.(feat(workspace): generate .pre-commit-config.yaml from the flake (git-hooks.nix) — composable base hooks, consumer-extensible in the project flake #883): every
direnv/bareconsumer regains (or gains) markdown lintfrom the shared flake hook set, and the container/both lanes converge on the
same system hook.
ci.ymlDependency Review gate reads GitHub's dependencygraph, which the
vig-osorg leaves disabled on new repos(
dependency_graph_enabled_for_new_repositories: false) — so a fresh publicconsumer's first run
403s until it is enabled.docs/MIGRATION.mdgains an"Enable the dependency graph on new public consumers" step (idempotent
gh api -X PUT repos/<owner>/<repo>/vulnerability-alerts, one-time per repo,mode-agnostic), and the scaffolded
ci.ymldependency-reviewjob carries apointer comment at the failure site. Private consumers are unaffected (the
gate is neutral there).
Changed
github-backupfrom==0.64.0to==0.64.2(#1213)resolve-toolchainemits anempty container image), which lacks the devkit image's FHS loader and C++
runtime that the hand-managed
.pre-commit-config.yaml'spymarkdownhook(native
pyjson5) needs — so it fails withImportError: libstdc++.so.6there, and every direnv consumer had to switch to flake-generated hooks by
hand. A fresh
direnvscaffold now activates an emptyhooks = { }inflake.nixand drops the hand-managed YAML, so the shared flake hook setgenerates
.pre-commit-config.yaml(a gitignored/nix/storesymlink,dropping
pymarkdown) and runs host-side. A consumer's own preservedflake.nixor committed config is never rewritten;container/bothkeepthe hand-managed YAML (they run inside the image where
pymarkdownworks);bareis unaffected (it ships no flake and owns its own toolchain).Fixed
NIX_CONFIG(#1216)nix --version 2>&1(Detect host Nix step logs an empty nix --version #1198)with the runner's ambient
NIX_CONFIGstill in effect. On a self-hostedrunner whose service environment carries a malformed
NIX_CONFIG(observedon exo-fleet's meatgrinder), nix rejects the config before printing the
version, so the detect log recorded a
syntax error in configurationparseerror instead of the version string the diagnostic aims to capture. The probe
now runs
env -u NIX_CONFIG nix --version 2>&1, keeping the2>&1fold forother failure shapes, so the log shows the real version even when the
runner's environment is broken. Non-fatal before the fix (the "Configure host
Nix" step rewrites a clean
NIX_CONFIG), diagnostic-only impact.on
PATH, whose loader does not search/usr/lib, so auvx-run tool'smanylinux native wheel (e.g. otterdog's
rjsonnet) aborted withlibstdc++.so.6: cannot open shared object file— the same failure class asthe dropped
pymarkdown/pyjson5hook. The rootjustfilenow ships a basewith-native-libsrecipe that wraps one command with a command-scopedLD_LIBRARY_PATHsourced from$VIGOS_STDCPP_LIBor derived from theon-
PATHccwrapper, so ajustfile.projectrecipe can run such a tool(
just with-native-libs uvx …) without the wheel failing to import. Itdegrades to a no-op when neither source resolves the library.
shellHookenvironment (#1180)setup-devkit-toolchainpreamble exported the dev-shellstore bin dirs to
GITHUB_PATHbut dropped every environment variable aproject's flake
shellHookexports, so env defaults present in every localnix develop/direnv session silently vanished on CI — surfacing as unrelatedtool errors (feat(config): import vig-os organization configuration org-config#40: a shellHook-seeded
OTTERDOG_TOKENplaceholder worked locally, failed on CI). The preamble now diffs the ambient
environment against the dev-shell environment (the
shellHookhas run insidenix develop) and forwards the vars the dev-shell adds or changes toGITHUB_ENV, minus a denylist of shell session state (PATH,HOME,SHLVL,TMPDIR, …) and Nix/stdenv build machinery (NIX_*,buildInputs,stdenv,shellHook,*Phase, …). The ambient diff keeps host secrets outof
GITHUB_ENV; a random heredoc delimiter keeps multi-line values intact.Local-vs-CI parity is now the default in direnv mode, no consumer change.
justno longer leaks a gitfatal:in a foreign-git worktree cwd (#1203)justfile.worktree_wt_repovariable is a top-level backtick thatjustevaluates eagerly on every invocation, so itsgit rev-parse --show-toplevelran for any recipe (just sync,just lint, …). In a gitworktree whose
.gitfile points at a gitdir outside a bind mount (thebare-
podmanscaffold context), git couldn't resolve the repo and printedfatal: not a git repository: (null)to stderr on everyjustcall. Thesubstitution now falls back to
pwd(git rev-parse --show-toplevel 2>/dev/null || pwd), matching the existingsetup-labels.shidiom —cosmetic only, the worktree recipes are unaffected.
Security
zizmorover the 14 devkit-managed workflows previously surfaced 73 findings(40 high / 32 medium) that every consumer had to baseline against code it does
not own. Devkit now audits its own output: 8 findings fixed upstream and the
intentional remainder shipped as a devkit-owned baseline so consumer baselines
shrink to zero.
persist-credentials: falseon the read-only checkouts thatnever push or fetch (CI lint/test/resolve-toolchain/dependency-review,
codeql.yml, and therenovate-changelog-build/sync-issuestoolchaincheckouts) — 7
artipackedfindings; and thesync-main-to-devcleanup step'srelease-app token moved into
env:— 1template-injectionfinding. Allbehavior-preserving.
zizmor.yml(scaffolded/managed, registeredin
scripts/manifest.toml) suppresses the 65 residual findings that cannot befixed without changing release/CI behavior (
unpinned-imagesfor theruntime-resolved toolchain image, broadly-scoped
github-apprelease tokens,secrets: inheritrelease fan-out, the renovate-changelogdangerous-triggers,and credential-persisting push checkouts). Every exemption is scoped to a
managed-workflow basename, so a consumer-authored workflow never inherits one.
ci.ymlproject-checks) lints the managed setagainst the shipped baseline, so a regression or a new audit fails devkit CI
instead of reaching consumers. Policy documented in
docs/WORKFLOW_SECURITY.md.