Repository navigation
Description
Problem
devops ci job-time reads push runs only. The image jobs of ci.yml (Service Image and Runner Image) run on pull requests, so no check reports when one averages over the limit of AGENTS.md rule 5. Runner Image averaged 487 s and nothing filed it (#7205). Split from #7205.
Change
devops ci job-time reads the runs of a given event, and the daily job also reads the two image jobs on pull_request. A run that built no image ends in about 20 s and must not lower the mean.
Proof
- A test with a fake of the Actions API shows that a pull request job over the limit fails the command.
Alternatives check of 2026-12-01: none.
Tool: none found.
Reason: The searches found no maintained tool. No project reads the runs of a named event, leaves out a run that built no image, and fails a named job over the AGENTS.md rule 5 limit.
Lacks:
- No choice of the workflow event
- No exclusion of a run that built no image
- No non-zero exit on a mean over the rule 5 limit
Proposed design
Problem statement
devops ci job-time reads push runs only. The image jobs of ci.yml, Service Image and Runner Image, run on pull requests. No check reports when one of them averages over the limit of AGENTS.md rule 5. Runner Image averaged 487 s and no issue filed it. This item makes the command read the runs of a named event and adds the two image jobs to the daily check.
Acceptance criteria
Requirement: The command reads the runs of the named event
devops ci job-time SHALL read the workflow runs of the event that the caller names, and MUST default to push.
Scenario: A pull request event is read
- WHEN the caller runs
devops ci job-time --event pull_requestagainst a fake of the Actions API. - THEN the fake shows one runs request for the event
pull_requestand no request for another event.
Requirement: A pull request image job over the limit fails the command
The command MUST exit non-zero when a named image job of the pull_request event averages over 5 min plus 1 min.
Scenario: Runner Image averages 487 s on pull request runs
- WHEN the fake of the Actions API answers pull request runs of
Runner Imagewith a mean of 487 s. - THEN the command exits 1 and reports
Runner Imagewith the mean of 487 s.
Requirement: A run that built no image does not lower the mean
The command MUST leave a job run that built no image out of the mean.
Scenario: A 20 s run does not lower the mean
- WHEN the fake answers two pull request runs of
Runner Image, one of 487 s with a built image and one of 20 s with no built image. - THEN the command reports the mean of 487 s and exits 1.
Requirement: The daily job reads the two image jobs on pull requests
The daily job-time step MUST read the Service Image and Runner Image jobs with the event pull_request.
Scenario: The workflow passes actionlint
- WHEN the caller runs
uv run devops ci --check --only actionlint,zizmor. - THEN actionlint reports no error for the workflow.
Existing Tool Considered
The alternatives block of the issue records the check of 2026-11-25 with the verdict none and no tool: no maintained project reads the runs of a chosen event, leaves out a run that built no image, and fails a named job over the AGENTS.md rule 5 limit. The change therefore builds its own code. The cost is about 30k tokens to build the --event option, the exclusion of a run that built no image, the workflow step and the tests; about 10k tokens a year to keep and fix that code; and about 4 hours of elapsed time.
Key questions
- How does the command choose the event of the workflow runs?: Add an
--eventoption todevops ci job-time. The option defaults topush, so the current daily push check keeps its behavior. The daily job passes--event pull_requestfor the two image jobs. (best practice) [sources: openspec/specs/ci-job-time/spec.md]- Chosen: An
--eventoption that defaults topush. ADR 0037 makes a tool command mirror and pass through its options. The default keeps the push check and the spec ruleOnly the wanted runs are read. - Rejected: A fixed
pull_requestevent for the image jobs. One run then reads two events, and the caller cannot pick the event of another job. - Rejected: Both events in every run. The mean then mixes push and pull request runs of one job, and the spec reads only the wanted runs.
- Chosen: An
- How does the command find a job run that built no image?: Read the steps of each job run from the Actions API, and leave out a run in which no build step ran. Refine confirms the name of the build step in
.github/workflows/ci.yml. (best practice) [sources: .github/workflows/ci.yml]- Chosen: Leave out a run whose build step did not run. The steps of a job run show whether the build ran, so each real build stays in the mean.
- Rejected: Leave out a run under a fixed duration such as 60 s. A fast build and a fast failure are short too, so a fixed floor hides a real regression.
- Rejected: Leave out a run whose conclusion is not
success. The spec counts the conclusion of the job, not of the run, so a failed build must stay in the mean.
- Which limit applies to the image jobs on pull requests?: The same limit. AGENTS.md rule 5 makes a check that averages over 5 min plus 1 min tolerance a P0 bug, and it names no job. [sources: AGENTS.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 25, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (10)
Searches run:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.