You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] check-expirations consumer fragment still resolves through the project venv (uv run) instead of a store path #1447
check-expirations is the last vig-utils hook whose consumer fragment still resolves its entry through the project venv:
consumer=_: {enable=true;name="check-expirations";entry="uv run check-expirations .trivyignore .vulnixignore";
...
};
uv run <tool> resolves against the consumer's project venv — but a consumer venv has no vig-utils, and many consumers have no pyproject.toml at all. This is the exact venv-resolution weakness #1434 was filed about.
After #1434 shipped the commit-message and agent-identity hooks as store-path fragments, check-expirations is now the odd one out: every other tool-naming consumer fragment (nixfmt, statix, deadnix, just-fmt, gitleaks, pymarkdown, and now validate-commit-msg / prepare-commit-msg-strip-trailers / check-agent-identity) resolves a ${pkgs.<tool>}/bin/… store path.
Steps to Reproduce
In a direnv consumer on flake-generated hooks with no vig-utils in its venv (or no pyproject.toml), inside the dev shell, trigger the hook by touching a .trivyignore / .vulnixignore. The entry cannot resolve.
Expected Behavior
The consumer fragment resolves ${vigUtils}/bin/check-expirations, exactly like the three hooks fixed in #1434, so the hook version follows the devkit pin the consumer bumps with nix flake update vigos.
Actual Behavior
The fragment shells out to uv run check-expirations, which depends on consumer venv state that devkit does not control and that most consumers do not have.
Additional Context
nix/vig-utils.nix already exists (extracted in #1434 so hook fragments can build vig-utils from an un-overlaid pkgs), so the mechanism is in place — this is applying the established pattern to the one fragment that was missed.
Note the yaml (portable, committed-runner) representation must stay uv run; only the consumer fragment changes. The drift gate (tests/test_flake_hooks.py) pins that, so .pre-commit-config.yaml must come out byte-identical.
Impact
All direnv-mode consumers on generated hooks that carry a .trivyignore / .vulnixignore. Latent rather than loud: the hook is files-scoped, so it only fires when those files change. Pre-existing, not a regression.
Fixed by #1449, merged to release/1.8.0 as 3ac6a5c (ships in 1.8.0-rc2).
check-expirations's consumer fragment now resolves ${import ./vig-utils.nix pkgs}/bin/check-expirations .trivyignore .vulnixignore, matching the three hooks fixed in #1434. The yaml (portable, committed-runner) representation deliberately stays uv run; the check (hermetic) fragment already used a store path.
Behavioral proof: a plain consumer config built from an un-overlaid pkgs now carries
and executing that store binary directly with VIRTUAL_ENV unset gives Validated 32 exception(s) across 2 file(s), exit 0 — no project venv involved.
The class is now closed, not just this instance. Alongside the specific contract tests, TestNoConsumerHookResolvesVigUtilsThroughTheVenv 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/…. A future hook added to hookDefs cannot reintroduce the defect. Verified to have teeth: on the pristine tree it failed listing all 7 shells.
Invariants held — drift gate (.pre-commit-config.yaml absent from the diff entirely, both TestPortableRenderFidelity tests green) and zero-hooks parity (identical drvPath).
Changelog entry went into the ## [1.8.0] - TBD section rather than ## Unreleased, matching #1443/#1444 — the changelog was frozen for 1.8.0 at 046ca54, so an Unreleased entry would have been stranded out of these release notes.
Activity
test: pin the check-expirations consumer entry to a vig-utils store path
fix(workspace): resolve the check-expirations consumer entry from the…
docs(changelog): record the check-expirations consumer-entry fix
fix(workspace): resolve the check-expirations consumer entry from the…
c-vigo commentedon Aug 12, 2026
Fixed by #1449, merged to
release/1.8.0as 3ac6a5c (ships in 1.8.0-rc2).check-expirations'sconsumerfragment now resolves${import ./vig-utils.nix pkgs}/bin/check-expirations .trivyignore .vulnixignore, matching the three hooks fixed in #1434. Theyaml(portable, committed-runner) representation deliberately staysuv run; thecheck(hermetic) fragment already used a store path.Behavioral proof: a plain consumer config built from an un-overlaid
pkgsnow carriesand executing that store binary directly with
VIRTUAL_ENVunset givesValidated 32 exception(s) across 2 file(s), exit 0 — no project venv involved.The class is now closed, not just this instance. Alongside the specific contract tests,
TestNoConsumerHookResolvesVigUtilsThroughTheVenvreads 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/…. A future hook added tohookDefscannot reintroduce the defect. Verified to have teeth: on the pristine tree it failed listing all 7 shells.Invariants held — drift gate (
.pre-commit-config.yamlabsent from the diff entirely, bothTestPortableRenderFidelitytests green) and zero-hooks parity (identicaldrvPath).Changelog entry went into the
## [1.8.0] - TBDsection rather than## Unreleased, matching #1443/#1444 — the changelog was frozen for 1.8.0 at 046ca54, so an Unreleased entry would have been stranded out of these release notes.feat(workspace): ship a doctor host-preflight recipe on the consumer …
docs(changelog): restore the #1434 entry title bullet in 1.8.0 (#1457)
revert: restore the #1447 and #1448 content dropped by failed-run rol…
revert: restore the #1447 and #1448 content dropped by failed-run rol…
chore: merge release/1.8.0 into bugfix/1454-doctor-linked-worktree
fix(workspace): report git hooks as live in a linked worktree (#1461)
fix(ci): revert only the run's own finalize commits in release rollba…
chore: release 1.8.0 (#1441)