Repository navigation
feat(ci): Static Analysis runs the commit hygiene hooks - #7929
Merged
dan-petty merged 5 commits intoDec 1, 2026
Merged
Conversation
Contributor
Author
|
The steps of the job: Stopped at group 2. The stop report is on #4779: #4779 (comment).
|
Nine hygiene hooks run in the manual stage, which the hooks row of devops ci starts. check-added-large-files stays out of it. The stages lines also take trailing-whitespace, end-of-file-fixer and check-added-large-files out of pre-push. Their manifest ran them there with no time limit and before branch-current. The tooling cache holds ~/.cache/pre-commit, and its key reads .pre-commit-config.yaml. The help of --check says that the hooks row still changes files.
Two premises of the plan are false. The manifest of pre-commit-hooks v6.0.0 gives check-added-large-files the manual stage, so default_stages cannot keep it out. It needs a stages line, which task 2.1 forbade. devops ci drops PRE_COMMIT_HOME from the environment of a row, so a cache at that path stays empty. A cache of the default ~/.cache/pre-commit, which the issue names, replaces it.
dan-petty
force-pushed
the
feat/4779-static-analysis-runs-the-commit-hygiene
branch
from
December 1, 2026 13:06
dee3997 to
25fbde0
Compare
Owner
Finished by hand (head
|
| Stage | main |
This branch |
|---|---|---|
manual |
trailing-whitespace, end-of-file-fixer, check-added-large-files |
the 9 hygiene hooks |
pre-push |
the 3 hooks above, branch-current, the 2 devops ci hooks |
branch-current, the 2 devops ci hooks |
- A test changed.
test_workflow_contracts.pyrefused eachstages: [pre-commit]entry as redundant. It now namescheck-added-large-filesas the one entry that overrides a manifest. --checkchanges files. The hooks have no check-only mode. The help of--checkanddocs/SDLC.mdsay so.- The cache key now also reads
.pre-commit-config.yaml.
Checks
| Check | Result |
|---|---|
devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures,actionlint,zizmor,hooks |
pass |
mypy on the 5 changed source files |
pass |
pytest -n 4 on the covering tests, tests/invariants, tests/ai/mcp, tests/lang, tests/docs |
2211 passed |
| Scratch repository, file with no final newline | hooks row exits 1 and prints the diff |
| Scratch repository, file with an unused import | row exits 0, file unchanged |
devops ci hooks on the tree |
pass, no file changed, no file needed a repair |
| CI | all required checks pass |
Not yet verified
The criterion "at most 10 s more with a warm cache". The CI run had a cold cache: the hooks row took 54 s beside the other rows, and the gate took 2 min 3 s, set by test-tree (2 min 2 s). That run saved the cache. A local warm run takes 4 to 7 s. Read the hooks row of the next Static Analysis run.
dan-petty
marked this pull request as ready for review
December 1, 2026 13:19
dan-petty
deleted the
feat/4779-static-analysis-runs-the-commit-hygiene
branch
December 1, 2026 13:45
dan-petty-release Bot
added a commit
that referenced
this pull request
Dec 1, 2026
🤖 I have created a release *beep* *boop* --- ## [0.270.0](v0.269.1...v0.270.0) (2026-12-01) ### Features * **ci:** Static Analysis runs the commit hygiene hooks ([#7929](#7929)) ([07e7be6](07e7be6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Static Analysis runs the nine commit hygiene hooks over every tracked file. Before, no CI job ran them, so a bad file could reach
main. The newhooksrow ofdevops ciruns the pre-commitmanualstage and prints the diff of each file that a hook changes. A hygiene hook has no check-only mode, so the row changes files also with--check.ruff-checkandcheck-added-large-filesstay out of themanualstage.trailing-whitespace,end-of-file-fixerandcheck-added-large-filesno longer run at a push: their manifest ran them there with no time limit and beforebranch-current.The tooling cache holds
~/.cache/pre-commit, and its key reads.pre-commit-config.yaml.Closes #4779
Change:
openspec/changes/archive/2026-12-01-4779-static-analysis-runs-the-commit-hygiene/