Repository navigation
docs(adr): decide required checks, a merge queue and what the local gate runs before a push - #2115
Merged
Merged
Conversation
…ate runs before a push ADR 0014 records the decision of the owner of 2026-10-22 in #1752. The main ruleset requires Static Analysis, Tests & Coverage and Semantic PR title, with the strict policy and no merge queue. The pre-push hook runs only the fast static checks, and the full devops ci is a manual command. Copilot reviews only on request. ADR 0004 gets a line that names ADR 0014. Closes #1752
dan-petty
marked this pull request as ready for review
October 24, 2026 15:07
dan-petty
added a commit
that referenced
this pull request
Oct 24, 2026
… runs the fast static checks (#2118) ## 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 ci` is a manual run. This carries out the owner's decision of 2026-10-22 in #1752, which ADR 0014 records. - **The hook.** `devops-ci-pre-push` in `.pre-commit-config.yaml` runs `uv run devops ci --check --only lint,format,actionlint,zizmor`. `--only` takes a comma-separated list of check names, so one hook runs the four checks. `--check` makes the hook examine the pushed tree and change no file, as the `Static Analysis` job does. One `devops ci --only` hook runs the same commands as `Static Analysis`, so the hook and CI cannot disagree. Four separate pre-commit hooks were rejected for this reason (design.md). - **The test.** `test_the_pre_push_hook_runs_only_the_fast_static_checks` in `tests/test_workflow_contracts.py` resolves each pre-push hook against the `devops ci` check table. It holds the hooks to exactly `lint`, `format`, `actionlint` and `zizmor`, 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_resolves` still finds and resolves the hook's `devops` command. - **The documents.** AGENTS.md rule 5 says what runs where: the fast static checks before a push (never `--no-verify`), the required checks of CI before a merge, and the full `uv run devops ci` by 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 of `openspec/config.yaml` and 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 new `main`. No document says that a branch must hold the current `main`. - **The guard.** The deleted-process check in `tests/test_agents_md_claims.py` also 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. - **Other text.** The chat invariant of `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 in `constants.py`, `ci.yml` and the `openspec-gate` hook, the docstring of `compute_workspace_fingerprint` and five test docstrings no longer say that the hook runs the full gate. No `devops` command, option, help text or output changes, so the change sets `skip_specs: true`. `devops docs generate --sync-readme` changes no file. ### Timing of `uv run pre-commit run --hook-stage pre-push --all-files` Host: 16 CPUs. The environment was synced before each run. | Tree | Hook | Time | Load (1 min) | | :--- | :--- | ---: | :--- | | base, 02fee43 | `uv run devops ci` | 285.3 s | 22, with one other full gate on the host | | this change | `uv run devops ci --check --only lint,format,actionlint,zizmor` | 9.0 s, 9.1 s, 8.7 s | 4 to 5 (quiet) | | this change, rebased on 35b5632 | same | 22.8 s | 45 | On the base, the slowest rows were `test` (4 min 17 s), `typecheck` (3 min 49 s) and `security` (3 min 39 s). With the change, the rows took: `lint` 1.0 s, `format` 1.9 s, `actionlint` 3.1 s and `zizmor` 5.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): the `main` ruleset requires `Static Analysis`, `Tests & Coverage` and `Semantic PR title`, so the condition of #1752 holds. - `.github/workflows/ci.yml`: `Static Analysis` runs `devops ci --check --no-cache --skip test,outdated`, and `Tests & Coverage` runs `devops ci --check --no-cache --only test`. Each check that the hook drops, except the advisory `outdated` report of the scheduled `Dependency Freshness` job, runs in a required check. ### Checks run - `uv run devops ci test` over `tests/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.py` and `tests/test_docs.py`: all pass. - `uv run ruff check`, `uv run ruff format --check` and `uv run mypy` on the changed files, `uv run devops docs check` and `uv run devops openspec check`: all pass. - `docs/adr/0004-ci-is-the-authoritative-gate.md`: the amendment line that #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 on `main`, as ADR 0014 records. ## Item Closes #2110 Change: `openspec/changes/archive/2026-10-24-2110-pre-push-fast-static-checks/`
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
ADR 0014 records the decision that the owner made on 2026-10-22 in #1752. It amends ADR 0004.
mainruleset requiresStatic Analysis,Tests & CoverageandSemantic PR title(ADR 0012, decision 10). No strict up-to-date policy and no merge queue: the release pull request runs the required checks on each newmain, so its status shows a defect that two pull requests make together (owner, 2026-10-24).rufflint,ruff format,actionlint,zizmor). The fulluv run devops ciis a manual command. Remote CI is the authoritative gate (ADR 0004).Evidence, read on 2026-10-24:
devops gh api repos/dan-petty/devops-cli/rulesets/21466414: the three required checks, no bypass actor, nomerge_queuerule and nocopilot_code_reviewrule.strict_required_status_checks_policyisfalse, as the owner wants (2026-10-24). ADR 0012 read it as on on 2026-10-22.Static Analysismedian 105 s (maximum 119 s),Tests & Coveragemedian 291 s (maximum 307 s). No job waited more than 4 s for a runner.Pending a person:
Item
Closes #1752
Change:
openspec/changes/archive/2026-10-24-1752-adr-gate-and-required-checks/Fail-to-pass: not applicable: the change adds a decision record and changes no behavior, so it adds no test.