Repository navigation
chore: sync dev with main - #1501
Merged
Merged
Conversation
Set release date to 2026-08-13 and regenerate release docs. Refs: #1498
# [Release 1.9.0](https://github.com/vig-os/devkit/releases/tag/1.9.0) - 2026-08-13 This PR prepares release 1.9.0 for merge to main. ## [1.9.0](https://github.com/vig-os/devkit/releases/tag/1.9.0) - 2026-08-13 ### Added - **`guardrails` capability module — the org's semantic gates, now devkit-owned** ([#1488](#1488), [#1492](#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. #1492 records why this resolves the opposite way to `checks` (#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](#1400), [#1440](#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](#1400), [#1427](#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 #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](#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](#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](#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](#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](#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](#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](#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](#1474)). Only operator discipline had kept it latent - The `validate` copy mirrors the scaffold template's, so it also brings the mergeability gate ([#1132](#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](#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](#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](#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](#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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
devwithmain(sync-main-to-dev workflow).