Skip to content

chore: release 1.17.0 - #1734

Merged
vig-os-release-app[bot] merged 167 commits into
mainfrom
release/1.17.0
Sep 28, 2026
Merged

vig-os-release-app[bot] merged 167 commits into
mainfrom
release/1.17.0

Conversation

@vig-os-release-app

@vig-os-release-app vig-os-release-app Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Release 1.17.0 - 2026-09-28

This PR prepares release 1.17.0 for merge to main.

1.17.0 - 2026-09-28

Added

  • Opt-in environment binding for the commit-App token-minting jobs
    (#1710)

    • The scaffolded workflows mint the commit App token from
      COMMIT_APP_CLIENT_ID / COMMIT_APP_PRIVATE_KEY, which as organization or
      repository secrets are readable by a workflow job on any branch. The
      commit App normally holds a branch-protection bypass, so that surface let any
      account with write access push a branch, mint the token there and write
      straight past the default branch's protection — no PR, no required checks
    • The new .vig-os knob DEVKIT_COMMIT_APP_ENVIRONMENT renders
      environment: '<name>' onto exactly those jobs — sync-issues.yml (sync),
      prepare-release.yml and prepare-hotfix.yml (prepare, rollback),
      release.yml (rollback), sync-main-to-dev.yml (sync), mirror mode's
      rendered reset-sync-mirror job — and on the reusable callee
      release-core.yml's finalize job, whose two COMMIT_APP_*
      workflow_call declarations are flipped to required: false because an
      environment secret cannot arrive through the caller's secrets: inherit.
      Empty (the default) renders today's bytes exactly; the value round-trips
      across upgrades
    • Consumer prerequisites: create the environment before upgrading (a bound
      job auto-creates an unprotected one), give it a deployment branch policy
      admitting main, release/* and — under gitflow — dev, add no required
      reviewers
      (a second approval would stall the single-approval train), then
      move the secrets. prepare-release-extension.yml is yours: if your extension
      mints the token, add the key there yourself
  • Release-neutral lane: change main without cutting a release
    (#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'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
  • prepare-release refuses to cut a train while dev is behind main
    (#1680)

    • The cut freezes dev's ## Unreleased, but main can carry commits dev
      has not received yet. Cutting while the open chore/sync-main-to-dev-* PR
      is still unmerged silently left those entries out of the frozen section, so
      the release shipped without describing changes it contained — invisible
      until someone went looking. Validation now refuses and names the remedy:
      merge the sync PR, then re-dispatch.
    • The guard uses the same git rev-list --count origin/main ^origin/dev
      comparison sync-main-to-dev.yml uses to decide whether to open that PR, so
      the lane that carries the commits and the lane that demands them agree by
      construction rather than by coincidence.
    • Trunk consumers are unaffected: releases cut from main there and
      sync-main-to-dev.yml is copy-excluded, so the scaffold render drops the
      step instead of shipping a comparison against a branch that does not exist.
  • Composite-action run: bodies are shellchecked
    (#1704)

    • actionlint refuses a composite action outright (unexpected key "runs" for "workflow" section) and has no composite mode, so every run: body that
      moved out of a workflow and into .github/actions/*/action.yml silently lost
      its shellcheck pass — locally and in CI
    • The new shellcheck-composite-actions hook reproduces actionlint's own
      recipe over those bodies: each ${{ … }} blanked to same-length underscores
      (so findings still point at the real line and column), GitHub's shell prelude
      prepended, and actionlint's exclude list passed verbatim — one lint, not two
      dialects of one. Inline # shellcheck disable= directives keep working
    • Scaffolded: new scaffolds and flake-hooks consumers gate their own
      composites from this release; a consumer with a preserved
      .pre-commit-config.yaml receives the hook on the release that adds its
      insert row. Findings are reported in action.yml coordinates. The first
      pass caught one real defect: an unquoted $(id -u) in the podman socket
      URI of test-integration

Changed

  • BATS suite runs under bats --jobs, and a scaffold forks 65% less
    (#1687)

    • bats tests/bats/ was 6m14s of the 11m28s Project Checks job — the only
      job on CI's critical path — and ran serially. init-workspace.bats alone
      was 80% of it, so the per-file GNU-parallel branch in just test-bats
      (dead anyway: parallel was never on PATH) was the wrong axis
    • A parallel runner now rides with the bats wrapper in nix/bats.nix — bats
      is its only consumer and it lands on nobody's PATH — and both entry points,
      just test-bats and the test-project composite action, run
      bats -j "$(nproc)". worktree.bats first opted out of within-file jobs,
      because its tests drove real tmux sessions against the repository's own
      sibling worktrees directory; it now drives an isolated per-test fixture repo
      instead, so it runs under -j and in CI like every other file
      (#1694)
    • init-workspace.sh batches its two per-file fork loops — the chmod u+w
      scaffold sweep, which is on the production path, and the host-side
      placeholder-substitution pass — into one xargs each. Rendered trees
      are byte- and permission-identical; a scaffold drops from ~680 ms to
      ~270 ms
    • init-workspace.bats clones setup_file-rendered fixtures
      (_clone_shared) instead of re-rendering a stock scaffold per test: 343 →
      250 script invocations per run, 300 tests unchanged
  • Placeholder substitution is scoped to the paths devkit ships
    (#1693)

    • init-workspace.sh had two substitution paths: an image-only fast path
      reading a manifest baked into the image, and a runtime fallback that greped
      the workspace. There is now one routine, and its candidate set is the
      template-shipped paths mapped into the workspace — built the same way as the
      chmod u+w scaffold sweep builds its own — plus the smoke overlay's when one
      was applied
    • A file at a path devkit does not ship is no longer rewritten. The
      retired fallback walked the whole workspace, which in the container is the
      mounted repo — .venv and node_modules included — so any file holding a
      literal {{ SHORT_NAME }}, {{ ORG_NAME }} or {{ GITHUB_REPOSITORY }}
      token was substituted in place on a scaffold and again on every upgrade.
      Only paths devkit ships are reachable now. (Those three tokens are spelled
      with inner spaces throughout this entry so that the scaffolded copy of this
      changelog is not itself rewritten by the pass it describes.)
    • Reach is unchanged for the paths devkit does ship. A consumer file
      living at one of them that an upgrade preserves rather than overwrites —
      README.md, .typos.toml, .pre-commit-config.yaml, renovate.json, a
      consumer flake.nix, .devcontainer/* under direnv/bare — still has
      those tokens resolved, exactly as the retired manifest path resolved them
      and exactly as the chmod u+w sweep still reaches them. This is not a
      regression and not a change; it is the boundary being stated
    • The image no longer ships /root/assets/.placeholder-manifest.txt and the
      flake step that generated it is gone, together with the
      Using build-time manifest (N files) and
      Warning: Manifest not found, searching at runtime (slower) lines a
      scaffold used to print
    • Rendered output is byte- and permission-identical in all four delivery
      modes, under --smoke-test, and for a Node scaffold with
      DEVKIT_LICENSE=proprietary. A template file the consumer deleted, or one a
      mode prunes, is skipped silently

Dependencies

  • Update github/codeql-action from 1c5b675 to 2892aa5 (#1730)
  • Lock file maintenance (pip) (#1731)

Fixed

  • Preserved-config hook inserts survive a disabled anchor and keep their
    rationale
    (#1725)

    • A new scaffolded hook was inserted into a preserved .pre-commit-config.yaml
      after the single hook the template places immediately before it, so a consumer
      pinned below 1.17.0 with DEVKIT_FEATURES_DISABLED=actionlint had no anchor
      for shellcheck-composite-actions and lost the hook to a warning on every
      upgrade, forever — while a fresh scaffold with the same opt-out does ship it.
      The insert now walks every predecessor the template declares, nearest first,
      and anchors on the first one the file carries (here shellcheck); the warning
      is reached only when the file carries not one of them. A present anchor still
      wins, and still contributes its sentinel range where it has one, so an
      insert after a bracketed block lands past its closing sentinel rather than
      inside the range a feature excision deletes
    • An un-sentinelled template entry was extracted from its - repo: line down,
      so the prose above it — why the hook exists, what it deliberately does not
      cover — stayed in the template and the consumer's copy arrived as an
      unexplained entry:. The structural extraction now takes the run of
      whole-line comments directly above the entry too, stopping at a blank line, a
      non-comment line or a # >>> devkit: / # <<< devkit: sentinel, so no copy
      can swallow the previous block's text or half a sentinel pair
    • The retired-block fold reads the same extraction, so a replacement block
      now arrives with the template's rationale as well — which is what you want when
      a hook's form changed under you. Your own comment above the retired block is
      yours and is untouched, so an adoption PR shows the two comment blocks stacked
  • A hung release-neutral guard no longer leaves its last positive verdict
    standing
    (#1712)

    • The job's timeout-minutes expiry cancels the job, so gate 6 — which runs
      on !cancelled() — was skipped: a run that proved nothing left the previous
      "This change is release-neutral" comment as the pull request's only verdict,
      and a label-event run cannot even be superseded, so nothing else would
      rewrite it. The toolchain set-up, gate 2 and the .vulnixignore extra now
      carry their own step budgets (10, 10 and 60 minutes, summing to less than the
      job's 90), so a hang expires a step's budget first and the job survives to
      report it.
    • Which raises the opposite hazard, since the runner reports a step that
      exhausted its own budget as failure — indistinguishable from a gate
      refusing the change, and gate 6 would have called it "gate 2 refused it".
      A refusal is now something a gate declares: each of the five gates writes
      refused=true where it states its refusal, and gate 6 words a refusal only
      where one was declared. Every other non-green outcome — a failure with no
      declaration, a cancellation, an unrecognised value — is reported as
      infrastructure, naming the step and asking for a rerun. The outcome scan also
      no longer selects on the literal failure, so an unexpected outcome can no
      longer fall through to the positive verdict.
  • The release-neutral guard rewrites its verdict comment when the proof fails
    (#1705)

    • Gate 6 posted the verdict under a bare if: env.ACTIVE == 'true', whose
      implicit success() skipped it after any gate failure and on the unlabeled
      event. Since the verdict became a single sticky comment, the last positive
      verdict then stood as the pull request's only — and permanent — verdict: a
      reviewer read "This change is release-neutral" after a gate-2 refusal, or
      after the label had been pulled. The guard is not a required check, so
      nothing else contradicted it.
    • The step now runs on !cancelled() — never always(), since a run cancelled
      by a superseding head reached no conclusion — and writes one of three bodies:
      the unchanged verdict, a refusal naming the first failing step and saying
      whether that was a gate refusal or an infrastructure failure, or an
      "inactive" stub when the lane label is removed. Every gated step carries an
      id so gate 6 can read its outcome, the checkout and the toolchain set-up
      included: a failure there skips the gates, and skipped is not failure.
    • Deactivation is expressed by a third discriminator read from
      github.event.label, because the unlabeled payload has already dropped the
      label from the pull request's label set. It only ever edits an existing
      verdict, so a pull request labelled and unlabelled without being judged gets
      no comment at all; and neither non-green body reads the worktree, which after
      a failed gate 2 is still parked on the base ref.
  • The release-neutral guard no longer cancels its own in-flight run on a label
    event
    (#1698)

    • release-neutral-guard.yml triggers on labeled/unlabeled as well as the
      code events, and carried one cancel-in-progress concurrency lane per pull
      request, undiscriminated by event. Every label event cancelled whatever run
      was in flight, including the opened/synchronize run the label had nothing
      to do with; gh pr create --label a --label b emits two labeled events
      within a second, so a pull request opened with two labels left cancelled
      guard runs on its head beside the eventual success.
    • Label events now get a concurrency lane of their own, keyed on
      github.run_id, while code events keep superseding each other. Not a single
      lane with a conditional cancel-in-progress: false queues a label event
      behind the in-flight run — up to a 90-minute vulnix extra — and the label
      event is precisely the one whose verdict must not be stale.
    • The trade: label runs neither cancel nor are cancelled, so a burst of
      activating label events runs the gates more than once, concurrently, instead
      of superseding — three concurrent runs is the normal case, since the opener
      emits opened plus the two labeled events GitHub sends for one
      gh pr create --label. Affordable because the gates are eval-only seconds;
      only a pull request touching .vulnixignore pays the vulnix extra per run.
      Accepted in exchange for never leaving a cancelled run behind, which every
      cancellation-based alternative reintroduces.
    • env.ACTIVE additionally scopes the label actions to the lane's own
      release-neutral label, so an unrelated relabel is a cheap
      all-steps-skipped success rather than a full gate run in a fresh lane. The
      label set is still read from the pull request, so an unlabeled event
      removing the lane label deactivates the gates as before.
    • The gate-6 verdict is now one sticky comment, found by an HTML marker and
      patched in place, instead of a fresh comment per run — a stale verdict names
      files and a changelog diff that no longer exist. It also converges: after
      upserting, the step deletes every marked comment but the newest, so however
      many concurrent runs posted one, the last to finish leaves exactly one
      verdict.
    • The scope report gained its missing third state. With the label-name gate, a
      relabel for something else is inactive on a pull request that does carry
      the lane label, where the old two-branch report claimed there was no
      release-neutral label at all.
  • The hotfix lane freezes main's unshipped entries instead of refusing to
    start
    (#1679)

    • prepare-hotfix refused to run whenever main's ## Unreleased had
      content, resting on [BUG] sync-main-to-dev merge can drop the fresh ## Unreleased scaffold #590's invariant that it never does. Release-neutral lane: merge to main without cutting a release #1676 supersedes
      that invariant — main may now carry changes that have landed but are not
      yet shipped — and this refusal was its only mechanical blocker: the lane
      that exists for urgent security incidents would have refused every time the
      release-neutral lane had been used.
    • validate now classifies the section instead of refusing it and publishes
      the verdict as a changelog_mode job output. prepare freezes main's
      carried entries into ## [X.Y.Z] - TBD (prepare-changelog prepare) when
      there are any, and seeds an empty section (prepare-changelog seed) exactly
      as before when there are not. A hotfix cuts from main's head, so it ships
      those changes and their entries belong in its own version section.
    • The write still lands on the release branch only, never on main, so
      rollback remains "delete the branch"; main's ## Unreleased self-clears
      when the release branch merges back, re-establishing the empty shape after
      every hotfix.
    • release.yml's publish-time gate is deliberately unchanged: no empty
      sections at release time, an empty section is acceptable at
      prepare-hotfix time. Carried entries can therefore satisfy that gate
      without the hotfix's own fix being described — accepted, with no
      compensating check.
    • Both copies of the lane are updated: devkit's own workflow and the consumer
      scaffold's.
  • prepare-changelog prepare no longer deletes entries it cannot freeze
    (#1689)

    • validate counted any line starting with - under ## Unreleased as
      content, while prepare only moved bullets sitting under a recognised
      ### <section> heading. A bullet written straight under ## Unreleased
      therefore passed validate, and prepare then wrote an empty
      ## [X.Y.Z] - TBD, reset ## Unreleased, dropped the bullet and exited
      0 with a warning. fix(ci): freeze main's carried changelog entries in the hotfix lane #1682's classifier picks its mode by calling
      validate, so it selected prepare on exactly the input prepare could
      not freeze.
    • A bare ## Unreleased (no ### headings at all) was worse: the body
      capture was bounded by \n## [, a lookahead that cannot fire when the
      separating newline is already consumed by the heading match, so the capture
      ran to end of file and the previous release's entries were read as
      unreleased content
      — validate reported content and prepare
      duplicated that release into the new version section.
    • Both commands now read one body bounded at the next ## heading and share
      one notion of content: "has content" means "prepare can freeze this".
      Bullets outside a recognised ### subsection are refused by validate,
      prepare and seed alike, naming every offending line and leaving the file
      untouched; prepare refuses when there is nothing to freeze instead of
      writing an empty section. The hotfix lane needs no change — validate
      exits 1, the classifier picks seed, and seed refuses the same input, so
      the lane fails closed instead of losing the entry.
    • The same guard now runs over the ## [X.Y.Z] block prepare folds back in
      on a reused release branch, closing the twin of the bug: a bullet written
      straight under the version heading — the shape the hotfix runbook asks
      authors to fill in — was dropped just as silently. validate --version,
      the release-time gate in release.yml and the scaffold's
      release-core.yml, reads content the same way, so it no longer blesses a
      section prepare would empty on the next cycle.
    • A repeated standard heading (### Added twice, the normal result of a
      hand-resolved merge conflict) is refused as well. Only the first block of
      each heading was ever read, so the rest was deleted at exit 0. It refuses
      rather than merging the blocks: a repeated heading means an edit went
      wrong, and quietly stitching it back together would hide that.
  • bats --jobs runs on rush, keeping perl out of the image
    (#1708)

    • The parallel runner that arrived with bats -j
      (#1687) was GNU parallel,
      which is a perl script. The bats wrapper ships in the image env, so perl
      5.42.0 re-entered the image's runtime closure —
      #1108 had evicted it
      precisely so its CVE exception batch could be retired — carrying three
      findings the register holds no exception for (CVE-2026-4176 9.8,
      CVE-2026-13221 9.1, CVE-2026-57432 8.4). The nightly vulnix gate on dev
      caught it; no release carried it.
    • The runner is now shenwei356/rush,
      which bats supports natively via BATS_PARALLEL_BINARY_NAME (the wrapper
      sets it, so bats -j still needs nothing from the caller). rush is Go: no
      interpreter behind it, and the image's runtime closure drops 47 MiB.
    • A negative image test pins the eviction, which nothing had: no perl on PATH
      and no perl derivation anywhere in the image's store. The second half is
      the one that matters — perl was never on PATH even while it sat in the
      closure, which is where the vulnix scan looks.

Security

  • Except the second unbound 1.26.1 CVE batch in the vulnix register
    (#1668,
    #1669)
    • The 2026-09-24 nightly went red on both lanes on the same package as the
      day before, with two CVEs the 2026-09-23 exception did not carry:
      CVE-2026-82717 (9.8) and CVE-2026-81634 (7.5)
    • Not new upstream work and not a closure change: all three unbound CVEs
      were published 2026-09-16 and are fixed by the same 1.26.1 release. They
      arrived a day apart because vulnix matches on CPE and NVD analysed the
      two additions at 2026-09-23T19:50Z/19:51Z — after that day's scan ran
    • Both are resolver paths (RRSet canonicalisation; CNAME synthesis on an
      upstream response), so the existing reachability finding covers them
      unchanged: the closure carries libunbound only, with no daemon and no
      unbound binary
    • Added to the existing 2026-11-04 block rather than a new one — all three
      share one death condition, the pin advance that ships unbound 1.26.1, and
      must be deleted together. The date is deliberately unchanged
    • The remediation lever shortened in the meantime: the staging-26.05
      backport has merged, leaving the fix one staging -> nixos-26.05 cycle
      from the pinned channel rather than two branch hops

c-vigo and others added 30 commits September 24, 2026 19:27
prepare-hotfix refused to start whenever main's ## Unreleased had content,
resting on #590's empty-by-construction invariant that #1676 supersedes.
validate now classifies the section and prepare freezes it or seeds an
empty one, on the release branch as before.

Refs: #1679
Port the freeze-or-seed branch to the consumer copy of prepare-hotfix.yml
and its runbook. Separate commit from devkit's own copy: this one is a
published asset and needs a release to reach consumers.

Refs: #1679
Syncs `dev` with `main` (sync-main-to-dev workflow).
Syncs `dev` with `main` (sync-main-to-dev workflow).
Syncs `dev` with `main` (sync-main-to-dev workflow).
## Description

`prepare-hotfix.yml` refused to start whenever `main`'s `## Unreleased`
had content, resting on
[#590](#590 invariant that it
never does. [#1676](#1676
revised plan supersedes that invariant — `main` may now carry changes
that have landed but are not yet shipped — and this refusal was its only
mechanical blocker. Left alone, the lane that exists for urgent security
incidents would refuse every time the release-neutral lane had been
used.

A hotfix cuts from `main`'s head, so it **ships** whatever `main`
carries; those entries belong in the hotfix's own version section. The
refusal becomes a branch on content.

## Type of Change

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

### Modifiers

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

Behaviour changes only in the case that is currently a hard error.

## Changes Made

- **`validate` classifies instead of refusing.** The step is now
`Classify main's Unreleased section`: it probes with `prepare-changelog
validate`, sets `MODE=prepare` when the section carries entries and
`MODE=seed` when it does not, dry-probes that exact call locally, and
publishes the verdict as a new `changelog_mode` job output.
- **`prepare` branches on that verdict.** `prepare-changelog prepare
X.Y.Z` freezes `main`'s carried entries into `## [X.Y.Z] - TBD` (plus a
fresh empty Unreleased); `prepare-changelog seed X.Y.Z` writes an empty
section exactly as before. The classification is load-bearing: `prepare`
run on an *empty* Unreleased scoops the previous release's section
instead (verified locally), which is why the mode is decided before
anything is written.
- **The write still lands on the release branch only** — never `main`,
never `dev` — so rollback remains "delete the branch". `main`'s `##
Unreleased` self-clears when the release branch merges back.
- PR body, run summary and the seed commit message now state which of
the two happened, so a non-empty section is visible rather than silently
tolerated.
- Header comments, `docs/RELEASE_CYCLE.md` (hotfix preconditions,
CHANGELOG-state block, `prepare`/`seed` CLI reference) and
`docs/DOWNSTREAM_RELEASE.md` record the superseded invariant.

**Not changed, deliberately:** `release.yml`'s publish-time gate
(`prepare-changelog validate --version`). No empty sections at release
time; an empty section is acceptable at `prepare-hotfix` time. This does
mean carried entries satisfy that gate without the hotfix's own fix
being described — accepted on the issue, no compensating check added.
Both the PR body the lane writes and the docs say so explicitly.

**Commit split.** Devkit's own `.github/workflows/` copy and the
`assets/workspace/` scaffold copy land as separate commits: the first is
release-neutral and can reach `main` through the #1676 lane, the second
is a published asset and needs a release. The scaffold copy **did**
carry the equivalent refusal (its own dialect: mode-aware toolchain, no
`uv run`) and received the same branch.

## Changelog Entry

```markdown
### Fixed

- **The hotfix lane freezes `main`'s unshipped entries instead of refusing to
  start** ([#1679](#1679))
  - `prepare-hotfix` refused to run whenever `main`'s `## Unreleased` had
    content, resting on #590's invariant that it never does. #1676 supersedes
    that invariant — `main` may now carry changes that have landed but are not
    yet shipped — and this refusal was its only mechanical blocker: the lane
    that exists for urgent security incidents would have refused every time the
    release-neutral lane had been used.
  - `validate` now classifies the section instead of refusing it and publishes
    the verdict as a `changelog_mode` job output. `prepare` freezes `main`'s
    carried entries into `## [X.Y.Z] - TBD` (`prepare-changelog prepare`) when
    there are any, and seeds an empty section (`prepare-changelog seed`) exactly
    as before when there are not. A hotfix cuts from `main`'s head, so it ships
    those changes and their entries belong in its own version section.
  - The write still lands on the **release branch only**, never on `main`, so
    rollback remains "delete the branch"; `main`'s `## Unreleased` self-clears
    when the release branch merges back, re-establishing the empty shape after
    every hotfix.
  - `release.yml`'s publish-time gate is deliberately unchanged: no empty
    sections at release time, an empty section is acceptable at
    `prepare-hotfix` time. Carried entries can therefore satisfy that gate
    without the hotfix's own fix being described — accepted, with no
    compensating check.
  - Both copies of the lane are updated: devkit's own workflow and the consumer
    scaffold's.
```

## Testing

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

### Manual Testing Details

- TDD: `tests/test_workflow_prepare_hotfix.py` gained
`test_validate_classifies_mains_unreleased_instead_of_refusing` and
`test_prepare_freezes_carried_entries_or_seeds_an_empty_section`, both
parametrized over the devkit and scaffold copies. Committed RED (4
failures), then GREEN per copy.
- `uv run pytest tests/test_workflow_prepare_hotfix.py -q` -> 33 passed.
- Full suite: `uv run pytest tests/ -q --ignore=tests/test_image.py
--ignore=tests/test_integration.py` (those two fail locally from a stale
`:dev` image) -> green.
- `just precommit` (`prek run --all-files`) -> exit 0, including
`actionlint`, `shellcheck`, `yamllint` and the `sync-manifest` drift
gate.
- Verified the `prepare`/`seed` semantics directly against
`prepare-changelog` on fixture changelogs, including the failure mode
that motivates classifying first: `prepare` on an *empty* `##
Unreleased` moves the previous release's section into the new one.

## Checklist

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

`docs/RELEASE_CYCLE.md` and `docs/DOWNSTREAM_RELEASE.md` are
hand-maintained, not generated from `docs/templates/`.

## Additional Notes

- Depends on the model change in
[#1676](#1676 "Revised plan
(2026-09-24)". This is its Phase 1; Phase 2 (`prepare-release`
sync-ordering guard) is not in scope here.
- Base is `dev`, per the repo's gitflow model.

Refs: #1679
…1682)

## Description

`prepare-hotfix.yml` refused to start whenever `main`'s `## Unreleased`
had content, resting on
[#590](#590 invariant that it
never does. [#1676](#1676
revised plan supersedes that invariant — `main` may now carry changes
that have landed but are not yet shipped — and this refusal was its only
mechanical blocker. Left alone, the lane that exists for urgent security
incidents would refuse every time the release-neutral lane had been
used.

A hotfix cuts from `main`'s head, so it **ships** whatever `main`
carries; those entries belong in the hotfix's own version section. The
refusal becomes a branch on content.

## Type of Change

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

### Modifiers

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

Behaviour changes only in the case that is currently a hard error.

## Changes Made

- **`validate` classifies instead of refusing.** The step is now
`Classify main's Unreleased section`: it probes with `prepare-changelog
validate`, sets `MODE=prepare` when the section carries entries and
`MODE=seed` when it does not, dry-probes that exact call locally, and
publishes the verdict as a new `changelog_mode` job output.
- **`prepare` branches on that verdict.** `prepare-changelog prepare
X.Y.Z` freezes `main`'s carried entries into `## [X.Y.Z] - TBD` (plus a
fresh empty Unreleased); `prepare-changelog seed X.Y.Z` writes an empty
section exactly as before. The classification is load-bearing: `prepare`
run on an *empty* Unreleased scoops the previous release's section
instead (verified locally), which is why the mode is decided before
anything is written.
- **The write still lands on the release branch only** — never `main`,
never `dev` — so rollback remains "delete the branch". `main`'s `##
Unreleased` self-clears when the release branch merges back.
- PR body, run summary and the seed commit message now state which of
the two happened, so a non-empty section is visible rather than silently
tolerated.
- Header comments, `docs/RELEASE_CYCLE.md` (hotfix preconditions,
CHANGELOG-state block, `prepare`/`seed` CLI reference) and
`docs/DOWNSTREAM_RELEASE.md` record the superseded invariant.

**Not changed, deliberately:** `release.yml`'s publish-time gate
(`prepare-changelog validate --version`). No empty sections at release
time; an empty section is acceptable at `prepare-hotfix` time. This does
mean carried entries satisfy that gate without the hotfix's own fix
being described — accepted on the issue, no compensating check added.
Both the PR body the lane writes and the docs say so explicitly.

**Commit split.** Devkit's own `.github/workflows/` copy and the
`assets/workspace/` scaffold copy land as separate commits: the first is
release-neutral and can reach `main` through the #1676 lane, the second
is a published asset and needs a release. The scaffold copy **did**
carry the equivalent refusal (its own dialect: mode-aware toolchain, no
`uv run`) and received the same branch.

## Changelog Entry

```markdown
### Fixed

- **The hotfix lane freezes `main`'s unshipped entries instead of refusing to
  start** ([#1679](#1679))
  - `prepare-hotfix` refused to run whenever `main`'s `## Unreleased` had
    content, resting on #590's invariant that it never does. #1676 supersedes
    that invariant — `main` may now carry changes that have landed but are not
    yet shipped — and this refusal was its only mechanical blocker: the lane
    that exists for urgent security incidents would have refused every time the
    release-neutral lane had been used.
  - `validate` now classifies the section instead of refusing it and publishes
    the verdict as a `changelog_mode` job output. `prepare` freezes `main`'s
    carried entries into `## [X.Y.Z] - TBD` (`prepare-changelog prepare`) when
    there are any, and seeds an empty section (`prepare-changelog seed`) exactly
    as before when there are not. A hotfix cuts from `main`'s head, so it ships
    those changes and their entries belong in its own version section.
  - The write still lands on the **release branch only**, never on `main`, so
    rollback remains "delete the branch"; `main`'s `## Unreleased` self-clears
    when the release branch merges back, re-establishing the empty shape after
    every hotfix.
  - `release.yml`'s publish-time gate is deliberately unchanged: no empty
    sections at release time, an empty section is acceptable at
    `prepare-hotfix` time. Carried entries can therefore satisfy that gate
    without the hotfix's own fix being described — accepted, with no
    compensating check.
  - Both copies of the lane are updated: devkit's own workflow and the consumer
    scaffold's.
```

## Testing

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

### Manual Testing Details

- TDD: `tests/test_workflow_prepare_hotfix.py` gained
`test_validate_classifies_mains_unreleased_instead_of_refusing` and
`test_prepare_freezes_carried_entries_or_seeds_an_empty_section`, both
parametrized over the devkit and scaffold copies. Committed RED (4
failures), then GREEN per copy.
- `uv run pytest tests/test_workflow_prepare_hotfix.py -q` -> 33 passed.
- Full suite: `uv run pytest tests/ -q --ignore=tests/test_image.py
--ignore=tests/test_integration.py` (those two fail locally from a stale
`:dev` image) -> green.
- `just precommit` (`prek run --all-files`) -> exit 0, including
`actionlint`, `shellcheck`, `yamllint` and the `sync-manifest` drift
gate.
- Verified the `prepare`/`seed` semantics directly against
`prepare-changelog` on fixture changelogs, including the failure mode
that motivates classifying first: `prepare` on an *empty* `##
Unreleased` moves the previous release's section into the new one.

## Checklist

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

`docs/RELEASE_CYCLE.md` and `docs/DOWNSTREAM_RELEASE.md` are
hand-maintained, not generated from `docs/templates/`.

## Additional Notes

- Depends on the model change in
[#1676](#1676 "Revised plan
(2026-09-24)". This is its Phase 1; Phase 2 (`prepare-release`
sync-ordering guard) is not in scope here.
- Base is `dev`, per the repo's gitflow model.

Refs: #1679
prepare-changelog validate reports "has content" for any line starting
with a dash under ## Unreleased, while prepare only freezes bullets that
sit under a recognised "### <section>" heading. The gap lets prepare exit
0 having deleted the entry, and the #1682 hotfix classifier selects
prepare on exactly the input prepare cannot freeze.

The bare ## Unreleased shape is worse than the issue describes. The body
regex is bounded by a literal newline plus "## [", and with an empty body
that separating newline is already consumed by the heading's own "\s*\n",
so the capture runs to end of file and both validate and prepare read the
PREVIOUS release's subsections as unreleased content. validate therefore
returns 0 there as well, so the classifier does not mask the duplication
after all.

These tests fail on the current implementation.

Refs: #1689
…ntent

validate and prepare disagreed about what counts as content under
## Unreleased, and the gap destroyed entries. validate accepted any line
starting with a dash; prepare only moved bullets sitting under a
recognised "### <section>" heading. A loose bullet therefore passed
validate and was deleted by prepare, which exited 0 with a warning, and
the #1682 hotfix classifier selected prepare on exactly that input.

Both commands now read one bounded Unreleased body and share one notion
of content:

- _unreleased_body bounds the capture at the next "## " heading. The old
  "\n## [" lookahead could not fire on a bare ## Unreleased, because the
  separating newline was consumed by the heading match itself, so the
  capture ran to end of file and the previous release's subsections were
  read as unreleased content. That made validate report content and
  prepare duplicate the previous release into the new version section.
- _reject_loose_bullets refuses, leaving the file untouched, when the
  body holds bullets no recognised "### " subsection owns, naming every
  offending line. It runs from extract_unreleased_content (prepare and
  seed) and from validate_changelog.
- validate's has_content is now _parse_subsections, so "has content"
  means exactly "prepare can freeze this".
- prepare refuses when there is nothing to freeze instead of writing an
  empty ## [X.Y.Z] - TBD and warning on stdout, which only deferred the
  failure to release.yml's validate --version. cmd_prepare's empty branch
  is therefore unreachable and goes.

No caller depends on prepare succeeding on an empty section: every
prepare call is gated by a validate that refuses one. prepare-release.yml
validates before preparing in both trees, and the #1682 classifier in
prepare-hotfix.yml routes an empty section to seed. justfile.gh only
calls reset.

No workflow change is needed for the loose-bullet path either. validate
exits 1, so the classifier picks seed, and seed now refuses the same
input through the shared guard, failing the dry probe loudly under
set -euo pipefail rather than wiping the entry.

Refs: #1689
Both hazards belong in the entry: the loose bullet validate accepted and
prepare deleted, and the bare ## Unreleased whose unbounded body capture
made prepare duplicate the previous release. The mirror under
assets/workspace/.devcontainer/ is the sync-manifest hook's output.

Refs: #1689
The docstring is not raw, so the backslash-n written to describe the old
lookahead rendered as a real newline mid-sentence. Describe it in words
instead.

Refs: #1689
sweep_scaffold_writable collected one chmod fork per template file (23%
of a scaffold's ~4.3k forks) and the placeholder-substitution fallback
one grep fork per workspace file (42%). Collect the sweep's targets and
chmod them through a single xargs, and replace the fallback's per-file
grep/sed loop with one `grep -rl --null` piped into one xargs sed.

File selection and permissions are unchanged: rendered trees are
byte-identical old vs new for all four modes and across upgrade runs,
`.git/` stays excluded, in-tree symlinks stay unfollowed, and binary
files still match. A fresh `--mode both` scaffold drops from 680ms to
267ms locally.

Refs: #1687
…ures

setup_file already rendered one read-only tree per delivery mode, but a test
that mutates its workspace could not reuse one, so 111 of the ~274
init-workspace.sh invocations in this file re-render a tree an earlier test
already built. Copying a rendered tree costs ~36ms against ~1770ms for a
render, and the render is path-independent, so a cp -a of a fixture is
byte- and permission-identical to a fresh scaffold into an empty directory.

Factor the per-mode render into a _render_shared helper, add the node-both,
python-both and trunk-both fixtures for the three largest seeded/flagged
groups, and expose _clone_shared <fixture> <ws> as a pure-setup replacement
for a stock scaffold call.

Refs: #1687
76 tests scaffolded a stock tree into an empty workspace purely to have
something to mutate, then asserted on what a later invocation did to it. Each
such call is byte-for-byte what setup_file already rendered, so replace it with
a _clone_shared copy: 61 both-mode, 9 direnv, 2 devcontainer, 2 bare, and the
three-mode inference loop.

Only the pure-setup call is converted. Every test that asserts on a scaffold
run own output, seeds files the shared render did not, or passes extra flags
keeps its real invocation, as does the second invocation in the tests that
scaffold and then upgrade.

Refs: #1687
…caffolding

Three more groups share a setup the shared per-mode trees could not cover: a
package.json or pyproject.toml language marker seeded before a both-mode
scaffold, and --workflow trunk on an otherwise stock both-mode tree. Each is
now a setup_file fixture, so the 18 tests clone it instead of rendering it.

The marker file moves from the test body into the fixture, where it is seeded
before the identical render; the fixture name records which marker is in play.

Refs: #1687
c-vigo and others added 22 commits September 25, 2026 23:02
…ecessor (#1728)

## Description

Two defects in how a new scaffolded hook reaches a consumer's preserved
`.pre-commit-config.yaml`, both exposed by the `1.17.0
shellcheck-composite-actions` row from #1726.

**A disabled anchor blocked the hook after it.** The insert anchored on
the single hook the template places immediately before the new one. For
the composite hook that is `actionlint`, so a consumer pinned below
1.17.0 with `DEVKIT_FEATURES_DISABLED=actionlint` had no anchor and was
skipped with a warning on every upgrade, forever — while a fresh
scaffold with the same opt-out does get the hook, since it sits outside
the actionlint sentinels. Now `template_hook_anchors` returns every
predecessor nearest-first, the insert walks them and anchors on the
first one present in the consumer's file, and the warning fires only
when none is. The chosen anchor's range is still whatever
`hook_block_range` prefers — the sentinel range where one exists — so an
insert after a present `actionlint` still lands after `# <<<
devkit:actionlint`, outside what the feature's excision deletes.

**The inserted block lost its rationale.** An un-sentinelled template
entry was extracted byte-exact from its `- repo:` line, so the
consumer's copy carried none of the prose above it. The structural
branch of `hook_block_range` now sweeps upward over the contiguous run
of whole-line comments, stopping at a blank line, a non-comment line, or
either sentinel marker, so it can neither swallow the previous block's
text nor half a sentinel pair. Only the range's start moves; the anchor
path reads the end.

**Why not sentinel-wrap the composite entry instead** (the alternative
noted on the issue): sentinels mean feature-gated excision, and the
composite hook belongs to no group. Decisively, `hook_block_range`
matches sentinel ids by prefix, so a `# >>>
devkit:shellcheck-composite-actions` marker would satisfy a lookup for
`shellcheck` — breaking the very fallback that anchors on it. Verified
against a fixture; recorded in the function's docstring so nobody takes
that route later.

**Behaviour change to be aware of:** a pin at or below 1.16.0 whose
config lacks the actionlint block now gains the composite hook through
the `shellcheck` fallback. That is the fix, not a #1651 regression:
those pins have never seen the composite hook (its row is 1.17.0); the
actionlint row itself still stands down at 1.16.0. Two existing
assertions were narrowed to `preserved-hook-insert: actionlint` for that
reason, with docstrings saying why.

## Type of Change

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

### Modifiers

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

## Changes Made

`assets/init-workspace.sh`

- `template_hook_anchor` → `template_hook_anchors` (all predecessors,
nearest first); `insert_missing_hook_blocks` walks them and anchors on
the first present, warning only when none is
- `hook_block_range` structural branch sweeps the comment run above the
`- repo:` line (three stop conditions); the docstring records the
sentinel prefix-match trap and why an ungrouped hook stays
un-sentinelled

`tests/test_scaffold_preserved_hooks.py`

- `test_a_disabled_anchor_does_not_block_the_hook_after_it` (pin 1.16.0
+ actionlint disabled ⇒ `[shellcheck, shellcheck-composite-actions,
typos]`, no warning),
`test_the_walk_stops_at_the_nearest_present_predecessor` (after the
actionlint sentinel end), a seed lacking every predecessor still warns
and writes nothing,
`test_the_inserted_block_carries_the_template_comment_above_it`, and
`test_the_folded_block_carries_the_template_comment` (the retired-block
fold shares the extractor; the consumer's own comment survives above the
template's). Each RED before its fix

`docs/MIGRATION.md`, `CHANGELOG.md` (+ generated mirror)

- Consumer prose: the block lands after the nearest predecessor the file
still carries, and an opt-out no longer withholds the hooks behind it;
`### Fixed` entry with three sub-bullets (anchor walk, comment run, fold
side effect). The `inserted_hook_blocks()` row-order comment is
corrected: order is position, not delivery (review finding)

## Changelog Entry

### Fixed

- **Preserved-config hook inserts survive a disabled anchor and keep
their
  rationale** ([#1725](#1725))
- A new scaffolded hook was inserted into a preserved
`.pre-commit-config.yaml`
after the single hook the template places immediately before it, so a
consumer
pinned below 1.17.0 with `DEVKIT_FEATURES_DISABLED=actionlint` had no
anchor
for `shellcheck-composite-actions` and lost the hook to a warning on
every
upgrade, forever — while a *fresh* scaffold with the same opt-out does
ship it.
The insert now walks every predecessor the template declares, nearest
first,
and anchors on the first one the file carries (here `shellcheck`); the
warning
is reached only when the file carries not one of them. A present anchor
still
wins, and still contributes its **sentinel** range where it has one, so
an
insert after a bracketed block lands past its closing sentinel rather
than
    inside the range a feature excision deletes
- An un-sentinelled template entry was extracted from its `- repo:` line
down,
so the prose above it — why the hook exists, what it deliberately does
not
    cover — stayed in the template and the consumer's copy arrived as an
    unexplained `entry:`. The structural extraction now takes the run of
whole-line comments directly above the entry too, stopping at a blank
line, a
non-comment line or a `# >>> devkit:` / `# <<< devkit:` sentinel, so no
copy
    can swallow the previous block's text or half a sentinel pair
- The retired-block **fold** reads the same extraction, so a replacement
block
now arrives with the template's rationale as well — which is what you
want when
a hook's form changed under you. Your own comment above the retired
block is
yours and is untouched, so an adoption PR shows the two comment blocks
stacked


## Testing

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

### Manual Testing Details

- End-to-end with the real script: `DEVKIT_VERSION=1.16.0`,
`DEVKIT_FEATURES_DISABLED=actionlint`, config = template minus the
actionlint sentinel block and the composite block → `Inserted the
'shellcheck-composite-actions' hook after 'shellcheck' …`, the block
lands with its template comment right after `shellcheck`, nothing on
stderr about anchors, YAML parses with the template's hook order;
`--preview` reports the planned insert and writes nothing
- `uv run pytest tests/test_scaffold_preserved_hooks.py
tests/test_flake_hooks.py -q` → 110 passed (32 + 78); whole Python suite
minus image/integration → 1301 passed, 1 skipped
- `bats -j 4 --filter '1660|1651|preserved|hook|1717|1725'
tests/bats/init-workspace.bats` → 48 ok; the one failure is the known
environmental one (the #1660 opt-out test shells out to a bare `python3`
without PyYAML in the plain `nix develop` shell; green in CI)
- `shellcheck -x` clean; `prek run --all-files` → 55 hooks passed

## Checklist

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

## Additional Notes

Side effect, pinned by its own test and recorded in the changelog: the
retired-block fold (Case 1) shares the extractor, so a folded
replacement block now also carries the template's rationale comment,
stacked under the consumer's own. The sentinel prefix match itself is
left as-is and documented; hardening it to an exact-id match is #1727.

Refs: #1725
The structural branch still builds its `- id:` pattern from the id; say
so rather than overstate what #1727 changed.

Refs: #1727
## Description

`hook_block_range` located a hook's `# >>> devkit:<id>` / `# <<<
devkit:<id>` sentinels with an awk `index()` prefix match, so a sentinel
whose id extends another id answered the shorter id's lookup: a
consumer-bracketed `# >>> devkit:shellcheck-composite-actions` block was
returned for a lookup of `shellcheck`. Found in the #1725 review;
nothing in the template trips it today, but it is exactly what the #1725
fallback anchor (which walks predecessors such as `shellcheck`) and the
feature excisions would silently mis-target the day someone
sentinel-wraps a hook whose id is a prefix extension of another.

The sentinel branch now regex-matches only the marker's whole-line
shape, extracts the token after `devkit:` up to the first whitespace,
and compares it to the requested id **as a string** — the id is never
interpolated into a regex, so a metacharacter in a hook id cannot change
what matches. The template's opening sentinels carry trailing prose (`#
>>> devkit:actionlint — excised when …`), which is why the token stops
at whitespace rather than requiring end-of-line.

Same hazard, same fix, in the two feature excisions:
`render_actionlint_optout` and `render_release_optout` used unanchored
`grep`/`sed` ranges on `# >>> devkit:actionlint` / `# >>>
devkit:release`, so `…:actionlint-extra` or `…:release-notes` pairs
would have been deleted too. Both are now anchored at line start and
require whitespace or end-of-line after the id (`-E` alternation, again
because of the trailing prose). The structural branch's sweep stops are
left id-agnostic on purpose: any sentinel must stop the comment sweep.

## Type of Change

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

### Modifiers

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

## Changes Made

`assets/init-workspace.sh`

- `hook_block_range`: `sentinel(line, dir)` awk function (whole-line
marker shape, token extracted, string equality against `"# " dir "
devkit:" id`); docstring updated — the prefix hazard is gone, the
feature-gating reason for keeping ungrouped hooks un-sentinelled stays
- `render_actionlint_optout`, `render_release_optout`: `grep -qE
'^[[:space:]]*# >>> devkit:<id>([[:space:]]|$)'` guard and the matching
`sed -i -E` range

`tests/test_scaffold_preserved_hooks.py`

- `_shell_function(name)` harness lifting one function's verbatim text
out of the script into a `bash -c` run (the script is not sourceable)
- Five tests, four RED before the fix: a prefix-extended sentinel does
not answer the shorter lookup (direct `hook_block_range`); the extending
id still resolves to its own sentinel range; the anchor walk ignores a
prefix-extended sentinel (upgrade-driven, pin 1.15.1 ⇒ actionlint lands
after `shellcheck`, not after the composite block); the actionlint
excision takes only its own pair (decoy `actionlint-extra` pair survives
under the opt-out); the release excision takes only its own pair (real
`render_release_optout` against a fixture `justfile.gh` with a decoy
`release-notes` pair)

## Changelog Entry

No changelog needed — the issue says so; no template sentinel triggers
the prefix match today, so consumer-visible behaviour is unchanged.

## Testing

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

### Manual Testing Details

- End-to-end `--force --no-prompts --mode both` with
`DEVKIT_FEATURES_DISABLED=actionlint` on a config carrying the
template's real actionlint block plus a decoy `# >>>
devkit:actionlint-extra` pair: only the real block removed (19 lines),
decoy intact; `DEVKIT_FEATURES_DISABLED=release` still drops every
`devkit:release` sentinel and `prepare-release:` recipe from
`justfile.gh`
- `uv run pytest tests/test_scaffold_preserved_hooks.py
tests/test_flake_hooks.py -q` → 115 passed
- `bats -j 4 --filter
'1660|1651|preserved|hook|1717|1725|optout|opt-out|release'
tests/bats/init-workspace.bats` → 66 ok; the one failure is the known
environmental one (the #1660 opt-out test shells out to a bare `python3`
without PyYAML in the plain `nix develop` shell; green in CI)
- `shellcheck -x` clean; `prek run --all-files` → 55 hooks passed

## Checklist

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

## Additional Notes

The issue's suggested end-of-line anchor would have broken the live
actionlint excision because the template's opening sentinel carries
trailing prose; "followed by whitespace or end-of-line" is the reading
that matches the template, and the tests pin it.

Refs: #1727
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github/codeql-action](https://redirect.github.com/github/codeql-action)
([changelog](https://redirect.github.com/github/codeql-action/compare/1c5b675653bb5c22dbe9b12b556ec555138e09fd..2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2))
| action | digest | `1c5b675` → `2892aa5` |

---

### Configuration

📅 **Schedule**: (in timezone Etc/UTC)

- Branch creation
  - "before 9am on monday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/vig-os/devkit).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMTIuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjExMi4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2IiwibGFiZWxzIjpbXX0=-->
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: (in timezone Etc/UTC)

- Branch creation
  - "before 9am on monday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/vig-os/devkit).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMTIuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjExMi4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2IiwibGFiZWxzIjpbXX0=-->
Scheduled refresh of the fast-branch pins: nixpkgs-unstable (uv, gh,
claude-code via the fastMovers overlay) and home-manager master (the
ci-hm-unstable eval guard). Full CI on this PR is the merge gate.

Refs: #817, #1589
Scheduled advance of the pinned stable nixpkgs rev - the primary
CVE-remediation lever (docs/CONTAINER_SECURITY.md). Full CI on this PR,
including the closure rebuild, is the merge gate.

After merge, the first nightly security scan produces the findings delta
against the new closure; reconcile the exception registers against that
delta (delete cleared entries) rather than re-dating them.

Refs: #1565
Move Unreleased content to [1.17.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 September 28, 2026 06:28
@c-vigo
c-vigo self-requested a review as a code owner September 28, 2026 06:28
Set release date to 2026-09-28 and regenerate release docs.

Refs: #1734
@vig-os-release-app
vig-os-release-app Bot merged commit b32b3b5 into main Sep 28, 2026
21 checks passed
@vig-os-release-app
vig-os-release-app Bot deleted the release/1.17.0 branch September 28, 2026 07:53
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.

1 participant