Repository navigation
Description
What happened
The required check Tests & Coverage takes more than 5 minutes. AGENTS.md rule 5 says a build or check that averages more than 5 minutes is a P0 bug.
Measured on GitHub on 2026-10-31 and 2026-11-01 (job start to job end):
| Run | Time |
|---|---|
main push, 2026-10-31 12:56 |
5 min 59 s |
main push, 2026-11-01 11:49 |
7 min 17 s |
main push, 2026-11-01 12:11 |
7 min 0 s |
| PR #3035 (code change) | 7 min 17 s |
| PR #3036 (code change) | 7 min 21 s |
| PR #2974 (code change, earlier on 2026-11-01) | 4 min 42 s |
A plan-only pull request runs only tests/invariants and takes about 80 s. The local full run takes 389 s to 717 s.
The suite has about 15,700 tests. The perf issues #2369 (56 interpreters at start, 204 s of 2,423 s), #2371 (what each of the 16 workers repeats at start) and #2373 (cost of coverage and branch measurement) hold part of the cause, and their plans are being corrected. No open issue tracks the P0 itself.
What should happen
- The check averages 5 minutes or less (rule 5), measured over the last 20 runs of
main. - The cause of the rise from 4 min 42 s to 7 min is found: compare the job step times of the runs above (collection, workers, the slowest 25 tests, coverage combine) and the tests added since 2026-10-31.
- The fix does not skip a check (owner rule, 2026-10-23): it removes the slow work, splits the job across runners, or caches the repeated start-up cost.
Acceptance criteria
- The step times of one slow run and one fast run are in the issue, with the difference named.
- The average of
Tests & Coverageover 20 runs ofmainis at most 5 minutes, and the number is stated. - The job
Test Job Durationreports the average and fails above the bound. - No required check is removed or weakened.
Related: #2369, #2371, #2373, #2164.
regression of #2699
Proposed design
Problem statement
The Tests & Coverage required CI check averages over 7 minutes. AGENTS.md rule 5 sets the bound at 5 minutes. The regression from 4 minutes 42 seconds to 7 minutes is not yet explained. The fix must reduce the check time without removing or weakening any required check.
Acceptance criteria
Requirement: Step time comparison documented
The step times of one slow run and one fast run SHALL be recorded in the issue, with the difference named.
Scenario: Step times present in issue
- WHEN The issue body is read after the fix is merged
- THEN The step times of a slow run and a fast run are present, and the difference between them is named.
Requirement: Average within bound
The average duration of Tests & Coverage over the last 20 runs of main SHALL be at most 5 minutes, and the number SHALL be stated.
Scenario: Average at or below bound
- WHEN The last 20 runs of
mainare measured - THEN The average is at most 300 seconds and the number is stated in the issue.
Requirement: Duration job enforces bound
A job named Test Job Duration SHALL report the average and SHALL fail when the average exceeds 5 minutes.
Scenario: Duration job fails on slow average
- WHEN The average of
Tests & Coverageexceeds 300 seconds - THEN The
Test Job Durationjob reports the average and exits with a failure status.
Requirement: No check removed or weakened
No required check SHALL be removed or weakened by the fix.
Scenario: Required checks intact after fix
- WHEN The repository rulesets are read after the fix is merged
- THEN The checks
Static Analysis,Tests & Coverage, andSemantic PR titleare still required.
Existing Tool Considered
No check has run. The project already uses pytest, coverage.py, and GitHub Actions, which cover the need for test execution and coverage measurement. The fix optimizes their configuration (caching, parallelism) rather than replacing them.
Key questions
- What is the 5-minute bound and where is it defined?: AGENTS.md rule 5 states: 'A build or check that averages more than 5 minutes is a P0 bug.' [sources: AGENTS.md]
- What is the cause of the regression from 4 minutes 42 seconds to 7 minutes?: Not yet determined. The body identifies three contributing issues: perf(ci): the startup-import tests start 56 interpreters and take 204 s of the suite's 2,423 s #2369 (56 interpreters at start, 204 s of 2423 s), perf(ci): each test shard collects only its own test files #2371 (per-worker repetition at start), and perf(ci): measure coverage and branch cost #2373 (cost of coverage and branch measurement). The step times of a slow run and a fast run must be compared from GitHub Actions run data to name the difference. [sources: .github/workflows/ci.yml]
- Which approach reduces the check time within the owner rule?: Cache the repeated start-up cost and split the job across runners. This addresses the 56-interpreter startup and the per-worker repetition without removing any test. (best practice) [sources: AGENTS.md, .github/workflows/ci.yml]
- Rejected: Remove slow work. Rejected. The owner rule of 2026-10-23 forbids skipping a check.
- Chosen: Split the job across runners. Chosen. It parallelizes the 16 workers and reduces wall-clock time without removing tests.
- Chosen: Cache the repeated start-up cost. Chosen. It eliminates the 204 s of interpreter startup repeated per worker.
- Should a
Test Job Durationjob be added to enforce the bound?: Yes. The acceptance criteria require a job that reports the average and fails above the 5-minute bound. A dedicated job enforces the bound on every run. (best practice) [sources: AGENTS.md]- Chosen: Add a dedicated
Test Job Durationjob. Chosen. It enforces the bound automatically and fails the build when the average exceeds 5 minutes. - Rejected: Rely on manual measurement. Rejected. It does not fail the build and does not meet the acceptance criteria.
- Chosen: Add a dedicated
- May the fix remove or weaken a required check?: No. The owner rule of 2026-10-23 states that the fix does not skip a check. ADR 0004 pins the required check names and forbids altering them without coordinating changes to repository rulesets. [sources: docs/adr/0004-ci-is-the-authoritative-gate.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 1, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
perfprefix of the title gives the type.(ci)scope of the title gives the scope.A required check blocks every pull request and is 40 percent over its budget.Every contributor waits on this check for each push and pull request.Multiple causes must be measured, compared, and fixed across workers, collection, and coverage.devops-cli-service commentedon Nov 1, 2026
Staged: branch
perf/3050-the-tests-coverage-check-averages-7, draft pull request #3131. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
dan-petty commentedon Nov 2, 2026
Blocked by #3037 (the stage job plans with a read-only investigation toolbox). The first plan for this item (#3131) rested on a false premise: the planner could not read the test job's configuration. The evaluation of 2026-11-02 gives the cause: plans of every model score 1.4 to 2.2 of 5 while the planner has no way to read code. The stage job plans this item again after #3037 merges. The cause of the 7-minute test check is still open, and a person or a session that can measure CI timings may take the item at once.
dan-petty commentedon Nov 4, 2026
#2369 closes as not planned, because its premise is false: paired runs with and without
-X importtimegave a ratio of 0.97 to 1.02. The cause list of this item still names #2369 (56 interpreters at start, 204 s of 2,423 s). The cost stays, because each argv keeps its own interpreter. Read #2164 in the place of #2369. #2164 moves these probes into adevops cirow, and it holds the criterion on the CPU time of that row. That row counts against the 5-minute bound.dan-petty commentedon Nov 4, 2026
The owner asked for this priority change on 2026-11-04. AGENTS.md rule 5 says that a build or check that averages more than 5 minutes is a P0 bug, and this check averages 7 minutes.
dan-petty commentedon Nov 4, 2026
Measured evidence for criterion 1, from the last 30 pushes to
main(2026-11-03 20:31 to 2026-11-04 16:54 UTC). The job averages 474 s. The last 20 average 472 s. The range is 337 s to 578 s, and none was under 300 s.The difference of 174 s is in the test session alone. The setup steps differ by 2 s. Every test ran 1.4 to 3.2 times slower on the slow runner, so the cause is runner speed, not a test that was added. The fast run alone is over the bound, so a cut of fixed work cannot fix it. PR #3517 runs the test row in four shards. I will state the measured 20-run mean here after about 15 new runs of
main.fix(ci): warn on unused snapshots in a test shard instead of failing
devops-cli-service commentedon Nov 4, 2026
Released in v0.56.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.56.1
devops-cli-service commentedon Nov 4, 2026
Live since 2026-11-04 21:54 UTC