Problem
A clone-local hook installed by codebase pre-commit delegates with:
exec codebase lint "$REPO_ROOT"
That can ignore the target repository's declared shiv:codebase version because ordinary Git hooks do not activate the repository's mise environment.
Observed in KnickKnackLabs/shitshow on 2026-07-16:
- repository declares
"shiv:codebase" = "0.3" and resolves 0.3.0 through mise exec;
- ambient PATH resolves an older globally installed
codebase 0.2.0;
git commit runs the generated hook with 0.2.0 and fails because that version has no aggregate lint task;
mise exec -- git commit ... runs the same hook with 0.3.0 and all nine configured lints pass.
The hook was reported current by the 0.3 pre-commit installer/check before the commit attempt.
Expected
The generated hook should execute the codebase version declared by the target repository, independent of an ambient stale shim. For example, it may need to enter the repository and invoke through its mise environment rather than calling bare codebase.
The solution should preserve useful failure when mise or the declared package is unavailable, rather than silently falling back to a different ambient version.
Reproduction
cd <repo-declaring-shiv-codebase-0.3>
codebase pre-commit
command -v codebase # ambient 0.2 path
mise exec -- command -v codebase # repo-declared 0.3 path
git commit ... # hook invokes ambient 0.2 and fails
mise exec -- git commit ... # hook invokes declared 0.3 and passes
Problem
A clone-local hook installed by
codebase pre-commitdelegates with:That can ignore the target repository's declared
shiv:codebaseversion because ordinary Git hooks do not activate the repository's mise environment.Observed in
KnickKnackLabs/shitshowon 2026-07-16:"shiv:codebase" = "0.3"and resolves0.3.0throughmise exec;codebase 0.2.0;git commitruns the generated hook with 0.2.0 and fails because that version has no aggregatelinttask;mise exec -- git commit ...runs the same hook with 0.3.0 and all nine configured lints pass.The hook was reported current by the 0.3 pre-commit installer/check before the commit attempt.
Expected
The generated hook should execute the codebase version declared by the target repository, independent of an ambient stale shim. For example, it may need to enter the repository and invoke through its mise environment rather than calling bare
codebase.The solution should preserve useful failure when mise or the declared package is unavailable, rather than silently falling back to a different ambient version.
Reproduction