Skip to content

fix(workspace): resolve the check-expirations consumer entry from the devkit pin - #1449

Merged
c-vigo merged 3 commits into
release/1.8.0from
bugfix/1447-check-expirations-store-path
Aug 12, 2026
Merged

c-vigo merged 3 commits into
release/1.8.0from
bugfix/1447-check-expirations-store-path

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

  • fix -- Bug fix
  • test -- Adding or updating tests

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

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](https://github.com/vig-os/devkit/issues/1447))

Testing

  • Tests pass locally
  • 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

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

Additional Notes

Invariants. Drift gate: neither .pre-commit-config.yaml appears in the diff (git diff --stat b60b306a 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

@c-vigo
c-vigo merged commit 3ac6a5c into release/1.8.0 Aug 12, 2026
14 checks passed
@c-vigo
c-vigo deleted the bugfix/1447-check-expirations-store-path branch August 12, 2026 09:34
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant