Skip to content

feat(ci): add the release-neutral lane for changing main without a release - #1678

Merged
c-vigo merged 12 commits into
mainfrom
feature/1676-release-neutral-lane
Sep 24, 2026
Merged

c-vigo merged 12 commits into
mainfrom
feature/1676-release-neutral-lane

Conversation

@c-vigo

@c-vigo c-vigo commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Description

Implements the release-neutral lane from #1676: merge to main without cutting a release, admitted only when a machine proof shows no published artifact changes.

main can only be written by a release — prepare-release and prepare-hotfix are the only lanes, and both cut a tag, publish a GHCR image and trigger devkit-upgrade adoption PRs across every consumer repo. But plenty of changes belong on main while altering nothing a consumer receives: devkit's own .github/workflows/** (not the scaffolded copy under assets/workspace/), tests/**, most of docs/**, the scan-time registers.

Two cases motivated it:

  1. A workflow_dispatch workflow must exist on the default branch to be dispatchable at all — so a new workflow cannot reach main without a release or an admin bypass.
  2. main and dev each scan their own closure against their own .vulnixignore, so an amendment on dev leaves main's nightly lane red until the next train (32 register commits in 90 days vs a weekly cadence).

Supersedes #1677, which solved only case 2 and baked "scan config" into the lane's identity. This generalises it: scan registers are now just one thing the lane carries.

Type of Change

  • feat -- New feature

Modifiers

  • Breaking change (!)

Changes Made

release-neutral-open.yml — opens the PR as the release App.

Not ceremony. main requires one approving review, GitHub forbids authors approving their own PRs, and main's only bypass actor is OrganizationAdmin — no App holds bypass, and promote-release.yml merges with a plain gh pr merge --merge. So a human-authored PR to main is unapprovable by the only human there is, which is exactly why every release PR into main is already App-authored (#1672, #1648, #1620). Nothing else is automated: which commits get carried, when the lane runs, and the merge all stay manual.

release-neutral-guard.yml — proves release-neutrality.

Gate Proves
1 No release content (CHANGELOG.md, its mirror, .vig-os) in the diff
2 devShells.default, devkitImage, devkitImageEnv .drv paths identical to main's
3 Consumer scaffold under assets/ byte-identical
4 main's ## Unreleased still empty
5 No release/* train in flight
6 Verdict comment listing the files carried

Gate 2 is the contract. Equal derivation paths mean the published artifacts cannot differ, whatever the diff touched — a proof, not an argument about which files happen to be inputs. It is deliberately not a path allowlist: an allowlist encodes a guess about what is published and would need extending for every new kind of release-neutral change. It compares devShells.default as well as the image because a direnv/bare consumer never pulls the image — it evaluates the dev shell straight from the flake — so an image-only check would wave through a change that alters every such consumer's toolchain.

Content-triggered extra. When the diff touches .vulnixignore, the guard also replays main's own nightly gate and requires exit 0. Not part of the contract — it exists because the register is not append-only: a pin advance on dev clears exceptions and dev's pin advances first, so there is always a window where dev has correctly deleted an exception main's older closure still needs.

Docs go to docs/RELEASE_CYCLE.md, beside the hotfix lane (its sibling concept). docs/CONTAINER_SECURITY.md carries only a pointer plus the two register-specific notes — the procedure has one home.

Label lives in .github/label-taxonomy.local.toml (new), not the shared taxonomy: the shared file syncs into assets/workspace/ and would scatter this label across consumers that have none of this machinery. Verified it does not appear under assets/workspace/ after sync-manifest.

Changelog Entry

See 5ca1764c — deliberately its own commit (explained under Testing).

### Added

- **Release-neutral lane: change `main` without cutting a release**
  ([#1676](https://github.com/vig-os/devkit/issues/1676))
  - `main` could only be written by a release, so a change that alters nothing a
    consumer receives — devkit's own `.github/workflows/**`, `tests/**`, most of
    `docs/**`, the scan-time registers — either waited for the next train or
    inflated the version for a no-op that handed every consumer an adoption PR
  - `release-neutral-open.yml` opens the PR **as the release App** (`main`
    requires one approving review and GitHub forbids authors approving their own
    PRs, so a human-authored PR there is unapprovable), and
    `release-neutral-guard.yml` proves the change is release-neutral
  - The contract is **derivation identity**: `devShells.default`,
    `devkitImage` and `devkitImageEnv` `.drv` paths must equal `main`'s, which
    proves the published artifacts cannot differ whatever the diff touched. It
    covers `direnv`/`bare` consumers too, who never pull the image
  - Also gated: no release content in the diff, the `assets/` scaffold
    untouched, `main`'s `## Unreleased` still empty, and no release train in
    flight. A verdict comment lists the files carried
  - A changelog entry makes a change **non**-release-neutral (it is mirrored
    into the scaffold and baked into the image), so keep changelog edits in
    their own commit to leave the rest cherry-pickable
  - When a lane PR touches `.vulnixignore` the guard additionally replays
    `main`'s own nightly gate, since a pin advance on `dev` clears exceptions
    that `main`'s older closure may still need

Testing

  • Tests pass locally (just test) — 23 new assertions; full suite 1122 passed, 1 skipped
  • Manual testing performed (below)

Manual Testing Details

TDD, three commits: b18329f6 (23 assertions, red) → 3669c3b2 (implementation, green) → 5ca1764c (changelog, separate — see below).

Gate 2 was measured, not assumed. nix eval …drvPath against main and against this branch:

Tree devShells devkitImage devkitImageEnv Verdict
main 464904d9… d6ikbz96… 262sli4a… —
workflows + label + docs + tests 464904d9… d6ikbz96… 262sli4a… admitted
the same plus a CHANGELOG.md entry 464904d9… ffbgni7c… 262sli4a… refused

Two things follow, and both are load-bearing:

  1. The lane's own implementation is release-neutral by its own contract — so it can travel by the very lane it adds, once bootstrapped.
  2. A changelog entry makes a change non-neutral. The changelog is mirrored into assets/workspace/.devcontainer/CHANGELOG.md and baked into the image. That is why gate 1 refuses it, why it is barred a second time by gate 4 (an entry on main leaves ## Unreleased non-empty, which prepare-release and prepare-hotfix refuse to start on), and why the changelog is a separate commit here rather than folded into the feature. RELEASE_CYCLE.md records this as a runbook rule.

just precommit green (exit 0) including actionlint + shellcheck over both workflows.

Not yet exercised end-to-end. These are shape, lint and eval proofs. The guard has never run — workflow_dispatch only registers from the default branch, so the first live exercise is the bootstrap.

Checklist

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

Additional Notes

Bootstrap — needs one admin bypass. The lane cannot deliver itself: workflow_dispatch only registers from the default branch. After this merges to dev:

git switch -c chore/1676-bootstrap-release-neutral origin/main
git cherry-pick b18329f6 3669c3b2      # NOT 5ca1764c (the changelog)
git push -u origin HEAD

Then open a PR and merge with OrganizationAdmin bypass, one time only. Both refs then hold identical content so the next release merge is clean, and the lane carries its own future changes from then on.

Dropping the changelog commit from that cherry-pick is required, not tidiness — carrying it would leave main's ## Unreleased non-empty and break prepare-release and prepare-hotfix.

Still unverified, flagged in #1676: main sets require_extra_approval_for_unattributed_changes: true. App-authored commits should be attributed to the app rather than counting as unattributed, but that is unproven. If it bites, a lane PR would silently demand a second approval that cannot be supplied — worth watching on the first live run.

Refs: #1676

vig-os-release-app Bot and others added 5 commits September 23, 2026 15:32
Syncs `dev` with `main` (sync-main-to-dev workflow).
Covers the two workflows that merge release-neutral changes to main
without cutting a release, before either exists. 23 assertions, all red.

The contract under test is gate 2, derivation identity: equal .drv paths
mean the published artifacts CANNOT differ, whatever the diff touched.
That is deliberately not a path allowlist -- an allowlist encodes a guess
about what is published and would need extending for every new kind of
release-neutral change, where a derivation comparison simply holds.

Gate 2 is asserted to cover devShells as well as the image, because a
direnv/bare consumer never pulls the image: it evaluates devShells.default
from the flake, so an image-only comparison would wave through a change
that alters every such consumer's toolchain.

Measured against main at 2026-09-24, the gates discriminate:

  workflows + tests + docs/CONTAINER_SECURITY.md
    -> devkitImage d6ikbz96... == main's d6ikbz96...   ADMITTED
  the same tree plus a CHANGELOG.md entry
    -> devkitImage ffbgni7c... != main's d6ikbz96...   REFUSED

That second line is why CHANGELOG.md is treated as release content and
gate 1 refuses it: the changelog is mirrored into
assets/workspace/.devcontainer/CHANGELOG.md, which is baked into the
image. It is also why a lane PR must never carry a changelog edit for a
second, independent reason -- a changelog entry reaching main would leave
## Unreleased non-empty, and both prepare-release and prepare-hotfix
refuse to start on that.

The remaining invariants are the ones whose failure modes are silent or
catastrophic rather than merely wrong: the guard job carries no job-level
`if` (a skipped job would, if the guard were ever made a required check,
leave release PRs waiting forever on a check that never reports); the
gates are label-scoped rather than diff-scoped (a release PR legitimately
changes CHANGELOG.md, .vig-os and the scaffold); the guard never writes
(main sets dismiss_stale_reviews_on_push, so a push would discard the
approval the lane depends on); and the opener mints an App token, because
main requires one approving review, GitHub forbids authors approving
their own PRs, and no App holds bypass -- so a human-authored PR to main
is unapprovable by the only human there is.

Refs: #1676
…lease

main can only be written by a release: prepare-release and
prepare-hotfix are the only lanes, and both cut a tag, publish a GHCR
image and trigger devkit-upgrade adoption PRs across every consumer. But
plenty of changes belong on main while altering nothing a consumer
receives -- devkit's own .github/workflows/** (not the scaffolded copy
under assets/workspace/), tests/**, most of docs/**, the scan-time
registers. For those a release republishes a functionally identical
artifact and hands every consumer a pin bump that changes nothing they
run.

Two cases motivated it. A workflow_dispatch workflow must exist on the
DEFAULT branch to be dispatchable at all, so a new workflow cannot reach
main without a release or an admin bypass. And main/dev each scan their
own closure against their own .vulnixignore, so a register amendment on
dev leaves main's nightly lane red until the next train -- 32 register
commits in the 90 days to 2026-09-24 against a roughly weekly cadence.

THE CONTRACT IS GATE 2, derivation identity. Equal .drv paths mean the
published artifacts CANNOT differ, whatever the diff touched: a proof
rather than an argument about which files happen to be inputs, and
deliberately not a path allowlist, which would encode a guess about what
is published and need extending for every new kind of release-neutral
change. It compares devShells.default as well as the image, because a
direnv/bare consumer never pulls the image -- it evaluates the dev shell
straight from the flake -- so an image-only check would wave through a
change that alters every such consumer's toolchain.

The gates discriminate, measured against main:

  this commit's own content (workflows + label + docs + tests)
    devShells      464904d9... == main   ADMITTED
    devkitImage    d6ikbz96... == main
    devkitImageEnv 262sli4a... == main
  the same tree plus a CHANGELOG.md entry
    devkitImage    ffbgni7c... != main   REFUSED

so the lane is proven release-neutral against its own contract by its own
content. The second line is why gate 1 refuses CHANGELOG.md: the
changelog is mirrored into assets/workspace/.devcontainer/CHANGELOG.md
and baked into the image. It is barred for a second, independent reason
too -- reaching main it would leave ## Unreleased non-empty, which
prepare-release and prepare-hotfix both refuse to start on (gate 4). The
changelog entry for this feature therefore lands in its own follow-up
commit, which is what keeps this one cherry-pickable to main.

The opener exists to author the PR as the App, and that is not ceremony:
main requires one approving review, GitHub forbids authors approving
their own PRs, and main's only bypass actor is OrganizationAdmin -- no
App holds bypass, and promote-release.yml merges with a plain
`gh pr merge --merge`. So a human-authored PR to main is unapprovable by
the only human there is, which is why every release PR into main is
already App-authored. Nothing else is automated: which commits get
carried, when the lane runs and the final merge all stay manual.

The scan-register safety check survives as a CONTENT-TRIGGERED extra
rather than the lane's identity: when the diff touches .vulnixignore the
guard replays main's own nightly gate and requires exit 0, because the
register is not append-only and a deletion correct on dev can strand a
finding on main's older closure.

Docs go to RELEASE_CYCLE.md beside the hotfix lane, its sibling concept,
with CONTAINER_SECURITY.md carrying only a pointer plus the two
register-specific notes -- the procedure has one home.

The label lives in .github/label-taxonomy.local.toml, not the shared
taxonomy: the shared file syncs into assets/workspace/ and would scatter
the label across consumers that have none of this machinery.

23 shape assertions green.

Refs: #1676
Deliberately a SEPARATE commit from the lane itself, not an oversight.

A changelog entry is mirrored into
assets/workspace/.devcontainer/CHANGELOG.md and baked into the image, so
it changes devkitImage's derivation: the lane's own gate 2 measures
d6ikbz96 (== main) for the implementation commit and ffbgni7c (!= main)
once this entry is added. Folding the two together would therefore make
the implementation non-release-neutral and unable to travel by the very
lane it adds.

It is barred from main for a second, independent reason: an entry under
## Unreleased on main would leave that section non-empty, and both
prepare-release and prepare-hotfix refuse to start on that.

So the changelog rides dev only, ships with the next real release, and
the two commits below it stay cherry-pickable to main. RELEASE_CYCLE.md
states this as a runbook rule for every future use of the lane.

Refs: #1676
The lane forbids changelog edits (gates 1 and 4), which raised a fair
question: a security exception ought to be recorded, so does the lane
drop that record?

It does not, but only because of an ordering rule the runbook had left
implicit. Two things are being conflated:

- The substantive record of a risk acceptance is the .vulnixignore block
  itself -- dated triage, CVSS, provenance, reachability, lever, expiry.
  The lane puts that on main IMMEDIATELY, sooner than a release would.
- The CHANGELOG entry is the release note. It stays on dev and ships with
  the next train, which is correct Keep-a-Changelog semantics: the
  changelog describes releases, and a release-neutral change is in none.

So the entry is deferred, not skipped -- PROVIDED the change was authored
on dev. If someone instead authors it on a main-based branch, which this
lane makes newly convenient, there is no dev commit and the entry has
nowhere to live: main cannot hold one. The release note is then lost
outright rather than deferred. That is a real hazard the lane introduces
and the runbook did not name.

The convention is worth protecting: 10 of the last 12 .vulnixignore
commits carried a changelog entry.

Adds the ordering rule to RELEASE_CYCLE.md (in the Execute block and as
the leading runbook rule), mirrors it in CONTAINER_SECURITY.md's pointer,
and has the guard say it in its verdict comment -- with an extra note
when the diff touches .vulnixignore, the case where the convention is
strongest. A reminder, not a gate: the guard cannot prove a dev commit
exists, and claiming to check what it cannot check would be worse than
saying so plainly.

The accompanying test asserts on the phrases "changelog entry" and "next
release" inside the verdict STEP rather than the job body. Two weaker
versions passed vacuously first: bare "changelog" matches the gate
table's CHANGELOG.md, and bare "dev" matches devShells.

Refs: #1676
@c-vigo

c-vigo commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up on the changelog question: does the lane drop the record of a security exception?

It does not — but only because of an ordering rule the runbook had left implicit, so 9958516d makes it explicit.

Two things were being conflated:

  • The substantive record of a risk acceptance is the .vulnixignore block itself — dated triage, CVSS, nix why-depends provenance, reachability, lever, expiry rationale. The lane puts that on main immediately, sooner than a release would.
  • The CHANGELOG.md entry is the release note. It stays on dev and ships with the next train, which is correct Keep-a-Changelog semantics: the changelog describes releases, and a release-neutral change is in none.

So the entry is deferred, not skipped — provided the change was authored on dev first. If it is instead authored on a main-based branch, which this lane makes newly convenient, there is no dev commit and the entry has nowhere to live, because main can never hold one (gates 1 and 4). The release note is then lost outright rather than deferred. That is a real hazard the lane introduces and the runbook did not name.

Worth protecting: 10 of the last 12 .vulnixignore commits carried a changelog entry.

9958516d adds:

  • The ordering rule in RELEASE_CYCLE.md — in the Execute block and as the leading runbook rule — plus a second rule spelling out that the entry is deferred rather than skipped.
  • The same, mirrored in CONTAINER_SECURITY.md's pointer.
  • The guard saying it in the verdict comment, with an extra note when the diff touches .vulnixignore. A reminder, not a gate: the guard cannot prove a dev commit exists, and claiming to check what it cannot check would be worse than saying so plainly.

Re-verified that the cherry-pickable subset stays release-neutral with the changelog commit excluded:

Output subset (b18329f6+3669c3b2+9958516d) main
devShells.default 464904d9… 464904d9… ✅
devkitImage d6ikbz96… d6ikbz96… ✅
devkitImageEnv 262sli4a… 262sli4a… ✅

Full suite 1123 passed / 1 skipped; just precommit exit 0.

Bootstrap cherry-pick is now three commits (still excluding 5ca1764c, the changelog):

git cherry-pick b18329f6 3669c3b2 9958516d

The lane as written cannot carry its own changelog entry. CHANGELOG.md is
mirrored by a pre-commit hook into
assets/workspace/.devcontainer/CHANGELOG.md, which is baked into the image,
so a release note alone moves devkitImage's derivation and gate 2 refuses
it. Measured on this branch: raw tree d5gf56y0, changelog reverted to
main's d6ikbz96 == main. Under the old rule every change carrying a note
would need an --admin bypass, which is the thing the lane exists to avoid.

The project decision supersedes #590's invariant: main MAY carry changes
that have landed but are not yet shipped, and ## Unreleased describes them.
sync-main-to-dev.yml triggers on push to main, so the entry reaches dev by
itself and the next train freezes it normally.

RED first. Six assertions fail against the current workflow:

- gate 1 must stop naming either changelog copy (it keeps .vig-os, which
  carries DEVKIT_VERSION -- changing that IS releasing)
- gate 2 must revert both copies to the base's BEFORE the first drvPath
  eval, and restore the head tree afterwards so the verdict's file list
  still reports what is really being carried
- the Unreleased-emptiness gate must be gone rather than renumbered
- the verdict must report changelog drift explicitly, conditioned on the
  diff, and say the comparison was normalized -- otherwise a release note
  rides through invisibly and a reviewer cannot tell a workflow-only carry
  from one that writes main's Unreleased section

The gate-1 assertions read the gate-1 STEP, not the job body: gate 2 and
the verdict both name the changelog for legitimate reasons, so a body-wide
assertion would pass vacuously.

Refs: #1676
Gate 2 compared raw trees, so any change carrying a release note was
refused: CHANGELOG.md is mirrored into
assets/workspace/.devcontainer/CHANGELOG.md and baked into the image.
Measured on this branch -- raw devkitImage d5gf56y0 vs main's d6ikbz96 --
the lane could not even carry itself.

Gate 2 now reverts both copies to the base's before evaluating the head
side, then restores them. Both sides hold identical changelog text, so a
surviving difference is genuinely non-changelog. It needs no commit
because `nix eval .#...` on a dirty git tree evaluates the WORKING TREE.
Verified locally on this branch: normalized, all three derivations equal
main's (464904d9 / d6ikbz96 / 262sli4a); un-normalized, devkitImage
d5gf56y0 differs.

Gate 1 stops refusing the changelog and its mirror. It keeps .vig-os,
which carries DEVKIT_VERSION -- writing a version is the one edit no proof
can make release-neutral.

Gate 4 is DELETED, not renumbered. It asserted main's ## Unreleased was
empty, true by construction under #590. That invariant is superseded:
main may carry changes that have landed but are not yet shipped, and
## Unreleased is where they are described. sync-main-to-dev.yml fires on
push to main, so the entry reaches dev by itself and the next train
freezes it normally. (prepare-hotfix still refuses a non-empty section --
phase 1 of this issue, a separate change and not this guard's business.)

The verdict reports the drift instead, conditioned on the diff, and shows
the entry inline: normalization means a release note now passes the
contract silently, and silence would leave a reviewer unable to tell a
workflows-only carry from one that rewrites main's Unreleased section.

Also fixes a real bug the verdict rewrite exposed. The verdict opened with
`git checkout -q -` to undo the vulnix extra's checkout, but that extra
exits early when the diff leaves .vulnixignore alone -- the common case --
and `-` then resolved to gate 2's base checkout, making `git diff
origin/main...HEAD` empty and the "files carried" list blank. Each step
now restores the head tree itself and the verdict does no checkout at all.

Refs: #1676
The runbook still described the model the guard enforced yesterday: no
changelog on a lane PR, main's ## Unreleased empty at all times, and
dev-first authoring as an ordering RULE whose stated justification was
"main cannot hold a changelog entry". That justification is now false.

- Demotes dev-first authoring to a preference. Cherry-picking from dev
  still keeps the two refs converged commit-for-commit, but it is no
  longer the only route that preserves a release note:
  sync-main-to-dev.yml triggers on push to main, so whichever ref gets
  the change first, the other follows.
- Gate table: gate 1 refuses .vig-os only, gate 2 says the comparison is
  normalized, gate 4 is struck with the numbering hole left in place so
  the older discussion still reads.
- Adds "The comparison is normalized", which explains why a raw
  comparison would refuse nearly every change (the changelog is mirrored
  into the scaffold and baked into the image), and updates the
  discriminate table with the measured pair: raw d5gf56y0 != main,
  normalized d6ikbz96 == main. The changelog is the only thing
  normalized away, and the verdict names the drift.
- Adds "main may carry unshipped changes", recording #590's invariant as
  superseded and the two objections that were checked and dropped.
- Corrects a claim inherited from the design: prepare-release never
  inspects main's ## Unreleased. It runs on dev and requires DEV's
  section to have content. Only prepare-hotfix reads main's, and that
  precondition is still enforced as written -- flagged at the hotfix
  runbook too, since "always true by construction" no longer holds.

CONTAINER_SECURITY's register pointer gets the same correction: carry the
changelog entry with the register instead of leaving it behind on dev.

Refs: #1676
The entry described the lane as refusing changelog edits and asserting
main's ## Unreleased was empty. Both were true when it was written and
neither is now.

Notably this commit is itself the thing it documents: under the old rule
it could not have travelled to main by the lane it describes, because the
mirror into assets/workspace/.devcontainer/CHANGELOG.md is an image input.
With the normalized comparison it can.

Refs: #1676
The raw hash quoted for "same tree plus a changelog entry" was measured
before the entry itself was rewritten, so it no longer reproduces on this
branch. Re-measured at the tip: dlsp5xm6.

Says so, too: the raw hash is a function of the changelog text and moves
with every edit to it, so the durable claim is the pair -- raw differs
from main's, normalized equals it -- not either number.

Refs: #1676
@c-vigo

c-vigo commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

Phase 3: the lane now admits changelog entries

CHANGELOG.md is mirrored by a pre-commit hook into assets/workspace/.devcontainer/CHANGELOG.md, which is baked into the image, so under the old gate 2 any change carrying a release note was refused — including this PR. The lane could not carry itself.

Implemented per the revised plan: normalized derivation comparison, main may carry landed-but-unshipped changes, and #590's empty-## Unreleased invariant is superseded.

Measured locally on this branch

Attr un-normalized (head as-is) normalized (changelog reverted to main's) main
devShells.default 464904d98kis3fgq6172914ksjz6nv9y-nix-shell.drv same same
devkitImage dlsp5xm622wdrvzqf9i0hpvjik00f1ca-devcontainer.tar.gz.drv ❌ d6ikbz964cpqnvahwjrc6y7g9d4blklv-devcontainer.tar.gz.drv ✅ d6ikbz96…
devkitImageEnv 262sli4azn161b81f4ljmjvqpwa23gaw-devcontainer-image-env.drv same same

Only devkitImage ever moved, and only because of the changelog. The second column is the actual gate-2 step body, extracted from the workflow and executed with BASE_REF=main — exit 0, all three equal, working tree and branch restored. (The un-normalized image hash is a function of the changelog text, so it moves with every edit to the entry; the durable claim is the pair, not the number.)

Changes

  • Gate 2 reverts CHANGELOG.md and its mirror to the base's copy, evaluates the three drvPaths, restores the head tree, then evaluates the base. Works without a commit because nix eval .#… on a dirty git tree evaluates the working tree.
  • Gate 1 keeps only .vig-os (it carries DEVKIT_VERSION; writing a version is releasing). Both changelog paths dropped.
  • Gate 4 deleted, not renumbered — the numbering hole is documented so earlier discussion still reads.
  • Verdict reports changelog drift explicitly, conditioned on the diff, and shows the entry inline. Silence was the failure mode: normalization means a release note passes the contract invisibly.
  • Docs. RELEASE_CYCLE.md gains The comparison is normalized and main may carry unshipped changes; the dev-first authoring rule from 9958516 is demoted to a preference (its justification — "main cannot hold a changelog entry" — is now false, and sync-main-to-dev.yml fires on push: [main]); CONTAINER_SECURITY.md's register pointer says to carry the entry along.
  • Tests: gate-4 test replaced by one pinning its removal; gate-1 changelog assertions inverted (asserted against the gate-1 step, since gate 2 and the verdict name the changelog legitimately); new tests for the normalization ordering and the head-tree restore; module docstring rewritten.

One extra fix, found while rewriting the verdict

The verdict opened with git checkout -q - to undo the vulnix extra's checkout — but that extra exits early when the diff leaves .vulnixignore alone (the common case), so - resolved to gate 2's base checkout. git diff origin/main...HEAD would then be empty and the "files carried to main" list would come out blank. Each step now restores the head tree itself and the verdict does no checkout at all.

Corrections to the design text

  • prepare-release never inspects main's ## Unreleased — it runs on dev and requires dev's section to have content. Only prepare-hotfix reads main's. Fixed in the docs; the earlier "both refuse to start" phrasing was wrong.
  • prepare-hotfix's check is still enforced as written, so a hotfix cut while main carries entries refuses to start. That is phase 1 and is not touched here; the hotfix runbook now flags it instead of claiming emptiness is "always true by construction".

Verification

  • just precommit — exit 0, clean first pass, no files modified
  • uv run pytest tests/ -q --ignore=tests/test_image.py --ignore=tests/test_integration.py — 1126 passed, 1 skipped (exit 0)
  • tests/test_workflow_release_neutral.py — 27 passed (was 24)

Phase 3 widened gate 1 to admit CHANGELOG.md and taught gate 2 to
normalize it away before comparing derivations -- but left gate 3
refusing `assets/` wholesale. The changelog is mirrored to
assets/workspace/.devcontainer/CHANGELOG.md, so gate 3 would have
rejected every changelog-carrying PR regardless, silently undoing the
entire phase.

Caught while classifying the open PRs for retargeting: #1675 and #1678
both touch exactly one path under assets/, and it is that mirror.

Gate 3 now excludes the mirror via a pathspec and says why. The
exclusion is narrow and safe: the mirror is regenerated from CHANGELOG.md
by the sync-manifest hook, never independently authored, so it carries no
information gate 1 has not already admitted -- and gate 2 still compares
the real derivations either side of it.

This is the first defect found in the widened lane, and it is one only
running the gates would have surfaced: every shape test passed, because
the tests asserted what each gate said about itself rather than whether
the gates agreed with each other. The accompanying test pins the
agreement rather than the wording.

Refs: #1676
@c-vigo
c-vigo changed the base branch from dev to main September 24, 2026 19:51
@c-vigo c-vigo linked an issue Sep 24, 2026 that may be closed by this pull request
@c-vigo c-vigo added the release-neutral Changes no published artifact; merges to main without a release label Sep 24, 2026
@github-actions

Copy link
Copy Markdown

Release-neutral guard — verdict

This change is release-neutral. Every published derivation is byte-identical to main, so merging it changes nothing any consumer receives and no release is required.

Gate Proved
1 No release content (.vig-os, which carries DEVKIT_VERSION) touched
2 devShells.default, devkitImage, devkitImageEnv derivations unchanged, compared with the changelog normalized
3 Consumer scaffold under assets/ byte-identical
5 No release train in flight

Files carried to main:

  • .github/label-taxonomy.local.toml
  • .github/workflows/release-neutral-guard.yml
  • .github/workflows/release-neutral-open.yml
  • CHANGELOG.md
  • assets/workspace/.devcontainer/CHANGELOG.md
  • docs/CONTAINER_SECURITY.md
  • docs/RELEASE_CYCLE.md
  • docs/issues/issue-1673.md
  • docs/pull-requests/pr-1672.md
  • docs/pull-requests/pr-1674.md
  • tests/test_workflow_release_neutral.py

Changelog drift — the one published difference. This PR edits CHANGELOG.md (and its assets/workspace/.devcontainer/ mirror), which is baked into the image. Gate 2 therefore normalized it away: both sides were evaluated with main's changelog, so the identity proved above covers everything except the changelog text.

That is allowed by design — main may carry changes it has landed but not shipped, and ## Unreleased is where they are described (superseding #590). sync-main-to-dev.yml fires on push: [main], so the entry reaches dev on its own and the next train freezes it normally. Read the entry before approving:

diff --git a/CHANGELOG.md b/CHANGELOG.md
index ddc153bf..50612882 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Added
 
+- **Release-neutral lane: change `main` without cutting a release**
+  ([#1676](https://github.com/vig-os/devkit/issues/1676))
+  - `main` could only be written by a release, so a change that alters nothing a
+    consumer receives — devkit's own `.github/workflows/**`, `tests/**`, most of
+    `docs/**`, the scan-time registers — either waited for the next train or
+    inflated the version for a no-op that handed every consumer an adoption PR
+  - `release-neutral-open.yml` opens the PR **as the release App** (`main`
+    requires one approving review and GitHub forbids authors approving their own
+    PRs, so a human-authored PR there is unapprovable), and
+    `release-neutral-guard.yml` proves the change is release-neutral
+  - The contract is **derivation identity**: `devShells.default`,
+    `devkitImage` and `devkitImageEnv` `.drv` paths must equal `main`'s, which
+    proves the published artifacts cannot differ whatever the diff touched. It
+    covers `direnv`/`bare` consumers too, who never pull the image
+  - The comparison is **normalized**: `CHANGELOG.md` and its scaffold mirror are
+    reverted to the base's copy before evaluating, so a release note — which is
+    baked into the image and would move the derivation on its own — no longer
+    disqualifies a change from the lane. The verdict comment reports that drift
+    explicitly rather than tolerating it silently
+  - Also gated: no release content in the diff (`.vig-os`, which carries
+    `DEVKIT_VERSION`), the `assets/` scaffold untouched, and no release train in
+    flight. A verdict comment lists the files carried
+  - Supersedes [#590](https://github.com/vig-os/devkit/issues/590)'s invariant:
+    `main` may now carry changes that have landed but are not yet shipped, and
+    its `## Unreleased` section describes them. `sync-main-to-dev.yml` triggers
+    on `push: [main]`, so those entries reach `dev` before the next freeze
+  - When a lane PR touches `.vulnixignore` the guard additionally replays
+    `main`'s own nightly gate, since a pin advance on `dev` clears exceptions
+    that `main`'s older closure may still need
+
 ### Changed
 
 ### Deprecated

Do not push to this branch after approving — main sets dismiss_stale_reviews_on_push.

@c-vigo
c-vigo merged commit 125f2e5 into main Sep 24, 2026
13 checks passed
@c-vigo
c-vigo deleted the feature/1676-release-neutral-lane branch September 24, 2026 20:05
c-vigo added a commit that referenced this pull request Sep 24, 2026
## Description

The release-neutral lane's **first live dispatch failed**. Run
[36054453452](https://github.com/vig-os/devkit/actions/runs/36054453452),
at `gh pr create`:

```
/home/runner/work/_temp/....sh: line 40: retry: command not found
##[error]Process completed with exit code 127.
```

`retry` is a bash **function** exported through `BASH_ENV` by the
`setup-env` composite action. The opener's job deliberately skips
`setup-env` — `gh` is preinstalled and opening a PR needs no toolchain —
so the function was never in scope.

`prepare-hotfix.yml`'s PR job had already solved this, and its comment
even says so (*"the retry helper is sourced from the checkout"*). I
copied its `retry … -- gh pr create` call without the `source` line that
makes it work.

## Type of Change

- [x] `fix` -- Bug fix

## Changes Made

Sources `.github/scripts/retry.sh` from the checkout before the `retry`
call, with the same `# shellcheck source=/dev/null` directive
`prepare-hotfix.yml` uses, and a comment explaining why this job cannot
rely on `BASH_ENV`.

The test walks every step of the opener job and requires any that calls
`retry` to source the helper, so the coupling is pinned rather than
remembered.

**Why no existing test caught it:** all 28 shape assertions pass what a
step says about *itself*, and the step said `retry` quite correctly — it
was the *environment* that lacked it. Only running the workflow surfaces
this class of defect. That is now twice in this bootstrap: the first was
gate 3 refusing the changelog mirror that gates 1 and 2 were widened to
admit.

## Changelog Entry

No changelog needed. This fixes a defect in an unreleased feature whose
own `## Unreleased` entry (added in #1678) already describes the lane; a
separate entry for "the thing we just added now works" would be noise.
Carrying no changelog also keeps this PR trivially release-neutral.

## Testing

- [x] Tests pass locally — 29 passed (28 + the new assertion, which was
RED before the fix)
- [x] `just precommit` exit 0, including `actionlint` + `shellcheck`
over the workflow

### Manual Testing Details

TDD: test added and confirmed RED (`retry` called with no `source`),
then fixed, then GREEN. Exit codes read from redirected files, not
through pipes.

**Not yet proven end-to-end** — the opener still has not successfully
opened a PR. That is the next step after this merges, and it is the real
test.

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly — n/a, no behaviour
change to document
- [ ] I have updated `CHANGELOG.md` — n/a, see Changelog Entry above
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published

## Additional Notes

**This needs an `--admin` merge, and it is the bootstrap's second and
last bypass.** The circularity is unavoidable: the opener is what makes
a `main` PR App-authored and therefore approvable, so a broken opener
cannot open the PR that fixes itself. Once this is on `main`, the lane
can carry its own future changes — including re-dispatching for the
unbound register amendment on `bugfix/1668-unbound-1261-cve-batch`.

This PR is release-neutral by the lane's own contract (one workflow
file, one test file, no changelog, no `assets/`), so once the opener
works it would qualify to travel by the lane itself.

Refs: #1676
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-neutral Changes no published artifact; merges to main without a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release-neutral lane: merge to main without cutting a release

1 participant