Skip to content

fix(ci): a commit runs no test suite in pre-commit; the pre-push gate and CI run the tests #2086

Closed

Description

@dan-petty

What happened

A commit in devops-cli waits minutes for the pre-commit hook devops-ci-test-changed (uv run devops ci test on the staged Python files). The other pre-commit hooks take less than 1 second each.

Measured on 2026-10-24 (host: 16 CPUs):

  • On the 26 files of the fix(ai): a hosted gateway call is priced at the deployment model that the gateway names, not at the route name #2031 commit, every other hook took 0.16 to 0.74 s. The covering-tests hook ran for more than 10 minutes under the load of the day, and the run was then stopped.
  • No coverage index exists: only devops ci coverage --build-index builds one, and nothing runs it. So the hook uses the text-based selector.
  • The text selector picks 109 of the 484 test modules for src/devops_cli/config/constants.py and 76 for src/devops_cli/config/defaults.py. Most changes touch one of these files.
  • For a staged source with no covering test, such as src/devops_cli/lang/en/help.py (0 modules), the hook runs the full suite.
  • The pre-push hook runs uv run devops ci, which runs the full suite again. CI runs it a third time.

What should happen

The owner decided on 2026-10-24 to remove the hook devops-ci-test-changed from .pre-commit-config.yaml. A commit runs only the fast hooks (pre-commit-hooks, ruff, AST structural invariants, ast-grep, openspec gate). The tests run once before a push, in the pre-push gate uv run devops ci, and in CI. No threshold changes: the same full suite still gates every push.

Scope

  • .pre-commit-config.yaml: remove the hook.
  • The documents and help text that say the tests run at commit (for example CONTRIBUTING.md, docs/TESTING.md and the devops ci test help text).
  • Any test that pins the hook.

Activity

  1. added
    source/agent
    type/infra
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/infra. The candidate fixes an issue in the CI pre-commit hook configuration which is infrastructure related.
    • Priority: P2-Medium. The issue affects commit performance and developer experience, but does not block development or cause failures.
    • Value: Medium. Improving commit speed helps developers work faster but does not provide a major user benefit.
    • Effort: Low. Removing one hook and updating documentation is a small change.
    • Related: docs(adr): decide required checks, a merge queue and what the local gate runs before a push #1752, which asks for a different change. Both items deal with pre-commit hooks and local gate performance, but the candidate removes a slow hook while item 1752 defines what the local gate should run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source/agenttype/infra

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions