Repository navigation
chore: sync dev with main - #1476
Merged
Merged
Conversation
The deploy job committed via commit-action, which builds its tree additively from working-tree contents — paths the installer deleted (retired scaffold paths, #1348) never reached the deploy branch, so the scaffold-drift gate rejected the 1.8.0-rc1 deploy PR. Publish the deletions as a follow-up verified API commit of null-sha tree entries, the same tree-API pattern the scaffolded devkit-upgrade.yml uses. Refs: #1443
) ## Summary The 1.8.0-rc1 smoke dispatch failed at the deploy-merge wait: the deploy PR (devkit-smoke-test#356) was rejected by its Scaffold Drift gate because the two workflows retired by #1423 (\`renovate-changelog-build.yml\`, \`renovate-changelog-commit.yml\`) survived on the deploy branch. The installer deleted them correctly in the working tree (retired-paths manifest, #1348), but the deploy publishes via \`commit-action\` (\`FILE_PATHS: .\`), which builds its tree additively and cannot express deletions. ## Fix New deploy step \`Publish installer deletions via verified API commit\`: collects \`git ls-files --deleted\` (in smoke mode the working tree after install is exactly the fresh render + smoke overlay, so this set is precisely what the new scaffold no longer ships) and publishes one follow-up commit of null-sha tree entries via the git tree API — the same pattern the scaffolded \`devkit-upgrade.yml\` already uses for adoption PRs (which were never affected). App-token API commits are GitHub-verified, matching the commit-action commit. TDD: bats contract test pinned first (\`smoke-test dispatch publishes installer deletions to the deploy branch (#1443)\`), then the step; \`bats tests/bats/just.bats\` 51/51 green, \`prek run --all-files\` green, \`actionlint\` clean on the template. ## Operational note The listener executes from devkit-smoke-test's **default branch (main)** — the fixed template must be manually redeployed there before dispatching rc2 (tracked in #1443). Closes #1443 Refs: #1443
## Summary
The smoke dispatch template still computes
\`BRANCH_NAME="chore/deploy-${TAG}"\` (dotted). The scaffolded CI
branch-name gate (#1432) allows chore branches only as
\`^chore/[a-z0-9]+(-[a-z0-9]+)*$\` — dots rejected. The live listener on
devkit-smoke-test \`main\` was hand-fixed as a 1.8.0 train prerequisite
(devkit-smoke-test#354), but every deploy overlays the template listener
over the live one, so the 1.8.0 deploy would revert the fix and the
**next** train's deploy PR would fail its own branch gate.
## Fix
Port smoke#354 into the template SSoT: dots map to dashes
(\`${TAG//./-}\`), and the header comment documents why. Found while
diagnosing #1443 on the rc1 dispatch failure (fixed in #1445).
TDD: bats contract test pinned first; \`bats tests/bats/just.bats\`
51/51 green, \`actionlint\` clean, \`prek run --all-files\` green.
Closes #1444
Refs: #1444
… devkit pin Refs: #1447
… devkit pin (#1449) ## Description Fixes #1447. **Targets `release/1.8.0`** — the train is cut and `1.8.0-rc1` is tagged; this lands ahead of rc2 alongside #1443/#1444. `check-expirations` was the last vig-utils hook whose **consumer** fragment resolved its entry through the consumer's project venv (`uv run check-expirations …`). A consumer venv carries no `vig-utils`, and many consumers have no `pyproject.toml` at all — the exact defect #1434 fixed for the three commit-message/agent-identity hooks. After #1434, this one was the odd one out among the tool-naming consumer fragments. ## Type of Change - [x] `fix` -- Bug fix - [x] `test` -- Adding or updating tests ### Modifiers - [ ] Breaking change (`!`) -- This change breaks backward compatibility ## Changes Made - `nix/hooks.nix` -- `check-expirations`'s `consumer` fragment now takes `pkgs` and resolves `${import ./vig-utils.nix pkgs}/bin/check-expirations .trivyignore .vulnixignore`, matching the #1434 fragments. Leading comment updated to explain the split. - `tests/test_flake_hooks.py` -- `_vig_utils_console_scripts()` helper, `TestCheckExpirationsConsumerSurface` (3 tests), `TestNoConsumerHookResolvesVigUtilsThroughTheVenv` (1 test). - `CHANGELOG.md` (+ hook-synced mirror) -- entry under the 1.8.0 `### Fixed`. The `yaml` (portable, committed-runner) representation deliberately stays `uv run`; the `check` (hermetic) fragment already used `${vigUtils}/bin/…` and is untouched. **Test strategy — specific and general, deliberately.** The specific tests pin the exact contract (store path, argv preserved, `files`/`language`/`pass_filenames` matching the scaffold render, and that the runner + scaffold renders still start with `uv run`). The general test is what the issue actually argues for: it reads the console-script list from `packages/vig-utils/pyproject.toml` (SSoT, no second list to maintain), walks all seven generated consumer configs, and fails any hook naming a vig-utils script that does not resolve `/nix/store/...`. That closes the defect *class* — a future hook added to `hookDefs` cannot reintroduce it. The specific tests still earn their place: the general one would also pass if the hook vanished from the consumer surface entirely. ## Changelog Entry Placed in `## [1.8.0] - TBD` -> `### Fixed`, **not** `## Unreleased`: the changelog was frozen for 1.8.0 at `046ca547`, and both post-freeze fixes already on this branch (#1443 `c427dee8`, #1444 `d0f276cd`) did the same. An `## Unreleased` entry would be missing from the 1.8.0 release notes and would resurface in the next release. ``` ### Fixed - **`check-expirations` resolves from the pinned devkit on the consumer surface** ([#1447](#1447)) ``` ## Testing - [x] Tests pass locally - [x] Manual testing performed (describe below) ### Manual Testing Details - RED on pristine `nix/hooks.nix`: `-k "CheckExpirations or NoConsumerHook"` -> 3 failed, 1 passed, exit 1. All three failed with `check-expirations entry is not a store path: 'uv run check-expirations .trivyignore .vulnixignore'` (the general test enumerated all 7 shells). The 1 pass was `test_portable_render_keeps_the_uv_run_entry`, an invariant pin correctly green from the start. - GREEN: `uv run pytest tests/test_flake_hooks.py` -> 63 passed, exit 0. - Full suite: `uv run pytest tests/ -q` -> 780 passed, 20 skipped, 1 failed. The single failure is `tests/test_image.py::TestFileStructure::test_manifest_files`, **verified pre-existing** by stashing `CHANGELOG.md` back to `b60b306a` and re-running: still fails. It checksums the working-tree `CHANGELOG.md` against a locally cached devcontainer image; stale-image noise, and CI rebuilds the image. - `prek run --all-files` -> exit 0, fully green. **Behavioral proof, not just render-level.** Built a plain consumer config from an un-overlaid `pkgs`; the `check-expirations` entry is now: ``` /nix/store/v1r12zx3zcgnb4hiqvi7a8spsc4b0wy3-python3.14-vig-utils-0.1.0/bin/check-expirations .trivyignore .vulnixignore ``` Executing that store binary directly with `VIRTUAL_ENV` unset: `Validated 32 exception(s) across 2 file(s)`, exit 0 — it resolves and runs with no project venv involved. ## 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` (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 **Invariants.** Drift gate: neither `.pre-commit-config.yaml` appears in the diff (`git diff --stat b60b306 HEAD` touches only `CHANGELOG.md`, its mirror, `nix/hooks.nix`, `tests/test_flake_hooks.py`), and both `TestPortableRenderFidelity` tests pass. Zero-hooks parity: all four `TestZeroHooksParity` tests pass, including the identical-`drvPath` check. **Unrelated defect spotted, deliberately not fixed here** (no out-of-scope drive-bys): in the 1.8.0 `### Fixed` section, the #1434 entry has lost its bold title bullet, so its three sub-bullets now hang off the #1444 entry (`CHANGELOG.md:187-213` on `b60b306a`). As it stands the 1.8.0 release notes will present the commit-msg-hooks fix as part of the smoke-dispatch branch-name fix, and #1434 will have no visible entry. Worth repairing before the notes are cut. Closes #1447 Refs: #1447
…surface (#1451) ## Description Implements #1448. **Targets `release/1.8.0`** — the train is cut and `1.8.0-rc1` is tagged; this lands ahead of rc2. `just doctor` (#1418, extended with a `core.hooksPath` diagnostic in #1430) existed only in devkit's own `justfile`. The scaffolded consumer surface shipped no equivalent, so a consumer clone got no host preflight at all — the same "configured, believed active, never executed" failure #1430 documents, in the population devkit actually ships to, where the person committing is least likely to know devkit's installer exists. ## Type of Change - [x] `feat` -- New feature - [x] `test` -- Adding or updating tests - [x] `refactor` -- Code restructuring (no behavior change) ### Modifiers - [ ] Breaking change (`!`) -- This change breaks backward compatibility ## Changes Made - `assets/workspace/justfile` -- new `[group('info')] doctor` recipe. Diagnostics only: `PASS`/`WARN` lines, always exits 0. Reports git identity, commit signing, `core.hooksPath`, ssh-agent and `gh` auth. - `tests/bats/consumer-doctor.bats` -- 14 tests driving the real shipped justfile in a fixture workspace, using the `doctor.bats` harness idiom (`GIT_CONFIG_GLOBAL`/`GIT_CONFIG_SYSTEM` pinned, `SSH_AUTH_SOCK` stripped, stub `gh`) so host state never leaks in. - `CHANGELOG.md` (+ hook-synced mirror) -- entry under the 1.8.0 `### Added`. **Why the managed root justfile.** It is the only managed justfile layer present in *every* delivery mode — `direnv`/`bare` ship no `.devcontainer/` — and `justfile.project` is a `PRESERVE_FILES` entry, so a recipe placed there would never reach an existing consumer on upgrade. (Note: the `.devcontainer/justfile.base` layer named in the issue's context was retired in 0.4.0 and no longer exists.) **Mode-aware remediation.** Devkit's hint is `./scripts/init.sh`, a file no consumer has. The consumer hint is driven by `DEVKIT_MODE` in `.vig-os`, with the universal command always first and the mode entry point named on top of it: | mode | inert-hooks WARN tail | |---|---| | `direnv` | `(run: git config core.hooksPath .githooks); normally set on dev-shell entry: run direnv allow` | | `devcontainer` | `(run: git config core.hooksPath .githooks); normally set by the devcontainer setup: reopen the container` | | `both` | `(run: …); normally set by the devcontainer setup (reopen the container) or on dev-shell entry (direnv allow)` | | `bare` / no `.vig-os` | `(run: git config core.hooksPath .githooks)` — nothing wires it, so no entry point is named | `./scripts/init.sh` never appears in any mode, and that is test-enforced. The `.vig-os` read uses the same `sed -n 's/^KEY=//p' … | head -n1` form the scaffolded `devkit-upgrade.yml` already uses. **Sharing vs. duplication — two implementations, drift pinned by a test.** Three sharing routes were evaluated and rejected: a synced shared script (needs a brand-new always-shipped managed root path — `.devcontainer/` is absent in direnv/bare and there is no scaffolded root `scripts/`); a manifest transform (`scripts/manifest.toml` transforms whole files, so splicing one recipe from file A into file B needs a new transform type bought for a single recipe); and importing devkit's justfile (never scaffolded, full of image/release recipes). The two also genuinely differ in behavior, not just wording — see the hint table. Rather than force the abstraction, the shared *contract* is pinned: `consumer doctor checks exactly what devkit's doctor checks` runs both recipes under the same controlled environment, extracts the check labels from the `PASS|WARN <label>:` lines, and asserts the sets are non-empty and identical. Adding a check to one and not the other now fails CI. **Manifest/sync wiring: none needed, and verified why.** `scripts/manifest.toml` governs only files copied from the repo root *into* `assets/workspace/`; `assets/workspace/justfile` is authored directly in the scaffold tree, picked up by `init-workspace.sh`'s rsync of `TEMPLATE_DIR`, and already in the never-migrate managed literal list (`assets/init-workspace.sh:1124`). The `.vig-os` manifest contract suite declares *keys*; this adds no knob, it only reads the existing `DEVKIT_MODE`. ## Changelog Entry Placed in `## [1.8.0] - TBD` -> `### Added`, **not** `## Unreleased`: the changelog was frozen for 1.8.0 at `046ca547`, and the post-freeze fixes on this branch (#1443, #1444, #1447) all did the same. An Unreleased entry would be stranded out of these release notes. ``` ### Added - **`just doctor` now ships on the consumer surface** ([#1448](#1448)) ``` ## Testing - [x] Tests pass locally - [x] Manual testing performed (describe below) ### Manual Testing Details - Baseline on the pristine branch point `b60b306a`: `bats tests/bats/` -> 482 ok, exit 0; `uv run pytest tests/ -q` -> 1 failed, 776 passed, 20 skipped. - RED: `bats tests/bats/consumer-doctor.bats` -> 14/14 `not ok`, all `error: justfile does not contain recipe 'doctor'` (the drift guard failing on an empty consumer label set while printing devkit's six). - GREEN, post-merge of `release/1.8.0`: `bats tests/bats/` -> **496 ok, 0 failures, exit 0** (482 + 14 new). - `uv run pytest tests/test_flake_hooks.py` -> 63 passed, exit 0 (confirms #1447's tests still hold after the merge). - `prek run --all-files` -> exit 0, fully green. - Full pytest: 776 passed, 20 skipped, 1 failed — the known `tests/test_image.py::TestFileStructure::test_manifest_files`. **Verified pre-existing**, and provably the stale image: the *destination* sha is byte-identical between the baseline and final runs (`0b4f7b0ff94c…`); only the source sha moved when `CHANGELOG.md` was edited. CI rebuilds the image. Real output, from workspaces produced by the actual `assets/init-workspace.sh --no-prompts --mode <mode>`: ``` ############ mode=direnv | hooksPath UNSET (fresh clone) ############ vigOS devkit doctor =================== PASS git user.name: Carlos Vigo PASS git user.email: … WARN commit signing: incomplete (…) WARN git hooks: core.hooksPath not set, .githooks is tracked but inert (run: git config core.hooksPath .githooks); normally set on dev-shell entry: run direnv allow PASS ssh-agent: reachable with 9 key(s) PASS gh auth: logged in EXIT=0 ############ mode=direnv | hooksPath WIRED ############ PASS git hooks: core.hooksPath -> .githooks ############ mode=direnv | hooksPath ELSEWHERE ############ WARN git hooks: core.hooksPath=.git/hooks, expected .githooks (run: …); normally set on dev-shell entry: run direnv allow ############ mode=devcontainer | hooksPath UNSET ############ WARN git hooks: … normally set by the devcontainer setup: reopen the container ############ ad-hoc checkout: no .vig-os ############ WARN git hooks: core.hooksPath not set, .githooks is tracked but inert (run: git config core.hooksPath .githooks) EXIT=0 ``` ## 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` (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 **Known limitation, worth a follow-up covering both doctors together.** Linked worktrees are not special-cased. `justfile.worktree` deliberately `--unset`s `core.hooksPath` and installs prek hooks into `.git/hooks`, and `githooksPathHook` guards itself to the main worktree — so `just doctor` inside a `just worktree-start` worktree reports `WARN git hooks … inert` when the hooks are in fact live. Devkit's own `doctor` has the identical behavior today, so this is not a regression, but a diagnostic that lies is exactly the failure class #1430 is about. Left alone here under YAGNI/minimal-diff given this is an rc; the fix (detect git-dir != common-dir, then PASS on an installed `.git/hooks/pre-commit`) should land in both recipes at once. Not done deliberately: no consumer docs edit (the scaffolded `README.md` is a seeded stub enumerating no recipes), no `.vig-os` knob, no changes to devkit's own `justfile`. Closes #1448 Refs: #1448
The #1443 entry (c427dee) replaced the "Flake-generated hooks now carry the commit-message and agent-identity guards" title bullet instead of inserting above it, so #1434's three sub-bullets hung off #1444 and #1434 had no entry of its own — the release notes would have reported a consumer-facing change to local commit-message and agent-identity enforcement as part of an unrelated smoke-dispatch branch-naming fix. Restore the title line verbatim as merged in #1439, in its original slot ahead of #1414; the sub-bullets are byte-identical to that render and need no re-indentation. The hook-synced .devcontainer mirror follows. Documentation-only change to a data file, so RED-GREEN TDD does not apply. No test is added: the defect is a sub-bullet attached to the wrong parent, not an orphan, so a structural "every sub-bullet has a titled parent" assertion passes both before and after the fix and cannot express it. Refs: #1453
## Description Fixes #1453. **Targets `release/1.8.0`** — the train is cut and `1.8.0-rc1` is tagged; this must land before the notes are finalized, after which the `[1.8.0]` section is released and immutable. The #1434 entry had lost its bold title bullet, so its three sub-bullets hung off the #1444 entry. As it stood, the 1.8.0 release notes would have presented a user-visible fix to local commit-message and agent-identity enforcement as part of an unrelated smoke-dispatch branch-naming fix, and #1434 would have had no entry at all. ## Type of Change - [x] `docs` -- Documentation only ### Modifiers - [ ] Breaking change (`!`) -- This change breaks backward compatibility ## Changes Made A **single added line**. No re-indentation was needed — the orphaned sub-bullets were already at the correct 2-space depth: ```diff (devkit-smoke-test#354) but every deploy overlays the template back over it, re-arming the regression for the next train. Dots now map to dashes in the template SSoT, matching the live listener +- **Flake-generated hooks now carry the commit-message and agent-identity guards** ([#1434](#1434)) - A direnv consumer on flake-generated hooks had **no local commit-message or agent-identity enforcement at all**: `validate-commit-msg`, ``` `### Fixed` now reads #1447, #1443, #1444, #1434, #1414, #1403, #1396, and #1444 keeps only its own sub-bullet. **The title is recovered, not invented.** `git show 20e5660:CHANGELOG.md` (the PR #1439 merge) carries this exact line, and #1439's body proposes it verbatim under "Changelog Entry". The restored 20-line region diffs byte-identical against the original, and the entry lands back in its original slot ahead of #1414. **Root cause — this corrects the guess in the issue.** It was *not* the changelog freeze. `046ca547` only moved headings (14 insertions / 4 deletions). The culprit is **`c427dee8`** (#1443), whose diff shows `-- **Flake-generated hooks…**`: it *replaced* the #1434 title line instead of inserting above it. `d0f276cd` (#1444) then inserted below that, inheriting the orphans. ## Changelog Entry No changelog entry needed — this **is** a changelog repair. Adding a "fixed the changelog" bullet to the section it repairs would be noise in the released notes. ## Testing - [x] Tests pass locally - [x] Manual testing performed (describe below) ### Manual Testing Details - `prek run --all-files` -> exit 0, fully green, including `pymarkdown` on both the root file and the synced mirror — which is the real risk here, since it validates list nesting. Re-run clean after `sync-manifest` mirrored the file. - `uv run pytest tests/ -q` -> 780 passed, 20 skipped, 1 failed. The single failure is the known `tests/test_image.py::TestFileStructure::test_manifest_files`, **proved** pre-existing rather than assumed: stashing to a fully pristine tree reproduces it, and the stale image's *destination* hash is identical across both runs (`0b4f7b0ff94c…`) while only the source hash moves. CI rebuilds the image. - Re-verified after merging `release/1.8.0` in: `prek run --all-files` exit 0, the restored entry intact, #1448's entry present. - The mirror `assets/workspace/.devcontainer/CHANGELOG.md` was written by the hook, never hand-edited; its diff is the same single line. ## 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 - [x] I have updated `CHANGELOG.md` (this PR *is* the changelog change) - [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 -- see below - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published ## Additional Notes **No test was added, deliberately.** The defect is not an orphaned sub-bullet — the three sub-bullets had a perfectly valid parent (#1444). A "every sub-bullet has a titled parent entry" assertion passes identically before and after this fix, so it cannot express the bug. The only detecting heuristic would be "a sub-bullet cites an issue other than its parent's", which this changelog violates constantly by design (#1447's sub-bullet cites #1434; #1443's cites #1344/#1348/#1423). It would be almost entirely false positives. This is a semantic authorship error, not a structural one — which is also why `pymarkdown` passes it. TDD does not apply; the commit body says so explicitly rather than skipping it silently. Nothing below `## [1.8.0]` was touched. Every top-level bullet in the 1.8.0 section was checked against the canonical shape post-fix; all 19 conform. One suspected second instance was chased and cleared: the #1403 entry's sub-bullets about smoke deploys preserving `CHANGELOG.md` look misparented, but `git show 64b524a` proves all three were authored together as facets of the same sync-conflict fix. Two cosmetic inconsistencies remain, both pre-existing and deliberately out of scope: stray blank lines between three entries in `### Changed` (#1411, #1409, #1405) where every other section is contiguous, and trailing periods on four sub-bullets (#1403's three, #1396's one) where the rest of the section is period-free. **Worth flagging for the train:** this defect class — a hand-inserted entry silently consuming the line beneath it — survived a PR review and the freeze, and surfaced only by eye during #1447 review. Since the section becomes immutable at cut, one last read of the rendered notes before finalize is cheap insurance. Closes #1453 Refs: #1453
…lbacks Two failed release.yml dispatches ran their Rollback on Failure job, which resets the branch tree to the pre-finalize SHA captured at validate start. Finalize was skipped in both runs, so nothing needed rolling back, but the reset still discarded everything merged since each run began. Reverts c1cc5d8 (dropped #1448) and 71cd72f (dropped #1447). Refs: #1459
…lbacks (#1460) ## Description Fixes #1459. **Targets `release/1.8.0`.** Restores the #1447 and #1448 content that two failed `release.yml` dispatches stripped off the release branch. Both PRs (#1449, #1451) merged green and both issues are closed, but the content is absent from the branch tip. Without this, 1.8.0 would ship claiming two fixes it does not contain, and the changelog would omit both. | Rollback commit | Time | Triggering run | Destroyed | |---|---|---|---| | `71cd72fb` | 09:49Z | `31583273344` (failed: `Candidate tag '1.8.0-rc2' already exists on origin`) | **#1447** — `nix/hooks.nix` fix, 102 lines of tests, changelog entry | | `c1cc5d82` | 09:59Z | `31584765199` (failed: validate's PR gate — #1441 is a draft with `REVIEW_REQUIRED`) | **#1448** — 77-line `doctor` recipe, 241-line `consumer-doctor.bats`, changelog entry | ## Type of Change - [x] `revert` -- Reverts a previous commit ### Modifiers - [ ] Breaking change (`!`) -- This change breaks backward compatibility ## Changes Made `git revert --no-commit c1cc5d8 71cd72f`, squashed into one commit. No hand edits, no conflicts: ``` CHANGELOG.md | 31 ++ assets/workspace/.devcontainer/CHANGELOG.md | 31 ++ assets/workspace/justfile | 77 ++ nix/hooks.nix | 12 +- tests/bats/consumer-doctor.bats | 241 ++ tests/test_flake_hooks.py | 102 ++ 6 files changed, 490 insertions(+), 4 deletions(-) ``` ## Root cause (tracked separately — not fixed here) `release.yml`'s **Rollback on Failure** job (`.github/workflows/release.yml:1551`) builds a commit whose **tree is `PRE_SHA`** — the branch tip captured when `validate` started — parented onto the current tip. A tree-level reset expressed as a commit. Two properties make it destructive: 1. It runs when **`validate`** fails. `Finalize Release` was **skipped** in both runs — nothing needed rolling back — yet the tree was reset anyway. 2. `PRE_SHA` is a run-start snapshot, so **anything merged to the release branch while a release run is in flight is destroyed if that run fails**, related to the release or not. The trigger was merging into the release branch while a run was live. The defect is that a rollback for a step that never executed discards unrelated merged commits. Filed separately; this PR only restores content. **Interim operating rule:** never merge into a release branch while a `release.yml` run is in flight. ## Changelog Entry No new entry. This restores the #1447 and #1448 entries that the rollbacks deleted from the `## [1.8.0] - TBD` section; adding a "restored the changelog" bullet would be noise in the released notes. ## Testing - [x] Tests pass locally - [x] Manual testing performed (describe below) ### Manual Testing Details Content restoration verified item by item on the branch: | item | present | |---|---| | `check-expirations` store-path entry (`nix/hooks.nix`) | yes | | `TestNoConsumerHookResolvesVigUtilsThroughTheVenv` | yes | | consumer `doctor` recipe (`assets/workspace/justfile`) | yes | | `tests/bats/consumer-doctor.bats` | yes | | changelog entries #1447 / #1448 | yes / yes | | #1434 title bullet (from #1453) | exactly 1, not duplicated | - `bats tests/bats/` -> **496 ok, 0 not ok, exit 0** — exactly the pre-loss baseline, confirming #1448's 14 tests are back and passing. - `uv run pytest tests/test_flake_hooks.py` -> 63 passed, exit 0 — #1447's tests restored and green. - `uv run pytest tests/ -q` -> 780 passed, 20 skipped, 1 failed. The single failure is the known `tests/test_image.py::TestFileStructure::test_manifest_files`, which checksums the working-tree `CHANGELOG.md` against a stale locally cached devcontainer image; it reproduces on a clean `dev` without this branch, and CI rebuilds the image. - `prek run --all-files` -> exit 0, fully green. - `git status` clean; no stray or untracked files in the revert. ## 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 - [x] I have updated `CHANGELOG.md` (restores the deleted entries) - [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 (restores the deleted tests) - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published ## Additional Notes **Merge only while no `release.yml` run is in flight** — otherwise this PR is subject to the very defect it repairs. I will re-check immediately before merging. **`1.8.0-rc2` is stale.** It is tagged at `b60b306a`, which predates #1447, #1448, #1453 and #1454. After this lands (and #1454 after it) the branch matches no existing RC, so a fresh candidate is warranted before finalize rather than finalizing content no RC validated. Published tags are immutable, so it must be rc3 — re-dispatching rc2 is what failed at 09:31. #1454 is complete and pushed but not yet PR'd: its `consumer-doctor.bats` additions conflict until this restores the base file. Closes #1459 Refs: #1459
## Description Fixes #1454. **Targets `release/1.8.0`** (post-recovery base `9cce85ed`). `just doctor` reported `WARN git hooks: … tracked but inert` inside a linked worktree **where the hooks are live**, and the remediation it offered would have undone the worktree setup. A diagnostic that lies is the exact failure class #1430 exists to close. `just worktree-start` unsets `core.hooksPath` on purpose — prek refuses to install its shims while it is set — and installs the shims instead. `hooks` is one of git's **shared** paths, so they land in the common git dir and git runs them from inside the worktree. Both `doctor` recipes read that intended state as the fresh-clone failure. ## Type of Change - [x] `fix` -- Bug fix - [x] `test` -- Adding or updating tests ### Modifiers - [ ] Breaking change (`!`) -- This change breaks backward compatibility ## Changes Made - `justfile` -- devkit's `doctor`: linked-worktree PASS branch ahead of the fresh-clone WARN. - `assets/workspace/justfile` -- the scaffolded `doctor`: identical branch, inserted after the mode-aware `hint` construction so #1448's hints are untouched. - `tests/bats/doctor.bats` -- 3 tests + hermetic `_git_fixture` / `_init_linked_worktree` helpers (real `git worktree add` under `BATS_TEST_TMPDIR`, pinned identity, signing off). - `tests/bats/consumer-doctor.bats` -- 3 tests + `_run_doctor_at` / `_scaffold_linked_worktree` (commits the fixture so the linked checkout really carries `justfile`, `.githooks`, `.vig-os`). - `CHANGELOG.md` (+ hook-synced mirror) -- entry under the 1.8.0 `### Fixed`. **Two mechanics the obvious implementation gets wrong**, both established empirically rather than assumed: - `.git` is a **file** in a linked worktree, so a literal `.git/hooks/pre-commit` test can never see the shim. This uses `git rev-parse --git-path hooks/pre-commit` — the file git itself would run. - `git rev-parse --absolute-git-dir` vs `--path-format=absolute --git-common-dir` is the safe comparison. A plain `--git-dir` / `--git-common-dir` compare falsely reports "linked" from a *subdirectory* of the main worktree (`/abs/.git` vs `../.git`). This is also the idiom `flake.nix`'s `githooksPathHook` already uses. The PASS additionally requires the shim to be **executable** (`-x`), since git ignores a non-executable hook. ## Verdict matrix | worktree | `core.hooksPath` | installed `hooks/pre-commit` | verdict | |---|---|---|---| | main | `.githooks` | any | PASS `core.hooksPath -> .githooks` | | main | unset | none | WARN fresh-clone | | main | unset | present | WARN fresh-clone (unchanged — see notes) | | main | other | any | WARN naming the value | | linked | `.githooks` | any | PASS (still live; pinned by a new test) | | linked | unset | **present** | **PASS `linked worktree, installed at <path> (core.hooksPath unset by design)`** | | linked | unset | none | WARN fresh-clone — genuinely inert | | linked | other | any | WARN naming the value | | not a repo | — | — | WARN (the `-n "$gitdir"` guard keeps it out of the PASS branch) | ## Changelog Entry ``` ### Fixed - **`just doctor` no longer calls the git hooks inert inside a linked worktree** ([#1454](#1454)) ``` Placed in `## [1.8.0] - TBD`, matching every post-freeze entry on this branch. ## Testing - [x] Tests pass locally - [x] Manual testing performed (describe below) ### Manual Testing Details Real clone + `git worktree add` + the exact `worktree-start` setup (`unset-all core.hooksPath`, `prek install`): BEFORE: ``` WARN git hooks: core.hooksPath not set, .githooks is tracked but inert (run: ./scripts/init.sh) ``` AFTER: ``` PASS git hooks: linked worktree, installed at /…/demo/.git/hooks/pre-commit (core.hooksPath unset by design) ``` AFTER, same worktree with the shims deleted (must-stay-WARN case): ``` WARN git hooks: core.hooksPath not set, .githooks is tracked but inert (run: ./scripts/init.sh) ``` The verdicts are grounded in behavior, not inference: in the live worktree `git commit -m "bad message"` was **rejected** by `validate-commit-msg`; after deleting the shims the same commit **landed unblocked**, confirming the WARN is true in that state. - RED: `bats tests/bats/doctor.bats tests/bats/consumer-doctor.bats` -> exit 1, exactly 2 failures (`not ok 6`, `not ok 23`), both showing the lying WARN. The other 4 new tests passed as intended — they pin cells that must not move. - GREEN: same command -> 26/26 ok, exit 0. - Full bats after merging the recovered `release/1.8.0`: **502 ok, 0 not ok, exit 0**. - `prek run --all-files` -> exit 0, tree clean. - Full pytest -> 776 passed, 20 skipped, 1 failed — the known stale-image `test_manifest_files`, verified pre-existing two ways (branch-point changelog sha already differs from the image's baked copy; re-ran with the pristine changelog checked out and it still failed). ## 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 - [x] I have updated `CHANGELOG.md` (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 **Drift guard intact.** #1448's `consumer doctor checks exactly what devkit's doctor checks` passes — the new PASS keeps the `git hooks` label, so both label sets stay identical. All mode-aware hint tests pass, and `refute_output --partial "scripts/init.sh"` was added to both new consumer tests. **Deliberately unchanged:** main worktree + unset `core.hooksPath` + a prek shim in `.git/hooks` still WARNs. The gates are live there too, so the WARN is under-informative — but it is literally true (`.githooks` *is* inert) and its remediation is harmless. #1454 explicitly says to keep the fresh-clone WARN for every other unset case, so that cell was left alone and not pinned either way. Worth a follow-up if `doctor` should key purely off "what will git execute". **Separate bug found, not fixed here:** `git config --unset-all core.hooksPath` inside a linked worktree writes to the **shared** config, so `just worktree-start` silently unsets `core.hooksPath` for the **main** checkout too, leaving its `.githooks` inert until something re-sets it. Reproduced. Deserves its own issue — and `doctor` will now correctly WARN about it. The base merge resolved one additive `CHANGELOG.md` conflict by keeping both this entry and the restored #1447 entry (#1459 recovery); the 1.8.0 section was re-audited afterwards and all entries carry their title bullets. Closes #1454 Refs: #1454
Executed decision matrix + workflow-shape assertions for the rollback job in both release.yml copies: no-op when finalize never ran or for candidates, refuse loudly when the branch tip is not exactly the commit(s) this run wrote, and revert only after the chain proof. Red against the current tree-reset logic that destroyed foreign commits in #1459/#1460. Refs: #1462
The rollback job reset the branch tree to the run-start PRE_SHA whenever a failed run's tip had moved, destroying commits merged mid-run (#1459/#1460). It now no-ops when finalize never ran (and on branch-neutral candidates), verifies the tip is exactly the finalize commit — optionally with the sync-issues commit on top — parented on the snapshot, using SHAs finalize exports as job outputs, and refuses loudly otherwise. The scaffolded consumer rollback swaps its git reset --hard + force push for the identical guarded Git Data API revert; release-core exposes finalize_result/finalize_commit_sha to the caller, and the devkit PR-body restore skips when finalize was skipped. Refs: #1462
…rt (#1464) ## Summary `just worktree-start` ran `git config --unset-all core.hooksPath` from inside the new linked worktree. `core.hooksPath` is **shared** repo config, so the unset disarmed the main checkout's tracked `.githooks` shims repo-wide — the #1430 failure mode, self-inflicted by a primary devkit workflow. ## Fix Skip-when-set: a relative `core.hooksPath` resolves against each worktree's root, and `.githooks` is tracked (present in every worktree), so when the setting exists the tracked shims already cover all three hook stages in the new worktree. `worktree-start` now leaves the config untouched and skips `prek install` in that state. The old `prek install` path survives only as the fallback when no hooks path is configured at all (the unset line is gone — it was a no-op there anyway). Rejected alternatives: - `git config --worktree --unset-all`: needs `extensions.worktreeConfig` repo-wide, and a worktree-scoped *unset* cannot mask a shared value — it would actually require a worktree-scoped SET plus the extension flip. More moving parts for no gain given the shims are already present. - Restore-after-install / restore-on-stop: still mutates shared state, leaving a disarm window (or a disarmed main checkout for the worktree's whole lifetime). Both copies fixed identically: `justfile.worktree` and the scaffolded `assets/workspace/.devcontainer/justfile.worktree`. ## Tests TDD: `test(workspace)` commit landed RED first. Two new bats tests in `tests/bats/worktree.bats` drive the **real** recipe (both copies) in a sandbox repo with a bare origin and stubbed tools: - main checkout's `core.hooksPath` survives `worktree-start`, all three tracked shims are executable in the new worktree, and `prek install` is never invoked; - the no-hooksPath fallback still installs all three prek stages (#778 pin). `bats tests/bats/worktree.bats tests/bats/githooks.bats` → 14/14 ok; full `prek run --all-files` green. ## Notes - The #1454 doctor comments in `justfile` / `assets/workspace/justfile` still describe the pre-fix behavior ("worktree-start unsets core.hooksPath on purpose"); the doctor logic itself remains correct for both pre-fix worktrees and the fallback path, so those comments were left alone (minimal diff) — cheap follow-up if wanted. - `git config commit.template .gitmessage` in the same recipe also writes shared config from the worktree, but idempotently (same value as main); out of scope here. Closes #1463
Squash merges are single-parent, so a foreign PR squash-merged between the finalize commit and the post-sync tip record would pass the parentage check and get reverted. The FINAL_TIP path now also requires the tip's message to be exactly 'chore: sync issues and PRs' in both release.yml copies, and its author to match the org commit App (SYNC_COMMIT_AUTHOR knob, devkit only — consumer App bot names are not a devkit-known constant, so the scaffold relies on the message gate alone). Refs: #1462
The smoke-mode rsync carried --delete, which removes every tracked path the template does not ship — including the smoke repo's own pyproject.toml, uv.lock, src/ and tests/. That stayed invisible while commit-action built the deploy tree additively; once #1443 began publishing `git ls-files --deleted`, the 1.8.0-rc3 deploy committed those deletions, the drift gate saw a repo with no pyproject.toml (so it rendered CodeQL and .gitignore language-neutral), and the whole smoke orchestration aborted. Retirement is the #1348 manifest's job, and the drift gate re-scaffolds in normal mode, which never deletes — so dropping --delete makes gate and deploy agree by construction. The docs/issues/ and docs/pull-requests/ excludes go with it: they existed only to shield sync-issues output from --delete. Refs: #1466
…ck (#1467) ## Summary `release.yml`'s **Rollback on Failure** built a commit whose tree was reset to `pre_finalize_sha` — a run-start snapshot — whenever the run failed and the branch tip had moved at all. Any commit merged to the release branch while a run was in flight was silently destroyed on that run's failure (#1459: the merged content of #1447 and #1448 wiped off `release/1.8.0` twice, both times with `finalize` *skipped*). ## Fix The rollback branch step now proves the branch holds only this run's own writes before touching anything, and refuses loudly otherwise: 1. **No-op when `finalize` never ran** (`needs.finalize.result == 'skipped'`/empty) — this alone prevents both incidents. 2. **No-op for candidates** — finalize is branch-neutral unless `release_kind == final` (second independent shield; both incidents were candidates). 3. Retained `CURRENT_SHA == PRE_SHA` no-op. 4. **Chain proof before any write**: `finalize` now exports the exact commit SHA it pushed (commit-action's `commit-sha` output) plus the post-sync tip. The tip must be exactly the finalize commit parented on `PRE_SHA`, or the sync commit directly on top of it — and since this org squash-merges PRs (single-parent, indistinguishable by parentage alone), the sync-tip path additionally gates on the sync commit's fixed message `chore: sync issues and PRs` (devkit also pins the author `commit-action-bot[bot]`; live-verified against the real 1.7.0 finalize/sync pair on `main`). Anything else ⇒ `::error` + step failure, branch untouched; the failure issue and job summary report the outcome. Only when the proof passes does the existing tree-at-`PRE_SHA` revert commit run — at that point it is exactly a revert of the run's own commits. The PR-body restore step (and its Release-App token mint) now also skip when finalize was skipped — finalize is the only PR-body writer. **All three copies fixed consistently**: devkit's `release.yml`, scaffolded `release-core.yml` (new `finalize_commit_sha` / `finalize_result` workflow_call outputs), and the scaffolded orchestrator `release.yml` — whose old rollback was a `git reset --hard $PRE_SHA` + force-push with zero guards, now replaced by the identical guarded API revert. Scaffold copies gate on the sync message only (the commit-bot name is per-consumer, the shipped `sync-issues.yml` message is a constant); script bodies are byte-identical between copies. No concurrency group (issue proposal 4) — deliberately out of scope. ## Tests TDD: `test(ci)` commit landed RED first (18 failed / 5 passed — the 5 were retained behaviors). New `tests/test_release_rollback_guard.py` executes the actual workflow scripts against stubbed `gh`/`retry` simulating the Git Data API, parametrized over both copies: both incident shapes no-op, foreign-tip and foreign-parent refuse, foreign squash commit atop finalize refuses (the row that fails against the unhardened script), genuine sync commit reverts. Existing #1378 rollback-identity test rewritten to pin the App-token API rollback. Verification (direct exit codes): `pytest tests/test_release_rollback_guard.py tests/test_workflow_release_publish.py` → 43 passed; broad `pytest tests/` (excl. image/integration/flake) → 524 passed; `actionlint .github/workflows/release.yml` clean; rendered-tree actionlint bats 6/6 (covers the scaffold copies in all modes); full `prek run --all-files` → exit 0. Also included: `chore` merge of `release/1.8.0` (brings in the #1463 fix from #1464; changelog union resolved manually, mirror byte-identical), and stale "branch reset to pre-finalization state" wording updated in `docs/RELEASE_CYCLE.md` / `DOWNSTREAM_RELEASE.md` and the failure-issue texts. ## Notes - Failed-job output propagation for `finalize_commit_sha` follows the pattern the job already relied on for `pre_finalize_sha`. - The dead `git_user_name`/`git_user_email` plumbing in `release-core.yml` (now unused after dropping the git-CLI rollback) is left in place — removal ripples across three workflows; separate-issue material. - The interim operating rule from the issue (don't merge into a release branch mid-run) becomes a courtesy rather than a data-integrity requirement, but remains good practice. Closes #1462
…ling The doctor recipe comments in justfile and the scaffolded assets/workspace/justfile still claimed `just worktree-start` unsets core.hooksPath in the worktree on purpose and always prek-installs the shims. Since #1463 a configured hooks path is left untouched (the tracked .githooks shims cover the worktree) and the prek install into the shared .git/hooks survives only as the fallback when no hooks path is configured. Reword both copies to describe that reality; doctor logic and output are unchanged. Refs: #1469
… release workflows Refs: #1470
…les (#1468) ## Summary The 1.8.0-rc3 smoke deploy committed the deletion of devkit-smoke-test's own Python project (`pyproject.toml`, `uv.lock`, `src/`, `tests/`), which failed the scaffold-drift gate and aborted the release gate. This drops `--delete` from the smoke-mode scaffold copy. `assets/init-workspace.sh` smoke mode was the only copy branch carrying `rsync --delete`, so it removed every tracked path the template does not ship — consumer payload included. That was invisible while `commit-action` built the deploy tree additively; #1443 then started publishing `git ls-files --deleted`, and the deletions reached the branch. The drift gate re-scaffolds in **normal** mode, which never deletes and prunes retirement via the #1348 manifest. Smoke mode now does the same, so gate and deploy agree by construction. The `docs/issues/` and `docs/pull-requests/` excludes go with `--delete` — they existed only to shield sync-issues output from it. The `/CHANGELOG.md` exclude stays: it is overwrite protection (#1403), not delete protection. Second-order effect this clears: with `pyproject.toml` gone from the branch, the gate's re-scaffold no longer detected a Python repo, so it rendered `language: ['actions']` for CodeQL and stripped the 166-line Python block from `.gitignore`. ## Changes - `assets/init-workspace.sh` — smoke-mode rsync drops `--delete` and the two docs excludes - `tests/bats/init-workspace.bats` — two new end-to-end regression tests (consumer payload survives; retired paths are still pruned); the two tests that asserted the `--delete` behaviour replaced by one that pins its absence - `CHANGELOG.md` — Fixed entry under 1.8.0 ## Verification | Suite | Result | |---|---| | `bats tests/bats/init-workspace.bats` | 252/252 pass | | `bats tests/bats/install.bats tests/bats/just.bats` | 140 pass, exit 0 | | `pytest tests/` (excluding container suites) | 608 passed, 1 skipped | | `prek run --all-files` | exit 0 | Both new tests were confirmed RED before the fix: the payload test failed on the deleted `pyproject.toml`/`uv.lock`, the retirement test passed throughout (pinning that the #1348 prune, not `--delete`, is what removes retired paths). ## Notes No change to `assets/smoke-test/.github/workflows/repository-dispatch.yml`, so the listener already deployed to devkit-smoke-test `main` needs **no** redeploy — its `git ls-files --deleted` step now sees only genuine retirements. Live proof is the next candidate's smoke chain. Closes #1466
…ling (#1471) ## Summary After #1463 (PR #1464), `just worktree-start` no longer unsets `core.hooksPath` — a configured hooks path is left untouched (the tracked `.githooks` shims cover the new worktree) and the prek install into the shared `.git/hooks` survives only as the fallback when no hooks path is set. The #1454 doctor comments in both `justfile` copies still asserted the old behavior was "the INTENDED state ... on purpose", which would actively mislead the next hook-state investigation (the #1430 → #1454 → #1461 → #1463 chain shows how much debugging here leans on these comments). ## Changes Comment-only, zero behavior delta: - `justfile` + `assets/workspace/justfile`: the doctor linked-worktree comment now describes post-#1463 reality — the shared-hooks PASS branch covers the no-hooksPath fallback plus worktrees created before #1463; a post-fix worktree keeps the shared setting and hits the normal `.githooks` PASS branch. The `--git-path` rationale and the copies' one-phrase wording difference are preserved. (These are independent copies — `scripts/manifest.toml` mirrors only `justfile.gh`/`justfile.worktree` — so both needed the hand edit.) - `tests/bats/doctor.bats`, `tests/bats/consumer-doctor.bats`, `tests/test_flake_hooks.py`: the same stale claim repeated in test comments, folded in per the scope note on the issue. Doctor logic and echo strings untouched; no changelog entry (internal docs). TDD skipped: comment-only, non-testable. ## Verification `bats tests/bats/doctor.bats tests/bats/consumer-doctor.bats` → 26/26 ok; full `prek run --all-files` → exit 0; clean tree. Closes #1469
… release workflows (#1472) ## Summary #1467 replaced the scaffolded orchestrator's rollback (`git reset --hard` + force-push under a configured git identity) with the guarded Git Data API revert — the last consumer of the `git_user_name` / `git_user_email` values threaded through the release workflows. This removes the dead plumbing everywhere, caller and callee in lockstep. The set turned out larger than #1467's "three workflows" note: **four workflows × two copies**: - scaffold `release.yml`: `workflow_dispatch` inputs + the forward into the `release-core` call - scaffold `release-core.yml`: `workflow_call` declarations (zero use sites in the file) - `prepare-release.yml` (devkit's own + scaffold): dispatch inputs + the forward into the extension call - `prepare-release-extension.yml` (devkit's own + scaffold): seam template declarations (the default no-op never reads them) Plus the contract docs (`docs/DOWNSTREAM_RELEASE.md` + scaffold copy). Devkit's own `release.yml` was already clean (bespoke, zero hits) and is untouched. Historical archives and released changelog entries deliberately kept. ## Consumer safety This is a `workflow_call`/seam interface change, hence the `semver:minor` label and the `### Removed` changelog entry under 1.8.0. Orchestrator and core ship together via the scaffold, so caller and callee change in lockstep — no consumer action beyond the normal upgrade. All six reachable consumers' **preserved** `prepare-release-extension.yml` copies (commit-action, sync-issues-action, org-config, devkit-smoke-test, vault, exo-fleet) were checked: they declare the pair but have zero use sites, and since the inputs are optional with declared defaults, a stale preserved copy stays valid against the upgraded caller. The one genuine surface change: the (never-exercised) dispatch knob for a custom release-commit identity is gone — all release writes are App-identity API commits. ## Tests TDD: `test(ci)` commit landed RED first (5 failed / 32 passed — exactly the new absence assertions). `test_scaffold_orchestrator_keeps_the_dispatch_identity_inputs` rewritten to `..._drops_...` (also pins the release-core declarations and the core-call `with:`, keeps the App-token rollback assertions); the pair dropped from `REQUIRED_INPUTS` in `test_workflow_prepare_extension.py` plus two absence tests parametrized over both extension copies. Verification (direct exit codes): workflow suites 66 passed; broad `pytest tests/` (excl. image/integration/flake) 534 passed; `actionlint` on the two touched devkit workflows clean; rendered-tree actionlint bats 6/6; after merging in the updated `release/1.8.0` (#1468 landed mid-flight; clean auto-merge, changelog union verified, mirror byte-identical): full `init-workspace.bats` 252/252 ok and full `prek run --all-files` exit 0. Closes #1470
Set release date to 2026-08-12 and regenerate release docs. Refs: #1441
# [Release 1.8.0](https://github.com/vig-os/devkit/releases/tag/1.8.0) - 2026-08-12 This PR prepares release 1.8.0 for merge to main. ## [1.8.0](https://github.com/vig-os/devkit/releases/tag/1.8.0) - 2026-08-12 ### Added - **`just doctor` now ships on the consumer surface** ([#1448](#1448)) - The host preflight added in [#1418](#1418) / [#1430](#1430) existed only in devkit's own justfile, so a scaffolded repo had none. The managed root `justfile` now carries the same diagnostic — git identity, commit signing, `core.hooksPath`, ssh-agent, `gh` auth — reported as `PASS`/`WARN` lines, always exiting 0 - The `core.hooksPath` remediation hint is delivery-mode aware, read from `.vig-os` `DEVKIT_MODE`: the universal `git config core.hooksPath .githooks` in every mode, plus the entry point that normally wires it (reopen the devcontainer, or `direnv allow` for the dev-shell hook from [#1112](#1112)). `bare` and ad-hoc checkouts, where nothing wires it, get the direct command only — never devkit's own `./scripts/init.sh`, which no consumer has - Lives in the managed root `justfile`, the only justfile layer present in every delivery mode, so upgrades deliver it; `justfile.project` is preserved on upgrade and would never reach an existing consumer - **`just doctor` reports whether the git hooks are actually wired** ([#1430](#1430)) - New `core.hooksPath` diagnostic: `PASS` when it points at `.githooks`, `WARN` otherwise, distinguishing "not set" (a fresh clone, where the tracked `.githooks/` shims are on disk but inert) from "set to something else", both with a `./scripts/init.sh` remediation hint - Closes the last gap in #1430: an un-initialised clone now has a local signal it can read before its first commit lands, complementing the CI branch-name and `Refs:` gates that hold regardless of local git config - `doctor` remains diagnostics-only and still always exits 0 - **Branch-types knob (`DEVKIT_BRANCH_TYPES`) + CI branch-name gate** ([#1432](#1432)) - New `.vig-os` key: a comma-separated full replacement of the issue-numbered `<type>/<issue>-<summary>` branch-type set, rendered into the scaffolded `no-commit-to-branch` pattern, the flake-generated consumer surface (new `mkProjectShell` `branchTypes` argument; the template `flake.nix` reads the key at eval time), and CI — one key, every gate; the `chore/`, `renovate/`, `worktree/` clauses stay fixed - New CI branch-name gate ([#1430](#1430)): the commit-checks lane now validates the PR head ref against the resolved type set plus automation allowances (`release/X.Y.Z`, `renovate/*`, `worktree/<n>`, bot `chore/` branches, `main`/`dev`) — enforcement that survives a fresh clone whose local hooks are not yet wired (`core.hooksPath`), also added to devkit's own CI - Empty key keeps every render byte-identical; the value round-trips across `--force` upgrades; out-of-charset values fail the scaffold (and `nix develop`) loudly while CI falls back to the stock set with a warning; dropping `release` prints a notice - **Scaffold-time commit-types knob (`DEVKIT_COMMIT_TYPES`)** ([#1431](#1431)) - New `.vig-os` key: a comma-separated full replacement of the approved commit types, rendered into the `validate-commit-msg` hook's `--types` arg at scaffold time and driving CI's `validate-commit-range` via resolve-toolchain's new `commit-types` output — one key, both gates - `DEVKIT_REFS_POLICY=optional` now mirrors the resolved list (custom or stock), so the two knobs compose; empty key keeps the default scaffold byte-identical - The value round-trips across `--force` upgrades; out-of-charset values fail the scaffold loudly (CI falls back to the stock list with a warning), and dropping the bot types (`chore`/`build`) prints a notice - **`just doctor` host diagnostics + audit coverage gaps closed** ([#1418](#1418)) - New `just doctor` recipe reports host prerequisites (git identity, commit signing, ssh-agent, gh auth) as PASS/WARN diagnostics and always exits 0 - New tests for previously uncovered behavior: `docs/generate.py` skill parsing/grouping units, image coverage for nvim/actionlint and locale archive resolution, read-only token-ceiling pins for the scaffolded release jobs, and stub-driven behavioral tests for the scaffolded `devc-upgrade` recipe - **Changelog entries for devkit adoption PRs** ([#1404](#1404)) - The scaffolded `renovate-changelog-build.yml` now also accepts PRs opened by the devkit-upgrade App (`vigos-devkit-upgrade[bot]`), so an adoption PR gets an `Adopt vigOS devkit X.Y.Z` entry under `## Unreleased` → `### Changed`, linking the PR and the devkit release notes — the same pipeline Renovate PRs already use - `renovate-changelog-pr` branches on the PR title (`chore: adopt devkit X.Y.Z[-rcN]`) and skips the Renovate dependency parser for adoption PRs; it also no-ops instead of crashing when the consumer has no `CHANGELOG.md` - The privileged commit message is generalized to `docs(changelog): add unreleased entry for PR N` ### Changed - **Allow `renovate/*` branches in the branch guard** ([#1433](#1433)) - The `no-commit-to-branch` pattern (committed hook config, scaffold template, and flake-generated consumer surface) now admits Renovate's tool-owned branch namespace, so maintainer fix-up commits on Renovate PRs (changelog conflict merges, `dist/` rebuilds) no longer need the commit-on-a-compliant-branch-then-`git push HEAD:renovate/…` workaround - **Mirror-mode consumers integrate the issue archive via the release train** ([#1424](#1424)) - With `DEVKIT_SYNC_TARGET` set, the scaffolded `release-core.yml` final leg now dispatches sync-issues onto the **mirror** (the only branch that may advance the shared incremental-sync cutoff) and then folds the mirror's `docs/issues/` + `docs/pull-requests/` into the release branch, so the full archive reaches `main` through the human-approved release PR — previously the mirror diverged forever and `main` never carried the archive - The scaffolded `promote-release.yml` gains a rendered `reset-sync-mirror` job that force-resets the mirror onto `main` after the release PR merges, bounding its divergence to post-release snapshot commits - Unset knob renders byte-identical templates; no change for non-mirror consumers - **Bot changelog entries are synthesized at release time** ([#1423](#1423)) - New `synthesize-bot-changelog` (vig-utils) enumerates merged bot PRs (Renovate, devkit adoptions) since the last stable tag and regenerates a `#### Dependencies` block under `### Changed`, coalesced to the net delta per dependency with every contributing PR cited; lock-file-maintenance PRs — previously skipped entirely — roll up per ecosystem, and adoption PRs coalesce to the shipped devkit version - Runs at the two dispatch points that own changelog mutation: release cut (`prepare-release.yml`, before the content gate and freeze) and the final finalize pass (`release.yml` / scaffolded `release-core.yml`, before the date stamp) — a bot PR merged into the release branch mid-train is picked up at finalize; candidates stay changelog-neutral - The per-PR `renovate-changelog-build.yml` + `renovate-changelog-commit.yml` pipeline is deleted from devkit and the scaffold (retired paths, pruned on consumer upgrade): bot PR branches no longer receive changelog commits, so concurrent Renovate PRs stop conflicting on `## Unreleased`, Renovate's own conflict rebase works again, and the double CI run per bot PR disappears - The scaffolded prepare-release content gate moves from the host-only validate job into the toolchain-capable prepare job so a train whose only content is bot PRs still cuts - New `just changelog-preview` prints the pending block read-only - **Refresh `CLAUDE.md` and add the green-CI dispatch rule** ([#1411](#1411)) - `CLAUDE.md`: correct the project title to `vig-os/devkit`, add the missing `/solve-and-pr` command row, and add a lean "Release Operations" section pointing at the release doc set plus the agent-behavioral hard rules (green-CI-before-dispatch, immutable-release forward-fix, automated consumer adoption — no per-consumer lane dispatch) - `docs/RELEASE_CYCLE.md` Phase 2: state the hard rule that `release.yml` must never be dispatched until the release-branch PR CI is fully green — the release PR opening is not the go-signal - **Document the smoke-test final-release human-approval gate** ([#1409](#1409)) - `docs/CROSS_REPO_RELEASE_GATE.md` now describes the approval gate shipped in 1.7.0 (candidates leave the smoke release PR unapproved; the final dispatch polls `reviewDecision` for a human approval, 30-minute window) and its two contract dependencies: required reviews on smoke-test `main` (org-config-owned) and default-branch listener execution (asset SSoT, hotfix-main + mirror procedure) - `docs/RELEASE_CYCLE.md` Phase 5 gains the explicit operator step: approve the freshly created smoke-test release PR while the final dispatch is paused at the gate, with timeout recovery (approve, then re-run failed jobs) - **`devkit-upgrade` no longer opens a per-train adoption issue** ([#1405](#1405)) - Adoption PRs are bot PRs like Renovate's: the PR is the traceable artifact and the changelog entry ([#1404](#1404)) links it. On gitflow consumers the dev-targeted `Closes #N` never auto-closed anyway, stranding an open issue every train - The upgrade branch becomes `chore/devkit-<train>` (the guard-legal issue-less shape), the staging commit drops its `Refs:` line (`chore` is exempt), and the PR body links the devkit release notes - The #1347 no-diff cleanup step and the token's `issues: write` grant are removed — a no-diff run now strands nothing by construction - One-time migration: close any adoption issues left open by earlier trains on the consumers ### Removed - **Dead `git_user_name` / `git_user_email` plumbing dropped from the scaffolded release workflows** ([#1470](#1470)) - The Git Data API rollback ([#1462](#1462)) removed the last consumer of the git identity threaded through the release train, so the `release.yml` dispatch inputs (`git-user-name` / `git-user-email`), the `release-core.yml` `workflow_call` declarations, and the `prepare-release.yml` dispatch inputs plus their forwarding into the `prepare-release-extension.yml` hook contract are all gone - Orchestrator and core ship together via the scaffold, so caller and callee change in lockstep — no consumer action is needed beyond the normal upgrade. Preserved consumer copies of `prepare-release-extension.yml` that still declare the optional pair remain valid and simply fall back to their own declared defaults - **`devc-upgrade` recipe removed from the scaffold** ([#1421](#1421)) - Upgrades are driven by the `devkit-upgrade` workflow's adoption PRs; the local recipe wrapped `install.sh --force` and steered users around the reviewed flow. The `version-check.sh` notification now points automation-wired repos at the adoption PR and falls back to the `install.sh --force` one-liner for repos without the workflow. **Breaking** for consumers scripting `just devc-upgrade` — use the one-liner instead ### Fixed - **Smoke deploys no longer delete consumer-owned files** ([#1466](#1466)) - The smoke-mode scaffold copy ran `rsync --delete`, removing every tracked path the template does not ship — the smoke repo's own `pyproject.toml`, `uv.lock`, `src/` and `tests/` among them. Harmless while the deploy commit was built additively; once [#1443](#1443) started publishing the installer's deletions, the deploy committed them and the repo lost its Python project, which in turn made the scaffold-drift gate re-render CodeQL and `.gitignore` language-neutral and aborted the release gate - Retiring a path is the [#1348](#1348) manifest's job, and the drift gate re-scaffolds in normal mode, which never deletes — so smoke mode now copies without `--delete` and the two modes agree by construction - **Release rollback no longer resets the branch to a stale run-start snapshot** ([#1462](#1462)) - The `release.yml` rollback job rebuilt the branch tree at `PRE_SHA` (captured when `validate` started) whenever a failed run's tip had moved, silently destroying commits merged mid-run — twice on `release/1.8.0` ([#1459](#1459) / [#1460](#1460)), both times with `finalize` skipped and nothing to roll back - The rollback now no-ops when `finalize` never ran (and on candidates, which are branch-neutral), and otherwise refuses loudly unless the tip is exactly the commit(s) this run wrote — the finalize commit, optionally with the sync-issues commit on top, parented on the snapshot — which `finalize` now exports as job outputs; only then is the tree revert performed, making it equivalent to reverting the run's own commits - The scaffolded consumer `release.yml` rollback carried the same exposure as a `git reset --hard` + force push; it now runs the identical guarded Git Data API revert (no history rewrite, no release-branch checkout), and `release-core.yml` exposes `finalize_result` / `finalize_commit_sha` to the caller. The devkit PR-body restore step likewise skips when `finalize` never rewrote the PR body - **`just worktree-start` no longer unsets `core.hooksPath` repo-wide** ([#1463](#1463)) - `core.hooksPath` is shared repo config, so unsetting it from inside the new linked worktree silently disarmed the main checkout's tracked `.githooks` shims — the [#1430](#1430) failure mode, self-inflicted by a primary devkit workflow - A relative `core.hooksPath` resolves against each worktree's root and `.githooks` is tracked, so when it is set the tracked shims already cover every hook stage in the new worktree: `worktree-start` now leaves the config untouched and skips the `prek install`, falling back to the old install-into-shared-`.git/hooks` path only when no hooks path is configured at all - Fixed in both copies (devkit's `justfile.worktree` and the scaffolded `.devcontainer/justfile.worktree`), pinned by bats tests driving the real recipe in a sandbox repo - **`just doctor` no longer calls the git hooks inert inside a linked worktree** ([#1454](#1454)) - `just worktree-start` unsets `core.hooksPath` in the worktree on purpose — prek refuses to install its shims while it is set — and installs those shims instead; `hooks` is one of git's shared paths, so they land in the common git dir and git runs them from inside the worktree. Both `doctor` recipes read that intended state as the fresh-clone failure and reported `WARN git hooks: … tracked but inert`, whose remediation would have undone the worktree setup - A linked worktree with an installed, executable `hooks/pre-commit` now reports `PASS git hooks: linked worktree, installed at <path>`. A linked worktree with no installed shim is genuinely inert and still warns, as do all the other unset and set-elsewhere cases - Fixed in devkit's own `justfile` and the scaffolded `assets/workspace/justfile` in the same change, keeping the two recipes in step for the [#1448](#1448) drift guard - **`check-expirations` resolves from the devkit pin in generated consumer hooks** ([#1447](#1447)) - It was the last vig-utils hook whose flake-generated consumer fragment shelled out to `uv run`, i.e. to the *consumer's* project venv — which carries no `vig-utils`, and which many consumers do not have at all (no `pyproject.toml`). The entry now resolves a `nix/vig-utils.nix` store path, like the three hooks fixed in [#1434](#1434) and every other tool-naming consumer fragment, so the hook follows the devkit pin the consumer bumps with `nix flake update vigos` - The committed `.pre-commit-config.yaml` renders are unchanged: only the consumer surface moves off `uv run`, and a new class-wide test rejects any future consumer fragment that names a vig-utils console script without a store path - **Smoke deploy now publishes installer deletions to the deploy branch** ([#1443](#1443)) - The smoke-test dispatch deploy committed via `commit-action`, which builds its tree additively from working-tree contents and cannot express file deletions — so paths the installer removed (retired scaffold paths, #1348) silently survived on the deploy branch and the scaffold-drift gate rejected the deploy PR (its second live catch, after [#1344](#1344)); caught on the 1.8.0-rc1 dispatch, where the per-PR renovate-changelog workflows retired by [#1423](#1423) rode along - The deploy job now publishes `git ls-files --deleted` as a follow-up verified API commit of null-sha tree entries — the same tree-API pattern the scaffolded `devkit-upgrade.yml` already uses for adoption PRs (which were never affected) - **Smoke dispatch template deploy branch is now dot-free** ([#1444](#1444)) - The template still generated `chore/deploy-<tag>` with dots, which the scaffolded CI branch-name gate ([#1432](#1432)) rejects (`^chore/[a-z0-9]+(-[a-z0-9]+)*$`). The live listener was hand-fixed (devkit-smoke-test#354) but every deploy overlays the template back over it, re-arming the regression for the next train. Dots now map to dashes in the template SSoT, matching the live listener - **Flake-generated hooks now carry the commit-message and agent-identity guards** ([#1434](#1434)) - A direnv consumer on flake-generated hooks had **no local commit-message or agent-identity enforcement at all**: `validate-commit-msg`, `prepare-commit-msg-strip-trailers` and `check-agent-identity` carried no consumer fragment, so the scaffolded `.githooks/commit-msg` shim ran an empty stage and exited 0, and `git commit --author="Claude <…>"` passed locally. All three now render into `mkProjectShell`'s generated config, resolving the vig-utils console scripts from the pinned devkit rather than the project venv - `mkProjectShell` gains `commitTypes` and `refsPolicy` arguments so `DEVKIT_COMMIT_TYPES` ([#1431](#1431)) and `DEVKIT_REFS_POLICY` ([#1282](#1282)) steer the generated hook exactly as they steer the scaffolded YAML and CI — same defaults, same charset guard, same `optional`-mirrors-the-resolved-types composition, same `required` sentinel. The template `flake.nix` reads both keys from `.vig-os`; consumers whose `flake.nix` predates this hand-port the reader (`docs/MIGRATION.md`) - Unset knobs keep the generated config byte-identical to the previous render, and a consumer that never opts into hooks is untouched - **Scaffolded CI summary gate now fails on cancelled required checks** ([#1414](#1414)) - The consumer `ci.yml` summary treated a cancelled `lint`, `test`, `commit-checks`, `scaffold-drift`, or `dependency-review` job as green (only `resolve-toolchain` had the cancelled leg), so a PR whose CI run was cancelled could still merge — the #1371 doctrine now applies to every needed job in both the devkit and scaffolded copies, pinned by a parametrized shape test - **Automated main→dev sync PR no longer opens conflicted on every release** ([#1403](#1403)) - `sync-main-to-dev` now auto-resolves add/add conflicts on generated `docs/issues/` / `docs/pull-requests/` snapshots: a GitHub-signed commit-action commit aligns the sync branch with dev's copies (the signed-commits ruleset forbids a runner merge commit; dev self-heals at the next nightly sync-issues run), the merge is re-verified with `git merge-tree`, and only then is auto-merge enabled. Any other conflict keeps the manual `merge-conflict` path. Applied to both the canonical workflow and the workspace template. - Smoke deploys preserve the consumer's root `CHANGELOG.md` (root-anchored rsync exclude; the scaffold skeleton is bootstrapped only when absent) instead of overwriting it with devkit's release history — the old copy rewrote the consumer's frozen `## [X.Y.Z] - TBD` heading with devkit's dated release line, guaranteeing a sync conflict at every smoke release. - The smoke-test deploy-entry seeding awk is bounded at the next release heading and synthesizes `### Changed` when `## Unreleased` lacks one. - **Smoke-test failure-notify job can mint its upstream App token again** ([#1396](#1396)) - The listener's notify job requested an installation token for the pre-rename `vig-os/devcontainer` repository, so the mint failed with 404 and no upstream failure issue was ever filed. It now targets `vig-os/devkit`.
c-vigo
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
devwithmain(sync-main-to-dev workflow).