Repository navigation
ci(gate): required status checks gate the merge and the pre-push hook runs the fast static checks - #2118
Merged
Conversation
… runs the fast static checks The pre-push hook devops-ci-pre-push runs only the fast static checks, uv run devops ci --check --only lint,format,actionlint,zizmor, in check-only mode (#1752). The required checks of CI gate the merge, and the full uv run devops ci is a manual run. AGENTS.md rule 5 and the documents say what runs where, and a test holds the hook to the four checks. Closes #2110
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.
Summary
The pre-push hook runs only the fast static checks. The required checks of CI gate the merge, and the full
uv run devops ciis a manual run. This carries out the owner's decision of 2026-10-22 in #1752, which ADR 0014 records.devops-ci-pre-pushin.pre-commit-config.yamlrunsuv run devops ci --check --only lint,format,actionlint,zizmor.--onlytakes a comma-separated list of check names, so one hook runs the four checks.--checkmakes the hook examine the pushed tree and change no file, as theStatic Analysisjob does. Onedevops ci --onlyhook runs the same commands asStatic Analysis, so the hook and CI cannot disagree. Four separate pre-commit hooks were rejected for this reason (design.md).test_the_pre_push_hook_runs_only_the_fast_static_checksintests/test_workflow_contracts.pyresolves each pre-push hook against thedevops cicheck table. It holds the hooks to exactlylint,format,actionlintandzizmor, in check-only mode. It fails on the base: the old hook resolves to all 17 rows.test_every_devops_command_the_workflows_actions_and_hooks_run_resolvesstill finds and resolves the hook'sdevopscommand.--no-verify), the required checks of CI before a merge, and the fulluv run devops ciby hand. The rule does not name the three checks, because with the names AGENTS.md has 6,505 characters, and the cap is 6,500. docs/SDLC.md Phase 6 names them, and the router sends the move from draft to merge there. CONTRIBUTING.md, docs/SDLC.md (the lifecycle diagram, Phase 4 and Phase 6), docs/TESTING.md, docs/ROUTINE_TASKS.md, docs/SELF_IMPROVEMENT.md, the apply guidance ofopenspec/config.yamland three knowledge base documents say the same. Where a document says what gates a merge, it says: the three required checks pass on the pull request, and the release pull request runs the same checks on each newmain. No document says that a branch must hold the currentmain.tests/test_agents_md_claims.pyalso finds five phrases that say the pre-push hook runs the full gate. It failed on the base for AGENTS.md, CONTRIBUTING.md, docs/SDLC.md, docs/TESTING.md and two knowledge base documents.devops ai chat(DEFAULT_CHAT_INVARIANTS) said "Never push before uv run devops ci passes locally". It now says "Never push with --no-verify or before the pre-push hook passes". Comments inconstants.py,ci.ymland theopenspec-gatehook, the docstring ofcompute_workspace_fingerprintand five test docstrings no longer say that the hook runs the full gate.No
devopscommand, option, help text or output changes, so the change setsskip_specs: true.devops docs generate --sync-readmechanges no file.Timing of
uv run pre-commit run --hook-stage pre-push --all-filesHost: 16 CPUs. The environment was synced before each run.
uv run devops ciuv run devops ci --check --only lint,format,actionlint,zizmorOn the base, the slowest rows were
test(4 min 17 s),typecheck(3 min 49 s) andsecurity(3 min 39 s). With the change, the rows took:lint1.0 s,format1.9 s,actionlint3.1 s andzizmor5.7 s, in parallel. The hook changed no file. The acceptance criterion is less than 1 minute on a quiet host: the result is 9 s.Evidence
uv run devops gh api repos/dan-petty/devops-cli/rulesets/21466414(2026-10-24): themainruleset requiresStatic Analysis,Tests & CoverageandSemantic PR title, so the condition of docs(adr): decide required checks, a merge queue and what the local gate runs before a push #1752 holds..github/workflows/ci.yml:Static Analysisrunsdevops ci --check --no-cache --skip test,outdated, andTests & Coveragerunsdevops ci --check --no-cache --only test. Each check that the hook drops, except the advisoryoutdatedreport of the scheduledDependency Freshnessjob, runs in a required check.Checks run
uv run devops ci testovertests/test_workflow_contracts.py,tests/test_agents_md_claims.py,tests/test_openspec_scaffold.py,tests/test_agent_invariants.py,tests/test_ai_cmd.py,tests/test_ci.py,tests/test_ci_cache.py,tests/test_ci_cache_fingerprint.py,tests/test_test_module_independence.py,tests/test_test_selection.py,tests/test_architectural_invariants.py,tests/test_ruff_complexity_cap.py,tests/test_instruction_generator.py,tests/test_kb.py,tests/test_kb_manuals_metadata.py,tests/test_docs_knowledge_base_argv.pyandtests/test_docs.py: all pass.uv run ruff check,uv run ruff format --checkanduv run mypyon the changed files,uv run devops docs checkanduv run devops openspec check: all pass.docs/adr/0004-ci-is-the-authoritative-gate.md: the amendment line that docs(adr): decide required checks, a merge queue and what the local gate runs before a push #2115 added said "with the strict policy". It now says that the strict policy is off and that the release pull request shows a defect onmain, as ADR 0014 records.Item
Closes #2110
Change:
openspec/changes/archive/2026-10-24-2110-pre-push-fast-static-checks/