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 248): alanguage: systempytesthook that runs the test suite on every commit.ci.skip(around line 20): listspytest, because pre-commit.ci cannot build the project environment.- CI already runs the tests on every pull request:
.github/workflows/build-test.yaml. - The comment above the hook (around lines 243-245) and the paragraph inside
ci:(around lines 11-12) both explain thepytesthook. AGENTS.md, Repository specifics (around lines 36-38): says plainuv syncleaves "thepytestpre-commit hook" failing.README.md,SETUP.mdandCONTRIBUTING.mdmay describe the hook; check them.
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. - Delete the
pytestparagraph insideci:along with the entry. RewordAGENTS.mdRepository specifics so it says plainuv syncleavesuv run pytestfailing withModuleNotFoundError; theuv sync --extra devadvice stays. - 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 looked at this issue and did not attempt it: The required change removes the pytest hook and its ci.skip entry from the root .pre-commit-config.yaml and rewords AGENTS.md; both are protected files this workflow may not edit, so a maintainer needs to make this change by hand.
lf-releng-code-monkey-bot commentedon Nov 23, 2026
🐒 An AI agent has proposed a change for this issue: pull request #463 (head 5018f7a). The Copilot review of it is clean. An antagonistic review was requested from the review bot.
lf-releng-code-monkey-bot commentedon Nov 23, 2026
🐒 Round 1: an AI agent revised pull request #463 (head c02ee3c). Round 1: amended the single commit, kept on
base_sha(no rebase was requested and the PR is mergeable). - Fixed the antagonistic-review thread onCONTRIBUTING.md:build-test.yamlskips PRs touching only.github/, root dotfiles ortox.ini. The text now names those filters and keeps the localuv run pytestinstruction. The commit body's "every pull request" claim is corrected too. - Copilot's overview had no open findings and no suppressed ones. ## Antagonistic review - Body summary ("documentation overstates when CI runs the unit tests"): fixed inCONTRIBUTING.md; same finding as the inline thread. Checks: prek on the changed files, gitlint anduv run pytestall passed. Still open:AGENTS.mdneeds the rewording from requirement 4. It is a protected file the workflow cannot edit, so a maintainer must do it. It answers antagonistic review round 1 (#463 (review)). The Copilot review of it is clean. An antagonistic review was requested from the review bot.lf-releng-code-monkey-bot commentedon Nov 23, 2026
🐒 An AI agent attempted this issue but its proposal failed a policy check (head moved from 5018f7a to c02ee3c since selection; nothing forced). Run: https://github.com/lfreleng-actions/github-code-monkey-bot/actions/runs/45149367271 This round does not count toward the round cap of its antagonistic review round: the branch moved after this run selected it.
lf-releng-code-monkey-bot commentedon Nov 23, 2026
🐒 Round 2: an AI agent handed pull request #463 back to a maintainer. It disputes every remaining finding and changed nothing: The only remaining finding asks for a change to AGENTS.md (Repository specifics, line 37), a protected file this workflow cannot edit. A maintainer needs to make that one-line rewording by hand; the rest of the change is complete and passes its checks. Round 2: no new commits; the branch stays on
base_shabecause nobody asked for a rebase and the PR is mergeable. The previous rejection said the head moved before publication. This round starts from the current head, c02ee3c. Copilot's review of c02ee3c is clean: no threads and no suppressed findings. ## Antagonistic review - Summary finding (AGENTS.md:37still mentions the removedpytestpre-commit hook): the finding is valid, but I did not fix it.AGENTS.mdis a protected file this workflow cannot add, edit or delete. A maintainer should change the sentence to say that plainuv syncleavesuv run pytestfailing withModuleNotFoundError, and keep theuv sync --extra devadvice (issue requirement 4). Checks on c02ee3c:uv run pytestpassed (114 passed, 2 skipped).prek run --files .pre-commit-config.yaml CONTRIBUTING.mdpassed.prek listshows nopytesthook. It answers antagonistic review round 2 (#463 (review)). Its replies are on the threads, which stay open; the workflow revises this pull request again once a maintainer comments.