Repository navigation
fix(workspace): resolve the check-expirations consumer entry from the devkit pin - #1449
Merged
Merged
Conversation
This was referenced Aug 12, 2026
c-vigo
added a commit
that referenced
this pull request
Aug 12, 2026
…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
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.
Description
Fixes #1447. Targets
release/1.8.0— the train is cut and1.8.0-rc1is tagged; this lands ahead of rc2 alongside #1443/#1444.check-expirationswas 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 novig-utils, and many consumers have nopyproject.tomlat 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
fix-- Bug fixtest-- Adding or updating testsModifiers
!) -- This change breaks backward compatibilityChanges Made
nix/hooks.nix--check-expirations'sconsumerfragment now takespkgsand resolves${import ./vig-utils.nix pkgs}/bin/check-expirations .trivyignore .vulnixignore, matching the [BUG] flake-generated consumer hooks omit the commit-msg-stage and agent-identity hooks — local enforcement is a no-op in direnv consumers #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 staysuv run; thecheck(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_filenamesmatching the scaffold render, and that the runner + scaffold renders still start withuv run). The general test is what the issue actually argues for: it reads the console-script list frompackages/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 tohookDefscannot 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 at046ca547, and both post-freeze fixes already on this branch (#1443c427dee8, #1444d0f276cd) did the same. An## Unreleasedentry would be missing from the 1.8.0 release notes and would resurface in the next release.Testing
Manual Testing Details
nix/hooks.nix:-k "CheckExpirations or NoConsumerHook"-> 3 failed, 1 passed, exit 1. All three failed withcheck-expirations entry is not a store path: 'uv run check-expirations .trivyignore .vulnixignore'(the general test enumerated all 7 shells). The 1 pass wastest_portable_render_keeps_the_uv_run_entry, an invariant pin correctly green from the start.uv run pytest tests/test_flake_hooks.py-> 63 passed, exit 0.uv run pytest tests/ -q-> 780 passed, 20 skipped, 1 failed. The single failure istests/test_image.py::TestFileStructure::test_manifest_files, verified pre-existing by stashingCHANGELOG.mdback tob60b306aand re-running: still fails. It checksums the working-treeCHANGELOG.mdagainst 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; thecheck-expirationsentry is now:Executing that store binary directly with
VIRTUAL_ENVunset:Validated 32 exception(s) across 2 file(s), exit 0 — it resolves and runs with no project venv involved.Checklist
docs/templates/, then runjust docs)CHANGELOG.md(and pasted the entry above)Additional Notes
Invariants. Drift gate: neither
.pre-commit-config.yamlappears in the diff (git diff --stat b60b306a HEADtouches onlyCHANGELOG.md, its mirror,nix/hooks.nix,tests/test_flake_hooks.py), and bothTestPortableRenderFidelitytests pass. Zero-hooks parity: all fourTestZeroHooksParitytests pass, including the identical-drvPathcheck.Unrelated defect spotted, deliberately not fixed here (no out-of-scope drive-bys): in the 1.8.0
### Fixedsection, the #1434 entry has lost its bold title bullet, so its three sub-bullets now hang off the #1444 entry (CHANGELOG.md:187-213onb60b306a). 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