Skip to content

chore: release 0.4.0 - #813

Merged
vig-os-release-app[bot] merged 360 commits into
mainfrom
release/0.4.0
Jul 6, 2026
Merged

vig-os-release-app[bot] merged 360 commits into
mainfrom
release/0.4.0

Conversation

@vig-os-release-app

@vig-os-release-app vig-os-release-app Bot commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Release 0.4.0 - 2026-07-06

This PR prepares release 0.4.0 for merge to main.

0.4.0 - 2026-07-06

Added

  • Shared mkProjectServices local-services helper (process-compose + services-flake) (#795)
    • New lib.mkProjectServices output implementing the local-services axis of ADR-nix-devenv-strategy: declared services-flake modules become a daemonless process-compose stack — nix run .#services boots native-process services with no Docker/Podman daemon, versions from the pinned nixpkgs lock (no out-of-lock image tags), and zero extra flake inputs downstream (both service flakes resolve from this flake's lock as dependency-free leaf entries)
    • This flake carries the validating PoC: nix run .#services boots SeaweedFS (S3) + Postgres, asserted end-to-end (boot, health probes, teardown, no container fixtures) by the new tests/test_flake_services.py. The issue named MinIO, but nixpkgs marks minio abandoned upstream with unfixed CVEs, so the PoC ships the maintained S3-compatible SeaweedFS instead (recorded in docs/NIX.md and on the issue)
    • The flake-parts question is resolved without adopting it: mkProjectServices uses process-compose-flake's standalone evalModules (services-flake's documented no-flake-parts path), so the flake stays on flake-utils. Measured cost recorded in docs/NIX.md (~0.8 s eval / ~3 s boot-to-healthy vs devenv's ~165 s IFD)
    • The scaffold opts consumers in but never forces them: the flake stub documents a commented packages.services block and justfile.project ships a commented services recipe — both preserved-on-upgrade files, so existing consumers are untouched
  • Flake checks as CI Tier 0 (nix-fast-build) (#779)
    • The project-checks CI job now builds every checks.<system> derivation (treefmt formatting, deadnix/statix, dev-shell build, devShellTools, and the git-hooks.nix pre-commit gate) in parallel with an eval cache via nix-fast-build, replacing the serial nix flake check build step. nix-fast-build is exposed as packages.<system>.nix-fast-build (a pinned-nixpkgs passthrough) so CI runs it reproducibly via nix run .#nix-fast-build without baking a CI-only tool into the dev-shell or the image
    • A new docs/rfcs/ADR-flake-checks-tier0.md records the tiering: pure, source-only checks are Tier 0 (nix-driven, cacheable, portable), while effectful jobs (image testinfra, integration, vulnix CVE-DB, multi-arch/publish, the impure pre-commit hooks and repo/git-dependent pytest units) stay GitHub-Actions-orchestrated. It also records the driver decision (nix-fast-build on existing runners now; garnix as a documented future option; Tier-1 self-hosting deferred)
    • The flake output schema nix-fast-build does not build (the treefmt formatter, the checks names, the install app, the nixos/homeManager modules) is now validated in CI by tests/test_flake_checks.py, preserving what the removed nix flake check covered
  • checks.pre-commit flake gate via git-hooks.nix + prek (#778)
    • Added the cachix/git-hooks.nix input and a checks.pre-commit output that runs the sandbox-pure subset of the pre-commit hooks under nix flake check, driven by the prek runner (package = pkgs.prek) — no network, no project venv. It reuses the treefmt wrapper for the single formatting hook (nixfmt + ruff-format + taplo), the nix-provided pure linters (ruff, shellcheck, yamllint, typos, taplo lint, just --fmt --check), the pre-commit-hooks meta hooks, and the vig-utils/bandit hooks wired to hermetic Nix binaries — so the flake is a Nix-verified guarantee that the committed config's pure hooks stay correct
    • Impure/generator/stage-gated hooks (generate-docs, sync-manifest, pip-licenses, pymarkdown, no-commit-to-branch, destroyed-symlinks, check-agent-identity, and the commit-msg/prepare-commit-msg hooks) stay runner-only in the committed .pre-commit-config.yaml; the two-artifact model is documented in docs/NIX.md
  • Docs: local Nix image build/iterate loop + downstream agent-models.toml customization (#717)
    • docs/NIX.md gained a "Building and iterating the image locally" section: when to build locally vs. pull the published image, the just build → just test-image iterate loop, and that just build tags <repo>:dev (the tag the default test/test-image/test-integration recipes use and auto-build)
    • docs/SKILL_PIPELINE.md gained a "Customizing models downstream" note under Model Selection explaining how a consuming project overrides the [models] tiers and [skill-tiers] assignments in its own committed .claude/agent-models.toml — no recipe edits needed
  • Flake polish: treefmt-nix, deadnix/statix gates, NixOS/home-manager modules, nix run .#install (#777)
    • nix fmt now runs treefmt across every supported language in one pass (nixfmt-rfc-style for *.nix, ruff format for *.py, taplo for *.toml), wrapping the same formatters the pre-commit hooks already run so the editor, hooks, and CI agree on one formatting
    • Added checks.deadnix and checks.statix (dead-Nix-code + anti-pattern linters), scoped to the authored flake.nix; deadnix and statix also join devTools
    • Added nixosModules.default and homeManagerModules.default that install the shared devTools toolchain into a NixOS / home-manager configuration via programs.vigos-devtools.enable = true
    • Added apps.install so nix run github:vig-os/devcontainer#install bootstraps a consumer project straight from the flake (wrapping install.sh, which stays the behavior SSoT)
  • Secrets-management pattern ADR (sops-nix/age + OIDC) (#780)
    • Added docs/security/ADR-secrets-management.md recording the storage/delivery pattern for two secret classes — sops-nix + age for runtime/downstream-consumer secrets (each consumer decrypts with their own key, no per-repo GitHub-secret dance) and GitHub OIDC for cloud/registry auth — plus the honest caveat that on hosted runners SOPS relocates the root of trust to one bootstrap key rather than eliminating the GitHub secret, with OIDC as the only true no-stored-secret lever. Classifies each current stored secret (CACHIX_AUTH_TOKEN, RELEASE_APP_*, COMMIT_APP_*) as OIDC / sops / keep, notes GHCR-via-GITHUB_TOKEN and keyless cosign are already correct, and ships an inert reference example under docs/security/examples/sops-nix/. Complements the agent-behaviour standard in #786 (design only; no workflow changed)
  • Nix dev-environment strategy ADR (activation / shell definition / local services) (#794)
    • Added docs/rfcs/ADR-nix-devenv-strategy.md recording why the org uses pkgs.mkShell (via mkProjectShell) + nix-direnv and rejects devenv/numtide/devshell as the shared builder. Reframes the recurring "direnv vs devenv vs devshell vs mkshell" question as three separable axes — activation (nix-direnv vs nix develop), shell definition (mkShell vs devshell vs devenv), and local services (devenv up-style orchestration) — noting devenv couples the latter two, which is the source of the confusion. Ratifies axes 1–2 on the dev-shell↔image parity-SSoT constraint plus devenv's ~165s IFD cold-eval (measured, exo-pet/exo-fleet#76), and adopts process-compose + services-flake for local services, with the shared mkProjectServices helper tracked in #795. Authoritative for vig-os; a recommendation to exo-pet/exoma siblings. Cross-linked from docs/NIX.md (decision record; no code or workflow changed)
  • In-container .#devShellTools parity test (#754)
    • tests/test_image.py now reads the devTools toolchain SSoT straight from the flake (nix eval --json .#devShellTools.<system>, never a hardcoded list) and asserts every entry resolves on PATH inside the running image via command -v, parametrized per tool. Previously the SSoT was exercised only on the dev-shell side (tests/test_flake_devshell.py, skipped where the host lacks nix) while the image had a hand-curated check covering ~10 of the 27 tools — so adding a tool to devTools but not shipping it in the image went uncaught. This turns the SSoT into an actual image-side gate
  • Bake /etc/nix/nix.conf enabling nix-command/flakes and on-demand local builds (#739, #749)
    • The Nix-built image bundles CppNix but shipped no nix.conf, leaving the modern CLI's nix-command/flakes features disabled by default so ad-hoc on-demand tooling (nix shell nixpkgs#<x>, nix run, nix eval) failed without an explicit --extra-experimental-features flag. The buildLayeredImage bootstrap layer now writes /etc/nix/nix.conf with experimental-features = nix-command flakes and an empty build-users-group = so the in-image root/single-user/daemonless nix (which has no nixbld group) can do on-demand local builds — not just cache substitutions, e.g. a rust-overlay toolchain — instead of aborting with "the group 'nixbld' … does not exist" (the explicit substituters/trusted-public-keys are covered under Security, #773)
  • Consolidated docs/NIX.md Nix reference (#255)
    • Added a single onboarding/architecture doc for the flake: the devTools toolchain SSoT and the dev-shell ↔ image parity guard, the stable/unstable channel split + fast-mover overlay, the Nix-built (buildLayeredImage) reproducible multi-arch image, the CppNix-vs-Lix and pre-commit-vs-prek decisions, the vig-os Cachix direnv allow flow, how nixpkgs bumps flow (Renovate nix manager + vulnix before/after), and the T4.1 — Publish-cutover to the Nix image (GATED) #639 publish-cutover — cross-linking CONTRIBUTE.md, docs/NIX2CONTAINER.md, and docs/CONTAINER_SECURITY.md
  • In-container Nix runtime smoke test (#675)
    • The Nix Image (discovery) workflow now runs a self-contained, network-free smoke script (scripts/nix_runtime_smoke.sh) inside the built image to prove the baked Nix toolchain actually functions (not merely that it is present, which is all the portable testinfra suite checked): nix --version, direnv version, a real nix eval exercising the evaluator with nix-command/flakes, and a direnv allow/exec round-trip — gating the build/test job so a broken in-container nix/direnv fails CI
  • Nix flake quality gates (#674)
    • Added a formatter output (nixfmt-rfc-style) so nix fmt formats nix files idempotently, a nixfmt --check pre-commit hook (nixfmt sourced from the flake dev-shell), lightweight flake checks (format check, dev-shell build, devShellTools eval), and a nix flake check --accept-flake-config step in the CI project-checks job
  • Install/init delivery-mode picker (--mode devcontainer|direnv|both) (#641)
    • install.sh gained a --mode devcontainer|direnv|both flag (accepts both --mode X and --mode=X), validated up front and passed through to init-workspace.sh. Empty means "let init-workspace decide": the one-line install runs non-interactively and defaults to both (unchanged behaviour)
    • init-workspace.sh gained the same --mode flag plus an interactive prompt when the mode is unset and prompts are enabled (default selection both); under --no-prompts/--smoke-test with no --mode it defaults to both. After the rsync scaffold it prunes to the chosen mode: devcontainer removes the flake.nix + .envrc stub, direnv removes the .devcontainer/ scaffold, and both keeps everything (prune is idempotent and scoped to the new workspace)
  • Downstream minimal flake stub (non-overwriting) + nix2container production builder (#640)
    • Scaffold assets/workspace/flake.nix (a minimal stub consuming the shared toolchain as a flake input — vigos.url = github:vig-os/devcontainer, nixpkgs.follows = vigos/nixpkgs, vigos.lib.mkProjectShell + a placeholder extraPackages) and assets/workspace/.envrc (use flake via nix-direnv). Updating the dev environment is nix flake update vigos; it never overwrites user files
    • Added both to the PRESERVE_FILES never-overwrite class in init-workspace.sh (same guarantee as justfile.project) and committed the template .envrc (un-ignored in the template .gitignore, with .direnv//.envrc.local still ignored)
    • Documented the nix2container production-image pattern (docs/NIX2CONTAINER.md) with a buildable example (examples/nix2container-production/) that derives a minimal runtime image from the same pinned nixpkgs, plus a note on the future opt-in modular language shells
    • CI now gates the stub: a nix flake check ./assets/workspace --override-input vigos path:. step (and a tests/test_downstream_flake.py parity test) validates the scaffold against the working-tree toolchain, so an lib.mkProjectShell/overlays.default API change can't silently break a downstream direnv allow
  • vulnix + SBOM CVE scanning for the Nix image; re-authored security policy (#637)
    • Added a nightly scan-nix-image job that builds the image's package closure (new flake packages.devcontainerImageEnv) and runs vulnix (the nixpkgs-native CVE scanner) as the primary signal, since a Nix image has no apt/dpkg database for Trivy's OS scanner; Trivy stays on to emit a CycloneDX SBOM and an SBOM-mode vuln view (defence in depth), and both scanners' output is archived as vulnix-vs-Trivy overlap evidence
    • Added the vulnix-gate utility (packages/vig-utils) and the .vulnixignore exception register: a HIGH/CRITICAL finding (CVSS v3 ≥ 7.0) blocks only when it is not covered by a non-expired exception. .vulnixignore reuses the .trivyignore Expiration: format and the check-expirations validator (pre-commit + CI), and exposes a pinned packages.vulnix for reproducible scans. The gate is non-blocking during discovery and becomes the T4.1 — Publish-cutover to the Nix image (GATED) #639 go/no-go gate at cutover
    • Re-authored docs/CONTAINER_SECURITY.md for the Nix posture: dropped the apt --only-upgrade escape hatch and the "why not apt-get upgrade" section, made "advance the pinned nixpkgs rev" the primary CVE lever, and documented the dual .vulnixignore/.trivyignore registers and the residual Debian :latest scan until decommission (T4.4 — Decommission the Debian path #642)
  • Multi-arch Nix image (amd64 + arm64) discovery build (#636)
    • The Nix Image (discovery) workflow now builds packages.devcontainerImage natively on an amd64 (ubuntu-24.04) + arm64 (ubuntu-24.04-arm) matrix — no QEMU or cross-compilation — pushes per-arch discovery tags (nix-dev-amd64, nix-dev-arm64), and assembles a top-level multi-arch index (nix-dev) with docker buildx imagetools create, verifying both platforms via imagetools inspect
    • cachix-action runs with an auth token on every leg so the arm64 closure is pushed to the vig-os Cachix cache; the workflow stays continue-on-error and only touches the disposable nix-dev* tags — the versioned/:latest publish-cutover remains T4.1 — Publish-cutover to the Nix image (GATED) #639
  • Renovate nix manager for flake.lock maintenance (#638)
    • Enabled the Renovate nix manager and weekly lockFileMaintenance in renovate.json so flake inputs (notably nixpkgs) are bumped through the normal PR/CI gate; the existing pep621, npm, github-actions, and dockerfile managers are retained
    • Documented the compensating control in docs/CONTAINER_SECURITY.md: every flake.lock/nixpkgs-bump PR must include a vulnix before/after diff, since the nix manager reports only the input revision change and not which CVE a bump fixes
  • De-duplicate the flake into the toolchain SSoT (#631)
    • Factored a single devTools list in flake.nix as the source of truth shared by the dev-shell now and the image later, absorbing the agent-CLI toolkit (rg, fd, bat, eza, delta, lazygit, zoxide, starship, freeze, expect, nvim) plus claude (#545)
    • Pinned nixpkgs to nixos-25.05 and added a nixpkgs-unstable input overlaid only for fast-movers (uv, gh, claude-code); refreshed flake.lock
    • Added reusable flake outputs lib.mkProjectShell, overlays.default, and a packages.devcontainerImage stub for the later image build
    • Added a non-blocking Nix Cachix workflow (with workflow_dispatch) that builds the dev-shell and pushes its closure to the vig-os Cachix cache
    • Added a per-tool nix develop -c <tool> --version parity test driven from the flake SSoT to guard against future dev-shell/image drift
  • nix-direnv onboarding fast path (#633)
    • Switched .envrc from bare use flake to nix-direnv: the dev-shell evaluation is now GC-rooted and cached under .direnv/, so re-entering the directory is instant and the closure is never garbage-collected; nix-direnv self-bootstraps on first direnv allow and falls back to bare use flake when unavailable
    • Documented the clone → direnv allow onboarding flow, the vig-os Cachix substituter (binary fetch instead of from-source build on first allow), and enabling the nix-command/flakes experimental features in CONTRIBUTE.md (#255)
  • Build the devcontainer image with Nix (buildLayeredImage, non-publishing) (#634)
    • Fleshed out packages.devcontainerImage from a stub into a real, bit-reproducible image assembled by dockerTools.buildLayeredImage (not a Dockerfile FROM); a --rebuild verifies the closure hash is identical
    • Baked the in-container Nix evaluator (upstream CppNix, pkgs.nix) plus direnv/nix-direnv into the closure so nix/direnv are live inside the container; documented the CppNix-vs-Lix and pre-commit-vs-prek decisions in the flake
    • Reproduced the Debian bootstrap layers in Nix: locale via glibcLocales + LOCALE_ARCHIVE (no locale-gen), /root/assets, pre-commit cache dir, template .venv scaffold (UV_PYTHON_DOWNLOADS=never, UV_PYTHON=<nix python3.14>), the precommit/cc/cld aliases, and IS_SANDBOX=1
    • Added fakeNss (root uid-0 user database) and a sticky /tmp to close the first FHS gaps surfaced by the portable testinfra (fixing ssh, whoami, and tmux)
    • Added a non-publishing Nix Image (discovery) workflow (with workflow_dispatch) that builds the image and runs the portable testinfra under continue-on-error: true

Changed

  • BREAKING for consumers — this release is the Nix publish-cutover (#639, #625)
    • From this release on, the published image (:latest and every versioned tag) is the Nix-built image: pure-Nix userland with no apt/dpkg, a docker → podman shim (no Docker engine), and uv-managed CPython 3.14 (pin requires-python as a range, never an exact patch). See docs/MIGRATION.md for the full consumer contract
    • The final Debian-built release is 0.3.9; it stays pullable indefinitely but frozen (no CVE fixes). Rollback/stay-behind: pin DEVCONTAINER_VERSION=0.3.9 in the repo-root .vig-os
    • Heads-up: the next release cycle renames the project devcontainer → devkit, moving the image to a new GHCR package ghcr.io/vig-os/devkit (#781)
  • Scaffolded devcontainer verbs renamed up/down/… → devc-up/devc-down/… (#795, completed by #806)
    • The managed .devcontainer/justfile.devc namespaces its compose-stack verbs — devc-up, devc-down, devc-status, devc-logs, devc-shell, devc-restart, devc-open — so generic verb names stay free for project use (the new opt-in services recipe was the trigger: up was squatted by the devcontainer stack). The file is managed (replaced on upgrade), so consumers pick the rename up automatically on their next upgrade; muscle memory is the only breakage
    • The audit follow-up ([CHORE] Audit scaffold justfile recipes for compose-era leftovers post-#799/#795 #806) completes the namespacing: check → devc-check and devcontainer-upgrade → devc-upgrade (recipes, their hint strings, and the version-check.sh notification text), freeing the generic check name for project use
  • Git-hook runner migrated from pre-commit to prek (#778, closes #40)
    • The Rust prek (a faster, drop-in pre-commit replacement) is now the hook runner and joins the shared devTools SSoT, so it ships in both the dev-shell and the image; the standalone Python pre-commit is dropped from both — one fewer manylinux/FHS consumer in the image closure
    • The .githooks shims, scripts/init.sh (prek prepare-hooks), just precommit (prek run --all-files), the worktree setup (prek install), and the downstream scaffold now invoke prek; the baked hook cache is renamed PREK_HOME=/opt/prek-cache and the precommit shell alias runs prek run. The committed .pre-commit-config.yaml (root + scaffold) is unchanged and prek runs it as-is
    • The CI lint gate (.github/actions/test-project) now runs the whole committed hook suite via prek run --all-files (was uv run pre-commit run --all-files), so prek — not the Python pre-commit — is what CI validates against the impure hooks too; pre-commit==4.6.0 is removed from pyproject.toml + uv.lock (and the now-vestigial pre-commit- dev-shell PATH exclusion in setup-env is dropped), completing the "dropped from both" migration
    • Migration-completeness follow-ups: the committed check-yaml hook now passes --allow-multiple-documents in both the runner and checks.pre-commit so the Nix gate is no longer more lenient than the runner on multi-document YAML; the worktree prek install wires all three hook stages (-t pre-commit -t commit-msg -t prepare-commit-msg) so commit-msg / prepare-commit-msg hooks run in worktrees; and the downstream scaffold's remaining pre-commit/PRE_COMMIT_HOME references (CI env, container-ci-quirks.md, init-precommit.sh) are repointed at prek/PREK_HOME
  • Nix image bakes the build-time placeholder manifest so workspace init takes the fast path (#718)
    • The flake bootstrap layer now generates /root/assets/.placeholder-manifest.txt (the file init-workspace.sh reads next to itself) by grep-listing every workspace asset that carries a {{SHORT_NAME}}/{{ORG_NAME}}/{{GITHUB_REPOSITORY}} token, at its in-image runtime path and sorted for bit-reproducibility. Previously the Nix image shipped without the manifest, so init-workspace.sh always fell back to a slow runtime find+grep over the whole scaffold; the fast substitution path now fires. Output is unchanged (the fallback already produced correct results) — this is a startup-time optimization only
  • CI provisions every job from the Nix flake — the ad-hoc setup-env install path (and its hardcoded uv pin) is gone (#720)
    • The setup-env composite action is now flake-only: it always installs Nix + Cachix and enters the flake dev-shell, so CI and local nix develop run the exact same toolchain (uv, Python, just, taplo, BATS, linters). The provision-via-flake toggle and the ad-hoc install steps (astral-sh/setup-uv, actions/setup-python, taiki-e/install-action for just, the taplo curl, and bats-action) — with their now-removed install-python/python-version/install-just/install-taplo/install-bats inputs and the unused uv-version output — are deleted
    • Resolves the version drift ci: automate the uv version sync between flake.nix and setup-env #720 was filed for: the second, hardcoded uv pin (0.11.23) in setup-env is removed, so the provisioned uv version now flows from a single source — the flake's overlaid pkgs.uv.version in flake.lock. The lightweight security and release-orchestration jobs (which previously used the ad-hoc path) now pull the warm vig-os Cachix closure instead; security-scan.yml's Nix-image job drops its duplicate direct Nix/Cachix setup in favour of the shared action. Host-integration tools (podman, Node.js, the devcontainer CLI) keep their dedicated steps
  • nix fmt and the flake format gate now run treefmt (superseding the nixfmt-only formatter) (#777)
  • Image-closure Cachix push is now first-class and blocking on the trusted paths (#776)
    • Published images are now guaranteed cache-backed: on the trusted paths (push to dev and releases) the built image closure is pushed to the vig-os Cachix cache as a blocking step (nix path-info --recursive ./result | cachix push), so consumers substitute the exact pinned closure instead of rebuilding it from source. Previously the image closure only reached the cache incidentally (a non-blocking, discovery-only side effect of cachix-action)
    • .github/actions/build-image gained an opt-in push-image-closure input (default false) that performs the blocking push, guarded on a non-empty auth token — so per-PR CI stays pull-only and fork PRs (which lack CACHIX_AUTH_TOKEN) never fail. The release build-and-test job opts in; the Nix Image (discovery) workflow pushes each per-arch image closure on dev as the same blocking step (distinct from the still-non-blocking GHCR discovery tag push)
    • The release CVE gate (vulnix-gate) now also pushes the devcontainerImageEnv scan-target closure, so the vulnix scan surface is cache-backed too. Documented the guarantee in docs/NIX.md and docs/CONTAINER_SECURITY.md
  • Flake cheap-fix batch: darwin-guarded image outputs, single nixpkgs-unstable eval, uv downloads URL derived from version, Renovate wheel-hash rule, nixfmt over all *.nix (#774)
    • The Linux-only packages (devcontainerImage plus its devcontainerImageEnv/vulnix scan targets) are now exposed only on *-linux systems, so nix flake check --all-systems no longer aborts during the darwin dockerTools evaluation; the dev-shell stays cross-platform
    • nixpkgs-unstable is imported once per system and threaded into the fast-mover overlay, instead of being re-imported inside the overlay fixpoint on each application
    • UV_PYTHON_DOWNLOADS_JSON_URL is derived from pkgs.uv.version rather than a literal version pin, so it can no longer drift from the overlaid (floating) uv
    • Added a Renovate custom regex manager that tracks the pip-licenses wheel version pinned in flake.nix (the sha256/URL hash path is refreshed by hand when the bump PR lands)
    • The flake checks.format gate now runs nixfmt --check over every *.nix in the repo (source filtered to .nix files), not just flake.nix
  • Resync security-gate docs to reflect the blocking vulnix gate (#758)
  • Offline skip-guard for network-dependent image tests (#761)
    • The image tests that fetch over the network — test_uv_venv_workflow (uv add/uv sync from PyPI) and test_npm_global_install_resolves_on_path (npm install -g tsx from the npm registry) — now pytest.skip(...) when the host cannot reach the relevant registry instead of failing on an offline/air-gapped runner. A reusable _host_can_reach(host, hostname) probe (generalizing the existing _pypi_reachable PyPI check) backs the guards; online runs still execute the tests unchanged
  • Applied the still-relevant Renovate dependency updates (#625)
  • SECURITY.md describes the Nix image security posture (#642)
    • Replaced the stale Debian/Containerfile base-image pin, the "Trivy in CI/release" line, the 78 Debian LOW-CVE .trivyignore note, and the nine legacy BATS-npm GHSA exceptions (the framework now ships from the flake) with the current vulnix + CycloneDX SBOM scanning model and the .vulnixignore/.trivyignore dual register, mirroring docs/CONTAINER_SECURITY.md
  • README now describes the Nix-built image (#673)
    • Replaced the stale python:3.12-slim-trixie Debian base-image claim with the actual build: a Nix flake assembled via dockerTools.buildLayeredImage (no Debian/Docker base), with CPython 3.14 and the toolchain from a pinned nixpkgs, bit-reproducible
  • Make just init Nix-first (#671)
    • Rewrote scripts/init.sh from a multi-OS package installer into a Nix-first gate + bootstrapper: it requires Nix (and direnv, unless --no-direnv) and the dev-shell toolchain, then performs one-time, idempotent project bootstrap (uv sync --frozen --all-extras, git hooks path, commit-message template, pre-commit install-hooks) with advisory podman info / gh auth status checks. It no longer installs any tool — the toolchain is the flake's devTools — and short-circuits inside the built image (IN_CONTAINER=true)
    • Repointed docs/generate.py and the CONTRIBUTE.md.j2 template: the per-OS "Requirements" table is now a "Prerequisites: Nix + direnv + a working host container runtime" section, with the toolchain sourced from flake.nix
  • Nix image passes the full testinfra suite (toolchain parity) (#666)
    • Packaged vig-utils (and pip-licenses from its PyPI wheel, as it is not in nixpkgs) as Nix python packages exposed through a python314.withPackages env, and added ruff, bandit, cargo-binstall, just-lsp, and typstyle from nixpkgs — the Nix image now carries the project Python toolchain hermetically, replacing the Debian image's build-time uv pip install
    • Relaxed requires-python from ==3.14.6 to >=3.14,<3.15 across the root, vig-utils, and workspace-template pyprojects: flake.lock is the reproducibility anchor now, so the exact pin was redundant and unsatisfiable against nixpkgs (3.14.4)
    • Adapted tests/test_image.py to the Nix toolchain (version prefixes are nixpkgs-pinned, so fast-movers/mismatched tools are checked for presence/run only; the pre-commit cache dir is asserted present rather than pre-populated, since a hermetic build cannot fetch hook repos), taking the suite to 63/63 — and made the nix-image.yml build-and-test job gate on it (discovery phase closed)
  • Stage the Nix publish-cutover; advance the nixpkgs baseline to 26.05 (#639)
    • Bumped the pinned channel nixos-25.05 → nixos-26.05 (the "advance the rev" CVE lever), cutting the vulnix HIGH/CRITICAL surface 83 → 27 and Trivy HIGH 244 → 14 on the image; triaged the residual 27 into .vulnixignore (4 CPE-mismatch false positives — VS Code/Jenkins, not the binaries; 23 recent CVEs accepted as low-risk in an interactive dev container with a 3-month re-review)
    • Made the nightly vulnix-gate blocking (the T4.1 — Publish-cutover to the Nix image (GATED) #639 go/no-go gate) now that it is legitimately green, and archived the vulnix-vs-Trivy scan overlap in docs/security/nix-cutover-scan-overlap.md (zero overlap — disjoint surfaces, no finding class lost in the Debian→Nix switch)
    • Staged the publish-cutover so the versioned/:latest publish stays paused pending a deliberate Nix release: the nightly vulnix-gate is the go/no-go signal. The build pipeline became Nix-only once the Debian path was decommissioned (T4.4 — Decommission the Debian path #642), so no builder toggle remains — the interim builder: debian|nix selector this issue introduced was superseded by that decommission
  • Make .claude/ the single source of truth for agent rules and skills (#626)
    • Moved the 30 agent skills from .cursor/skills/ to .claude/skills/ and rewrote the 29 .claude/commands/*.md wrappers to point at the new paths
    • Split the seven .cursor/rules/*.mdc: static principles (coding principles, commit messages, changelog, single source of truth) are now consolidated in CLAUDE.md; workflow rules (branch-naming, tdd, subagent-delegation) became on-demand .claude/skills/
    • Ported agent-models.toml and worktrees.json to .claude/, updated the docs generator, pre-commit hooks, shell entrypoints, and the workspace sync manifest, and deleted the root .cursor/ directory
  • Drive autonomous worktree pipelines with the claude CLI (#627)
    • just worktree-start/worktree-attach now launch claude --dangerously-skip-permissions in the tmux session instead of cursor-agent (agent chat --yolo --approve-mcps); the cursor-specific directory-trust step and the tmux send-keys "a" approval trigger are no longer needed and have been removed
    • Prerequisite, authentication (claude auth status/claude auth login, ANTHROPIC_API_KEY), and scripts/requirements.yaml now reference the claude CLI rather than the Cursor Agent CLI
  • Migrate the workspace template and editor glue off Cursor (VS Code only) (#629)
    • New workspaces now scaffold .claude/ (skills, agent-models.toml, worktrees.json) instead of the removed .cursor/ template tree; the sync manifest carries the .claude/ payload accordingly
    • just open launches VS Code only (dropped the command -v cursor fallback), and verify-auth.sh no longer scans the cursor-remote-ssh SSH-agent socket
    • COMMIT_MESSAGE_STANDARD.md now refers to VS Code rather than "VS Code / Cursor"
  • Make the image testinfra suite portable across Debian and Nix images (#635)
    • Replace dpkg host.package(...).is_installed checks (git, curl, openssh-client, nano, tmux, rsync) with path-agnostic --version/-V runs
    • Resolve gh, just, hadolint, taplo and cargo-installed tools via PATH (command -v) instead of hardcoded /usr/local/bin / /root/.cargo/bin / /root/.local/bin locations
    • Drop the DEBIAN_FRONTEND environment assertion and the apt-sourced version-prefix checks (git, curl, tmux, rsync) from EXPECTED_VERSIONS
  • Provision CI build/test tooling from the flake dev-shell (#632)
    • The setup-env action gained a provision-via-flake mode that installs Nix (SHA-pinned install-nix-action) and the vig-os Cachix substituter, builds the flake dev-shell, and prepends its tools to PATH, replacing the ad-hoc installs of uv/Python, just, hadolint, and taplo
    • Enabled the mode in the CI build/test path (build-image, test-image, test-integration, project-checks) so jobs run inside the flake shell (the toolchain SSoT); podman, Node.js, BATS, and the devcontainer CLI keep their dedicated install paths
    • Set UV_PYTHON_DOWNLOADS_JSON_URL in the flake dev-shell so the nixpkgs uv (whose embedded Python-download list is stripped) can fetch the project's pinned CPython 3.14.6, which nixpkgs does not package, letting uv sync --frozen succeed under flake provisioning
    • Keep podman off the flake-provisioned PATH so the runner's rootless-configured host podman is used (the nix-store podman cannot reach the host's setuid newuidmap/newgidmap, so podman info failed)

Removed

  • Removed the sidecar / multi-container capability (#799)
    • Dropped the just sidecar/just sidecars recipes, the docker-compose.project.yaml sidecar examples, the sidecar test fixtures (sidecar.Containerfile, test-build.sh, the fixtures justfile, the test-sidecar compose service) and TestSidecarConnectivity, and hadolint from devTools (unused since the Containerfile lint hook was dropped in T4.4 — Decommission the Debian path #642; the deleted sidecar Containerfile was its last Dockerfile-like artifact)
    • Migration: use Nix devShells for toolchains and process-compose/services-flake (#795) for local services; the Docker-out-of-Docker socket for building containers is retained
  • Retire scripts/requirements.yaml (#671)
    • Deleted the per-OS dependency manifest and its consumers (the load_requirements/format_requirements_table/format_install_commands helpers in docs/generate.py and their tests). flake.nix devTools is now the single source of truth for the toolchain, ending the dual-SSoT drift
  • Decommission the Debian build path (#642)
    • Deleted the root Containerfile, scripts/prepare-build.sh, scripts/build.sh, and the .hadolint.yaml config (plus its synced workspace copy); the image now builds Nix-only
    • Removed the hadolint pre-commit hook and its setup-env/test-project install wiring, the hadolint and Containerfile entries from scripts/requirements.yaml and scripts/manifest.toml, and the Containerfile/build-script CODEOWNERS entries
    • build-image, release.yml, and ci.yml are now Nix-only
    • Dropped the Debian scan-latest nightly Trivy job, the ~78 Debian OS-package CVE entries from .trivyignore, and the Renovate dockerfile manager; docs/CONTAINER_SECURITY.md now reads as Nix-only
  • Remove the cursor-agent CLI install from the image (#628)
    • Dropped the unpinned curl … cursor.com/install build step and its /root/.local/bin PATH entry, leaving an all-nixpkgs toolchain ahead of the Nix migration
    • Removed the coupled test_cursor_agent_installed image test

Fixed

  • vulnix CVE scans survive nvd.nist.gov outages via a self-hosted NVD feed mirror (#870)
    • nvd.nist.gov is chronically throttled/unstable (upstream nix-community/vulnix#171): cold scan runs crawled the full NVD year-feed set for tens of minutes and failed with ReadTimeoutError/IncompleteRead, blocking both the nightly gate and the release publish gate. A dedicated public mirror, vig-os/nvd-mirror, now downloads the NVD 2.0 feed files (nvdcve-2.0-<6 years>.json.gz + modified) with resumable retry, validates them, and serves them on GitHub Pages — the only job that talks to NVD
    • security-scan.yml and the release.yml vulnix-gate now run vulnix --mirror https://vig-os.github.io/nvd-mirror/, fetching NVD data from a CDN-backed mirror instead of nvd.nist.gov, so an NVD outage can no longer fail a scan or block a release. The mirror also localizes the NVD-format dependency to one place should the feeds ever change
  • Renovate changelog automation no longer self-triggers an empty-commit loop and keeps the workspace mirror in sync (#863)
    • The changelog commit is pushed with a GitHub App token (which re-triggers workflows), but the build gated only on the PR author (permanently renovate[bot]) and never the pusher, and commit-action has no empty-diff guard — so the bot's own no-op commits fired fresh synchronize events without end (chore(deps): update github/codeql-action digest to 99df26d #862 accrued 150+ identical empty commits before the build was disabled by hand). The build now skips synchronize events raised by the changelog commit bot (github.event.sender.login), severing the loop
    • The automation committed only root CHANGELOG.md, leaving the scripts/manifest.toml mirror assets/workspace/.devcontainer/CHANGELOG.md stale so the sync-manifest gate failed on every Renovate PR; the build now mirrors the verbatim copy and commits both files
  • rc4 field-validation fix batch: direnv-mode commits, pipe-safe scripts, prune/typos/installer hardening (#859)
    • Scaffolded .githooks/* now use #!/usr/bin/env bash (hosts without /bin/bash, e.g. NixOS, could not run them) and accept the nix dev-shell (IN_NIX_SHELL) as a sanctioned commit environment — previously direnv-mode consumers could not commit at all (the guard demanded the container)
    • Restored the ${BASH_SOURCE[0]:-$0} pipe-safety fallback in the scaffolded lifecycle scripts (initialize/post-create/post-attach/version-check) — a regression from the 0.3.x scaffold caught by a consumer's own regression tests
    • --mode devcontainer no longer deletes a consumer's pre-existing flake.nix/.envrc (two real repos lost their own nix-direnv setup); the prune now only removes stub files the scaffold itself created, mirroring the [BUG] install.sh --mode direnv --force overwrites populated consumer files (pyproject.toml, .devcontainer/) #738 guard
    • The installer's final just sync is non-fatal when the preserved old-generation justfile.project predates the sync recipe (warns and points to MIGRATION.md instead of failing an otherwise complete scaffold)
    • The typos hook (repo + scaffold) passes --force-exclude so [files] extend-exclude applies to explicitly-passed staged files — three consumer repos hit garbage findings on committed binary artifacts (PDFs, SVGs, .bin fixtures)
    • docs/MIGRATION.md gained the field-validated "Upgrading an existing 0.3.x consumer" checklist (prek recipe migration, recipe renames, typos config precedence/shadowing, artifact excludes, name re-derivation)
  • Shipped consumer prepare-release.yml caps its PR body under GitHub's 65,536-char limit (#857)
    • fix(ci): cap prepare-release draft-PR body under GitHub's 65536-char limit #812 capped the PR body only in this repo's own workflow; the scaffolded consumer copy still interpolated the full frozen changelog section uncapped, so a consumer with a large release (the 0.4.0-rc3 smoke test seeds this repo's ~67k-char section) failed Create draft PR to main with GraphQL: Body is too long. The shipped workflow now applies the same line-boundary truncation with a pointer to the release branch's full CHANGELOG.md
  • Scaffold ships .typos.toml so the shipped typos hook passes out of the box (#855)
    • The scaffolded .pre-commit-config.yaml runs the typos hook, but the exception config stayed repo-local — consumers linted scaffold-shipped content (version-check.sh's Nd duration syntax, the synced changelog's "unexcepted" CVE-policy term) with zero exceptions and failed immediately, as the 0.4.0-rc2 smoke test showed. .typos.toml now syncs into the workspace template via scripts/manifest.toml, same as .yamllint/.pymarkdown
  • install.sh --version now pins the scaffolded .vig-os to the requested version (#852)
    • The Nix image bakes the release it was built from into the scaffolded .vig-os (correct for finals, where the repo pin is bumped at finalize — but stale for release candidates), and install.sh never wrote its --version into the scaffold. An RC install therefore pinned the previous release: the 0.4.0-rc1 smoke test scaffolded the new prek-era workspace pinned to the Debian 0.3.9 image and its CI lint failed with prek: command not found. install.sh now forwards an explicit --version as VIG_OS_VERSION and init-workspace.sh pins it in .vig-os post-scaffold; plain latest installs keep the baked pin
  • Release-lane Trivy scan aligned with the ratified awareness-only posture (#849)
    • release.yml's build-and-test Trivy step was the last Debian-era blocking scanner (exit-code: 1 with only .trivyignore), failing the candidate on embedded language-ecosystem HIGHs already triaged into .vulnixignore. Per the T3.1 — vulnix + SBOM CVE scanning; re-author security policy #637 decision the Nix image's blocking CVE control is the vulnix-gate; the step is now non-blocking (exit-code: 0, continue-on-error) with its table kept in the log as awareness signal, mirroring security-scan.yml and ci.yml
  • setup-env no longer flakes on a SIGPIPE race when listing the provisioned dev-shell PATH (#847)
    • The provisioning step's grep '^/nix/store' | head -50 summary runs under the runner's pipefail shell; once the dev-shell PATH topped 50 nix-store entries, head exiting early could SIGPIPE grep (exit 2) and fail the step — a scheduling race that killed a release build-and-test leg. sed -n '1,50p' consumes the whole stream and prints the same summary
  • Release lane fixed for the Nix stack: current runners + tolerated vulnix findings exit (#842)
    • release.yml's build-and-test matrix still pinned Debian-era ubuntu-22.04/ubuntu-22.04-arm runners, whose podman 3.4.4 breaks rootless volume UID mapping — init-workspace.sh's in-container rsync failed to chmod the /workspace scaffold (Operation not permitted), killing the integration tests that pass everywhere else on ubuntu-24.04 (podman 4.9.3). The matrix now uses the same ubuntu-24.04/ubuntu-24.04-arm expression as nix-image.yml
    • The release Run vulnix step missed security-scan.yml's || rc=$? capture, so under the runner's bash -e a normal exit 2 (findings present, to be judged against .vulnixignore) aborted the step before the vulnix-gate ran. The step now uses the nightly's capture/retry pattern (crashes with exit > 2 or invalid JSON still fail loudly)
  • Release pipeline no longer fails when the release changelog exceeds GitHub's PR-body limit (#810)
    • The Create draft PR to main step passed the entire frozen changelog section as the PR body; GitHub caps PR bodies at 65,536 characters, so a large release (e.g. 0.4.0 at ~64k chars) overflowed with GraphQL: Body is too long and the release rolled back. The step now caps the body, truncating the changelog at a line boundary and pointing to the full CHANGELOG.md on the release branch when it would overflow; small releases still inline the whole changelog unchanged
    • The same uncapped rebuild existed in release.yml: the finalize-path Refresh release PR body from finalized changelog step (which would have crashed the final release run mid-finalize and triggered rollback) and the rollback-path Restore release PR body step. Both now apply the same cap
  • Scaffold justfile audit: worktree recipes reachable, compose docs de-stale'd (#806)
    • The scaffold root justfile now imports .devcontainer/justfile.worktree (import?, so direnv-mode workspaces still parse): the shipped .claude worktree skills invoke just worktree-start, but nothing imported the recipes, so they were unreachable in consumer repos
    • The shipped .devcontainer/README.md no longer documents the long-removed docker-compose.override.yml(.example) workflow; it now describes the real layering (docker-compose.project.yaml team-shared / docker-compose.local.yaml personal) that [CHORE] Drop the sidecar / multi-container capability entirely #799 deliberately kept
    • Dropped a vacuous image-test assertion on a docker-compose.local.yml (.yml) spelling nothing ships, and aligned the dev-env ADR's illustrative services verb with the shipped just services recipe. The audit found no other compose-era leftovers: the repo-root justfiles are clean and the project/local compose layering is intentional
  • Review-nit batch: dry-run/scaffold-guard, summary cancel handling, help/message fixes (#759)
    • install.sh --dry-run now derives the shown command from the real CMD array via printf '%q' (no hand-maintained duplicate string), and the automatic "initial project scaffold" commit is guarded so it only runs for a freshly scaffolded (empty) target instead of sweeping a pre-populated directory
    • release.yml now treats a cancelled required job as not-green (it triggers rollback like a failure), so a cancellation can no longer leave a partial release un-rolled-back
    • version-check.sh help text corrected (And (days) → Nd (days)), and init.sh now reports "Pre-commit hook environments installed" (the install-hooks step only fetches hook environments)
  • Restore arm64 image-testing coverage post-merge (#760)
    • nix-image.yml (the only lane that builds + runs the portable testinfra suite natively on arm64) was push-filtered to the migration epic branch only, so once it merges the arm64 image would no longer be exercised on the integration branch — PR CI (ci.yml) builds and tests amd64 only. Added dev to the workflow's push: branch filter (keeping the existing flake.nix/flake.lock/workflow paths: guard) so the native amd64 + arm64 build/test matrix keeps running on dev post-merge
  • release.yml publish retags the loaded Nix image tag (#752)
  • install.sh --skip-pull works under docker; ci.yml runs safety via uv run (#757)
    • install.sh checked for a present local image with the podman-only $RUNTIME image exists, which docker lacks, so --skip-pull always failed under docker; it now uses $RUNTIME image inspect, which works on both runtimes
    • The CI safety dependency scan was invoked bare instead of via uv run, so it ran outside the uv env (unlike the adjacent uv run bandit); it now runs via uv run safety
  • Dev-shell exposes python3 + pre-commit (image parity), CI-safely (#729)
    • mkProjectShell now ships a bare python3/pre-commit on PATH so the downstream flake-input/direnv dev-shell matches the image. setup-env filters the Nix python3-<ver> (and pre-commit) out of the forwarded CI runner PATH so uv keeps building the project venv from the downloaded managed CPython. No new LD_LIBRARY_PATH, so the Nix dev-shell leaks the Nix C++ runtime onto LD_LIBRARY_PATH, breaking just on non-NixOS hosts #703 FHS leak-guard is intact. A nix develop --ignore-environment parity test (and the FHS leak-guard) now run in the Project Checks job
  • Nix image runs pre-compiled PyPI (manylinux) wheels at runtime (arch-aware FHS loader + baked LD_LIBRARY_PATH) (#736)
    • The bare dockerTools.buildLayeredImage shipped neither the FHS dynamic loader (the PT_INTERP every manylinux wheel hardcodes) nor the Nix C++/compression runtime on the loader path, so runtime-installed PyPI binaries broke: standalone tools (consumer pre-commit configs pinning PyPI ruff/typos) aborted with cannot execute: required file not found, and C extensions dlopened by the baked CPython (numpy/scipy, pre-commit pymarkdown's pyjson5) failed with ImportError: libstdc++.so.6
    • The image now ships an architecture-aware FHS loader (/lib64/ld-linux-x86-64.so.2 on x86_64, /lib/ld-linux-aarch64.so.1 on aarch64 — the loader name and FHS dir are derived from the build platform, so the arm64 build passes test_fhs_loader_exists) symlinked to the Nix glibc loader (newer glibc runs the old-glibc wheels via backward compatibility), and bakes LD_LIBRARY_PATH with ${stdenv.cc.cc.lib}/lib (libstdc++/libgcc_s) + ${zlib}/lib (libz) so both standalone wheel executables and C-extension .so files dlopened by the store CPython resolve their runtime libs. This is the image-scope analogue of the dev-shell #698 fix, but ungated: an all-Nix container has no foreign FHS host binaries to pollute, so the /etc/NIXOS ABI gate never applies
  • Nix image bakes the template /root/assets/workspace/.venv (renameable prompt) (#735)
    • The image advertised UV_PROJECT_ENVIRONMENT/VIRTUAL_ENV at /root/assets/workspace/.venv but never created it (the Debian image did). The published 0.3.x consumer post-create.sh runs sed -i .../.venv/bin/activate as its first venv step and aborted under set -euo pipefail (exit 2) when the file was missing — so git setup, gh auth, pre-commit install, and just sync never ran. The flake bootstrap layer now pre-creates the venv from the baked CPython (matching the advertised env vars, hermetic and network-free with no packages — just sync populates it), and normalizes the activate VIRTUAL_ENV_PROMPT to the quoted "template-project" form the consumer post-create.sh rename targets (so the prompt rename no longer no-ops)
  • docker now resolves in the Nix-built image (podman compatibility shim) (#740)
    • The image shipped podman but no docker binary, while the consumer .devcontainer/docker-compose.yml mounts the socket at /var/run/docker.sock and sets DOCKER_HOST/CONTAINER_HOST. Docker-out-of-Docker worked because podman honors DOCKER_HOST, but any recipe/script invoking docker literally failed with command not found. The bootstrap layer now bakes a tiny docker -> podman wrapper at /usr/local/bin/docker (already on the baked PATH) that execs the baked podman, so docker-literal callers get a working binary without pulling in the Docker engine
  • install.sh --mode direnv --force no longer clobbers a populated consumer repo (#738)
    • Re-initializing an existing project in direnv mode deployed the full workspace template over it: the scaffold rsync overwrote a real pyproject.toml with the generic template one, and copied the template .devcontainer/ before the mode prune deleted the directory wholesale — destroying tracked files (devcontainer.json, project compose files, …). pyproject.toml is now in the never-overwrite PRESERVE_FILES class, and direnv mode excludes .devcontainer/ from the copy and skips the prune when a populated .devcontainer/ predates the (re)scaffold, so real project files survive untouched. --force still deploys the Nix/direnv stub (flake.nix, .envrc, .vig-os) onto repos that lack it
    • install.sh no longer prints a misleading User configuration script not found … copy-host-user-conf.sh warning in direnv mode, which scaffolds no .devcontainer/ and therefore has no host-user-conf step to run
  • /usr/bin/env now exists in the Nix-built image (#727)
    • The bare dockerTools.buildLayeredImage had no /usr/bin at all, so the ubiquitous #!/usr/bin/env <interp> shebang failed with /usr/bin/env: bad interpreter: No such file or directory — breaking essentially every Node/Python/Ruby CLI (e.g. node_modules/.bin/tsc) for image-mode consumers. Added dockerTools.usrBinEnv (the FHS shim symlinking /usr/bin/env to coreutils env) to the image package set, alongside the existing fakeNss shim
  • npm install -g now lands CLIs on PATH in the Nix image (#728)
    • npm's default global prefix was the read-only nodejs nix-store path, whose bin/ is not on PATH — so npm install -g <tool> reported success but the binary was unresolvable (command -v <tool> failed). The image now bakes NPM_CONFIG_PREFIX=/usr/local (already on the baked PATH) and creates a writable /usr/local/bin in the bootstrap layer, so globally installed CLIs resolve on PATH
  • init-workspace --mode direnv now produces a loadable justfile (#641)
    • The scaffolded root justfile hard-imported .devcontainer/justfile.devc and .devcontainer/justfile.gh, but direnv mode prunes .devcontainer/ — so every just command (including init-workspace's own final just sync) failed to parse in a direnv-mode workspace. Made the two .devcontainer/ imports optional (import?, matching justfile.project/justfile.local); the sync recipe lives in the preserved justfile.project, so just sync still works in all modes
  • Worktree recipes read agent config from the .claude/ SSoT (#627)
    • The Cursor→Claude migration swapped the launch command but left justfile.worktree reading the removed .cursor/ tree: a dead _read_model helper pointed at .cursor/agent-models.toml, and the branch-naming rule passed to derive-branch-summary was .cursor/rules/branch-naming.mdc. Removed the unused helper and repointed the rule at .claude/skills/branch-naming/SKILL.md; trimmed the stale .cursor/ wording from the sync-manifest comment. Added worktree-claude-cli.bats / test_claude_ssot.py guards against entrypoints reading removed .cursor/ config paths
    • derive-branch-summary (invoked by just worktree-start to name an unlinked branch) still shelled out to the removed cursor-agent binary (agent --print --yolo --trust); with no test exercising the non-BRANCH_SUMMARY_CMD path it slipped through CI. It now drives claude --print --dangerously-skip-permissions, and agent-models.toml tiers map to claude model aliases (haiku/sonnet/opus) instead of Cursor names (composer-1.5/sonnet-4.5/opus-4.6) so --model resolves
  • Integration tests now exercise the freshly-built image, not the published DEVCONTAINER_VERSION (#701)
    • The integration suite scaffolded a workspace from the image under test (TEST_CONTAINER_TAG) but then brought the devcontainer up from whatever DEVCONTAINER_VERSION resolved to (the published 0.3.9), so it validated fresh scaffolding running inside a stale image. The devcontainer_up/devcontainer_with_sidecar fixtures now export DEVCONTAINER_VERSION=TEST_CONTAINER_TAG; compose reads the shell environment over .env, so the scaffolded docker-compose.yml resolves to the build under test (and every devcontainer exec, which inherits the environment, agrees). Added test_devcontainer_runs_image_under_test asserting the running container's image
  • Dev-shell resolves pymarkdown's pyjson5 libstdc++ on NixOS without breaking just on FHS hosts (#698, #703)
    • The pymarkdown hook runs from pre-commit's own manylinux-wheel Python env, whose dependency pyjson5 is a C extension linked against libstdc++.so.6; on a NixOS host that library is off the loader path outside an FHS environment, so the hook aborted with ImportError: libstdc++.so.6 and forced --no-verify. Unlike the standalone binaries in #697, pymarkdown is not in nixpkgs, so the "add to devTools + language: system" recipe does not apply
    • mkProjectShell now appends the Nix C++ runtime (${stdenv.cc.cc.lib}/lib, libstdc++) to LD_LIBRARY_PATH only on NixOS ([ -e /etc/NIXOS ]), where it is both required (libstdc++ is off the default loader path) and ABI-safe (the system glibc is the Nix glibc). On an FHS host the system loader resolves libstdc++ and nothing is exported — avoiding the GLIBC_ABI_DT_X86_64_PLT not found breakage an unconditional export caused in host just/bash recipes (whose #!/usr/bin/env bash, plus anything /etc/ld.so.preload forces libstdc++ into, were dragged onto the Nix C++ runtime built against a newer glibc). The dev-shell parity tests are gated to NixOS and an FHS leak-guard (test_devshell_no_nix_cxx_runtime_leak_on_fhs_host) was added
  • pre-commit ruff/ruff-format/typos hooks now run on NixOS hosts (sourced from the flake) (#697)
    • The ruff, ruff-format, and typos hooks pulled compiled tools as generic-linux (manylinux) wheels from astral-sh/ruff-pre-commit and crate-ci/typos; a NixOS host cannot execute those binaries out of the box (no FHS ld-linux), forcing --no-verify on every local commit
    • Added ruff and typos to the flake devTools SSoT and converted the three hooks to repo: local / language: system (ruff check --fix, ruff format, typos), so they resolve their tool from the Nix dev-shell like the other local hooks — no host setup needed inside the dev-shell. Hook versions now track nixpkgs/flake.lock (Renovate nix manager) instead of upstream rev: pins, consistent with the [MASTER] Migrate devcontainer to a Nix toolchain + Claude-native setup #625 toolchain consolidation. The scaffolded assets/workspace/.pre-commit-config.yaml is language: system as well (no upstream-hook decoupling — downstream workspaces resolve the tools from the toolchain baked into the image)
    • Removed ruff from the project's uv dependency groups (pyproject.toml/uv.lock) and repointed just lint/just format to the flake ruff (dropping uv run). Otherwise the venv's ruff (a manylinux wheel) shadowed the flake ruff under uv run — which is how the .githooks/pre-commit hook and the just recipes invoke it — so ruff stayed broken on NixOS; the flake is now the single ruff source (its [tool.ruff] config is unchanged)
    • Declared PATH in the devcontainer image's OCI config.Env. buildLayeredImage symlinks the toolchain into /bin but set no PATH; podman run injects a default (so it worked), but docker-compose / devcontainer exec inherit config.Env verbatim, leaving the baked toolchain off PATH so language: system hooks could not resolve. Added an image test asserting the OCI config declares a PATH containing /bin
  • BATS suite no longer fails locally on the Nix toolchain (helper libraries unresolved) (#695)

Changelog truncated to fit GitHub's 65000-char PR-body limit; see CHANGELOG.md on release/0.4.0 for the full entry.

c-vigo and others added 30 commits June 24, 2026 17:07
The class-scoped install_workspace fixture was defined as an instance
method, which pytest 9 flags with PytestRemovedIn10Warning and pytest 10
removes outright — a future pytest bump would then error at collection
and take out the whole install-script integration suite. The fixture
never referenced self, so convert it to a @staticmethod, preserving the
class-scope (run install.sh once per class) behaviour.

Refs: #691
The .githooks/{pre-commit,commit-msg,prepare-commit-msg} hooks hardcoded
#!/bin/bash. Like the host scripts fixed in #690, these run on the host and
fail on NixOS (no /bin/bash), so git cannot exec them and every commit aborts
with 'cannot exec: No such file or directory'. Switch to the portable
#!/usr/bin/env bash form.

Refs: #690
The session-scoped initialized_workspace fixture waited only 30s for the
'Workspace initialized successfully' banner after 'Syncing dependencies'.
That window covers 'just sync' (uv sync --all-extras) downloading the
test-project's heavy scientific extras (numpy, scipy, pandas, matplotlib,
jupyter) with no warm uv cache, so a cold/slow network times out and the
failure cascades to every dependent test as an ERROR at setup.

Raise the completed-stage timeout to a generous default (300s) and make it
overridable via INIT_DEPS_SYNC_TIMEOUT for fast-cache/CI tuning.

Refs: #692
## Description

Resolves the `PytestRemovedIn10Warning` emitted by the install-script
integration suite. The class-scoped `install_workspace` fixture was
defined as an instance method — a pattern pytest 9 deprecates and pytest
10 **removes**. Since the project pins `pytest==9.1.1`, a future
Renovate/Dependabot bump to pytest 10 would error at collection and take
out the entire `TestInstallScriptIntegration` suite. This converts the
fixture to a `@staticmethod` (it never used `self`), keeping the
class-scope "run `install.sh` once per class" behaviour.

## Type of Change

- [x] `fix` -- Bug fix
- [x] `test` -- Adding or updating tests

### Modifiers

- [ ] Breaking change (`!`)

## Changes Made

- `tests/test_install_script.py`:
`TestInstallScriptIntegration.install_workspace` is now a
`@staticmethod` fixture (dropped the unused `self`);
`@pytest.fixture(scope="class")` and the body are otherwise unchanged.
The 17 tests already consume it via the fixture parameter, so no
test-method changes were needed.
- `CHANGELOG.md` (+ manifest-synced
`assets/workspace/.devcontainer/CHANGELOG.md`): added a `### Fixed`
entry under `## Unreleased`.

## Changelog Entry

```
### Fixed

- **Install-script test suite no longer trips a pytest-10-removal deprecation (class-scoped fixture as instance method)** ([#691](#691))
  - `TestInstallScriptIntegration.install_workspace` was a class-scoped fixture defined as an instance method, which pytest 9 flags with `PytestRemovedIn10Warning` and pytest 10 removes — a future `pytest` bump would then error at collection and take out the whole install-script suite. Converted it to a `@staticmethod` (it never used `self`), preserving the class-scope "run `install.sh` once per class" behaviour; verified with `-W error::pytest.PytestRemovedIn10Warning`
```

## Testing

- [x] Tests pass locally (`just test` — relevant subset)

### Manual Testing Details

Verified RED → GREEN with the deprecation escalated to an error so the
warning is enforced, not merely observed:

```bash
TEST_CONTAINER_TAG=dev uv run pytest tests/test_install_script.py \
  -W error::pytest.PytestRemovedIn10Warning -p no:cacheprovider
```

- **Before:** `1 error` — `pytest.PytestRemovedIn10Warning: Class-scoped
fixture defined as instance method` at fixture setup.
- **After:** `23 passed` — no `PytestRemovedIn10Warning`.

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [x] New and existing unit tests pass locally with my changes

## Additional Notes

Committed from a NixOS host worktree. Three pre-commit hooks cannot
execute on a bare NixOS host (the documented #683-class dynamic-linking
limitation — they run in the Debian container / CI): `typos` and `ruff`
(downloaded binaries) and `pymarkdown` (manylinux `libstdc++`
C-extension). They were skipped for the local commit but independently
validated and/or re-enforced by CI:

- `ruff check` + `ruff format --check` on the changed file — **clean**
via store-native `nix run nixpkgs#ruff`.
- `typos` on the changed files — **clean** via store-native `nix run
nixpkgs#typos`.
- `pymarkdown` — deferred to CI (the change is a format-matching
CHANGELOG entry).
- All runnable hooks (incl. `validate-commit-msg`, `bandit`, `check
agent identity`, `sync-manifest`) ran and passed; `--no-verify` was
**not** used.

Refs: #691
…git-hook shebangs) (#694)

## Summary

Fixes the flaky `initialized_workspace` testinfra fixture that timed out
during
`uv sync`, cascading an `ERROR at setup` to every dependent test. Folds
in a
companion portability fix for the git hooks (same `#!/bin/bash`-on-NixOS
class as
#690), without which commits cannot run on a NixOS host.

Sub-issue of the #625 Nix migration epic; targets the epic branch
`feature/625-nix-claude-migration`.

## Changes

### `test(setup)` — init dep-sync timeout (Closes #692)
- The fixture allowed only **30s** for the `Workspace initialized
successfully`
  banner after `Syncing dependencies`. That window covers `just sync`
(`uv sync --all-extras`) downloading the test-project's heavy scientific
extras
(`numpy`, `scipy`, `pandas`, `matplotlib`, `jupyter`) with **no warm uv
cache**,
  so a cold/slow network times out mid-download.
- Raise the completed-stage timeout to a generous **300s** default,
overridable
  via `INIT_DEPS_SYNC_TIMEOUT` for fast-cache/CI tuning.

### `fix(setup)` — portable git-hook shebangs (Refs #690)
- `.githooks/{pre-commit,commit-msg,prepare-commit-msg}` hardcoded
`#!/bin/bash`.
Like the host scripts fixed in #690, these run on the host and fail on
NixOS
(no `/bin/bash`): `fatal: cannot exec '.githooks/pre-commit': No such
file or
  directory`. Switched to portable `#!/usr/bin/env bash`.

## Verification

- Python syntax + `INIT_DEPS_SYNC_TIMEOUT` env override resolve
correctly
  (verified via `uv run python`).
- Longest added line = 80 chars (< the 88 `line-length`), so `ruff` is
clean.
- pre-commit ran green for every hook that can execute on the host
(shellcheck,
bandit, agent-identity, branch-name, commit-msg validation,
sync-manifest).
- `ruff`/`ruff-format`/`typos` cannot execute on this NixOS host
(dynamically
linked binaries — the very limitation #625 addresses) and were skipped
locally
via pre-commit `SKIP`; **CI enforces them on this PR**. No `--no-verify`
used.

## Notes

The durable fix (warming the uv cache in the Nix-built image so `uv
sync` is
offline-fast) belongs to the #634/#635 image track and is out of scope
here.

Closes #692
The direnv prerequisite promised the flake dev-shell loads automatically
on cd but never documented installing direnv's shell hook, the step that
behaviour depends on. Without the hook, direnv allow succeeds yet nothing
activates on cd and the host silently falls back to system tooling (e.g.
an old Node that breaks just test-renovate). Document the hook in the
prerequisites table and as a fast-path note, with nix develop as the
hook-free fallback.

Refs: #633
Add bats wrapped with its helper libraries (bats-support, bats-assert,
bats-file) to the devTools SSoT and export BATS_LIB_PATH in the dev-shell
and the image so bats_load_library resolves the helpers from the Nix
store. The npm (node_modules) and Debian (/usr/lib) resolution paths do
not exist on the Nix toolchain, which broke the local BATS suite.

Refs: #695
Switch every BATS consumer to the flake-provided bats:
- test_helper.bash resolves the helper libraries via bats_load_library
  (BATS_LIB_PATH from the flake), dropping the node_modules and /usr/lib
  branches.
- just test-bats invokes the flake bats instead of npx bats.
- remove the now-unused bats* npm dependencies from package.json/lock.
- setup-env skips the ad-hoc bats-action under flake provisioning (the
  flake provides bats); the action remains for non-flake callers.

Refs: #695
## Description

On the Nix toolchain the local BATS suite failed completely — 246 tests,
246
failures — every `.bats` file erroring in `setup()` with
`Could not find library 'bats-support'`. `tests/bats/test_helper.bash`
resolved
the helper libraries (`bats-support`/`-assert`/`-file`) from
`node_modules`
(npm) or the now-removed Debian `/usr/lib` path; on the Nix dev-shell
neither
exists, `BATS_LIB_PATH` was unset, and `just test-bats` ran `npx bats`,
which
fetches only `bats-core` (not the helpers).

This PR makes BATS come from the flake (the toolchain SSoT): `bats`
wrapped with
its helper libraries is added to `devTools`, and `BATS_LIB_PATH` is
exported in
the dev-shell and image so `bats_load_library` resolves the helpers from
the Nix
store. Consumers are switched to the flake `bats` and the unused `bats*`
npm
dependencies are removed.

## Type of Change

- [ ] `feat` -- New feature
- [ ] `fix` -- Bug fix
- [ ] `docs` -- Documentation only
- [ ] `chore` -- Maintenance task (deps, config, etc.)
- [ ] `refactor` -- Code restructuring (no behavior change)
- [ ] `test` -- Adding or updating tests
- [ ] `ci` -- CI/CD pipeline changes
- [x] `build` -- Build system or dependency changes
- [ ] `revert` -- Reverts a previous commit
- [ ] `style` -- Code style (formatting, whitespace)

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

- **`flake.nix`** — add `batsWithLibs` (bats wrapped with
`bats-support`,
`bats-assert`, `bats-file`) to the `devTools` SSoT; export
`BATS_LIB_PATH` in
  the dev-shell (`mkProjectShell`) and the image env.
- **`tests/bats/test_helper.bash`** — resolve the helpers via
`bats_load_library` (`BATS_LIB_PATH` from the flake); drop the
`node_modules`
  and `/usr/lib` branches.
- **`justfile`** — `test-bats` invokes the flake `bats` instead of `npx
bats`.
- **`package.json` / `package-lock.json`** — remove the now-unused
`bats`,
  `bats-support`, `bats-assert`, `bats-file` dependencies (keeps
  `@devcontainers/cli`).
- **`.github/actions/setup-env/action.yml`** — skip the ad-hoc
`bats-action`
and `BATS_LIB_PATH` export under `provision-via-flake` (the flake
provides
bats); the action remains for non-flake callers. Updated the related
comments.
- **`tests/test_flake_devshell.py`** — add parity tests asserting the
flake
provides `bats` and that `BATS_LIB_PATH` exposes the three helper
libraries.
- **`CHANGELOG.md`** (+ synced `.devcontainer` copy) — Fixed entry.

## Changelog Entry

### Fixed

- **BATS suite no longer fails locally on the Nix toolchain (helper
libraries unresolved)**
([#695](#695))
- `tests/bats/test_helper.bash` resolved the BATS helper libraries
(`bats-support`/`-assert`/`-file`) from `node_modules` (npm) or the
now-removed Debian `/usr/lib` path; on the Nix toolchain neither exists
locally, so every `.bats` file errored in `setup()` (`Could not find
library 'bats-support'`) and all 246 tests failed
- Added `bats` wrapped with its helper libraries to the flake `devTools`
SSoT and exported `BATS_LIB_PATH` in the dev-shell and image, so
`bats_load_library` resolves the helpers from the Nix store; simplified
`test_helper.bash` to that single path, switched `just test-bats` to the
flake-provided `bats`, and removed the now-unused `bats*` npm
dependencies. CI provisions BATS from the flake under
`provision-via-flake` (the ad-hoc `bats-action` steps now run only for
non-flake callers)

## Testing

- [x] Tests pass locally (`just test`)
- [x] Manual testing performed (describe below)

### Manual Testing Details

- `nix develop --command just test-bats` with `node_modules` removed:
**246/246
  pass** via the flake `bats` (previously 246/246 failed).
- `uv run pytest tests/test_flake_devshell.py`: **6 passed** (includes
the new
  bats parity tests and `bats --version` running inside `nix develop`).
- `shellcheck -x tests/bats/test_helper.bash`: clean.
- `nixfmt flake.nix`: clean; `nix eval` of `devShells`,
`packages.devcontainerImage`,
  and `checks` all evaluate.
- `jq empty package.json package-lock.json` and `yamllint` on the
action: clean.

> Note: pre-commit's `ruff`/`typos` hooks cannot execute on the NixOS
host
> (manylinux binaries, no `nix-ld`), so those file hooks were not run
locally;
> `ruff check`/`ruff format --check` were verified via the Nix-native
`ruff`.
> CI re-runs the full pre-commit suite.

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Additional Notes

Sub-issue of the Nix migration epic #625; PR targets the epic branch
`feature/625-nix-claude-migration`. The remaining `npx bats` references
in
`docs/issues/` and `docs/pull-requests/` are archived issue/PR records
and were
intentionally left unchanged.

Refs: #695
…lake

Add ruff and typos to the flake devTools SSoT and convert the ruff,
ruff-format, and typos pre-commit hooks to repo: local / language: system
so they resolve their tool from the Nix dev-shell instead of upstream
manylinux wheels, which a NixOS host cannot execute. Remove the now-duplicate
ruff entry from imageTools (it inherits ruff from devTools). Re-sync the
scaffolded assets/workspace/.pre-commit-config.yaml and the CHANGELOG copy.

Refs: #697
The pymarkdown pre-commit hook runs from pre-commit's own manylinux-wheel
Python env, whose dependency pyjson5 is a C extension linked against
libstdc++.so.6. On a NixOS host that library is not on the loader path
outside an FHS environment, so the hook failed with an ImportError and
forced --no-verify. pymarkdown is not in nixpkgs, so the #697
"devTools + language:system" recipe does not apply.

mkProjectShell now appends ${pkgs.stdenv.cc.cc.lib}/lib to
LD_LIBRARY_PATH in the dev-shell (the same libstdc++ the Nix toolchain
links, so no version clash), preserving any mkShell-injected value.
Documented in docs/NIX.md.

Refs: #698
The venv's ruff (a manylinux wheel) shadowed the flake ruff under
`uv run` — which is how .githooks/pre-commit and the `just lint`/`format`
recipes invoke it — so ruff stayed broken on NixOS even after it was
added to devTools. Remove ruff from the uv dependency groups
(pyproject.toml/uv.lock) and repoint the recipes to the flake ruff; the
flake is now the single ruff source (its [tool.ruff] config is unchanged).

Refs: #697
…lake (#699)

Source ruff, ruff-format and typos from the flake (devTools + language:system hooks) and make the flake the single ruff source (removed from the uv venv; just lint/format repointed) so they run on NixOS hosts.

Refs: #697
…' into bugfix/698-pymarkdown-nixos

# Conflicts:
#	CHANGELOG.md
#	assets/workspace/.devcontainer/CHANGELOG.md
…ixOS (#700)

Append ${pkgs.stdenv.cc.cc.lib}/lib to LD_LIBRARY_PATH in mkProjectShell so pre-commit's pyjson5 C extension (pymarkdown) resolves libstdc++ on NixOS.

Refs: #698
Removing ruff from the lint dependency-group (#697) shortened the array
enough for taplo to collapse it to a single line. That commit used
--no-verify (pre-commit could not run on NixOS then), so the taplo-format
hook only caught it in CI on #670. Apply taplo formatting.

Refs: #697
buildLayeredImage symlinks the toolchain into /bin but set no PATH in the
image config. podman run injects a default PATH (so it worked), but
docker-compose / devcontainer exec inherit config.Env verbatim, leaving
the baked toolchain off PATH. After #697 made ruff/typos language:system
hooks, an in-container git commit failed with Executable not found. Declare
PATH explicitly and add an image test asserting the OCI config carries it.

Refs: #697
…ooks

#699 converted ruff/ruff-format/typos to repo-local language:system hooks
and synced that into the scaffolded config. A downstream workspace commits
inside the published image without the flake toolchain on PATH, so those
hooks fail with "Executable not found" (the integration suite caught this
on the typos hook). Add a ReplacePrecommitRepoBlock sync-manifest transform
that restores self-contained upstream ruff/typos hooks in the scaffolded
config only; the repo's own config keeps language:system for NixOS-host dev.

Refs: #697
The integration suite scaffolds from the freshly-built image but
`devcontainer up` resolves the runtime image from DEVCONTAINER_VERSION,
so it validates fresh scaffolding inside the stale published image. Add
a regression test asserting the running devcontainer uses the image
under test (TEST_CONTAINER_TAG).

Refs: #701
The devcontainer_up/devcontainer_with_sidecar fixtures scaffolded a
workspace from the freshly-built image but let `devcontainer up` resolve
the runtime image from DEVCONTAINER_VERSION (the published release baked
into the scaffolded .vig-os/.env), so the suite validated fresh
scaffolding inside a stale image. Export DEVCONTAINER_VERSION =
TEST_CONTAINER_TAG; compose reads the shell environment over .env, so the
scaffolded docker-compose.yml resolves the build under test, and the
in-test `devcontainer exec` calls inherit it.

Refs: #701
post-create.sh ran an unguarded `sed` on the venv activate script before
`just sync`. The Debian image baked that venv at build time, but the Nix
image populates /root/assets/workspace/.venv during post-create, so the
script did not exist yet and post-create aborted (exit 2), failing
`devcontainer up`. Move the prompt rewrite after `just sync` and guard it
on the file's existence. uv writes the prompt as the venv parent's
basename, so rewrite the VIRTUAL_ENV_PROMPT assignment directly instead
of substituting the no-longer-present "template-project" literal.

Refs: #701
The #697 decoupling shipped the scaffolded ruff/ruff-format/typos hooks
as self-contained upstream (manylinux) hooks because the integration
suite still ran the published Debian image, whose PATH lacked those
tools. Now that the suite runs the freshly-built Nix image -- whose
non-FHS userland cannot execute those manylinux binaries -- the workaround
breaks the in-container `git commit`. Restore the repo's repo-local
language:system hooks in the scaffold (resolved from the image's baked
devTools), and drop the now-unused ReplacePrecommitRepoBlock transform
and its tests.

Refs: #701
Explain in tests/README.md how TEST_CONTAINER_TAG selects the image under
test and why the devcontainer fixtures override DEVCONTAINER_VERSION so
compose uses it. Record the fixes under CHANGELOG Unreleased.

Refs: #701
…702)

## Description

The integration suite scaffolded a workspace from the freshly-built
image (`TEST_CONTAINER_TAG`) but then ran `devcontainer up` from
whatever `DEVCONTAINER_VERSION` resolved to — the published `0.3.9`. So
it validated *fresh scaffolding inside a stale image*, not the image
under test. Pointing it at the fresh Nix image then surfaced real
bring-up failures. This fixes all of it. Closes the gap tracked in #701.

## Type of Change

- [x] `fix` -- Bug fix

## Changes Made

- **Run the image under test.**
`devcontainer_up`/`devcontainer_with_sidecar` now export
`DEVCONTAINER_VERSION=TEST_CONTAINER_TAG`. Compose resolves shell env
over `.env`, so the scaffolded `docker-compose.yml` (`image:
…:${DEVCONTAINER_VERSION:-latest}`) selects the build under test, and
the in-test `devcontainer exec` calls inherit it. Added
`test_devcontainer_runs_image_under_test` asserting the running
container's image.
- **Bring the Nix image up cleanly.** `post-create.sh` ran an unguarded
`sed` on the venv `activate` script *before* `just sync`. The Debian
image baked that venv at build time; the Nix image creates it during
post-create, so the script didn't exist yet and post-create aborted
(exit 2). Moved the prompt rewrite after `just sync`, guarded it, and
rewrote the `VIRTUAL_ENV_PROMPT` assignment directly (uv sets the prompt
to the venv parent's basename, so the old `template-project` literal is
never present).
- **Scaffold ruff/ruff-format/typos as `language: system`.** Reverted
the #697 decoupling: those scaffolded hooks pulled upstream manylinux
binaries, which the non-FHS Nix userland cannot execute (`No such file
or directory` on the ELF interpreter), breaking the in-container `git
commit`. They now resolve from the image's baked `devTools`, like the
repo's own config. Removed the now-unused `ReplacePrecommitRepoBlock`
sync-manifest transform and its tests.
- **Docs.** Documented the image-selection behaviour in
`tests/README.md`.

## Changelog Entry

### Fixed
- **Integration tests now exercise the freshly-built image, not the
published `DEVCONTAINER_VERSION`**
([#701](#701))
- The fixtures export `DEVCONTAINER_VERSION=TEST_CONTAINER_TAG` so
compose resolves the build under test; added
`test_devcontainer_runs_image_under_test`
- Guarded/moved the `post-create.sh` venv-prompt `sed` so the Nix image
comes up cleanly under `devcontainer up`
- Reverted the [#697](#697)
scaffold decoupling: scaffolded `ruff`/`ruff-format`/`typos` are
`language: system` again; removed the unused `ReplacePrecommitRepoBlock`
transform

## Testing

- [x] Tests pass locally (`just test`)
- [x] Manual testing performed (describe below)

### Manual Testing Details

Run against the freshly-built Nix image (`TEST_CONTAINER_TAG=dev`,
podman socket + standalone `docker-compose` as CI provides):

- `tests/test_integration.py`: **123 passed, 7 skipped** (skips are
host-environmental: SSH signing config + sidecar compose), 0 failed
- `tests/test_image.py`: **64 passed**
- `tests/test_transforms.py` + `tests/test_flake_devshell.py`: pass
- `test_devcontainer_runs_image_under_test` confirmed RED against
`0.3.9` → GREEN against `dev`
- `test_pre_commit_hook` exercises the in-container ruff+typos run that
previously failed on the Nix image — now passes.
`test_git_commit_ssh_signature` skips locally (no host SSH signing
config) but runs in CI's test-integration action.

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have updated the documentation accordingly
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective
- [x] New and existing unit tests pass locally with my changes

## Additional Notes

Sub-issue of the Nix migration epic #625; targets
`feature/625-nix-claude-migration`. The `install.sh` host-side
`/etc/os-release` probe mentioned in the issue is not exercised by
`devcontainer up` (it has a `linux` fallback) and is left unchanged.

Refs: #701
The #698 LD_LIBRARY_PATH libstdc++ injection is only needed and ABI-safe on NixOS. Gate the two injection-presence tests to NixOS and add an FHS-only guard asserting the Nix C++ runtime is not exposed on LD_LIBRARY_PATH (it breaks host binaries with GLIBC_ABI_DT_X86_64_PLT). Fails until the dev-shell gate lands.

Refs: #703
…x exit (#843)

## Summary

Forward-fix for the two `release.yml` defects that failed the first
0.4.0 candidate run ([rc1 failure issue
#842](#842), diagnosis
posted there). No tag was consumed — publish was skipped, so the next
candidate dispatch is still `0.4.0-rc1`.

1. **Stale runners**: the build-and-test matrix pinned Debian-era
`ubuntu-22.04`/`ubuntu-22.04-arm` (podman 3.4.4), whose rootless volume
UID mapping breaks `init-workspace.sh`'s in-container rsync (`chmod:
Operation not permitted`, exit 23 → pexpect EOF in the
`initialized_workspace` fixture). The identical `test-integration`
action is green on `ubuntu-24.04` (podman 4.9.3) in `ci.yml` and
`nix-image.yml` on the same commit. Switched to `nix-image.yml`'s exact
runner expression.
2. **Uncaptured vulnix exit**: the `Run vulnix` step lacked
`security-scan.yml`'s `|| rc=$?` capture; under the runner's default
`bash -e`, vulnix's normal exit 2 (findings present — all triaged in
`.vulnixignore`) aborted the step before `vulnix-gate` evaluated the
register. Adopted the nightly's capture/retry pattern; the original
intent is preserved — scan crashes (exit > 2) or invalid JSON still fail
the job rather than reading as a clean result.

Changelog entry added to the open `## [0.4.0] - TBD` section.

## Verification

- Root-cause evidence: failing job ran `ubuntu-22.04`/podman 3.4.4 vs
green ci.yml job `ubuntu-24.04`/podman 4.9.3 (same commit, same action,
same image — reproducible Nix build); vulnix step log shows `Process
completed with exit code 2` with the `rc<=2` guard unreached.
- The vulnix pattern is copied from `security-scan.yml:108-122`, which
passed today both on schedule-shaped dispatch (run 28709965103) and in
the release-PR Security Scan check.
- `just precommit` (full suite, all files): green, exit 0.
- `uv run pytest -k "release or workflow"`: 12 passed; the single
failure (`test_uv_venv_workflow`) is a stale local `:dev` image missing
`prek` (#778) — image-content test unrelated to this workflow-only diff,
passing in CI on the parent commit.

Refs: #842
c-vigo and others added 2 commits July 4, 2026 20:49
The provisioning step ends with `grep '^/nix/store' | head -50` under
the runner's `bash -e -o pipefail` shell. Once the dev-shell PATH tops
50 nix-store entries, head exiting early can SIGPIPE grep (exit 2) and
fail the step -- a scheduling race that killed the arm64 build-and-test
leg of the second 0.4.0 candidate run while every other leg of the same
line has run green for weeks. Replace head with `sed -n '1,50p'`, which
consumes the whole stream and prints the same first 50 lines.

Refs: #847
## Summary

Forward-fix for the second 0.4.0 candidate failure
([#847](#847), diagnosis
posted there). Again no tag consumed — publish was skipped.

The `setup-env` provisioning step ends with `printf … | grep
'^/nix/store' | head -50` under the runner's `bash -e -o pipefail`
shell. With the dev-shell PATH now exceeding 50 nix-store entries,
`head` exiting early can SIGPIPE `grep` (exit 2) and fail the step — the
log shows `grep: write error: Broken pipe` at the exact failure
timestamp on the arm64 build-and-test leg. It's a scheduling race: the
same line has run green across every workflow for weeks and passed on
five other legs today.

Fix: `sed -n '1,50p'` instead of `head -50` — consumes the whole stream
(no early pipe close), prints the same first 50 lines.

Positive signal from the failed run: the #842/#843 fixes are validated —
`Vulnix CVE Gate` **passed** on this run (previously the step died on
vulnix's exit 2), and amd64 was only cancelled by fail-fast.

## Verification

- Race mechanics confirmed from the job log (`grep: write error: Broken
pipe` + `Process completed with exit code 2` at 18:42:21, inside the
test-image action's setup-env sub-step).
- `just precommit` (full suite, all files): green, exit 0.
- Changelog entry added to the open `## [0.4.0] - TBD` section.

Refs: #847
c-vigo and others added 17 commits July 4, 2026 21:29
The build-and-test "Scan image for vulnerabilities" step was the last
Debian-era blocking Trivy scanner (exit-code 1 gated only by
.trivyignore). It failed the third 0.4.0 candidate on ~14 embedded
language-ecosystem HIGHs (gix-fs, thin-vec, quinn-proto, x/net, rekor,
sigstore) that are already triaged in .vulnixignore -- the blocking CVE
control for the Nix image is the vulnix-gate job (#639), which passed.
Align the step with the ratified #637 posture used by security-scan.yml
("defense in depth, awareness only") and ci.yml (exit-code 0):
non-blocking, table output kept in the job log as awareness signal.

Refs: #849
## Summary

Forward-fix for the third 0.4.0 candidate failure
([#849](#849), diagnosis
posted there). Again no tag consumed. Positive signal: everything the
previous fixes touched now passes — validate, finalize, **vulnix-gate**,
and the amd64 **image + integration tests** were green; the run died
only at the Trivy step.

`release.yml`'s `Scan image for vulnerabilities` was the last Debian-era
**blocking** Trivy scanner (`exit-code: '1'`, gated only by
`.trivyignore`). It failed on ~14 HIGH / 0 CRITICAL findings in
language-ecosystem packages embedded in shipped binaries — the same
2026-07 batch already triaged into `.vulnixignore`, which is why the
blocking vulnix-gate passed. Under the ratified #637 posture the Nix
image's blocking CVE control is the **vulnix-gate + `.vulnixignore`**;
Trivy is defense-in-depth, awareness only:

- `security-scan.yml:145-154` — SBOM-mode scan, `exit-code: '0'`,
`continue-on-error: true`
- `ci.yml:323,334` — `exit-code: '0'` (why the same image passed the
release PR's Security Scan check)

This aligns the release lane: `exit-code: '0'` + `continue-on-error:
true`, table output retained in the job log.

## Verification

- Same image content passed ci.yml's Security Scan and the
nightly-shaped dispatch today; vulnix-gate green on this very run.
- `just precommit` (full suite, all files): green, exit 0.
- Changelog entry added to the open `## [0.4.0] - TBD` section.

Refs: #849
RED: the two init-workspace.bats structure tests and the install.bats
forwarding test fail (3 failures confirmed locally via bats); the new
integration test exercises the override end-to-end against the CI-built
image (VIG_OS_VERSION env -> scaffolded .vig-os pin).

The 0.4.0-rc1 smoke test surfaced the gap: the image bakes the release
it was built from into the scaffolded .vig-os (repo pin, which only
advances at finalize), so an RC install scaffolds a stale 0.3.9 pin and
consumer CI runs the new prek-era scaffold against the old Debian image.

Refs: #852
install.sh forwards an explicit --version into the init container as
VIG_OS_VERSION, and init-workspace.sh pins it in the scaffolded .vig-os
after the mode prune (validated against a safe tag charset). Plain
"latest" installs keep the image-baked pin, which equals the release the
image was built from.

The Nix image bakes the repo-root DEVCONTAINER_VERSION into the template
.vig-os at build time; that pin only advances at finalize, so every RC
image scaffolds the previous release's pin. The 0.4.0-rc1 smoke test hit
exactly this: a new prek-era scaffold pinned to Debian 0.3.9, whose CI
lint died with "prek: command not found". (The Debian build passed the
per-tag IMAGE_TAG build-arg; the reproducible Nix build cannot without
breaking the same-commit-same-digest property, hence the install-time
override.)

Verified: bats structure tests green (were RED); host-side functional
run of init-workspace.sh with VIG_OS_VERSION=9.9.9-rc9 writes the pin;
install.sh --dry-run shows the forwarded env only for explicit versions.

Refs: #852
…on (#853)

## Summary

Forward-fix for the 0.4.0-rc1 smoke-test failure
([#852](#852)). The
candidate run itself was fully green — the failure was downstream, in
the consumer scaffold the RC installs.

**Root cause chain:** the Nix image bakes the release it was built from
into the scaffolded `.vig-os` (flake bootstrap, from the repo-root pin).
That pin only advances at **finalize**, so every RC image scaffolds the
*previous* release's pin — and `install.sh` never wrote its `--version`
into the scaffold. The smoke-test receiver ran `install.sh --version
0.4.0-rc1 --force`, got a deploy PR with the new prek-era scaffold
**still pinned to `DEVCONTAINER_VERSION=0.3.9`**, and its CI Lint job
ran `just precommit` → `prek run --all-files` inside the Debian 0.3.9
image → `command not found`. (The Debian build passed the per-tag
`IMAGE_TAG` build-arg at build time; the reproducible Nix build can't
bake the tag without breaking the same-commit-same-digest property —
hence an install-time override.)

**Fix (TDD, RED → GREEN commits):**
- `install.sh`: an explicit `--version` is forwarded into the init
container as `VIG_OS_VERSION` (bash-3.2-safe empty-array expansion;
`latest` keeps the baked pin, which equals the promoted release).
- `assets/init-workspace.sh`: pins
`DEVCONTAINER_VERSION=${VIG_OS_VERSION}` in the scaffolded `.vig-os`
post-prune, charset-validated.

The receiver needs no change — it already passes `--version "${TAG}"`
and curls `install.sh` from the dispatched tag, so **rc2 will exercise
the fixed path end-to-end**.

## Verification

- RED: 3 new bats structure tests failed before the implementation;
GREEN after (0 failures across `init-workspace.bats` + `install.bats`).
- New integration test (`test_init_workspace_pins_requested_version`)
runs the real containerized init with `VIG_OS_VERSION=9.9.9-rc9` and
asserts the scaffolded pin — runs in CI against the image built from
this branch.
- Host-side functional run: `TEMPLATE_DIR=assets/workspace ...
VIG_OS_VERSION=9.9.9-rc9 bash assets/init-workspace.sh --no-prompts
--force` → `.vig-os` contains `DEVCONTAINER_VERSION=9.9.9-rc9`.
- `install.sh --dry-run --version 0.4.0-rc1` shows `-e
VIG_OS_VERSION=0.4.0-rc1`; dry-run without `--version` shows no
override.
- `just precommit` (full suite, all files): green, exit 0.

Refs: #852
RED: the scaffold ships the typos prek hook but not the exception
config, so scaffold-shipped content (version-check.sh Nd duration
syntax, synced changelog "unexcepted" CVE-policy term) fails every
consumer lint out of the box — surfaced by the 0.4.0-rc2 smoke test.

Refs: #855
The scaffolded .pre-commit-config.yaml runs the typos prek hook, but
the exception register stayed repo-local, so consumers linted
scaffold-shipped content with zero exceptions and failed out of the
box: the 0.4.0-rc2 smoke-test deploy PR died on version-check.sh's Nd
duration placeholder and the synced changelog's "unexcepted" CVE-policy
term -- both excepted here in .typos.toml. Sync the file into the
template via scripts/manifest.toml (SSoT, same mechanism as .yamllint
and .pymarkdown).

Refs: #855
## Summary

Forward-fix for the rc2 smoke-test failure
([#855](#855), diagnosis
posted there). Strong convergence signal from rc2: the #853 `.vig-os`
pin works (`DEVCONTAINER_VERSION=0.4.0-rc2` in the deploy PR), the Lint
job runs inside the rc2 image, the **whole prek suite executes and the
Tests job passes** — the only remaining failure is the `typos` hook
flagging scaffold-shipped content (`Nd`, `unexcepted`) that this repo
excepts in `.typos.toml` but never shipped.

Fix: add `.typos.toml` to `scripts/manifest.toml` so sync-manifest ships
it with the workspace template — the same SSoT mechanism as
`.yamllint`/`.pymarkdown`.

## Verification

- TDD: new bats template test RED before (`not ok 56`), GREEN after the
manifest entry + sync.
- Shipped copy content-identical to the repo root config (sync-manifest
keeps it so).
- `just precommit` (full suite, all files): green, exit 0.
- Changelog entry added to the open `## [0.4.0] - TBD` section.

Refs: #855
The scaffolded consumer prepare-release.yml still interpolated the full
frozen changelog section into the draft-PR body uncapped; #812 fixed
only this repo's own workflow. The 0.4.0-rc3 smoke test hit it: the
receiver seeds the consumer CHANGELOG from this repo's ~67k-char 0.4.0
section, and the downstream "Create draft PR to main" died with
"GraphQL: Body is too long". Port the same cap (65000-char budget,
line-boundary truncation, pointer to the release branch's CHANGELOG.md);
small releases inline the whole changelog unchanged.

Inline-YAML shell is not unit-testable; the identical capping logic was
harness-verified against the real 0.4.0 section in #830, and the YAML
de-indentation of the new HEADER string asserted via yaml.safe_load.

Refs: #857
…#858)

## Summary

Forward-fix for the rc3 smoke-test failure
([#857](#857), diagnosis
posted there). rc3 convergence signal: consumer CI green inside the rc3
image, **deploy PR merged** (validating #853 + #856), downstream release
cycle started — and died at `Create draft PR to main` with `GraphQL:
Body is too long`.

It's the #810 bug shipped to consumers: #812 capped only this repo's own
`prepare-release.yml`; the scaffolded copy
(`assets/workspace/.github/workflows/prepare-release.yml`) still
interpolated the full changelog section uncapped, and the smoke-test
repo's CHANGELOG is seeded from our ~67k-char 0.4.0 section. This ports
the identical cap (65,000-char budget, line-boundary truncation, pointer
to the release branch's full `CHANGELOG.md`). `release-core.yml`
(shipped) has no PR-body write, so this is the only consumer-side site.

The deploy sync carries the fixed workflow to the smoke-test repo on the
next candidate (rc4), which should complete the downstream cycle.

## Verification

- Identical cap logic harness-verified against the real 0.4.0 section in
#830 (66,794 → 64,869 chars, line-boundary truncation; sub-threshold
passthrough byte-identical).
- YAML de-indentation of the new `HEADER` asserted via `yaml.safe_load`
(no indent leak).
- `just precommit` (full suite, all files): green, exit 0.
- Changelog entry added to the open `## [0.4.0] - TBD` section.

Refs: #857
RED (6 failing bats tests, confirmed locally): env-based githook
shebangs, nix-dev-shell-aware commit guard, BASH_SOURCE pipe-safety
fallback in lifecycle scripts, prune keeping pre-existing
flake.nix/.envrc, tolerant final just-sync, and typos --force-exclude
in both hook configs. All surfaced by the 0.4.0-rc4 field validation.

Refs: #859
Six fixes surfaced by the 0.4.0-rc4 field validation across five real
consumer repos (full findings on the tracking issue):

- .githooks/*: env-based shebangs (NixOS hosts have no /bin/bash) and
  accept IN_NIX_SHELL as sanctioned -- direnv mode could not commit.
- Lifecycle scripts: restore the ${BASH_SOURCE[0]:-$0} pipe-safety
  fallback (0.3.x regression caught by a consumer's regression tests).
- init-workspace prune: never delete a pre-existing flake.nix/.envrc in
  devcontainer mode (two repos lost their own nix-direnv setup).
- init-workspace final just sync: non-fatal when the preserved
  old-generation justfile.project lacks the sync recipe.
- typos hook (repo + scaffold): --force-exclude so consumer
  [files] extend-exclude applies to staged files.
- MIGRATION.md: field-validated 0.3.x upgrade checklist.

Verified: 6 new bats tests RED -> GREEN (62/62 suite green), including
a functional host-run of init-workspace.sh proving the prune guard;
full pre-commit suite green. The 3 local pytest failures are the known
stale-local-image class (image-content tests; CI builds fresh).

Refs: #859
…ts (#860)

## Summary

Fix batch for the six upstream defects surfaced by the 0.4.0-rc4 field
validation (#859; findings comments there cover five repos, two orgs,
both delivery modes):

| # | Finding | Fix |
|---|---------|-----|
| 1 | direnv mode cannot commit (guard demands the container) |
`.githooks/*` accept `IN_NIX_SHELL` as sanctioned |
| 2 | `.githooks/*` `#!/bin/bash` unusable on NixOS hosts |
`#!/usr/bin/env bash` |
| 9 | lifecycle scripts regressed `${BASH_SOURCE[0]:-$0}` → `unbound
variable` when piped | fallback restored in all four scripts |
| 12 | `--mode devcontainer` prune deleted consumers' own
`flake.nix`/`.envrc` (hyrr, talys) | prune only removes stub files the
scaffold created (mirrors #738) |
| 13 | installer's final `just sync` fails on old-generation preserved
`justfile.project` | non-fatal with a MIGRATION.md pointer |
| 3/10/11 | typos ignores `[files] extend-exclude` for staged files →
garbage findings on binary artifacts in three repos | `entry: typos
--force-exclude` (repo + scaffold via manifest sync) |

Plus the field-validated **"Upgrading an existing 0.3.x consumer"
checklist in `docs/MIGRATION.md`** (prek recipe migration, recipe
renames, typos config shadowing, artifact excludes, name re-derivation).

Remaining findings (7 CodeQL onboarding, 8 name re-derivation, 14
fresh-adoption clobber, 4 autofix-vs-artifacts defaults) are documented
in MIGRATION.md and/or tracked for the next cycle in #854 — they are
design-level, not rc5-blocking.

## Verification

- TDD: 6 new bats tests RED (confirmed) → GREEN; the prune guard is
proven by a **functional host-run** of `init-workspace.sh` with
pre-existing `flake.nix`/`.envrc` surviving `--mode devcontainer`; suite
62/62.
- Existing prune test updated to the new guarded behavior (message/shape
change).
- `just precommit` (full suite, all files): green, exit 0.
- Local pytest: 63 passed; 3 failures are the known
stale-local-`:dev`-image class (image-content tests; CI builds the image
from this branch, where they run for real).

Requires **rc5** (image bakes `assets/`), then targeted re-verification
per #859's exit criteria.

Refs: #859
… mirror

The changelog commit is pushed with a GitHub App token that re-triggers
workflows, but the build gated only on the PR author (permanently
renovate[bot]) and never the pusher, and commit-action has no empty-diff
guard -- so the bot's own no-op commits fired endless synchronize events
(#862 accrued 150+ empty commits). Guard both build jobs on
github.event.sender.login so the commit bot's push no longer starts a build.

The automation also committed only root CHANGELOG.md, leaving the
scripts/manifest.toml mirror assets/workspace/.devcontainer/CHANGELOG.md
stale and failing the sync-manifest gate on every Renovate PR. The build now
mirrors the verbatim copy and both files are committed (FILE_PATHS).

Refs: #863
… mirror (#864)

Fixes #863.

## What was wrong

The Renovate changelog automation had two independent defects, both
surfaced on #862 (which accrued **150+ identical empty commits** before
the build workflow was disabled by hand to stop it):

1. **Self-triggering loop.** `renovate-changelog-commit.yml` pushes with
a GitHub App token (re-triggers workflows); the build gated only on the
PR **author** (permanently `renovate[bot]`), never the **pusher**, and
`commit-action` has no empty-diff guard → the bot's own no-op commits
fired fresh `synchronize` events without end.
2. **Stale workspace mirror (red CI).** The bot committed only root
`CHANGELOG.md`, leaving the `scripts/manifest.toml` mirror
`assets/workspace/.devcontainer/CHANGELOG.md` stale, so the
`sync-manifest` gate failed on every Renovate PR — independent of the
loop.

## Fix

- **Loop:** guard both build jobs on `github.event.sender.login !=
'commit-action-bot[bot]'`, so a `synchronize` raised by the commit bot's
push no longer starts a build. Net effect: exactly one changelog commit
per Renovate PR.
- **Mirror:** the build copies root `CHANGELOG.md` → the verbatim mirror
and ships both in the artifact; `renovate-changelog-commit.yml` commits
`FILE_PATHS: CHANGELOG.md,assets/workspace/.devcontainer/CHANGELOG.md`
(precedent: `prepare-release.yml`).

Shipped copies under `assets/workspace/.github/workflows/` regenerated
via `scripts/sync_manifest.py` (identical to root).

## Testing

CI-config + changelog only (no unit-testable logic). `prek run
--all-files` green locally, including `sync-manifest`.

## Operational note

`renovate-changelog-build.yml` is **disabled manually** right now to
stop the active loop. Re-enable once this reaches `dev` (via
`sync-main-to-dev`), then use #862 to validate the flow end-to-end.
Set release date to 2026-07-06 and regenerate release docs.

Refs: #813
c-vigo and others added 5 commits July 6, 2026 13:15
nvd.nist.gov is chronically throttled (nix-community/vulnix#171): cold
scans crawl the full NVD year-feed set for tens of minutes and fail with
ReadTimeoutError/IncompleteRead, blocking both the nightly gate and the
release publish gate.

Add nvd-mirror-refresh.yml — the only job that talks to NVD — which
downloads the NVD 2.0 feed files with resumable retry, validates them,
and republishes them as assets on the nvd-mirror release. Point the
vulnix invocations in security-scan.yml and the release vulnix-gate at
that mirror via --mirror, so NVD data is fetched from GitHub's CDN and an
NVD outage can no longer fail a scan or block a release.

The scheduled refresh activates once this reaches the default branch via
the cutover; the mirror is bootstrapped out-of-band until then.

Refs: #870
Closes #870.

## Problem

`nvd.nist.gov` is chronically throttled/unstable
(`nix-community/vulnix#171`). Cold vulnix runs crawl the full NVD
year-feed set for tens of minutes and fail with
`ReadTimeoutError`/`IncompleteRead` — verified 2026-07-06, a cold run
failed all 3 retries over **53 min**, blocking both the nightly gate and
the release publish gate.

## Change

- **New `nvd-mirror-refresh.yml`** — the only job that talks to NVD.
Downloads the 7 NVD 2.0 feed files (`nvdcve-2.0-<6 years>.json.gz` +
`modified`) with resumable retry (`curl -C -`), validates them (`gzip
-t`), and republishes them as assets on the `nvd-mirror` release. Never
clobbers the mirror with a partial set.
- **`security-scan.yml` + `release.yml` `vulnix-gate`** now run `vulnix
--mirror <nvd-mirror release>/`, fetching NVD data from GitHub's CDN
instead of `nvd.nist.gov`. An NVD outage can no longer fail a scan or
block a release.
- Docs (`docs/CONTAINER_SECURITY.md`) + CHANGELOG.

## Why a mirror (not just retries)

The mirror localizes the NVD dependency to one job: if the feeds ever
change/retire, only the refresh job's source changes — vulnix keeps
consuming identical files. vulnix has no NVD-API-migration plan and is
on the current 2.0 feeds (no firm retirement date).

## Sequencing (important)

- A new workflow is only schedulable/dispatchable from the **default
branch**. `main` is still the pre-cutover Debian world, so the scheduled
refresh activates only once this rides the cutover onto the new `main`.
- Until then the `nvd-mirror` release is **bootstrapped out-of-band**
(the 7 feeds uploaded manually), so this release's own `vulnix-gate` can
use the mirror immediately.

## Test plan

- [ ] `nvd-mirror` release has 7 valid gzip feed assets (bootstrapped).
- [ ] Dispatch `security-scan.yml` on this branch → `Run vulnix` fetches
from `.../nvd-mirror/…`, not `nvd.nist.gov`; completes fast even while
NVD is degraded.
- [ ] After cutover: `nvd-mirror-refresh.yml` auto-refreshes on `main`.
GitHub immutable releases block updating a fixed release tag's assets
(and poison the tag once used), so the mirror cannot live on a release in
this repo. Host it in a dedicated public repo, vig-os/nvd-mirror, served
on GitHub Pages, and point vulnix --mirror at
https://vig-os.github.io/nvd-mirror/. Drop the in-repo
nvd-mirror-refresh.yml — that job now lives in the mirror repo.

Refs: #870
)

Follow-up to #871 (already merged). Refs #870.

## Why

#871 landed the mirror as **release assets in this repo**, but that
approach is blocked by **GitHub immutable releases**: assets can't be
updated/clobbered after creation, and once the `nvd-mirror` tag is used
by an immutable release it's poisoned (can't recreate). The in-repo
`nvd-mirror-refresh.yml` also can't run — a new workflow is only
schedulable/dispatchable from the default branch, and `main` is still
the pre-cutover Debian world.

So as merged, `release/0.4.0` points `vulnix --mirror` at a
release-asset URL that can't exist → the gate would fail.

## Change

- **Remove** the in-repo `nvd-mirror-refresh.yml`.
- Point `vulnix --mirror` (in `security-scan.yml` and the `release.yml`
`vulnix-gate`) at the **dedicated public mirror**
[`vig-os/nvd-mirror`](https://github.com/vig-os/nvd-mirror), served on
GitHub Pages: `https://vig-os.github.io/nvd-mirror/`.
- Update docs + CHANGELOG.

The dedicated repo owns the one job that talks to NVD (its default
branch, so it schedules/dispatches immediately — no cutover dependency).
It is **already live and serving** all 7 feeds
(`nvdcve-2.0-{2021..2026}.json.gz` + `modified`, 117 MB, HTTP 200 +
valid gzip), bootstrapped from a known-good local copy.

## Test plan

- [x] `https://vig-os.github.io/nvd-mirror/nvdcve-2.0-*.json.gz` → 200,
valid gzip (all 7).
- [x] Dispatch `security-scan.yml` on this branch → **passed in 97 s**
via the mirror ([run
28792515788](https://github.com/vig-os/devcontainer/actions/runs/28792515788));
`NVD_MIRROR=https://vig-os.github.io/nvd-mirror/`, gate green, no
`nvd.nist.gov` cold-crawl.
Set release date to 2026-07-06 and regenerate release docs.

Refs: #813
@vig-os-release-app
vig-os-release-app Bot merged commit f20bf6b into main Jul 6, 2026
15 checks passed
@vig-os-release-app
vig-os-release-app Bot deleted the release/0.4.0 branch July 6, 2026 14:02
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.

[DISCUSSION] Migration to prek

2 participants