Skip to content

feat(ci): job-time reads the pull request image jobs #7206

Backlog

Description

@dan-petty

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_request against a fake of the Actions API.
  • THEN the fake shows one runs request for the event pull_request and 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 Image with a mean of 487 s.
  • THEN the command exits 1 and reports Runner Image with 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 --event option to devops ci job-time. The option defaults to push, so the current daily push check keeps its behavior. The daily job passes --event pull_request for the two image jobs. (best practice) [sources: openspec/specs/ci-job-time/spec.md]
    • Chosen: An --event option that defaults to push. ADR 0037 makes a tool command mirror and pass through its options. The default keeps the push check and the spec rule Only the wanted runs are read.
    • Rejected: A fixed pull_request event 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.
  • 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

  1. added
    type/feature
    scope/ci
    source/agent
    status/new
    value/medium
    effort/low
    priority/p2-medium
    on Nov 25, 2026
  2. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    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:

    • GitHub Actions job duration report tool pull_request runs average time, results: 5
    • open source CLI report GitHub Actions workflow job timing per event, results: 5
    • github-actions job duration monitor tool pypi, results: 5
    • "github actions" job timing metrics CLI open source "workflow" duration export, results: 5
    • workflow timing dashboard GitHub Actions self-hosted runner minutes reporting, results: 5
    • github actions job time, results: 5
    • github-actions-exporter prometheus workflow job duration, results: 5
    • gha-timing report slowest github actions jobs, results: 5
    • github actions cost tracker open source, results: 5
    • CI pipeline job duration regression detection tool open source, results: 5
  3. added
    status/ready
    and removed
    status/new
    on Nov 28, 2026
  4. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/cisource/agentstatus/readytype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions