Skip to content

chore: release 1.9.0 - #1498

Merged
vig-os-release-app[bot] merged 43 commits into
mainfrom
release/1.9.0
Aug 13, 2026
Merged

vig-os-release-app[bot] merged 43 commits into
mainfrom
release/1.9.0

Conversation

@vig-os-release-app

@vig-os-release-app vig-os-release-app Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Release 1.9.0 - 2026-08-13

This PR prepares release 1.9.0 for merge to main.

1.9.0 - 2026-08-13

Added

  • guardrails capability module — the org's semantic gates, now devkit-owned
    (#1488,
    #1492)

    • devkit shipped 26 hooks to consumers and every one was syntactic. These 15
      gates are the semantic half: no fake implementations, no hardcoded magic
      values, no commented-out code, generated docs matching their source
      command, no debug prints, trunk protection, ADR/feature-matrix coherence
    • Vendored from gerchowl/guardrails under Apache-2.0 (the same licence and
      holder as devkit, so the copies need no separate attribution). devkit is
      now the source of truth; the upstream personal repo is being retired, so
      the org's semantic enforcement no longer depends on one person's account
    • The module contributes packages only — no contract change. Hook
      ENTRIES are a scaffold concern, not a shell one: .pre-commit-config.yaml
      is read by the runner from a bare git tree, by CI containers that never
      enter nix develop, and by humans reading a diff. Decision: which layer owns module-contributed pre-commit hooks? #1492 records why this
      resolves the opposite way to checks (Decision: where do a capability module's CHECKS live — lib function or a v2 contract field? #1427) despite looking similar
    • New checks.guardrails-canary: every gate is fed a known-bad fixture and
      must reject it, and a known-good one and must stay quiet. This is the
      assurance half — "protected" means the gate rejected a known-bad input,
      not the entry is in the config, because four of this org's eight
      recorded gate failures were "listed, did not run"
    • New checks.guardrails-shellcheck at error+warning over the vendored
      shell; the repo-wide hook (which runs at style) skips that tree rather
      than force a rewrite of 3,000 lines of working, fixture-covered script
  • Rust performance tooling: @perf tool groups + a deterministic ratchet
    (#1400,
    #1440)

    • The rust module's tools list now accepts GROUPS: @perf (samply,
      cargo-flamegraph, hyperfine, cargo-criterion, cargo-bloat,
      cargo-llvm-lines, cargo-show-asm, plus heaptrack/valgrind/poop on Linux),
      @perf-async (samply, tokio-console, hyperfine) and @api
      (cargo-semver-checks, cargo-expand). A group skips members the current
      platform lacks; an EXPLICITLY named tool still throws, because naming one
      is a request that can only be met or refused
    • New checks.perf-ratchet in lib.mkRustProject, auto-enabled when
      .repo/perf-baseline.toml exists (same rule as deny). It measures only
      things that are deterministic given a locked toolchain and lockfile —
      shipped binary size per binary, and dependency-graph size from Cargo.lock
      — and deliberately times NOTHING: wall-clock benchmarks on shared CI
      runners are noise, and a gate that fires on noise teaches --no-verify.
      Growth past the tolerance (default 5%) fails; a measured shrink is
      reported so the win can be banked. Needs no benchmark to be authored,
      which is what makes it a ratchet that is actually in place
    • New packages.perf-seal, which emits the baseline file itself so sealing
      is never hand-transcribed
    • fenix.inputs.rust-analyzer-src now follows nixpkgs: it fed only
      fenix's nightly rust-analyzer derivation, which the pack never builds
      (fromToolchainFile takes components from the release-channel manifest).
      Lock nodes 15 -> 14, fetched source ~33 MB -> ~5 MB, rust-analyzer still
      present in the built toolchain
  • Rust language pack: rust capability module + lib.mkRustProject (#1400, #1427)

    • New rust capability module (nix/modules/rust.nix): a v1-contract
      contribution that puts a Rust toolchain and the curated cargo tooling
      (nextest, cargo-deny, cargo-auditable, cargo-audit, cargo-about,
      cargo-shear by default; extensible via tools) on the dev-shell PATH,
      with mold picked up on Linux. The checks option is MANDATORY and has
      no default — a hand-written modules = [ "rust" ] fails at EVAL with a
      message that names the fix (mkRustProject) and the deliberate opt-out
      ({ name = "rust"; checks = "none"; }), because a v1 module cannot
      contribute checks.<system>.* and a silently toolchain-only Rust shell
      is exactly the failure the pack exists to prevent
    • New lib.mkRustProject composed entry point (nix/mk-rust-project.nix):
      ONE call returns { devShell, checks, packages, craneLib, cargoArtifacts, commonArgs, toolchain, src }, wiring the shell + the check suite (fmt,
      clippy with --deny warnings, nextest, cargo-doc, cargo-deny when a
      deny.toml exists) + per-crate builds together. Folds well-known root tool
      configs (rustfmt.toml, clippy.toml, deny.toml, about.*, .cargo/,
      rust-toolchain.toml) into the crane fileset unconditionally — their
      absence from a build sandbox is silent and turns the checks into a rules-
      nobody-wrote green
    • New flake inputs crane and fenix (three leaf lock entries, including
      fenix's rust-analyzer-src). Every consumer — including Python-only ones
      — pays for them in lock size and in fetch-at-eval. The alternative — each
      Rust repo pinning its own fenix — is per-repo drift on exactly the axis
      devkit exists to hold still; mkRustProject takes crane/fenix
      overrides so the inputs can move back out later without a consumer-
      visible change
    • New nix/modules/check-entries.nix (internal plumbing, not consumer
      surface): a per-name override for how the generated module-<name> smoke
      check instantiates a module whose options are mandatory. rust maps to
      the toolchain-only opt-out form
    • The ADR (docs/rfcs/ADR-capability-modules.md) records the Decision: where do a capability module's CHECKS live — lib function or a v2 contract field? #1427
      decision: the v1 contract is NOT extended with a checks field, on the
      reasoning that a field a contract can accept without touching what it
      composes is not part of that contract. The bar for revisiting is a
      SECOND, non-Rust capability module that independently needs to
      contribute checks
    • Zero-module invariant preserved: devShells.<system>.default.drvPath is
      byte-identical to before the pack shipped, pinned by a new parity test
    • Consumer hardening from the second consumer, a single-crate feature-gated
      library (#1450):
      mkRustProject now refuses a pkgs built without overlays.default
      (previously undefined variable 'vig-utils' from inside devtools.nix,
      and only on the dev shell — checks and packages evaluated fine, so a
      repo could have a green nix flake check and a shell that had never
      evaluated); a source tree with no Cargo.lock is named as such, on
      cleanSrc so fmt fails with the rest instead of passing alone; new
      checks.doctest runs cargo test --doc, which nextest cannot and
      cargoDoc does not, so adopting the pack no longer silently drops a
      consumer's doctests; and new cargoExtraArgs reaches every derivation so
      the checks can build non-default features — composed with -p <crate>
      rather than overwriting it, so a workspace's per-crate builds cannot end
      up with a different feature set from the checks that ran against them

Changed

  • sync-manifest and check-agent-identity run once per commit, at
    pre-commit
    (#1491)
    • Both hooks carried neither stages: nor a file filter, so each ran at
      every hook stage — three uv run invocations per commit for one useful
      result. Neither was broken by it (unlike typos,
      #1489, which received a
      filename and rejected rebases); this is the waste that trap left behind
    • For check-agent-identity the pin also settles a real disagreement between
      surfaces: flake-generated (direnv) consumers have always run it at
      pre-commit only, because git-hooks.nix defaults it there, while the
      committed configs ran it at all three. Consumers are affected: the hook
      is scaffolded, so adopting this release aligns a scaffolded repo with what
      its direnv counterpart already did
    • The message stages were not wanted: git exports the same
      GIT_AUTHOR_NAME/GIT_AUTHOR_EMAIL to all three stages of an ordinary
      commit, including under git commit --author=… — the case this hook exists
      to catch — so the commit-msg round only re-read what pre-commit had
      already rejected on. The one path where the message stages fire alone is
      git merge, where git exports no author at all and the hook fell back to
      git config user.*, the persistent identity that fails the committer's very
      next ordinary commit
    • No coverage is lost elsewhere: prek run --all-files and the CI lint lane
      both run the pre-commit stage
  • CI fails when a declared language's project file disappears
    (#1478)
    • New .vig-os key DEVKIT_LANGUAGES — a comma-separated subset of
      python,node,rust,nix recording the languages a repo DECLARES. It is a
      declaration, not a detection cache: the scaffold seeds it from the marker
      files it detects, ADDS a newly detected language on a later upgrade, and
      never removes one. Dropping a language is a deliberate hand-edit; the
      scaffold prints a loud notice when a declared language's marker is absent,
      and an unknown name fails the scaffold. The key ships empty, so a
      language-neutral repo and every consumer adopting from an older devkit are
      unaffected (the value is seeded on the adoption scaffold)
    • New early gate in the scaffolded ci.yml: resolve-toolchain emits the
      declared list as a languages output and one step fails the run when a
      declared language's marker file (pyproject.toml / package.json /
      Cargo.toml) is missing. It runs in the job every toolchain job already
      needs:, so lint/test never start on a repo whose project is gone —
      closing the blind spot that let a deleted Python suite report a green
      Tests check (#1466).
      nix is declared but not gated (no single marker file)
    • The scaffolded justfile.project recipes now REPORT the skip
      (no pyproject.toml — skipping) instead of no-oping in silence, and
      test / test-cov only swallow pytest's exit 5 ("no tests collected")
      while the repo has no tests/ directory — once one exists, zero collected
      propagates as a failure
  • Release docs: the release PR must be re-approved before promote
    (#1474)
    • A final release.yml run's finalize job pushes to release/X.Y.Z (the
      CHANGELOG date stamp and the sync-issues commit), which dismisses the PR
      approval that same run required wherever stale-review dismissal is enabled.
      promote-release.yml re-checks approvals before merging, so re-approving is
      a mandatory step between the final and the promote dispatch
    • docs/RELEASE_CYCLE.md now says so in Phase 2 step 7, the Phase 3
      prerequisites, the release lifecycle diagram, and the release.yml
      reference, and carries the re-approval commands as an explicit Phase 5 step
      before the promote dispatch; docs/DOWNSTREAM_RELEASE.md mirrors the
      operator step for consumers
    • Documentation only — no workflow or behaviour change. Both approval gates
      are kept: each guards a different irreversible act (burning the immutable
      X.Y.Z tag; moving :latest and merging to main)

Fixed

  • The promote gate checks the release PR before publishing, not after
    (#1487)
    • Devkit's own promote-release.yml verified the release PR's draft status,
      approvals and CI only in the merge job — which runs after promote
      has already moved GHCR :latest and published the draft GitHub Release. An
      unapproved PR therefore failed the promote from an already-published
      state
      , leaving the release public while main lacked the release commit,
      and published releases are immutable org-wide. The check now also runs in
      validate, so the promote refuses before anything is published
    • The trigger was the default state of every final release, not an edge case:
      a final release.yml run's finalize job always pushes to the release
      branch, which always dismisses the approval under the org-wide stale-review
      dismissal (#1474). Only
      operator discipline had kept it latent
    • The validate copy mirrors the scaffold template's, so it also brings the
      mergeability gate (#1132) —
      BEHIND / BLOCKED / DIRTY — which the upstream workflow had never carried in
      either job. The merge copy is kept: PR state can change between the jobs
  • typos no longer lints the commit-message buffer, so a rebase can commit
    (#1489)
    • The hook carried no stages:, so it ran at every hook stage — and since
      it passes filenames, the commit-msg round handed it COMMIT_EDITMSG.
      typos reads short letter runs inside abbreviated git SHAs as misspelled
      words, and git rebase --continue writes the rebase todo into that buffer
      as comment lines, so a legitimate rebase was refused over a comment that
      never enters the commit message. It now runs at pre-commit only, which is
      what a source typo checker is for
    • Consumers are affected too: the hook is scaffolded, so every scaffolded
      repo shipped the same trap. Adopting this release fixes it. Flake-generated
      (direnv) consumers were never affected — git-hooks.nix already defaults the
      hook to the pre-commit stage
    • No coverage is lost: prek run --all-files and the CI lint lane both run
      the pre-commit stage
  • Trunk release preparation: the release PR is no longer empty, and the freeze
    never pushes to the trunk

    (#1479)
    • prepare-release.yml now creates release/X.Y.Z before the changelog
      freeze and fast-forwards it onto the freeze commit afterwards. Under
      DEVKIT_WORKFLOW=trunk the freeze targets the release branch instead of
      main, so the draft release PR carries exactly one commit — it previously
      froze onto main and cut the branch from that same post-freeze SHA, and
      gh pr create failed with "No commits between main and release/X.Y.Z"
    • A trunk consumer's Commit App therefore needs no bypass on the main
      ruleset
      : the prepare phase only ever writes to release/*. main gets
      the frozen changelog when the release PR merges at promote time
    • New same-SHA guard in open-pr: head and base are resolved and compared
      before the PR is created, so a collapsed topology fails with a named cause
      instead of an opaque GitHub refusal
    • The gitflow leg is behaviour-identical: the freeze still lands on dev
      and the release branch still ends up at the freeze commit
  • Smoke listener waits now bind to the run they dispatched
    (#1477)
    • The listener's three "trigger a workflow, then wait for it" sites
      (prepare-release, release, promote-release) accepted any run that was
      completed and newer than a pre-dispatch id baseline. The dispatched run
      takes a moment to appear in the API, so the first poll could return a
      PREVIOUS run — already completed, still newer than a stale baseline — and
      the wait exited success having observed nothing. On the 1.8.0 final the
      release wait passed 1.5 s after starting, matching the rc4 run from 47
      minutes earlier, and promote-release was then dispatched against a repo
      with no 1.8.0 release
    • Each trigger step now stamps a DISPATCH_TS immediately before
      gh workflow run (backdated 60 s against runner/server clock skew) and the
      wait accepts only a run created at or after that stamp AND newer than the
      baseline. The first such run is locked on, so a later run cannot hijack the
      wait, and its id and URL are logged for diagnosis
    • Baseline capture and poll now use identical --workflow / --branch /
      --event workflow_dispatch filters, so the baseline describes the
      population being polled. Without a bound run the wait keeps polling to its
      timeout and fails loudly — it can no longer report success on a run it
      never observed
    • The listener runs from vig-os/devkit-smoke-test's DEFAULT branch, so this
      asset change needs the usual manual redeploy there to be live

Security

  • Renew the glibc exception block in the vulnix register
    (#1481)
    • The block expired 2026-08-12, failing check-expirations on every branch
      (the hook runs inside the flake's pre-commit check) and on the nightly
      security scan
    • Re-verified against the current pin before renewing: all six CVEs are still
      live findings against glibc-2.42-67, so none could be dropped the way the
      gawk block was after its rev advance; the advisories cover glibc through
      2.43, so advancing the pin cannot clear them either
    • Renewed onto the shared 2026-09-02 grid date, and each entry now records
      its CVSS and the advisory's required vector in place of the previous
      "specifics unverified offline" placeholder

gerchowl and others added 30 commits August 12, 2026 03:01
`rust` was an ask-gated candidate in ADR-capability-modules;
gerchowl/filesender is the ask. It ships as two pieces, and the split
between them is the whole design.

The module (nix/modules/rust.nix) stays on the v1 contract: packages,
env, shellHook. It puts a toolchain and the curated cargo tooling on the
dev-shell PATH, and that is the easy half of the capability.

The half that earns its keep is the check suite, and a v1 module cannot
contribute `checks.<system>.*`. That is not an oversight in the contract
— `packages`/`env`/`shellHook` fold monoidally into one derivation,
while `checks` is a namespaced map of independent peer derivations on a
different lifecycle, built from the consumer's source tree, which is
project shape a module never sees. The test that settled it (#1427): a
`checks` field could be added to the shell-composition contract WITHOUT
touching shell composition at all. If a field can be added to a contract
without touching what that contract composes, it is not part of it.

So lib.mkRustProject composes above mkProjectShell instead, and returns
the dev shell, the checks and the packages from ONE call. There is no
second function to forget.

Flake outputs are still consumer-assigned by construction, so nothing
here — and no contract change either — could make wiring structurally
impossible. What remains is closed loudly: the module's `checks` option
is mandatory with no default, so a hand-written `modules = [ "rust" ]`
fails at EVAL with a message that names the fix and the deliberate
opt-out (`{ name = "rust"; checks = "none"; }`). Silence was the failure
mode; silence is what is removed.

Notable details:

- mkRustProject folds the well-known root tool configs (rustfmt.toml,
  clippy.toml, deny.toml, about.*, .cargo/) into the crane fileset
  unconditionally via maybeMissing. Their absence from a build sandbox
  is SILENT — rustfmt/clippy/cargo-deny fall back to built-in defaults
  and the check passes while enforcing rules nobody wrote. The first
  consumer shipped that bug twice.
- The generated `checks.<system>.module-<name>` cannot instantiate a
  module whose options are mandatory, since it passes the bare name. The
  new nix/modules/check-entries.nix is the generator's per-name
  override; `rust` maps to the toolchain-only form. Internal plumbing,
  not consumer surface.
- crane and fenix become flake inputs (3 leaf lock entries). Every
  consumer, including Python-only ones, pays for them in lock size and
  fetch-at-eval. The alternative — each Rust repo pinning its own fenix
  — is per-repo drift on exactly the axis devkit exists to hold still.
  mkRustProject takes overrides, so the inputs can move back out later
  without a consumer-visible change.
- Zero-module invariant preserved: devShells.<system>.default.drvPath is
  byte-identical to dev (verified, not assumed).

Refs: #1400, #1427
crane's buildPackage runs `cargo test` as part of the build. With the
nextest check enabled that is the same suite run twice, on two separate
derivations, for one signal. The package builds now set doCheck = false
whenever nextest is enabled, leaving the test run to checks.nextest —
which is also what CI invokes via `just test`.

Gated on nextest rather than unconditional: with nextest off, dropping
doCheck would mean nothing runs the tests at all.

Refs: #1400
Nine tests on the rust module, and the load-bearing one is
`test_rust_module_bare_form_throws_with_mkrustproject_guidance`: the
whole design rests on `modules = [ "rust" ]` refusing to evaluate, so
that refusal gets a fixture asserting it fires AND that the message
names both the fix and the option. The rest cover the registry entry,
the generated module-rust check, the explicit opt-out, and the three
rejection paths (unknown option, invalid `checks` value, unknown tool).

The parity test is the other half: devShells.<system>.default.drvPath
must be byte-identical to a bare mkProjectShell, so the rust module's
existence cannot perturb the zero-module invariant. No inventory test
enumerating capability modules exists, so nothing needed `rust` added.

ADR-capability-modules gains the #1427 decision, the honest limitation
(flake outputs are consumer-assigned by construction, so no contract
change could have made wiring structurally impossible), the bar for
revisiting, the two rejected options, and a subsection documenting
check-entries.nix as internal plumbing. `rust` moves out of the
ask-gated candidate list into shipped.

Also in this commit: RUSTDOCFLAGS moves to a top-level attr on the doc
check so a consumer's `buildEnv` cannot collide with it through two
mechanisms, and the new banners say `inputs.devkit` rather than
`inputs.devcontainer` — the repo is devkit now.

Refs: #1400, #1427
85% of what crane+fenix cost a downstream consumer was one transitive
input devkit never chose. fenix pulls the rust-analyzer SOURCE TREE to
build its *nightly* rust-analyzer derivation — which this pack never
touches, because fromToolchainFile takes its components from the
release-channel manifest instead.

Following it to nixpkgs removes the node outright rather than replacing
it, since every consumer already has nixpkgs. Lock nodes 15 -> 14,
fetched source ~33 MB -> ~5 MB.

Verified rather than reasoned about, because the obvious worry is that
this breaks the rust-analyzer component: built a toolchain from
filesender's rust-toolchain.toml (which lists rust-analyzer) with the
follows in place, and result/bin contains rust-analyzer alongside cargo,
clippy, rustfmt and rustc. filesender's full nix flake check stays green
on all nine checks.

Measured while spiking #1440, which also corrected a claim I had made
about what these inputs cost. Deleting an unreferenced 20.8 MB input from
the store and re-running each operation shows nix eval, flake show, flake
check, flake metadata, develop and build all leave it absent; only flake
archive and re-locking fetch it. So the recurring cost of a shared input
is confined to nix flake update, not to everyday consumer operations.
That measurement is on Nix 2.34.7+1 with fetch-tree and no lazy-trees;
another Nix may differ, and CI images should be re-measured.

This lands the part of #1440 that every reviewer agreed on regardless of
how the larger question goes. Whether crane and fenix belong in devkit at
all is still open there.

Refs: #1440
…c ratchet

Two pieces: the kit, and a gate that can hold a line without becoming
noise.

TOOL GROUPS. `tools` entries may now start with `@` and expand to a
curated set: @Perf (samply first — sampling profiler, no root, no
perf_events, works on both platforms, which makes it the 2026 default;
then flamegraph, hyperfine, criterion, bloat, llvm-lines, show-asm, and
heaptrack/valgrind/poop where they exist), @perf-async (samply,
tokio-console, hyperfine — for tiers whose stalls are awaits, not CPU)
and @api (semver-checks, expand).

A group SKIPS members this platform lacks; an explicitly named tool does
not. That asymmetry is the reason groups exist: asking for @Perf is
asking for this platform's kit, but naming heaptrack is a request that
can only be met or refused, and silently dropping it would hand someone
a shell missing the one tool they asked for. Without groups every
consumer writes the same `optionals isLinux` by hand and some get it
wrong.

THE RATCHET. checks.perf-ratchet, auto-enabled when
.repo/perf-baseline.toml exists — the same adopt-by-existing rule as
deny.

It times nothing, on purpose. Wall-clock benchmarks on shared CI runners
move more with neighbours and thermal state than with most real
regressions, and a gate that fires on noise is one people learn to
re-run until it passes. The pack ADR already says coverage is reported
and never gated; this is the same reasoning, harder, because a flaky
perf gate teaches --no-verify.

What it measures is deterministic given a locked toolchain and a locked
graph, so a change means a change: shipped binary size per binary, and
dependency-graph size read from Cargo.lock at eval. Neither needs anyone
to have authored a benchmark — which is the point, because a ratchet
nobody has to write is a ratchet that is actually in place. Repos doing
real performance work add criterion/divan benches and run them off the
CI critical path; @Perf is what puts that kit on PATH.

It is a ratchet, not a limit: growth past the tolerance fails, a
measured shrink is REPORTED so it can be banked, and the baseline is
committed so the diff shows who spent the budget. packages.perf-seal
emits the baseline file itself, so sealing is never hand-transcribed.

Verified by firing it, not by reading it. On filesender: sealed a
baseline (filesender 2672624 B, filesender-mcp 3629360 B, 220 crates),
confirmed the check goes green, then tightened the baseline and
confirmed REGRESS on both the binary (+33%) and the graph (+10%) while
the untouched binary stayed ok, with the build failing and the guidance
(cargo bloat / llvm-lines / tree --duplicates, then perf-seal) printed.
Three new tests cover group expansion contributing a non-identical
derivation, the explicit-unavailable throw, and the unknown-group throw;
the rust set is 12 passing.

Refs: #1400, #1440
Four eval-time tests from adopting the Rust pack on a second consumer
(single-crate library, no binaries, heavily feature-gated):

- a pkgs without devkit's overlay must name overlays.default rather than
  dying on `undefined variable 'vig-utils'` inside devtools.nix
- a tree with no Cargo.lock must fail through fmt too, which took only
  `src` and so passed while the other five derivations failed
- checks must include a doctest entry, which #1400's stage table assigns
  to pre-push and #1429 did not ship
- cargoExtraArgs must reach commonArgs, so the checks can build features
  other than the default set

A dependency-free fixture crate keeps the lockfile a literal, so all four
run at eval — no vendoring, no network, no compile.

Refs: #1450
Two guards and two additions, all from a second consumer's adoption.

The guards replace failures that were opaque or partial:

- a pkgs without devkit's overlay now names overlays.default and says
  which outputs need it, instead of dying on `undefined variable
  'vig-utils'` inside devtools.nix. Checked lazily, on the dev shell
  alone: checks and packages never reach mkProjectShell and are usable
  against a plain nixpkgs, so an eager throw would break a working
  configuration to improve a message.
- a source tree with no Cargo.lock now says so, and says why a git-tree
  source is the reason. The check sits on cleanSrc so fmt fails with the
  rest rather than passing alone and making a total failure look partial.

The additions close gaps the suite did not admit to:

- checks.doctest runs `cargo test --doc`, which #1400 assigned to
  pre-push. nextest cannot run doctests and cargoDoc only lints rustdoc,
  so adopting the pack silently dropped them.
- cargoExtraArgs reaches every derivation, so the checks can build
  features other than the default set. Composed with `-p <crate>` in
  buildCrate rather than overwritten, so a workspace's per-crate builds
  cannot end up with a different feature set from the checks that ran
  against them.

Refs: #1450
Folded into the existing Rust language pack entry rather than opened as a
separate one: the fixes land before the pack has shipped, so a reader of
the released notes never saw the behaviour being corrected.

Refs: #1450
…1452)

Targets `feature/1400-rust-language-pack`, not `dev` — these are fixes
to the pack before it ships, so a reader of the released notes never
sees the behaviour being corrected.

Everything here came out of adopting #1429 on a second consumer,
`gerchowl/squelch`: a **single-crate library, no binaries, heavily
feature-gated** (`browser`/`logs` default; `gh-cli`, `endpoint`, `serde`
optional), wired from scratch rather than migrated. Full adoption report
is the comment on #1429. Closes #1450.

## Two guards

Both replace a failure that was opaque, partial, or both. Both follow
the `toolchainHash` error's shape, which is the best error in the pack:
say what happened, say why no default could be right, give the exact
line to add.

**`pkgs` without `overlays.default`.** `mkProjectShell` pulls
`nix/devtools.nix`, which resolves `vig-utils` from devkit's overlay.
Without it the shell died on `undefined variable 'vig-utils'` — an error
inside devkit, naming something the consumer has never seen, from a file
they did not open.

The reason this is a guard and not a docs fix: **`checks` and `packages`
never touch `mkProjectShell`**, so they evaluate fine without the
overlay. Unguarded, that is a repo with a green `nix flake check` and a
dev shell that has never once evaluated. Checked lazily, on the dev
shell alone — an eager throw would break a configuration that
legitimately uses only the checks.

**Missing `Cargo.lock`.** A flake's `src` is the git tree, so a repo
that gitignores its lockfile — the long-standing library convention, and
what `cargo new --lib` wrote for years — hands crane a source without
one. crane's own message is good, but only reachable from the
derivations that vendor: `cargoFmt` takes `src` alone and **passed**,
which made a total failure look partial. The guard sits on `cleanSrc` so
`fmt` fails with the rest.

## Two gaps the suite did not admit to

**`checks.doctest`.** #1400's stage table assigns pre-push `nextest`
**and** `cargo test --doc`. nextest cannot run doctests
(process-per-test has nowhere to put them) and `cargoDoc` only lints
rustdoc, so nothing executed them — a consumer whose doctests ran under
`cargo test` lost them on adoption, silently. `crane` already ships
`cargoDocTest`; this is one `optionalAttrs` block.

**`cargoExtraArgs`.** The checks built default features only, and
nothing reached `buildDepsOnly` / `nextest` / `doc` / the package builds
— `clippyExtraArgs` covers clippy alone, and carries lint flags rather
than feature selection. On squelch that was 55 of 59 tests, with the
gated code never compiled and therefore never linted. The suite reported
success over the gap.

Composed with `-p <crate>` in `buildCrate` rather than overwriting it,
so a workspace's per-crate builds cannot end up with a different feature
set from the checks that ran against them.

The seam that worked before this was `buildEnv = { cargoExtraArgs = …;
}`, since `buildEnv` is a raw `commonArgs` merge wearing an env-var
name. Left in place, now commented as what it actually is.

## Verified

- `uv run pytest tests/test_flake_modules.py -k "rust or mk_rust"` —
**13 passed**, including the zero-module parity invariant.
- The four new tests were committed failing first, and each fails for
its own reason before the implementation commit.
- **End-to-end on the consumer**, with `--override-input devkit` pointed
at this branch: `nix flake check` green on **6** checks, `doctest`
executing squelch's 3 doctests, and `cargoExtraArgs = "--all-features"`
replacing the `buildEnv` workaround.

## Note on scope

The fixture crate is written to `tmp_path` at test time rather than
committed under `tests/fixtures/`, deliberately: a `Cargo.toml` inside
devkit would make devkit look like a Rust consumer to its own language
detection.

Refs: #1450
Syncs `dev` with `main` (sync-main-to-dev workflow).
…craneArgs

Follow-ups from the second-consumer review in #1452, both on things that
review either surfaced or deliberately left to me.

THE SENTINEL NEEDED ITS OTHER HALF. #1452's overlay guard is right and
the error is good, but `hasOverlay = pkgs ? vig-utils` is a PROXY: it
infers "the overlay was applied" from one package name. Proxies drift.
If devkit's overlay ever renames or drops vig-utils, the guard starts
throwing "you did not apply the overlay" at consumers who did — and the
shipped test would still pass, because it asserts a throw.

That is the rule this whole branch is built on, applied to the branch
itself: a gate is unverified until it has fired on known-bad input AND
stayed quiet on known-good. The guard arrived with only the first half.
The new positive test evaluates rust.devShell WITH the overlay, so the
day the sentinel stops tracking what it stands for, something fails.

BUILDENV WAS A LIE OF OMISSION. #1452 found that feature selection had
exactly one seam reaching buildDepsOnly, and it was an argument
documented as holding CMAKE_* and PKG_CONFIG_PATH. They added a real
`cargoExtraArgs` and left the naming question to me, correctly.

It is now `craneArgs`, documented as what it is: raw attrs merged last
into every crane derivation, beating everything above them. `buildEnv`
stays accepted as a deprecated alias so the second consumer's flake
keeps evaluating — merged after craneArgs, on the reasoning that anyone
still passing the old name means it.

Reviewed the rest of #1452 by running it rather than reading it: the
pinned crane does expose cargoDocTest, filesender's check set is 11 with
`doctest` present and executing (zero doctests there, so vacuous on this
consumer but live on squelch's three), and the rust suite is 16 green,
19 with these two.

Refs: #1450, #1400
Both sides appended to CHANGELOG's Unreleased/Added block, so the
conflict is textual only and both sets of entries are kept. The
.devcontainer mirror is regenerated from the resolved file rather than
resolved by hand, since sync-manifest owns it.

Refs: #1400
CI's Project Checks gate failed on checks.statix: three dotted `fenix.*`
keys in `inputs` trip "avoid repeated keys in attribute sets". The
existing inputs use the dotted form with only two keys each, which is
under whatever statix tolerates; adding the rust-analyzer-src follows
made it three. Rewritten as a single attrset, comments intact.

Found by CI rather than locally because I had verified with
`nix flake check --no-build`, and statix is a check that must BUILD to
say anything. That is this branch's own lesson landing on me: a gate
that is configured and not executed reports nothing, and `--no-build` is
a way to not execute one while believing you ran the suite. Verified
here with a full `nix flake check` — all checks passed, lock unchanged
at 14 nodes.

Refs: #1400
…#1429)

Ships the Rust language pack as **two pieces**, and the split between
them is the design. Implements the `A + D + assert` resolution recorded
in #1427.

Closes #1400. Refs #1427.

## How to test it

```nix
# flake.nix
inputs.devkit.url = "github:vig-os/devkit/feature/1400-rust-language-pack";

# perSystem
rust = devkit.lib.mkRustProject {
  inherit pkgs;
  src = ./.;
  toolchainHash = "sha256-…";       # for your rust-toolchain.toml
  crates = [ "my-cli" ];
};
devShells.default = rust.devShell;
checks             = rust.checks;
packages           = rust.packages;
```

Set `toolchainHash = pkgs.lib.fakeHash` first; the build failure prints
the real one.

Toolchain-only, no check suite — deliberate and explicit:

```nix
modules = [ { name = "rust"; checks = "none"; } ];
```

And the thing that should NOT work:

```nix
modules = [ "rust" ];   # eval error, by design — see below
```

## What's here

| File | |
|---|---|
| `nix/modules/rust.nix` | v1 capability module: toolchain + curated
cargo tooling + mold on Linux |
| `nix/mk-rust-project.nix` | `lib.mkRustProject` — dev shell, checks
and packages from one call |
| `nix/modules/check-entries.nix` | internal: how the generated
`module-<name>` check instantiates a module whose options are mandatory
|

Checks produced: the per-crate builds, plus `clippy`, `fmt`, `nextest`,
`doc` (rustdoc warnings denied) and `deny` (auto-enabled when a
`deny.toml` exists).

## Why checks are a lib function and not a contract field

`packages` / `env` / `shellHook` fold monoidally into **one** derivation
— the shell. `checks` is a namespaced map of **independent peer
derivations** on a different lifecycle (`nix flake check`, not `nix
develop`), built from the consumer's source tree, which is project shape
a module never sees.

The test that settled it: a `checks` field could be added to the
shell-composition contract **without touching shell composition at
all**. If a field can be added to a contract without touching what that
contract composes, it isn't part of that contract.

So `mkRustProject` composes *above* `mkProjectShell` and returns all
three together. One call — there is no second function to forget.

## Why the module refuses to load bare

`modules = [ "rust" ]` would hand you a toolchain, a green `nix flake
check` that builds nothing, and CI that compiles nothing: the exact
silent-green failure the pack exists to prevent, delivered by the pack.
So the module's `checks` option is **mandatory with no default**, and
the bare form throws at eval with a message naming the fix and the
opt-out.

Being straight about the limit: **flake outputs are consumer-assigned by
construction.** No option here — including extending the contract —
could have made correct wiring structurally impossible. What this shape
buys is one call instead of two, `checks` arriving visibly beside
`devShell`, and a loud eval-time failure on the one remaining path.
Silence was the failure mode; silence is what's removed.

## Costs, stated plainly

- **`crane` + `fenix` become devkit inputs — 3 leaf lock entries that
every consumer pays for**, Python-only ones included, in lock size and
fetch-at-eval. The alternative is each Rust repo pinning its own fenix,
which is per-repo drift on exactly the axis devkit exists to hold still.
`mkRustProject` takes `crane`/`fenix` overrides, so the inputs can move
back out later without a consumer-visible change. **Flag it if you
disagree — this is the most reversible-but-annoying-later decision in
the PR.**
- `nix/lib/` turned out to be **gitignored** (`.gitignore:17` has a bare
`lib/` from the Python layout, which swallows any `lib` directory at any
depth). The file lives at `nix/mk-rust-project.nix` instead, matching
`nix/hooks.nix` / `nix/devtools.nix`. Worth fixing that pattern
separately — it will bite someone else.

## Verified, not assumed

- `checks.<system>.module-rust` evaluates ✅
- Bare `modules = [ "rust" ]` throws the guidance error ✅
- **Zero-module invariant holds**: `devShells.<system>.default.drvPath`
is byte-identical to `dev` ✅
- End-to-end on the first consumer (`gerchowl/filesender`, a cli + mcp +
lib workspace): its ~120 lines of hand-rolled crane/fenix wiring were
deleted and replaced by one `mkRustProject` call; all 9 checks evaluate
and build.

## Two bugs this shape prevents by construction

Both were shipped by the first consumer, and both were invisible to
inspection:

1. `deny.toml` outside the crane fileset — an `openssl` ban that banned
nothing.
2. `clippy.toml` outside the fileset — the sandboxed clippy check ran
against defaults, enforcing rules nobody wrote.

`mkRustProject` folds the well-known root tool configs (`rustfmt.toml`,
`clippy.toml`, `deny.toml`, `about.*`, `.cargo/`) into the fileset
unconditionally via `maybeMissing`, so there is nothing to remember and
nothing to keep in sync.

## Found by devkit's own gates, on devkit

Worth recording because it is the same failure class this PR is about.
My first branch was `feat/rust-language-pack` and the first two commits
said `Refs #1400` without the colon. Both were **wrong by devkit's own
rules** — the taxonomy is `feature`, not `feat`, and `Refs:` is a
mandatory trailer — and both went through, because a fresh `git clone`
has no hooks installed until something installs them. They were caught
only when the hooks happened to be present for the third commit.

That is exactly the shape of the five bugs in the first consumer's
history: configured, believed active, never executed. Branch renamed,
trailers normalized, commits signed. But **a fresh clone of devkit does
not enforce devkit's rules until someone runs the installer**, and
nothing tells you that. Probably worth its own issue.

## Review asks

1. The **`crane`/`fenix` as devkit inputs** tradeoff above.
2. `check-entries.nix` — is a per-name generator override the right
answer for mandatory-option modules, or should the generated smoke check
learn about them some other way?
3. Whether the eval-time refusal is too aggressive for a scratch-shell
user (the opt-out is one attrset, but it *is* friction).
The block expired 2026-08-12, so check-expirations failed on every branch
(the hook is enable=true in the flake hook set, so Tier 0 nix-fast-build
runs it inside the pre-commit derivation) and on the nightly security
scan for both dev and main.

Re-verified before renewing rather than bumping the date: against the
last green nightly scan on the current pin 531670d871c0 (run
31569093850, findings of 2026-08-12) all six CVEs are still live
findings against glibc-2.42-67, so none became droppable the way the
gawk block did after its rev advance (#1328). Advancing the rev cannot
help either -- the advisories scope the defects to "2.34 to 2.43" and
"2.7 to 2.43", so 2.43 is itself affected and only backported patches
clear them.

Renewed onto the shared 2026-09-02 grid date so the whole register comes
up for review in one pass (#1337). Each entry now carries its NVD CVSS
and the advisory's required vector in place of the "specifics unverified
offline" placeholder the 2026-06-23 triage had to use; the reachability
lines assess those vectors against the single-user container model and
do not claim an audit of the closure's callers. CVE-2026-4438 (5.4) and
CVE-2026-6238 (6.5) are reported against the same derivation and stay
out of the register: both sit below the gate's CVSS 7.0 threshold.

Refs: #1481
## Description

The glibc exception block in `.vulnixignore` expired **2026-08-12**, so
`check-expirations` fails on every branch — the hook is `enable = true`
in the
flake hook set (`nix/hooks.nix:749`), so Tier 0 `nix-fast-build` runs it
inside
the `pre-commit` derivation — and the nightly `Scheduled Security Scan`
has been
red on both `dev` and `main` since 2026-08-13 06:14Z.

**Merge this first.** It is the reason CI is red on the other four 1.8.1
PRs
(#1479, #1478, #1477, #1474); none of them touch `.vulnixignore`.

## Type of Change

- [x] `fix` -- Bug fix

## Changes Made

Renewed rather than date-bumped. Re-verified against the last green
nightly scan
on the current pin `531670d871c0` ([run
31569093850](https://github.com/vig-os/devkit/actions/runs/31569093850),
findings of 2026-08-12): **all six CVEs are still live findings**
against
`glibc-2.42-67`, so none became droppable the way the gawk block did
after its
rev advance (#1328).

| CVE | CVSS | Vector requires |
|-----|------|-----------------|
| CVE-2026-5450 | 9.8 | `scanf` `%mc` with an explicit width > 1024 on
attacker-controlled input |
| CVE-2025-15281 | 7.5 | `wordexp()` with `WRDE_REUSE|WRDE_APPEND` |
| CVE-2026-4437 | 7.5 | hostile/compromised resolver + the legacy
`gethostbyaddr` API |
| CVE-2026-4046 | 7.5 | converting untrusted input **from**
IBM1390/IBM1399 |
| CVE-2026-5928 | 7.5 | a non-Unicode charset with single/multi-byte
overlaps |
| CVE-2026-5435 | 7.3 | a caller of the deprecated `ns_printrr*` /
`fp_nquery` |

Advancing the pin cannot clear them either: the advisories scope the
defects to
*"2.34 to 2.43"* and *"2.7 to 2.43"*, so glibc 2.43 is itself affected
and only
backported patches help.

- Expiry renewed to **2026-09-02**, the Wednesday grid date the
register's five
other blocks already share (#1337), so the whole register is reviewed in
one pass.
- Each entry now records its NVD CVSS and the advisory's required
vector, replacing
the `specifics unverified offline` placeholder the 2026-06-23 triage had
to use.
The reachability lines assess those vectors against the single-user
container
model; they are explicitly **not** an audit of which closure members
call the
  affected functions.
- `CVE-2026-4438` (5.4) and `CVE-2026-6238` (6.5) are reported against
the same
derivation and stay out of the register — both are below the gate's 7.0
threshold.

## Changelog Entry

```
### Security

- **Renew the glibc exception block in the vulnix register**
  ([#1481](#1481))
  - The block expired 2026-08-12, failing `check-expirations` on every branch
    (the hook runs inside the flake's `pre-commit` check) and on the nightly
    security scan
  - Re-verified against the current pin before renewing: all six CVEs are still
    live findings against `glibc-2.42-67`, so none could be dropped the way the
    gawk block was after its rev advance; the advisories cover glibc through
    2.43, so advancing the pin cannot clear them either
  - Renewed onto the shared `2026-09-02` grid date, and each entry now records
    its CVSS and the advisory's required vector in place of the previous
    "specifics unverified offline" placeholder
```

## Testing

- [x] `uv run check-expirations .trivyignore .vulnixignore` ->
`Validated 32 exception(s) across 2 file(s)`, exit 0
- [x] `prek run --all-files` -> fully green, exit 0

Closes #1481

Refs: #1481
Assert the shape #1479 requires before implementing it: the release branch
is created BEFORE the changelog freeze, the freeze target is dev under
gitflow and release/X.Y.Z under trunk (never the trunk itself), the
release-branch fast-forward is non-forcing and gated on this run having
created the branch, and open-pr refuses a zero-commit release PR via an
explicit same-SHA guard.

The two existing assertions that encoded the defective topology are
retargeted in the same commit: `refs/heads/main` in a trunk render (nothing
writes to the trunk any more) and the `dev_sha` output name (renamed to the
model-neutral `freeze_sha`).

Refs: #1479
Under DEVKIT_WORKFLOW=trunk the rendered prepare-release.yml froze the
CHANGELOG onto main and then cut release/X.Y.Z from that same post-freeze
SHA, so `gh pr create --base main --head release/X.Y.Z` had head == base
and GitHub refused it ("No commits between main and release/X.Y.Z"). The
freeze was also a direct push to the trunk, which a require-PR ruleset
rejects unless the Commit App is a bypass actor (the #1227 collision class).

Reorder the shipped (gitflow) asset into a model-agnostic shape so the
trunk render stays a literal substitution: capture the base SHA, create
release/X.Y.Z at it, freeze onto the model's freeze target, wait for that
target to advance (#617, retargeted via FREEZE_REF), then fast-forward the
release branch onto the freeze commit. Under gitflow that fast-forward is
real and the leg is behaviour-identical; under trunk the freeze already
landed on the release branch, so it short-circuits and main is never
written to — by the prepare freeze or by the rollback's restore.

The fast-forward is non-force and gated on this run having created the
branch: a pre-existing release/X.Y.Z may carry commits that are not
ancestors of the freeze commit, where the update is not a fast-forward at
all, so it is skipped exactly as branch creation has always tolerated it.
The rollback's freeze-ref read is taken after the branch delete and
tolerates a missing ref, which is what makes the trunk restore a natural
no-op. `open-pr` gains an explicit same-SHA guard: a collapsed topology now
fails with a named cause instead of an opaque GitHub refusal, which is the
regression assert a local-git simulation cannot express (#1206).

The prepare job's `dev_sha` output becomes `freeze_sha` (it is the freeze
commit under either model) and a new bats case runs actionlint over the
trunk-rendered workflows, the render class that now substitutes a ${{ }}
expression into workflow env values.

Refs: #1479
## Description

Fixes the trunk release train. Under `DEVKIT_WORKFLOW=trunk`,
`render_workflow_model()` was a pure literal `dev` -> `main` rewrite, so
`prepare-release.yml` froze the CHANGELOG onto `main` and then cut
`release/X.Y.Z` from that **same post-freeze SHA**, while the draft PR
was still
opened `--base main --head release/X.Y.Z`. Head and base resolved to one
commit
and `gh pr create` failed with *"No commits between main and
release/X.Y.Z"*.
The same freeze was also a direct push to the protected trunk.

`vig-os/org-config` is blocked on exactly this; its `v1.0.0`/`v1.0.1`
were
hand-cut, so the train has never executed there and the defect stayed
latent.

## Type of Change

- [x] `fix` -- Bug fix

## Changes Made

The shipped (gitflow) asset is restructured into a **model-agnostic
ordering**,
so the trunk render stays a literal substitution with no step reordering
in sed:

1. capture `prepare_start_sha` = base head (`dev`; trunk: `main`)
2. **create `release/X.Y.Z` at that pre-freeze SHA** — moved ahead of
the freeze
3. freeze -> `TARGET_BRANCH` = `refs/heads/dev` (trunk: the release
branch)
4. `freeze_wait` — the #617 read-after-write loop, now watching
`FREEZE_REF`
5. fast-forward `release/X.Y.Z` onto the freeze commit (`force=false`);
under
   trunk the SHAs already match and the step short-circuits

`open-pr` gained an explicit **same-SHA guard** before `gh pr create` —
the
regression assert the issue asks for, since a local-git simulation
cannot express
GitHub's server-side refusal (which is why the #1206 spike could not
catch this).

Verified on the actual trunk render: base reads resolve to `heads/main`,
the
freeze `TARGET_BRANCH` and `FREEZE_REF` resolve to the release branch,
the
rollback's restore target likewise, and there are **zero residual bare
`dev`
tokens**. The freeze therefore never touches the trunk, so **no Commit
App bypass
on `main` is required** — consistent with how #1227 was resolved.

**gitflow is behaviourally unchanged**: the freeze still lands on `dev`
and the
release branch still ends at the freeze commit (now by fast-forward
instead of by
late creation). `test_gitflow_scaffold_matches_default_path` and
`test_gitflow_render_files_are_byte_identical_to_template` still pass.

Incidental improvement: a failure *between* the freeze and branch
creation used
to leave `dev_sha` empty, silently skipping the rollback's changelog
restore;
`freeze_sha` is now emitted immediately after the freeze.

## Changelog Entry

```
### Fixed

- **Trunk release: cut the release branch before the changelog freeze**
  ([#1479](#1479))
```
(full entry with sub-bullets is in `CHANGELOG.md`)

## Testing

- [x] `uv run pytest tests/test_workflow_model.py` -> 12 failed before
the fix, **32 passed** after
- [x] `uv run pytest tests/test_workflow_model.py
tests/test_workflow_prepare_extension.py tests/test_release_core.py
tests/test_release_rollback_guard.py tests/test_scaffold_lint.py
tests/test_scaffold_drift.py` -> 136 passed
- [x] full suite `uv run pytest -m "not integration"` -> 1355 passed, 20
skipped
- [x] `just test-bats` -> 506 ok, 0 not ok — including a **new** case
running actionlint over the *trunk*-rendered workflows (previously only
gitflow renders were linted)
- [x] `prek run --all-files` -> only `check-expirations` fails;
`.vulnixignore` is byte-identical to `dev` on this branch. **Fixed by
#1482 — merge that first.**

### Manual Testing Details

Rendered a trunk scaffold and read the resulting `prepare-release.yml`
directly to
confirm the branch/freeze/PR topology and the absence of `dev` residue.

**No live CI proof exists in this repo** — `devkit-smoke-test` is
gitflow, so every
automated leg here exercises only the unchanged gitflow path. Live proof
will be
`vig-os/org-config`'s next release train.

Closes #1479

Refs: #1479
…ig-os (#1484)

## Description

CI reported a green `Tests` check for a repo whose entire Python project
had been
deleted. Two individually-correct leniencies composed into one blind
spot: no
`pyproject.toml` -> the recipe body is skipped and exits 0;
`pyproject.toml`
present but nothing collected -> pytest's exit 5 is swallowed (#1281).
Together,
CI could not distinguish *"no Python suite by design"* from *"the Python
suite
vanished"* — and reported success for both. That is why #1466's damage
travelled
as far as it did.

## Type of Change

- [x] `fix` -- Bug fix

### Modifiers

- [ ] Breaking change

> **SemVer note:** this is arguably **minor**, not patch — it adds a
consumer-facing
> `.vig-os` key and a new `resolve-toolchain` output, and it can turn a
previously-green
> repo red (by design). Milestone `1.8.1` may need the same rename
`1.7.1` -> `1.8.0` got.

## Changes Made

**The key is a sticky DECLARATION, not a detection cache.** A cache
would not have
caught #1466: the deploy that deleted `pyproject.toml` re-ran the
scaffold in the
same commit, so a cache would have been rewritten to empty and CI would
still have
been green. So `DEVKIT_LANGUAGES` is seeded from detection, **grows**
when a
language appears, and is **never** narrowed by the scaffold — removal is
a
deliberate `.vig-os` hand-edit. A declared-but-undetected language
prints a loud
scaffold notice rather than being silently reconciled.

- **`.vig-os`** — new `DEVKIT_LANGUAGES=` key, shipped empty, documented
in house style.
- **`init-workspace.sh`** — read before the template overwrite (else an
upgrade would
erase the declaration); enum guard (unknown name aborts,
`DEVKIT_FEATURES_DISABLED`
shape); union with `DETECTED_LANGUAGES`; canonical ordering so the
written-back
  value is deterministic and does not read as drift each upgrade.
- **`resolve-toolchain`** — new `languages` output, always emitted
(explicit empty
string when nothing is declared), following the `drift-check` precedent.
- **`ci.yml`** — one `Check declared languages` gate as a step of
`resolve-toolchain`.
Every toolchain job already `needs:` that job, so a failure stops
lint/test/
commit-checks before they start — which closes the identical
`lint`/`format` blind
spot (the issue's option 4) at the same time — and it costs no extra
runner,
container pull or `needs:` edge. **The gate lives in managed `ci.yml` on
purpose:**
`justfile.project` is a preserved file, so a recipe-only fix would never
reach an
  existing consumer.
- **`justfile.project`** — recipes now report the skip instead of
no-oping silently,
and exit 5 is swallowed only while there is no `tests/` directory (the
issue's
options 2 and 3). The scaffold ships no `tests/` directory, so a fresh
scaffold
  stays green.

`nix` is declared and notified but never gated in CI: it has no single
marker file
(`flake.nix` ships with every direnv scaffold), so its absence is not
decidable from
a path. Stated in the manifest comment, the action output, `ci.yml` and
`MIGRATION.md`.

A language-neutral repo stays green at all three levels — bare template
line, explicit
empty output, gate prints "nothing to check" and exits 0. A consumer
whose `.vig-os`
predates the key resolves to the seeded-from-detection default; no hard
failure is
reachable from an absent key.

## Changelog Entry

```
### Changed

- **Gate CI on the project languages a repo declares in .vig-os**
  ([#1478](#1478))
```
(full entry with sub-bullets is in `CHANGELOG.md`)

## Testing

- [x] RED first: `uv run pytest tests/test_declared_languages.py` ->
**28 failed**; `bats` filter -> 4 not ok
- [x] `uv run pytest tests/test_declared_languages.py
tests/test_vig_os_manifest.py` -> **51 passed**
- [x] `uv run pytest` (+ `test_ci_runner`, `test_scaffold_drift`,
`test_scaffold_lint`, `test_install_script`, `test_integration`) -> 223
passed, 19 skipped
- [x] full suite -> 1372 passed, 20 skipped
- [x] `just test-bats` -> 511 ok, 0 not ok
- [x] `prek run --all-files` -> only `check-expirations` fails;
`.vulnixignore` is byte-identical to `dev` on this branch. **Fixed by
#1482 — merge that first.**

### Manual Testing Details

Reproduced #1466's shape end to end: scaffolded a Python repo, deleted
`pyproject.toml`, re-scaffolded — the declaration **survived** and the
notices
printed; the real `resolve-toolchain` script then emitted
`languages=python` and
the real `ci.yml` gate step exited 1 with the diagnosable error.

Closes #1478

Refs: #1478
A final release.yml run's finalize job pushes to release/X.Y.Z (CHANGELOG
date stamp, regenerated docs, sync-issues commit), which dismisses the PR
approval that same run required wherever stale-review dismissal is enabled.
promote-release.yml re-checks approvals before merging, so re-approving is a
mandatory step between the final and the promote dispatch.

Documents that step in RELEASE_CYCLE.md (Phase 2 step 7, Phase 3
prerequisites, Phase 5 runbook, lifecycle diagram, release.yml reference) and
mirrors the operator step into DOWNSTREAM_RELEASE.md, linking back for the
reasoning. Both approval gates are kept: each guards a different irreversible
act. No workflow or code change.

TDD does not apply: documentation only, nothing testable.

Refs: #1474
## Description

The smoke listener's "trigger a workflow, then wait for it" pattern
could match a
**stale, unrelated run** and report success without the dispatched run
having
started. On the 1.8.0 final it made `Trigger and wait for release
workflow` return
success in **1.5 seconds** — matching rc4's release run from 47 minutes
earlier —
and promote-release was then fired against a repo that had no `1.8.0`
release yet.

Silent on candidates (promote is skipped for RCs, so the defect hid
across
rc1–rc4); fires on **every** final. The cross-repo gate then reports a
false
negative, which is the worst failure mode for a gate.

## Type of Change

- [x] `fix` -- Bug fix

## Changes Made

The old guard assumed the newest run on `${WORKFLOW_REF}` at capture
time was the
newest the poll would ever see other than the dispatched one. It is not:
the
dispatched run needs a moment to appear in the API, and if the first
poll lands in
that window, `--limit 1` returns a previous, already-`completed` run
that is still
newer than a stale baseline.

All three call sites (prepare-release, release, promote-release) are
fixed
identically and kept textually in lockstep:

- each trigger step stamps `DISPATCH_TS` immediately **before** `gh
workflow run`;
- the wait accepts a run only if `createdAt >= DISPATCH_TS` **and**
  `databaseId > BEFORE_RUN_ID` — both guards must hold;
- capture and poll now carry identical `--workflow` / `--branch` /
`--event workflow_dispatch` filters, so the baseline describes the
population
  being polled;
- the **oldest** matching run is taken (ours is the first created after
our stamp)
  and the id is **locked on**, so a later run cannot hijack the wait;
- the loop can never exit success without a bound run; the timeout stays
a loud
  failure and now says no matching run was ever observed;
- the bound run's id and URL are logged, and both terminal messages name
them.

`DISPATCH_TS` is backdated **60 s**: the stamp comes from the runner's
clock and is
compared against a server-side `createdAt`, so skew in the wrong
direction would
filter the dispatched run out of its own wait and turn every release
into a
timeout. 60 s is ~47x smaller than the gap to the stale run that
actually bit.

Two pre-existing bats tests asserted the **defective** guard verbatim,
so they were
retargeted at the new shape (one now asserts the old guard is absent).
Net test
count unchanged: 505 before, 505 after.

## Changelog Entry

```
### Fixed

- **Smoke listener waits bind to the run they dispatched**
  ([#1477](#1477))
```
(full entry with sub-bullets is in `CHANGELOG.md`)

## Testing

- [x] `uv run pytest tests/test_smoke_dispatch_wait.py` -> 24 failed / 1
passed before, **25 passed** after
- [x] `uv run pytest tests/` (minus image/integration) -> 683 passed,
identical before and after the bats edit
- [x] `just test-bats` -> 505 ok, 0 not ok
- [x] `actionlint` on the modified workflow -> exit 0
- [x] `zizmor --offline` -> identical finding profile before and after
(61/48 suppressed, all pre-existing)
- [x] `prek run --all-files` -> only `check-expirations` fails;
`.vulnixignore` is byte-identical to `dev` on this branch. **Fixed by
#1482 — merge that first.**

### Manual Testing Details

The new test module is not only shape assertions: it executes each wait
step's real
bash against a stubbed `gh` that models the API visibility lag,
replaying the 1.8.0
timeline. `test_stale_completed_run_is_never_accepted` runs the
**pre-fix** bash
against those exact numbers and gets `exit 0` + "completed
successfully"; the fixed
bash keeps waiting and binds to run `31604068811` once it appears.

> [!IMPORTANT]
> **The listener executes from `devkit-smoke-test`'s DEFAULT branch.**
Merging this
> does not deploy it. It needs a manual redeploy to smoke-test `main`
before the next
> final, or the fix ships without ever running and #1477 fires again.
Precedents for
> that hotfix path: smoke-test#345, #353.

Closes #1477, closes #1475

Refs: #1477
)

## Description

`vig-os` dismisses PR approvals when new commits are pushed. The
`finalize` job of
a **final** `release.yml` run always pushes to the release branch (the
CHANGELOG
date stamp, plus the sync-issues commit), so **the approval that
authorises the
final release is destroyed by that very run** — every time, in every
repo consuming
the scaffolded release workflow. `promote-release.yml` then re-checks
approvals
independently, making re-approval a mandatory, undocumented step between
the final
and the promote dispatch.

Observed live on the 1.8.0 train: #1441 was `APPROVED` when `validate`
passed, and
`DISMISSED` / `REVIEW_REQUIRED` immediately after `finalize` pushed
`15abe1b3` +
`7a07142d`.

## Type of Change

- [x] `docs` -- Documentation only

**Both approval gates are kept.** Each guards a genuinely different
irreversible act
— burning the immutable `X.Y.Z` tag, and moving `:latest` + merging to
`main`. No
workflow or code file is touched by this PR.

## Changes Made

`docs/RELEASE_CYCLE.md`:
- lifecycle diagram — approval node relabelled as authorising the final
dispatch; new
  `Re-approve PR` node between publish and merge
- Release Phases item 2, Phase 2 step 7 — the approval authorises the
*dispatch* and
  does not survive it
- Phase 3 prerequisites — "PR has required approvals (**consumed by this
run**)",
  plus a paragraph naming the pushes that dismiss it
- Phase 5 — new step 4 "Re-approve the release PR" with the concrete
commands, before
  the promote dispatch
- `release.yml` reference — one bullet in Key characteristics

`docs/DOWNSTREAM_RELEASE.md` — mirrors the **operator step** only,
linking to
`RELEASE_CYCLE.md` for the reasoning (SSoT: no duplicated explanation).

Three pre-existing sentences had to be reconciled rather than left
contradicting the
new text. Notably, Phase 2 step 7's *"the approval lands on the exact
diff that
ships"* now says the approval lands on the release content **as it will
ship**, with
the mechanical finalization written on top. The issue's phrasing that
"the approved
SHA is what gets tagged" was deliberately **not** reused — the tag
points at
`finalize_sha`, i.e. the approved content *plus* the finalize commit, so
that
sentence would have been false.

## Changelog Entry

```
### Changed

- **Release docs: the release PR must be re-approved before promote**
  ([#1474](#1474))
```
(full entry with sub-bullets is in `CHANGELOG.md`)

## Testing

- [x] `prek run --all-files` (incl. `pymarkdown` on every changed file)
-> only
`check-expirations` fails; `.vulnixignore` is byte-identical to `dev` on
this
      branch. **Fixed by #1482 — merge that first.**

TDD does not apply: documentation only, nothing testable, as the repo's
TDD rule allows.

### Manual Testing Details

Verified the load-bearing claim against the code rather than the issue
text: devkit's
own `promote-release.yml` checks approval **only** in the `merge` job
(`:435`), which
runs *after* `promote` has published the draft release and moved
`:latest` — so a
dismissed approval leaves the release half-promoted. The consumer
template checks in
**both** `validate` (fails fast) and `merge`. The two documents say the
right thing
for their own audience.

Closes #1474

Refs: #1474
Parametrize the promote-release shape suite over both copies (devkit's own
workflow and the scaffold template) and assert the draft/approval/CI gate
runs in validate, before the irreversible publish, while the merge copy
stays as defence in depth.

RED on the devkit copy: its validate job has no release-PR check at all.

Refs: #1487
…shing

Devkit's own promote-release.yml checked the release PR's draft status,
approvals and CI only in the merge job, which runs after promote has moved
GHCR :latest and published the draft Release. An unapproved PR therefore
failed the promote from an already-published state, leaving the release
public while main lacked the release commit — and published releases are
immutable org-wide, so it cannot be walked back.

The trigger is the default state of every final release, not an edge case:
finalize always pushes to the release branch and so always dismisses the
approval under org-wide stale-review dismissal (#1474). Only operator
discipline kept it latent.

Mirror the scaffold template rather than invent a third shape: the same
Find and verify release PR step now runs in validate, and the merge copy
stays (PR state can change between the two jobs). Mirroring also brings the
mergeability gate (#1132) that the upstream copy never carried in either
job. The check needs a repo-scoped App token — validate's existing token is
scoped to devkit-smoke-test and cannot read this repo's PRs.

Refs: #1487
c-vigo and others added 11 commits August 13, 2026 11:17
…shing (#1490)

Closes #1487

## Problem

Devkit's own `promote-release.yml` checked the release PR's draft
status,
approvals and CI **only in the `merge` job** — which runs *after*
`promote` has
already moved GHCR `:latest` and published the draft GitHub Release. An
unapproved PR therefore failed the promote from an already-published
state:
the release is public, `main` does not contain the release commit, and
the
release PR is still open. Published releases are immutable org-wide, so
that
state cannot be walked back — only fixed forward.

The scaffolded consumer template does not have this shape. It runs the
same
`Find and verify release PR` check in `validate` (fail-fast) *and*
repeats it
in `merge`. Only the upstream workflow was missing the early gate.

**Latent, not fired.** Every promote to date succeeded, because the
maintainer
re-approves the release PR before dispatching. But #1474 established
that a
final `release.yml` run's `finalize` job *always* pushes to the release
branch
and so *always* dismisses the approval under the org-wide stale-review
dismissal. The trigger condition is the **default state of every final
release** — the only thing standing between it and a half-promoted
release was
an undocumented habit, documented only last commit in #1486.

## Change

Mirror the consumer template rather than invent a third shape: the same
`Find and verify release PR` step now runs in `validate`, and the
`merge` copy
**stays** — PR state can change between the two jobs, which is why the
template
keeps both deliberately.

The check needs a repo-scoped App token: `validate`'s existing
`smoke-check-token` is scoped `repositories: devkit-smoke-test` and
cannot read
this repository's PRs, and `github.token` there carries only
`contents: write, packages: read`. Rather than guess at a `GITHUB_TOKEN`
permission set that has never been exercised (a wrong guess fails closed
and
breaks the next promote), the new step mints the App token exactly as
the
`merge` job does — an identity proven on every promote run to date.

### One thing worth flagging

Mirroring the template's step wholesale also brings the **mergeability
gate**
(#1132 — BEHIND / BLOCKED / DIRTY), which devkit's upstream workflow had
never
carried in *either* job. This is slightly beyond the literal title of
#1487,
and deliberate: it is the same defect class (approved + CI-green is not
the
same as mergeable, and finding out during `merge` means finding out
after the
publish), and carving those lines out of the step would produce exactly
the
divergent third variant the issue asks to avoid. It is fail-*earlier*,
not
fail-*more*: a BEHIND PR already failed the merge, just from a published
state.

## Tests

`tests/test_promote_release.py` is parametrized over both copies
(`devkit`,
`scaffold`) instead of pinning the scaffold alone — the divergence this
issue
is about was invisible precisely because the shape suite only ever
looked at
the template. RED before the fix on all four `[devkit]` cases:

```
FAILED test_validate_gates_release_pr_before_promote[devkit]
FAILED test_validate_queries_pr_mergeability[devkit]
FAILED test_validate_rejects_behind_pr[devkit]
FAILED test_validate_requeries_unknown_mergeability[devkit]
4 failed, 13 passed
```

Green after: `17 passed`. Full suite `1307 passed, 20 skipped`
(`tests/test_image.py` excluded — it checks a locally-pulled 1.8.0 image
against dev's CHANGELOG and fails identically on clean `dev`; CI builds
the
image from the branch). `prek run --all-files` green.

## Verification owed

The gate cannot be live-proven without deliberately dispatching a
promote
against an unapproved PR. The next 1.8.1 promote exercises the happy
path —
`validate` passing the new step is the proof it does not false-positive.

Refs: #1487, #1474, #1132
A hook with no stages runs at every stage, and typos passes filenames, so
the commit-msg round hands it COMMIT_EDITMSG. Assert the pre-commit stage
on the runner render, the scaffold render and the flake-generated consumer
surface.

RED on both portable renders (stages is absent); the consumer surface
already passes, because git-hooks.nix defaults it to pre-commit.

Refs: #1489
The hook carried no stages, so it ran at every hook stage — and since it
passes filenames, the commit-msg round handed it COMMIT_EDITMSG. typos
reads short letter runs inside abbreviated git SHAs as misspelled words,
and git rebase --continue writes the rebase todo into that buffer as
comment lines, so a legitimate rebase was refused over a comment that never
enters the commit message. The workarounds it invites are editing git's own
todo or --no-verify, which this repo forbids.

Pin the stage in the yaml fragment of nix/hooks.nix, which renders both
committed configs. The check and consumer fragments need nothing:
git-hooks.nix already defaults the hook to pre-commit, so flake-generated
direnv consumers were never affected — the test covers that surface anyway,
so a future default change cannot reintroduce the trap silently.

Scaffolded consumers WERE affected and are fixed by adopting this release.
No coverage is lost: prek run --all-files and the CI lane run pre-commit.

Refs: #1489
Closes #1489

## Problem

The `typos` hook carried no `stages:`, so it ran at **every** hook stage
— and
because it has `pass_filenames: true`, the `commit-msg` round handed it
`COMMIT_EDITMSG`. `typos` reads short letter runs inside abbreviated git
SHAs as
misspelled words, and `git rebase --continue` writes the rebase todo
into that
buffer as comment lines, so a legitimate rebase was refused over a
**comment
that never enters the commit message**. The content being committed is
irrelevant.

The workarounds it invites are editing git's own todo comment or
`--no-verify`,
which this repo forbids.

## Change

`stages: [pre-commit]` on the `yaml` fragment in `nix/hooks.nix`, which
renders
both committed configs. That is what a *source* typo checker is for, and
it
costs no coverage: `prek run --all-files` and the CI lint lane both run
the
`pre-commit` stage.

### One correction to the issue's diagnosis

#1489 proposed changing the `yaml`, `check` **and** `consumer`
fragments. Only
`yaml` needs it. I checked the rendered consumer surface directly:

```
trunk -> {... 'pass_filenames': True, 'stages': ['pre-commit'], ...}
```

git-hooks.nix **already** defaults the hook to `pre-commit`, in all six
consumer
variants that enable it — so flake-generated (direnv) consumers were
never
affected, and an explicit pin there would be redundant. The test still
asserts
that surface, so the guard does not depend on the default staying put.

Scaffolded consumers **were** affected (`scaffold = true` ships the
identical
unfiltered definition) and are fixed by adopting this release.

## Verification

Live repro on this branch's worktree, before the fix — the `pre-commit`
round
passes and the *message* round fails:

```console
$ git commit -F msg.txt        # msg.txt has a "# pick <sha> # …" comment line
typos (source typo checker).....................Passed
typos (source typo checker).....................Failed
- hook id: typos
- exit code: 2
  error: `afe` should be `safe`
    ╭▸ .git/worktrees/1489/COMMIT_EDITMSG:3:11
```

The identical commit after the fix: **both rounds pass, exit 0.**

Tests: `TestTyposRunsOnlyAtPreCommit` covers all three surfaces (runner
render,
scaffold render, consumer surface). RED on both portable renders before
the fix
(`assert None == ['pre-commit']`); the consumer case passed already, and
I
confirmed that is not vacuous. The existing drift gate covers the two
committed
YAMLs. Full suite `1302 passed, 20 skipped`; `prek run --all-files`
green.

## Note on the diff

The explanatory comments deliberately do **not** spell out the offending
trigrams or a real example SHA — writing them out makes `typos` fail on
this
very PR's source files. typos 1.46.3 does not honour inline
`spellchecker:disable-line` directives (verified), and widening
`.typos.toml`
would weaken the linter repo-wide, so the comments describe the
mechanism
instead of exhibiting it.

## Follow-up filed

#1491 — the other two unfiltered `local` hooks (`sync-manifest`,
`check-agent-identity`) run 3x per commit for no benefit. Not bundled
here:
neither receives a filename, so neither is broken, and
`check-agent-identity`
needs a deliberate decision (its `consumer` fragment is pinned to
`pre-commit`
while its `yaml` fragment is unpinned — the two surfaces disagree).

Refs: #1489
sync-manifest and check-agent-identity carry neither stages nor a file
filter, so both run at every hook stage — three invocations of a uv run
entry point per commit where one is meant.

Record the decision for check-agent-identity in the test: git exports the
same GIT_AUTHOR_NAME/EMAIL to all three stages of an ordinary commit,
including under --author=, so the message stages see nothing the
pre-commit stage does not. The only path where they alone fire is
git merge, and there git exports no author, so the hook re-reads
git config user.* — the identity the next ordinary commit fails on.

RED on both portable renders; the consumer surface already passes, which
is the disagreement being reconciled.

Refs: #1491
sync-manifest and check-agent-identity carried neither stages nor a file
filter, so both ran at every hook stage: three uv run invocations per
commit for one useful result. Neither was broken by it — typos (#1489)
was the only one of the group that received a filename — so this is the
waste that trap left behind, not a second bug.

For check-agent-identity the pin also settles a disagreement between
surfaces. The consumer fragment has always run at pre-commit only, since
git-hooks.nix defaults it there, while the yaml fragment behind both
committed configs ran at all three. The message stages are the ones to
drop: git exports the same GIT_AUTHOR_NAME/GIT_AUTHOR_EMAIL to every
stage of an ordinary commit, including under --author=, the case this
hook exists to catch, so the commit-msg round only re-read what
pre-commit had already rejected on. The lone path where the message
stages fire and pre-commit does not is git merge, and git exports no
author there at all — the hook fell back to git config user.*, the
persistent identity that fails the committer's next ordinary commit.
A merge is therefore the one commit this no longer guards locally.

Scaffolded consumers pick the alignment up by adopting this release.
No coverage is lost elsewhere: prek run --all-files and the CI lint
lane both run the pre-commit stage.

Refs: #1491
devkit shipped 26 hooks to consumers and every one of them was
syntactic: formatting, whitespace, YAML validity, typos, commit-message
shape. Useful, and not one of them can tell you the code does what it
says. Every semantic gate the org relies on lived in a PERSONAL repo
that devkit and filesender both depended on.

These 15 gates are now devkit's. Vendored from gerchowl/guardrails under
Apache-2.0 — the same licence and holder as devkit, deliberately, so the
copies need no separate attribution block. The upstream repo had no
licence at all until gerchowl/guardrails#50; vendoring before that would
have shipped all-rights-reserved files from the repo that enforces
licence policy.

PACKAGES ONLY, NO CONTRACT CHANGE. The obvious design is for this module
to contribute hook ENTRIES too, and #1488 originally proposed exactly
that as a v2 contract field. It was wrong and #1492 settled why:
.pre-commit-config.yaml is read by the runner from a bare git tree, by
CI containers that never enter `nix develop`, and by humans reading a
diff — its lifecycle is the SCAFFOLD's, not the shell's. Flake-side
entries would be silently discarded for every consumer that owns a
committed config, which is all of them. It is closed at the tool level
too: neither prek nor pre-commit has include/extends, one `repo:` stanza
cannot pull a hook set, and prek's workspace mode scopes each sub-config
to its own directory tree.

So the module does the one thing v1 already allows — puts the gates on
PATH — and hook entries stay a scaffold concern.

THE CANARY IS THE POINT. checks.guardrails-canary feeds every gate a
known-bad fixture and asserts it fires, plus a known-good one and
asserts it stays quiet, running upstream's own harness against the
PACKAGED scripts rather than a copy. Four of this org's eight recorded
gate failures were "listed in the config, did not run" — a check that
reads YAML would have caught none of them. "Protected" has to mean the
gate rejected a known-bad input, because that is the only claim config
drift cannot counterfeit.

It earned itself immediately: it caught that the share/ copies the
fixtures execute are unwrapped, so their runtime dependencies were not
on PATH in the sandbox. One passthru list now feeds both the wrapper and
the check, so a dependency added to one cannot be forgotten in the other.

Also here: one real shellcheck ERROR fixed in the vendored tree (a
malformed `disable=` directive that silently disabled nothing), three
typos false positives whitelisted rather than edited into the scripts,
and upstream's `templates/` deliberately not vendored — devkit IS the
scaffolding system, and a second unreferenced one would just drift.

KNOWN WART, deliberately not fixed here: the shellcheck exclude is shared
between the runner config and the scaffold copy, because portableFor's
`includeAll` selects WHICH hooks render, not per-artifact fields. So a
consumer's .pre-commit-config.yaml now carries `^assets/guardrails/`,
which means nothing in their repo. It is a dead regex, not a behaviour
change. Fixing it properly means a `runnerYaml` override in hooks.nix
and a drift-gate update — worth doing, not worth bundling into this.

Refs: #1488, #1492
…it (#1494)

Closes #1491

## Summary

`sync-manifest` and `check-agent-identity` carried neither `stages:` nor
a file
filter, so both ran at **every** hook stage. Split out of #1489, which
fixed the
one hook of this group (`typos`) that actually broke a commit — only
`typos`
received a filename, so the other two were pure waste rather than a
second bug.

Both are now pinned to `pre-commit` in the `yaml` fragment of
`nix/hooks.nix`,
which renders both committed configs.

## The `check-agent-identity` decision

The issue asked for a deliberate decision here rather than a reflex pin,
because
this hook guards the *author/committer* and its consumer fragment
already ran at
`pre-commit` only (git-hooks.nix defaults it there) while the `yaml`
fragment ran
at all three — the runner and the flake-generated surfaces disagreed
about when
it fires. Probed against real git rather than assumed:

| Path | `pre-commit` | message stages | `GIT_AUTHOR_NAME` / `EMAIL`
seen |
|---|---|---|---|
| `git commit` | fires | fire | identical at all three stages |
| `git commit --author="Claude <…>"` | fires | fire | `Claude` at all
three stages |
| `git merge` | — | fire | **empty** → falls back to `git config user.*`
|
| `git rebase` replay | — | — (no `commit-msg` per pick) | — |

So the message stages saw nothing `pre-commit` did not, including under
the
`--author=` override this hook exists to catch. The only real coverage
delta is a
**merge commit**, where git exports no author and the hook merely
re-read
`git config user.*` — the persistent identity that fails the committer's
very
next ordinary commit at `pre-commit`. That is the trade recorded in the
code
comment and the changelog: one locally-unguarded merge, in exchange for
dropping
two of three invocations per commit.

## Verification

- `tests/test_flake_hooks.py::TestUnfilteredLocalHooksPinTheirStage` —
RED on
both portable renders before the fix, with the consumer surface already
passing (the disagreement being reconciled). Full module green after: 68
passed
- Drift gate green — `nix/hooks.nix` and both committed configs stay in
step
- Live-proven on this branch's own commits: before, one commit ran the
two hooks
9 times across the three rounds and both surfaces; after, they appear
only in
  the `pre-commit` round — 3 invocations
- `just precommit` (`prek run --all-files`) green, exit 0, with both
hooks still
  running — no lint coverage lost, which was the acceptance criterion
- `pytest tests/test_flake_hooks.py tests/test_transforms.py
tests/test_workflow_model.py tests/test_workflow_prepare_extension.py` —
159 passed

## Consumer impact

`check-agent-identity` is scaffolded, so scaffolded repos adopt the
alignment
with this release; direnv consumers were already at `pre-commit` and see
no
change. `sync-manifest` is runner-only.
…1495)

Implements #1488 with the layer decision from #1492. Closes the
guardrails half of #1400.

## What lands

devkit shipped **26 hooks to consumers and every one was syntactic** —
formatting, whitespace, YAML validity, typos, commit-message shape.
Useful, and not one of them can tell you the code does what it says.
Every *semantic* gate the org relies on lived in `gerchowl/guardrails`,
a personal repo that both devkit consumers and filesender depended on.

Those 15 gates are now devkit's:

`no-fake-impl` · `no-hardcoded` · `no-commented-code` ·
`no-debug-leftovers` · `no-raw-trace-fields` · `derived-docs` ·
`duplication` · `ci-shim` · `protect-trunk` · `protect-trunk-push` ·
`adr-matrix` · `numerical-obligation` · `no-conflict-markers` ·
`perf-budget` · `perf-record`

plus the `guardrails` CLI, the `guardrails-trace` per-hook JSONL
wrapper, and the freshness/stale/ledger tools — 25 executables, matching
upstream exactly.

## Packages only — no contract change

#1488 originally proposed a **v2 `hooks` field**. That was wrong, and
#1492 settled why with four independent reviews.

`.pre-commit-config.yaml` is read by the runner from a bare git working
tree, by **CI containers that never enter `nix develop`**, and by humans
reading a PR diff. Its lifecycle is the **scaffold's**, not the shell's.
Every consumer today owns a committed config, and the generated path
refuses to overwrite it — so flake-contributed entries would be silently
discarded, or discarded with a warning on every shell entry.

It is closed at the tool level too, independently confirmed: neither
prek nor pre-commit has `include`/`extends`
([pre-commit#1203](pre-commit/pre-commit#1203):
*"multiple configs / inclusion is not going to be implemented, sorry"*),
one `repo:` stanza cannot pull a hook set, and prek's workspace mode
scopes each sub-config to its own directory tree.

So the module does the one thing v1 already allows: **puts the gates on
PATH.** Hook entries stay a scaffold concern.

## The canary is the point

`checks.guardrails-canary` feeds every gate a known-bad fixture and
asserts it fires, and a known-good one and asserts it stays quiet —
running upstream's own harness against the **packaged** scripts, not a
copy.

Four of this org's eight recorded gate failures were *"listed in the
config, did not run"*. A check that reads YAML would have caught
**none** of them. "Protected" has to mean *the gate rejected a known-bad
input*, because that is the only claim config drift cannot counterfeit.

It earned itself during this PR: it caught that the `share/` copies the
fixtures execute are **unwrapped**, so their runtime dependencies were
absent in the sandbox. One `passthru` list now feeds both the wrapper
and the check, so a dependency added to one cannot be forgotten in the
other.

## Verified

- `nix flake check` green, including the new `guardrails-canary` and
`guardrails-shellcheck`
- 67 Python tests, 4 new for this module (registry, gates on PATH,
unknown gate, unknown option)
- Hook drift gate green — both committed YAMLs re-synced to
`nix/hooks.nix`
- **Consumer proof**: `gerchowl/filesender` migrated off the flake input
onto `modules = [ "guardrails" ]`. **Six lock nodes removed.** All 21
`guardrails-ok` source annotations, the `GUARDRAILS_*` env vars and
every hook id unchanged. Its `just precommit` (both stages + `nix flake
check`) and 77 tests green

## Decisions worth reviewing

1. **Names kept exactly.** `guardrails-ok` is an annotation living in
consumer *source* (21 sites in one repo). Renaming to match devkit would
break every consumer's source for no gain — devkit already ships `ruff`
and `typos` under upstream ids.
2. **Vendored, not an input.** 3,000 lines of dependency-free shell: no
lock node, nothing fetched at eval, and the bus-factor problem removed
rather than formalised. The upstream repo gets archived (still needs
`crates/tunables` → Rust pack and a decision on `tools/`).
3. **Shell kept, not ported.** Re-decided rather than inherited:
shellcheck-clean at `-S warning`, every gate has a fixture, and the
absent `set -e` is correct (these gates `grep`; `-e` would abort on the
quiet path). New gates go in Python; port only the stateful ones.
4. **Vendored tree excluded from the `style`-severity shellcheck hook**,
with `checks.guardrails-shellcheck` enforcing error+warning instead.
Rewriting 3,000 lines of working, fixture-covered shell for SC2181 is
the trade this repo already declined.

## Known wart

The shellcheck exclude is shared between the runner config and the
scaffold copy, because `portableFor`'s `includeAll` selects *which*
hooks render, not per-artifact fields. Consumers get a dead
`^assets/guardrails/` regex — no behaviour change. Fixing it properly
means a `runnerYaml` override plus a drift-gate update; worth doing, not
worth bundling here.

## Also in this PR

One real shellcheck **error** fixed in the vendored tree — a malformed
`# shellcheck disable=SC2254 -- reason` directive that parsed as garbage
and therefore disabled nothing. Three `typos` false positives
whitelisted rather than edited into the scripts (`[Ss]tatus:`, an
`fnd()` helper, and the real word "mis-attributes"). Upstream's
`templates/` deliberately **not** vendored — devkit *is* the scaffolding
system.

Blocked on nothing: `gerchowl/guardrails` is now Apache-2.0
(gerchowl/guardrails#50), same holder as devkit, so the vendored copies
need no separate attribution.
Move Unreleased content to [1.9.0] - TBD
and create fresh empty Unreleased section for continued development.
Regenerate the synced workspace mirror so
assets/workspace/.devcontainer/CHANGELOG.md matches the frozen root
CHANGELOG.md on the release branch.
@c-vigo
c-vigo marked this pull request as ready for review August 13, 2026 14:55
@c-vigo
c-vigo self-requested a review as a code owner August 13, 2026 14:55
c-vigo
c-vigo previously approved these changes Aug 13, 2026

@c-vigo c-vigo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for the 1.9.0 final release.

rc1 validated end to end at this commit (84241bb):

  • devkit release run green on both architectures; tag 1.9.0-rc1 at this SHA, multi-arch manifest published
  • image validated by hand: 1.77 GB (no change from 1.8.0), VERSION stamp correct, guardrails assets shipped
  • guardrails-canary built and passed in CI against the packaged gates
  • smoke-test chain green end to end (three earlier attempts died on a GitHub 5xx burst, root-caused in #1500)
  • #1478 live-proven on a real consumer: DEVKIT_LANGUAGES=python auto-resolved and written back on scaffold

No content has changed since rc1.

Set release date to 2026-08-13 and regenerate release docs.

Refs: #1498

@c-vigo c-vigo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving immediately before the promote dispatch.

The final release.yml run pushed the date stamp (462b8f6) and the sync-issues commit (df4cc4c) to release/1.9.0, which dismissed the approval that authorised it — the #1474 behaviour, reproduced exactly as documented. promote-release.yml re-checks approvals, so this re-approval is what lets the merge job complete.

Cross-repo gate is satisfied: vig-os/devkit-smoke-test published its final 1.9.0 release at 15:26:56Z (draft=false, prerelease=false) and merged its release PR #371.

@vig-os-release-app
vig-os-release-app Bot merged commit 331ca55 into main Aug 13, 2026
27 of 30 checks passed
@vig-os-release-app
vig-os-release-app Bot deleted the release/1.9.0 branch August 13, 2026 15:42
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.

2 participants