chore: tighten pre-commit verification

This commit is contained in:
Guillaume ARM 2026-06-08 16:52:45 +02:00
parent 325a4327b9
commit 66d979e543
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ init-env:
# Install Git hooks for this repository.
install-git-hooks:
@mkdir -p .git/hooks
@printf '%s\n' '#!/bin/sh' '' 'just test' > .git/hooks/pre-commit
@printf '%s\n' '#!/bin/sh' '' 'just check test' > .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@printf '%s\n' 'Installed .git/hooks/pre-commit'
@printf '%s\n' '#!/bin/sh' '' 'just ci' > .git/hooks/pre-push
@ -223,4 +223,4 @@ test-timeout: test-timeout-lua test-timeout-shell
# Lint all Lua source with luacheck.
check: check-luacheck
luacheck .
luacheck --quiet .

View File

@ -23,12 +23,12 @@ agent workflows if agents run one verification path and hooks run another.
Install two local Git hooks through `just install` / `just install-git-hooks`:
- `.git/hooks/pre-commit` runs `just test`.
- `.git/hooks/pre-commit` runs `just check test`.
- `.git/hooks/pre-push` runs `just ci`.
When an agent is explicitly asked to commit and/or push, it should not run `just test`
manually before the Git operation. The hook is the source of truth for that workflow:
commit triggers `just test`, and push triggers `just ci`.
commit triggers `just check test`, and push triggers `just ci`.
Manual verification is still appropriate outside commit/push workflows. For example, run
`just test` while developing a behavior change, and run `just ci` when checking the full