Skip to content

fix(ci): release image jobs average over the 6 min bound #6522

Closed

Description

@dan-petty

Problem

AGENTS.md rule 5: a check that averages over 5 min + 1 min tolerance is a P0 bug. Two release image jobs pass that bound (study of 2026-11-20, 18 release runs):

  • MCP Server Image (release.yml): mean 380 s, 10 of 18 runs over 360 s.
  • Runner Image (release.yml): mean 364 s, 7 of 18 runs over 360 s.

No issue tracks this. #6262 covers only Tests & Coverage.

Measured causes per release: the gha cache export with mode=max (median 298 s summed over the image jobs, up to 155 s in one job), the load: true export for the smoke test (47-56 s per image), a second build of the no-cache stages for the push, and on main the MCP image builds FROM runner, so it rebuilds the runner chain (tool downloads 10-16 s, the RUNNER_TOOLS check twice, kubectl and helm twice).

Change

The fixes exist as items; this P0 orders them and holds them to the bound:

  1. build(docker): build the runner image FROM devtools with no tool install #4361 (PR refactor(docker): build the runner image FROM devtools with no tool install #6513): runner FROM devtools; the MCP image builds FROM service-deps and copies kubectl and helm from devtools.
  2. perf(ci): keep the image build cache in GHCR #6404: GHCR registry cache instead of the gha cache for the service, runner and MCP builds.
  3. ci(release): push each image once, then verify and tag that digest #6407: build each release image once and push it by digest, then smoke-test and scan that digest in a verify job (no load: true).

Proof

  • Over the next 10 release runs after the fixes, the mean of each release image job is under 300 s and no run is over 360 s (job timings from the release.yml runs).

Alternatives check of 2026-11-20: in-use.
The repository already uses this tool.
Tool: dan-petty/devops-cli (https://github.com/dan-petty/devops-cli), MIT, last activity 2026-11-20, maintained.
Reason: Searches surfaced only generic Prometheus/Docker metrics exporters, which need a service and storage. The in-repo devops ci job-time check, already run daily, gives the measurement, the P0 alarm and the dry run, but not the two release image jobs.

Covers:

  • Reads job timings of workflow runs
  • Files one P0 issue on a mean breach
  • Holds the report in one alarm issue
  • Makes no GitHub request on --dry-run

Lacks:

  • No MCP Server Image job in its list
  • No Runner Image job in its list
  • No window over the last ten release runs
  • No release.yml job selection

Proposed design

Problem statement

The MCP Server Image and Runner Image jobs of the release workflow average over the 6 min bound of AGENTS.md rule 5. The study of 2026-11-20 gives a mean of 380 s and 364 s over 18 release runs. Three items fix the causes: #4361, #6404 and #6407. This item extends the daily devops ci job-time check to the two jobs. A mean over 360 s files one P0 issue, so the check holds the bound after the fixes.

Acceptance criteria

Requirement: Release image jobs are measured

The devops ci job-time check SHALL measure the MCP Server Image and Runner Image jobs of release.yml on main over the last 10 completed runs, with a limit of 360 s.

Scenario: Both release image jobs measured

  • WHEN A test gives the check ten recorded runs of release.yml whose MCP Server Image and Runner Image jobs each take 300 s, and whose Upload Release Assets job takes 60 s.
  • THEN The check reports a mean of 300 s for MCP Server Image and 300 s for Runner Image, and reports no mean for Upload Release Assets.

Requirement: Mean over the bound files one P0 issue

The check SHALL file one issue when the mean of a release image job is over 360 s.

Scenario: Mean over 360 s

  • WHEN A test gives the check ten recorded runs whose MCP Server Image job takes 380 s, and a client that records each request.
  • THEN The client records one issue request with the labels type/bug, scope/ci, status/new and priority/p0-critical, and the title fix(ci): MCP Server Image averages 380 s, over the 360 s limit.

Requirement: A mean at the bound files no issue

The check SHALL file no issue when the mean of each release image job is 360 s or less.

Scenario: Mean at the bound

  • WHEN A test gives the check ten recorded runs whose MCP Server Image and Runner Image jobs each take 360 s, and a client that records each request.
  • THEN The client records no issue request and the check exits 0.

Requirement: A short read never passes

The check SHALL exit 1 and file no issue when it reads fewer release runs than the window.

Scenario: Too few release runs

  • WHEN A test gives the check two recorded release runs for a window of ten, and a client that records each request.
  • THEN The check exits 1, its output says that only 2 of the last 10 runs were read, and the client records no issue request.

Requirement: One alarm issue holds the report

The check SHALL hold the report of a breach in one open alarm issue for that job and SHALL open no second issue.

Scenario: Second breach with an open alarm issue

  • WHEN A test gives the check an open alarm issue for Runner Image, a client that records each request, and ten recorded runs whose Runner Image mean is 364 s.
  • THEN The client records one body update of that issue and no new issue request.

Requirement: The dry run makes no request

The check MUST make no request to GitHub when it runs with --dry-run.

Scenario: Dry run

  • WHEN A test runs the check with --dry-run --file-issue and a client that records each call.
  • THEN The client records no call, the output names the listing of the runs of release.yml, and the check exits 0.

Existing Tool Considered

The alternatives check in the issue body gives the verdict in-use for dan-petty/devops-cli (https://github.com/dan-petty/devops-cli), the open, maintained MIT CLI that the repository already runs. The block names what the check covers and lacks. This change adds the two jobs that the block lists as missing: MCP Server Image and Runner Image of release.yml on main join the check's list with a window of ten runs and a limit of 360 s. The existing measurement, P0 alarm, one-time report and dry run then apply to them. The extension is about 40 lines and two tests, about 10k tokens and about 2 hours.

Key questions

  • Which job names does release.yml give the release image jobs?: The image job runs one job for each matrix entry, named <title> Image. The titles are Service, Runner and MCP Server, so the names are Service Image, Runner Image and MCP Server Image. [sources: .github/workflows/release.yml]
  • Which release image jobs does the check measure?: MCP Server Image and Runner Image. (best practice) [sources: .github/workflows/release.yml, AGENTS.md]
    • Chosen: The two jobs that breach the bound. The issue names MCP Server Image and Runner Image, and the study of 2026-11-20 gives their means as 380 s and 364 s.
    • Rejected: All three image jobs. The issue scopes the change to the two jobs, and the Service Image mean is inside the bound.
    • Rejected: Measure by hand. A hand measurement holds no bound after the study ends, and AGENTS.md rule 5 asks for a check.
  • What mean does the check hold a release image job to?: 360 s, the 300 s target plus the 60 s tolerance of AGENTS.md rule 5. A mean over 360 s files one P0 issue. The 300 s mean of the proof is the goal of the three fixes, not the alarm. (best practice) [sources: AGENTS.md, openspec/specs/ci-job-time/spec.md]
    • Chosen: Mean of 360 s. AGENTS.md rule 5 makes a check that averages over 5 min + 1 min tolerance a P0 bug.
    • Rejected: Mean of 300 s. An alarm at 300 s is stricter than the rule and fires on normal variation.
    • Rejected: One run over 360 s. Rule 5 bounds the mean, and the existing check alarms on the mean.
  • Over how many release runs does the check average?: Ten completed runs of release.yml on main. (best practice) [sources: openspec/specs/ci-job-time/spec.md]
    • Chosen: Ten runs. The proof of the issue reads ten release runs, and release runs are few, so a longer window hides a recent regression for longer.
    • Rejected: Twenty runs, the default of the test job. A window of 20 release runs delays the alarm of a new regression by many days.
    • Rejected: The last run only. One run is noise, and rule 5 bounds the average.
  • How does the check select the two release image jobs?: The change adds the two jobs to the check's list, each with release.yml, main, 10 runs and a limit of 360 s. The daily Test Job Duration job in ci.yml runs the check one time, as it does now. (best practice) [sources: openspec/specs/ci-job-time/spec.md, .github/workflows/release.yml]
    • Chosen: Extend the check's list. The daily job already runs the check, so the change adds two entries and their tests.
    • Rejected: Run the check twice more from the workflow. The check selects ci.yml today, so this needs the same code change and adds workflow steps.
    • Rejected: Write a new script. It duplicates the existing check, its alarm issue and its dry run.
    • Rejected: Add an external metrics stack. An exporter, Prometheus and alert routing add a service and a secret for a mean that a GitHub API read gives.
  • What does this item deliver, given that the three cause fixes are separate items?: It extends the job-time check to the two release image jobs. The causes stay in build(docker): build the runner image FROM devtools with no tool install #4361, perf(ci): keep the image build cache in GHCR #6404 and ci(release): push each image once, then verify and tag that digest #6407. The check files one P0 alarm issue when a mean is over 360 s, and updates it each day until the mean falls. (best practice) [sources: openspec/specs/ci-job-time/spec.md, AGENTS.md]
    • Chosen: Extend the in-repo job-time check. It reads the runs, files one P0 issue, holds the report one time and makes no request on a dry run.
    • Rejected: Measure by hand over ten releases. A hand measurement holds no bound after the ten runs, and rule 5 asks for a check.
    • Rejected: Wait for the fixes and add no check. No check holds the bound after the fixes, so the same regression returns with no alarm.
  • What shows that the fixes bring the jobs under the bound?: The check prints the mean of each release image job and the time of each run on each daily run of main. Ten release runs after build(docker): build the runner image FROM devtools with no tool install #4361, perf(ci): keep the image build cache in GHCR #6404 and ci(release): push each image once, then verify and tag that digest #6407 merge must show a mean under 300 s and no run over 360 s. The check alarms on the mean only, so a person reads the time of each run. (best practice) [sources: openspec/specs/ci-job-time/spec.md, .github/workflows/release.yml]
    • Chosen: Read the check output on each daily run. The check runs on main and prints the mean and each run time, so each release run adds one measured point.
    • Rejected: Repeat the study of the last 18 runs. A one-off study is a sample and holds no bound after it ends.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4361, #6404, #6407

Activity

  1. added
    type/bug
    scope/ci
    source/agent
    status/new
    on Nov 20, 2026
  2. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P0-Critical. AGENTS.md rule 5 makes any check averaging over 5 min + 1 min tolerance a P0, and two release image jobs exceed that bound.
    • Related: perf(ci): keep the image build cache in GHCR #6404, which asks for a different change. Both address release image build time; #6404 changes the cache to registry while the candidate orders three fixes and verifies the combined mean stays under 300 s.
  3. added
    effort/medium
    value/high
    priority/p0-critical
    on Nov 20, 2026
  4. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.

  5. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  6. devops-cli-service commented on Nov 20, 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 (8)

    Tools considered:

    Searches run:

    • GitHub Actions workflow job duration metrics exporter open source, results: 5
    • tool to track GitHub Actions job run time average alert slow CI jobs, results: 5
    • github-actions-exporter prometheus, results: 5
    • "gh run list" job duration script CI timing regression alert, results: 5
    • open source dashboard for GitHub Actions build times, results: 5
    • cimon buildtime observability github actions, results: 5
    • prometheus exporter for GitHub Actions workflow run durations repository, results: 5
    • github actions metrics exporter github.com repository stars, results: 5

    Sources:

  7. added
    status/ready
    and removed
    status/new
    on Nov 21, 2026
  8. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

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

  9. added
    owner/service
    on Nov 21, 2026
  10. 9 remaining items

  11. added
    status/blocked
    and removed
    status/in-progress
    on Nov 21, 2026
  12. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    implement: retry

  13. added
    status/ready
    and removed
    status/blocked
    on Nov 21, 2026
  14. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    Cleared the stop at group 1 by the rule retry: a person commented implement: retry. The item is Ready again, and the Service takes it in the next round.

  15. removed
    status/ready
    on Nov 22, 2026
  16. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor
  17. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-22 01:30 UTC

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/mediumpriority/p0-criticalscope/cisource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions