Repository navigation
Description
Summary
This repository's .pre-commit-config.yaml runs the test suite as a
pytest hook. The hook was a stop-gap to stop local agent sessions
pushing code with failing tests. Tests now run in CI alone, which
already runs them on every pull request, so the hook goes from every
lfreleng-actions repository that has one (eight, each with its own
issue).
The ci.skip entry has to go as well. The organisation is moving
pre-commit execution from pre-commit.ci to the linting.yaml reusable
workflow in lfreleng-actions/generic-workflows, run from the
organisation .github repository through a ruleset. That workflow
fails any run whose ci.skip names a hook the configuration does not
define, rather than reporting a green check over a smaller selection
(see docs/linting.md there, Which hook stages a run reaches).
Findings
On the default branch as of 2026-11-22 (line numbers approximate):
.pre-commit-config.yaml(around line 165): alanguage: systempytesthook that runs the test suite on every commit.ci.skip(around line 11): listspytest, because pre-commit.ci cannot build the project environment.- CI already runs the tests on every pull request:
.github/workflows/build-test.yaml.
Required changes
- Delete the
pytesthook from.pre-commit-config.yaml. It is the only hook in itsrepo: localentry, so remove that whole entry, together with any comment directly above it that describes running the tests. - Remove
pytestfromci.skipand keep every other entry in place, in order. Aci.skipthat names a hook the configuration does not define fails the new organisation linting workflow, so this is required, not tidying. - Leave
pytestalone wherever it appears in a type checker'sadditional_dependencies(mypy, basedpyright): those make the test imports resolve for type checking and run no tests. - Search the contributor documentation (
README.md,AGENTS.md,CONTRIBUTING.md,docs/) for claims that tests run on commit or through pre-commit/prek, and update them to say tests run in CI and locally withuv run pytest. - Change nothing under
.github/workflows/, nothing in the test suite, and no pytest configuration inpyproject.toml. Do not add a linting workflow caller: the organisation-level one replaces it.
Acceptance criteria
- No hook in
.pre-commit-config.yamlruns pytest;prek list
shows nopytesthook. - Every id under
ci.skipnames a hook the configuration defines. -
prek run --all-filespasses. - No contributor documentation says tests run on commit or through
pre-commit/prek; it points at CI anduv run pytest. - The CI test workflows (
.github/workflows/build-test.yaml) are unchanged and still run the
tests.
Activity
lf-releng-code-monkey-bot commentedon Nov 23, 2026
🐒 An AI agent attempted this issue but its proposal failed a policy check (.pre-commit-config.yaml is protected and cannot change). Run: https://github.com/lfreleng-actions/github-code-monkey-bot/actions/runs/45085142472
lf-releng-code-monkey-bot commentedon Nov 23, 2026
🐒 An AI agent has proposed a change for this issue: pull request #424 (head 7b1bad9). The Copilot review of it is clean. An antagonistic review was requested from the review bot.