Matrix lint workflow by hook stage#2842
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| matrix: | ||
| python-version: ['3.13'] | ||
| platform: [ubuntu-latest, windows-latest] | ||
| hook-stage: [pre-commit, pre-push, manual] |
There was a problem hiding this comment.
Lite-action in matrix jobs pushes incomplete auto-fixes
Medium Severity
Adding hook-stage to the matrix means pre-commit-ci/lite-action now runs in 6 parallel jobs, each containing auto-fixes from only a single hook stage. Previously, each job ran all three stages sequentially, so the action had the complete set of fixes. The pre-commit-ci/lite-action documentation requires it to be in a job that is "either by itself in the workflow or is the last job to finish," which 6 parallel matrix jobs violate. Only the last job's partial fixes will be pushed, losing fixes from the other two stages.


Refactor the lint workflow to parallelize hook stage execution by adding
hook-stageto the build matrix. This runs all three hook stages (pre-commit, pre-push, manual) in parallel instead of sequentially.Note
Low Risk
Workflow-only refactor that changes CI job fan-out and log grouping but not the lint commands themselves; primary risk is increased CI load or matrix misconfiguration.
Overview
Parallelizes CI linting by hook stage. The
lint.ymlworkflow addshook-stage(pre-commit,pre-push,manual) to the build matrix so each stage runs as its own matrix job across both Ubuntu and Windows.The
Lintstep is simplified from three sequentialprek runinvocations to a single command parameterized by${{ matrix.hook-stage }}, improving visibility and reducing total wall-clock time.Written by Cursor Bugbot for commit 74763f3. This will update automatically on new commits. Configure here.