Skip to content

chore: sync dev with main (conflicts) - #1262

Merged
c-vigo merged 26 commits into
devfrom
chore/sync-main-to-dev-25-1
Jul 24, 2026
Merged

c-vigo merged 26 commits into
devfrom
chore/sync-main-to-dev-25-1

Conversation

@vig-os-release-app

Copy link
Copy Markdown
Contributor

Automated sync of main to dev found merge conflicts that require manual resolution.

How to resolve

git fetch origin chore/sync-main-to-dev-25-1:chore/sync-main-to-dev-25-1
git checkout chore/sync-main-to-dev-25-1
git merge origin/dev
# resolve conflicts
git commit -S
git push origin chore/sync-main-to-dev-25-1

Once pushed, this PR will update and become mergeable.

c-vigo and others added 25 commits July 22, 2026 15:09
A release train's changelog-freeze push to dev starts a discovery build
whose baked-CHANGELOG checksum mismatch is guaranteed red until the
manifest-sync push lands one minute later. Group runs per ref with
cancel-in-progress so the sync build supersedes the doomed freeze build
instead of painting a red run every train; distinct refs stay
independent.

Refs: #1250
… restructure

The #1167 activate_flake_hooks_default awk anchors on the template's
extraPackages line at its exact indentation; the #1249 guard restructure
re-indented the mkProjectShell attrset 10->12 spaces, so the insert
silently no-opped and direnv scaffolds lost their generated hooks
(caught by the init-workspace bats e2e in PR CI).

Refs: #1249
…ser-owned (#1253)

## Summary

The #1235 ownership repair keyed on the runtime CLI *name* (`RUNTIME =
docker`). On hosts where `docker` is the rootless-podman compat shim,
the scaffold output is already correctly owned, and the in-container
`chown` to the host UID maps to an unmapped subuid — flipping a working
tree to `UNKNOWN`-owned and breaking the git phase (a regression of the
#1235 fix; 1.4.0 worked).

The repair now keys on the OBSERVED post-scaffold state: it runs only
when the tree contains files not owned by the invoking user (`find !
-user` probe, portable across GNU/BSD — no GNU-only `stat -c`). RUNTIME
is out of the condition entirely; real docker's root-owned output still
triggers the repair, and any rootless-podman flavor skips it.
Warn-not-fail posture and messages unchanged.

Closes #1248
Refs #1248

## Verification

- TDD: new bats test red-first (docker runtime + user-owned tree → no
repair container); existing #1235 tests keep asserting the repair on
root-owned output via a stubbed ownership probe
- `bats tests/bats/install.bats`: 103/103 ok; full pre-commit suite
green (51 hooks)
- **Live proof on a rootless-podman shim host**: rc1 installer breaks
(`UNKNOWN`-owned, no git repo); this branch's installer with identical
flags yields a user-owned, git-initialized tree — matching the 1.4.0
baseline
## Summary

Adds a workflow-level per-ref `concurrency` block with
`cancel-in-progress: true` to `nix-image.yml`, so a release train's
manifest-sync push cancels the guaranteed-red build started by the
changelog-freeze push one commit earlier (visible since #1236 dropped
the `paths:` filter).

Per-ref grouping keeps the epic branch and dispatches on other refs
independent; cancelled runs only produce disposable `nix-dev*` discovery
tags and idempotent Cachix paths, both fully regenerated by the
superseding run. Structure asserted test-first in
`tests/test_workflow_cachix.py` (RED confirmed before the fix).

Closes #1250
Refs #1250

## Verification

- `actionlint` clean; zizmor finding-set diff shows zero new findings
(removes one pedantic `concurrency-limits` finding)
- Full pre-commit suite green; `tests/test_workflow_cachix.py` 5/5
…#1252)

## Summary

The scaffolded `flake.nix` forwards the new `workflow` argument (#1224)
unconditionally, but its `vigos` input deliberately floats on the
default branch — so until 1.4.1 promotes, a fresh scaffold resolves
devkit `main` (1.4.0) and dies on first shell entry with `called with
unexpected argument 'workflow'`. This is what broke devkit-smoke-test PR
#288's Direnv Smoke jobs and the smoke rc1 dispatch, deadlocking the
promote precondition.

The call site now gates `inherit workflow;` behind
`builtins.functionArgs vigos.lib.mkProjectShell ? workflow` via
`optionalAttrs`, so older builders degrade to their gitflow default
instead of failing eval. All template comments preserved; upgrades were
never affected (`flake.nix` is scaffold-once).

Closes #1249
Refs #1249

## Verification

- TDD: guard asserted red-first in `tests/test_workflow_model.py`
- `tests/test_workflow_model.py` 22/22, `test_scaffold_lint.py` +
`test_flake_hooks.py` + `test_downstream_flake.py` green; full
pre-commit suite green (51 hooks)
- **Live proof**: fixed template + `.vig-os` `DEVKIT_WORKFLOW=trunk`
enters the shell against BOTH `github:vig-os/devkit` (main = 1.4.0,
previously fatal) and `?ref=1.4.1-rc1`
- Smoke-test PR #288 Direnv Smoke going green on the rc2 respin is the
final live gate
…abels (#1256)

## Summary

`setup-labels` now discovers an optional, non-managed
`.github/label-taxonomy.local.toml` (same `[[labels]]` schema) and
merges it into the effective taxonomy before reconcile/prune: extension
labels are created/updated normally, `--prune` only deletes labels
absent from BOTH files, and on a name collision the local entry wins
(justfile-layering convention). Absent file = byte-identical behavior.
Headers of both taxonomy copies, the vig-utils README, and the changelog
document the extension.

Targeted at `release/1.4.1` per maintainer decision (semver:minor
feature folded into the patch train).

Closes #1254
Refs #1254

## Verification

- TDD red-first; `test_shell_entrypoints.py` 24/24 (extension reconcile,
prune-spares-union, local-wins single edit, absent-file byte-identical
baseline, dry-run preview)
- Full pre-commit suite green (51 hooks)
- **Live acceptance (dry-run) against vig-os/org-config**: canonical 25
+ extension 4 → 29 effective; `drift`/`critical`/`change-request`
update, `inventory` creates, none pruned. Counterfactual without the
extension shows all of them as prune deletions — exactly the motivating
bug.
- Local file confirmed unmanaged: exact-path manifest entry only,
consumer rsync runs without `--delete`
…6-08-15

The curl 8.20.0 advisory batch (.vulnixignore) lapsed on 2026-07-22 and
reddened the nightly Scheduled Security Scan at the check-expirations gate.
curl 8.21.0 and openssh 10.4p1 fix the findings upstream but have not reached
the pinned nixos-26.05 channel (still curl 8.20.0 / openssh 10.3p1), so the
rev-advance lever has nowhere to land; renew both exceptions with a short
window pending backport propagation.

Refs: #1257
#1258)

## Summary

The nightly Scheduled Security Scan went red on 2026-07-23 ([run
29988472212](https://github.com/vig-os/devkit/actions/runs/29988472212))
at the `check-expirations` gate: the **curl 8.20.0** advisory batch in
`.vulnixignore` (18 CVEs, `Expiration: 2026-07-22`) lapsed. This renews
it, and pre-emptively renews the **openssh** `CVE-2026-60002` block
(`Expiration: 2026-07-24`, which lapses tomorrow), to a fresh short
window of **2026-08-15**.

Not a new/regressed vulnerability — two time-boxed risk acceptances that
ran out.

## Why renew rather than rev-advance

- **curl:** 8.21.0 (2026-06-24) fixes the whole batch and is in
`nixpkgs-unstable`, but the pin (`nixos-26.05`) still ships **8.20.0** —
verified.
- **openssh:** 10.4p1 (2026-07-06) fixes it, but `nixos-26.05` still
ships **10.3p1** — verified.

Both fixes are stuck in the 26.05 staging pipeline and haven't reached
the pinned channel, so the rev-advance lever has nowhere to land. Each
block gets a dated re-verification note; flip to a pin bump the moment
the fixed version lands in `nixos-26.05`.

## Placement

Based on `release/1.4.1` so the renewal ships with the promote-ready
train and reaches `main` at promote (which un-reds the nightly). Mirrors
the #1240 gawk-extension precedent (`chore(security)` + `### Security`
changelog entry, sync-manifest auto-mirror).

## Verification

- `uv run check-expirations .vulnixignore` → *Validated 57
exception(s)*.
- Full `just precommit` suite green locally.

## Out of scope

The tracking-issue automation didn't fire (its guard keys on
`vulnix-gate.outcome`, but the run died at the earlier
`check-expirations` step). Widening that guard is a separate follow-up.

Closes #1257
…rated hooks (#1259)

## Summary

An `install.sh --force` upgrade on a flake-hooks consumer deployed the
scaffold
template `.pre-commit-config.yaml` whenever the file was absent from the
tree.
On such a consumer the config is flake-GENERATED (#1167/#883): a
gitignored
`/nix/store` symlink that only materializes on shell entry, so a fresh
checkout/worktree legitimately has no file for the preserve list to
protect.
The deployed template then SHADOWED the generated config — git-hooks.nix
refuses to overwrite an existing file — silently dropping the consumer's
`hooks`/`hooksExcludes` customizations (observed on commit-action: typos
ran
against the committed `dist/` bundle).

## Fix

The opt-in is detectable without the file: an ACTIVE (uncommented)
`hooks`/`hooksExcludes` argument in the preserved `flake.nix` — exactly
`mkProjectShell`'s generation trigger (`hooks != null || hooksExcludes
!= [ ]`);
the template's commented opt-in block never matches.

- When detected and the config is absent, `.pre-commit-config.yaml`
joins
  `MODE_CONFIG_EXCLUDES` (the #1196 SSoT), so the rsync copy and the
  `--preview` report skip it consistently; the report says why.
- The #1092 gitignore seed also fires for this case, so the regenerated
root
`.gitignore` keeps the `.pre-commit-config.yaml` entry (previously it
was
dropped whenever neither the store symlink nor the #1167 fresh-scaffold
  default applied).
- Present-config paths are untouched: a store symlink stays PRESERVED
(#1117),
and a committed regular YAML (hand-managed or mid-migration) keeps
today's
  behavior, including no ignore seed.

Targeted at `release/1.4.1`: pre-existing since 1.4.0, but it bites
every
fresh-worktree upgrade of the direnv lanes, so it rides the patch train.

## Verification

- New bats coverage (5 tests): upgrade with absent generated config
deploys no
template YAML and keeps the gitignore entry; `hooksExcludes`-only opt-in
is
detected; a flake with only the COMMENTED template opt-in still receives
the
  template YAML; `--preview` no longer advertises the file as ADDED.
- Full `tests/bats/init-workspace.bats` suite: 243/243 green.
- `just precommit`: all hooks green except the pre-existing, unrelated
`check-expirations` failure (curl 8.20.0 batch expired 2026-07-22 —
filed
  separately; it will also fail this PR's CI until resolved).

Closes #1255
Set release date to 2026-07-23 and regenerate release docs.

Refs: #1247
# [Release 1.4.1](https://github.com/vig-os/devkit/releases/tag/1.4.1) -
2026-07-23

This PR prepares release 1.4.1 for merge to main.

## [1.4.1](https://github.com/vig-os/devkit/releases/tag/1.4.1) -
2026-07-23

### Added

- **`setup-labels`: repo-local taxonomy extension file**
([#1254](#1254))
- Optional, non-devkit-managed `.github/label-taxonomy.local.toml` (same
`[[labels]]` schema) lets a consuming repo declare repo-specific labels
    that survive devkit upgrades.
- `setup-labels` treats the union of both files as the effective
taxonomy:
extension labels are created/updated in the normal reconciliation pass,
and
    `--prune` only deletes labels absent from both files.
  - Local-wins collision policy: an extension entry with the same `name`
    overrides the canonical color/description.

- **Scheduled security scan now covers `dev` as well as `main`**
([#1237](#1237))
- `security-scan.yml` gains a `ref` matrix (`main`, `dev`) so the
nightly
vulnix gate scans the `dev` image closure alongside the default-branch
one.
A weekly `nixpkgs` bump or an expiring `.vulnixignore` exception on
`dev` now
surfaces as an ordinary tracking issue days early, instead of first
tripping
the gate mid-release-train. Each leg reuses the existing machinery
unchanged
    (`check-expirations`, `devkitImageEnv` closure build, vulnix via the
nvd-mirror, `vulnix-gate`, deduplicated tracking issue) through its
checkout
`ref`, files a ref-distinct tracking issue so the lanes never collide on
dedup, and runs with `fail-fast: false` so one lane never cancels the
other.
- **`sync-issues` target-branch and schedule knobs**
([#1228](#1228))
- New optional `.vig-os` key `DEVKIT_SYNC_TARGET` overrides the branch
the
scaffolded sync-issues job commits to. Default stays
workflow-model-aware
    (`dev` gitflow / `main` trunk), so existing consumers are unchanged.
- A `trunk` repo whose `main` carries a require-PR ruleset (which
refuses the
sync job's direct API push,
[#1227](#1227))
    sets an unprotected mirror branch, e.g. `sync/issue-mirror`; the job
bootstraps it from the default branch head if absent. No ruleset bypass
for
    the commit App is added (rejected for security).
- New optional `.vig-os` key `DEVKIT_SYNC_SCHEDULE` overrides the sync
schedule
trigger's cron (default `0 2 * * *`). Both keys are validated loudly at
scaffold time (git ref-format for the branch, a 5-field cron check) and
    persisted across re-scaffolds.

### Fixed

- **Upgrade no longer deploys the template `.pre-commit-config.yaml`
over flake-generated hooks**
([#1255](#1255))
- On a flake-hooks consumer
([#1167](#1167))
    the generated config is a gitignored `/nix/store` symlink that only
materializes on shell entry, so a fresh checkout/worktree has no file
for
    the preserve list to protect — an `install.sh --force` upgrade then
deployed the scaffold template YAML, which silently shadowed the
generated
config (git-hooks.nix refuses to overwrite an existing file) and dropped
the consumer's `hooks`/`hooksExcludes` customizations. Pre-existing
since
    1.4.0; gitignored, so CI and PRs were unaffected.
- The upgrade now detects the opt-in from the preserved `flake.nix`
itself
(an active `hooks`/`hooksExcludes` argument — exactly `mkProjectShell`'s
generation trigger), skips the template YAML in both the copy and the
`--preview` report, and still seeds the `.pre-commit-config.yaml`
gitignore
    entry so the regenerated root `.gitignore` stays correct.
- **`mkProjectShell`: `extraPackages` Python env no longer silently
shadowed** ([#1230](#1230))
  - A `pythonXX.withPackages` env passed through `extraPackages` — the
documented way to add Python libraries to a project shell — was shadowed
on
`PATH` by `vig-utils`'s propagated pinned 3.14 interpreter, so the
consumer
    got the bare interpreter with none of their libraries and only hit a
`ModuleNotFoundError` later. The builder now prepends any such env in
the
shellHook (the same PATH-order mechanism the `python` override uses), so
the
consumer's interpreter and its `site-packages` own `python3`/`python`.
- **Trunk render scrubs `sync-main-to-dev` prose from
`promote-release.yml`**
([#1233](#1233))
- Follow-up to [#1226](#1226) for
a file
`render_workflow_model` did not touch: the `promote-release.yml` header
step
list and the Summary echo each named `sync-main-to-dev`, a workflow that
is
copy-excluded in `trunk`. The trunk render now drops both
parentheticals, so
a `trunk` consumer no longer ships comments referencing a workflow
absent
from its repo. Comments only — no functional change; gitflow is
unaffected.
- **`nix-dev` discovery image no longer drifts stale on baked-content
pushes** ([#1236](#1236))
  - The `nix-image.yml` `dev` push trigger only watched `flake.nix`,
`flake.lock`, and the workflow file, but the image bakes broader repo
content
    at build time (the `assets/` scaffold tree, `docs/MIGRATION.md`, the
`packages/vig-utils` console scripts, the `nix/home` environment,
`scripts/`).
A `dev` push touching only baked content left the mutable `nix-dev` tag
stale
with no rebuild. Dropped the fragile `paths:` allowlist so every push to
`dev` (or the epic branch) rebuilds, tests, and repushes the tag;
Cachix/eval
    caching keeps no-op rebuilds cheap.
- **Trunk render scrubs residual `dev` prose from scaffolded workflows**
([#1226](#1226))
- `render_workflow_model` now retargets the inert `dev` mentions in
comments
and input descriptions as well as the functional literals, so a `trunk`
    consumer no longer ships slightly-lying comments: the `ci.yml` and
`codeql.yml` trigger-header comments, the `origin/dev` commit-gate
rationale
in `ci.yml`, and the `sync-issues.yml` `target-branch` example
description
all read `main` instead of `dev`. Comments/descriptions only — no
functional
    change; gitflow is unaffected.
- **Flake-generated pre-commit branch guard follows the workflow model**
([#1224](#1224))
- `render_workflow_model` drops the `(?!dev$)` clause from the
scaffolded
`.pre-commit-config.yaml` for `DEVKIT_WORKFLOW=trunk`, but a direnv
consumer
on flake-generated hooks (#1167) gets its branch guard from
`mkProjectShell`,
    which was not workflow-aware — after switching to trunk it kept
`^(?!main$)(?!dev$)…`, guarding a `dev` branch a trunk repo does not
have.
- `mkProjectShell` now takes a `workflow` argument (gitflow default |
trunk)
    threaded into the `nix/hooks.nix` consumer render, which drops the
`(?!dev$)` clause for trunk — mirroring the scaffold render exactly. The
scaffolded `flake.nix` reads `DEVKIT_WORKFLOW` from `.vig-os` and
forwards
it, so a trunk direnv consumer's generated guard follows the model out
of
    the box. gitflow is a no-op, leaving existing consumers unchanged.
- The template forwards `workflow` only when the resolved builder
accepts it
([#1249](#1249)): the `vigos`
input
deliberately floats on the default branch, so a fresh scaffold can
resolve
a devkit `main` that predates the argument — unconditional forwarding
then
    failed eval on first shell entry (`called with unexpected argument
    'workflow'`). The call site now gates `inherit workflow;` behind a
`builtins.functionArgs … ? workflow` check, so older builders fall back
to
    their gitflow default instead of breaking the scaffold.
- **`install.sh --docker` restores scaffold ownership before the git
phase, keyed on the observed post-scaffold state**
([#1235](#1235),
[#1248](#1248))
- Under real docker the scaffold container runs as root, so its
bind-mounted
    output landed root-owned on the host and the host-side git phase
(`setup_git_repo`, warn-not-fail by design) could not write to it — the
installer "succeeded" but left a root-owned, git-less tree that every
docker
    caller had to repair by hand. `install.sh` now reuses the image in a
throwaway container to `chown` the tree back to the invoking user before
the
    git phase, so the git setup succeeds normally.
- The repair is conditioned on the observed post-scaffold ownership, not
the
runtime CLI name: it runs only when the scaffolded tree contains files
not
owned by the invoking user. Rootless podman — in any flavor, including a
`docker` compat shim — maps container-root to the invoking user, so its
output is already correctly owned and an unconditional in-container
`chown`
would have flipped the tree to an unmapped subuid, breaking the git
phase.

### Security

- **Extend gawk 5.4.0 CVE exception expiry to 2026-08-18**
([#1240](#1240))
  - The `.vulnixignore` exception for the gawk 5.4.0 CERT-PL batch
(`CVE-2026-40467`/`-40468`/`-40469`/`-40553`, from
[#1071](#1071))
is extended from 2026-07-28 to 2026-08-18. The upstream fix (gawk 5.4.1)
is
still only on nixpkgs `staging` and has not reached the pinned
`nixos-26.05`
    channel, so the planned rev-advance remains unavailable.

- **Renew lapsed curl + openssh `.vulnixignore` exceptions**
([#1257](#1257))
- The curl 8.20.0 advisory batch (18 CVEs, from
[#941](#941))
and the openssh `CVE-2026-60002` client use-after-free (from
[#963](#963))
    exceptions are extended to 2026-08-15 after the curl block lapsed on
2026-07-22 and reddened the nightly scan. The fixes (curl 8.21.0,
openssh
10.4p1) exist upstream but have not reached the pinned `nixos-26.05`
channel
(still curl 8.20.0 / openssh 10.3p1), so the planned rev-advance remains
    unavailable.
@c-vigo
c-vigo merged commit 8a818fd into dev Jul 24, 2026
13 checks passed
@c-vigo
c-vigo deleted the chore/sync-main-to-dev-25-1 branch July 24, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant