Repository navigation
Description
Problem Description
The check DevContainer Image averages more than the limit of AGENTS.md rule 5, which is 5 minutes and 1 minute of tolerance (360 s). The last 10 successful pull request runs of 2026-11-30 gave job times of 334 s to 487 s, with a mean of 417 s. The step Build and Push DevContainer Image by Digest took 175 s to 298 s of each job. The scenario "A pull request run of the DevContainer Image job" of openspec/specs/ci-devcontainer-image/spec.md says that the job ends in less than 6 minutes. devops ci job-time does not read this job, so it files no alarm.
Reproduction Steps
- List the runs:
uv run devops gh api 'repos/{owner}/{repo}/actions/workflows/devcontainer-image.yml/runs?per_page=100&status=success&event=pull_request' --jq '.workflow_runs[0:10][].id'. - For each run, read
started_at,completed_atand the steps of the jobDevContainer Image:uv run devops gh api 'repos/{owner}/{repo}/actions/runs/<run_id>/jobs'. - The job runs 46526029818, 46525928087, 46505068310, 46504914573, 46483185314, 46482917587, 46469232216, 46460648922, 46460607804 and 46438705676 took 456, 441, 423, 334, 487, 405, 424, 423, 437 and 338 s.
Expected vs Actual Behavior
Expected: the job averages at most 360 s over its last runs.
Actual: the job averages 417 s.
Proposed Solution
Measure the build step of .github/actions/devcontainer-image and cut its time, for example the time that goes to the layers that the registry cache does not give. Do not raise the limit and do not remove the check.
Acceptance Criteria
- The job
DevContainer Imageaverages at most 360 s over 10 successful pull request runs. uv run devops ci --check --only actionlint,zizmorpasses.
Source
Source: #7966
Alternatives check of 2026-11-30: partly.
Tool: github_actions_exporter (https://github.com/cpanato/github_actions_exporter), Apache-2.0, last activity 2026-11-30, maintained.
Reason: Searches found GitHub Actions Prometheus exporters: cpanato/github_actions_exporter reports per-job durations by job name, but it files no roadmap issue and cuts no build time.
Covers:
- Per-job duration histograms labelled with workflow and job name
- Job status counts and queue time from GitHub webhook events
- Prometheus metrics that an alert rule can read
Lacks:
- No roadmap issue with priority P0
- No per-step timing of the build step
- No cut of the registry cache misses or build time
- Needs a webhook endpoint and a Prometheus stack
Proposed design
Problem statement
The DevContainer Image job averages 417 s over its last 10 successful pull request runs. The limit of AGENTS.md rule 5 is 360 s. devops ci job-time does not read this job, so no alarm records the breach. This change adds the job to that check over the pull request runs and keeps the limit at 360 s. The cut of the build time is a separate issue.
Acceptance criteria
Requirement: The check reads the DevContainer Image job
devops ci job-time SHALL read the DevContainer Image job of .github/workflows/devcontainer-image.yml over its last 10 completed pull request runs.
Scenario: The 10 runs of the issue
- WHEN a person runs
uv run pytest tests/github/test_ci_job_time.py -qwith the 10 runs of the issue routed - THEN the suite passes and the report shows the job
DevContainer Image, 10 runs and a mean of 416.8 s
Requirement: The read asks for pull request runs and no branch
The read of the DevContainer Image job SHALL ask GitHub for the runs with event=pull_request and SHALL send no branch parameter.
Scenario: The request URL of the job runs
- WHEN a person runs
uv run pytest tests/github/test_ci_job_time.py -q - THEN the suite passes and the requested URL holds
event=pull_requestand nobranchparameter
Requirement: A mean over the limit files one P0 issue
The check SHALL send one issue request with the label priority/P0 when the mean of the last 10 completed pull request runs of DevContainer Image is more than 360 s.
Scenario: The mean is 416.8 s
- WHEN a person runs
uv run pytest tests/github/test_ci_job_time.py -qwith the 10 runs of the issue routed - THEN the suite passes and shows one issue request that names
DevContainer Imageand holds the labelpriority/P0
Requirement: A mean at or under the limit files no issue
The check SHALL send no issue request when the mean of the last 10 completed pull request runs of DevContainer Image is at most 360 s.
Scenario: The mean is 360 s
- WHEN a person runs
uv run pytest tests/github/test_ci_job_time.py -qwith 10 routed runs of 360 s - THEN the suite passes and shows no issue request
Requirement: Pending a person after the merge
After the merge, the check SHALL file one issue with the label priority/P0 for the breach of the DevContainer Image job on its next run on main.
Scenario: The first run on main after the merge
- WHEN a person reads the issues after the next run of the job-time check on main
- THEN one open issue holds the label
priority/P0, namesDevContainer Imageand shows the mean of its last 10 completed pull request runs
Existing Tool Considered
The alternatives check of 2026-11-30 in the issue body gives the verdict partly for github_actions_exporter (https://github.com/cpanato/github_actions_exporter). The block in the issue body lists what the tool covers and lacks. The tool lacks a roadmap issue with priority P0 and needs a webhook endpoint and a Prometheus stack. This change adds the job to the check devops ci job-time, which already files one P0 issue and runs in the existing workflow. Cost: one job entry, one event parameter, five test cases and one spec delta, about 150 lines and under 2 hours.
Key questions
- Which job and which runs does the check read for the DevContainer Image workflow?: It reads the job
DevContainer Imageof.github/workflows/devcontainer-image.yml, over the last 10 completed runs with eventpull_requestand no branch filter. It uses thestarted_atandcompleted_atof each job. [sources: openspec/specs/ci-devcontainer-image/spec.md, openspec/specs/ci-job-time/spec.md, tests/github/test_ci_job_time.py, .github/workflows/devcontainer-image.yml] - What limit applies to the DevContainer Image job?: 360 s: 5 minutes plus the 1 minute tolerance of AGENTS.md rule 5. The scenario of the job in the spec also requires less than 6 minutes. [sources: AGENTS.md, openspec/specs/ci-devcontainer-image/spec.md]
- Which event does the read ask for?:
pull_request, with no branch. The workflow has nopushtrigger, so a read of push runs is always short and the check always fails. (best practice) [sources: .github/workflows/devcontainer-image.yml, tests/github/test_ci_job_time.py, openspec/specs/ci-job-time/spec.md]- Chosen: Add
event=pull_requestto the job entry and to the read, with no branch. The workflow runs on pull requests, and the 10 runs of the issue are pull request runs. - Rejected: Read the push runs of the workflow. The workflow has no
pushtrigger, so the read is always short and the check always fails. - Rejected: Read the scheduled runs of the workflow. The schedule runs one time each day, so 10 runs take 10 days.
- Chosen: Add
- Does the check count a failed DevContainer Image job?: Yes. The conclusion of the job counts, as the spec requires for each job. The 10 runs of the issue are all successful, so their mean is 416.8 s. (best practice) [sources: openspec/specs/ci-job-time/spec.md, tests/github/test_ci_job_time.py]
- Chosen: Count each job that ran to an end. The spec says the conclusion of the job counts, not the conclusion of the run.
- Rejected: Read only the successful runs. It departs from the rule of the spec for one job, and a failed job is a real sample.
- Does the change raise the limit or remove the check?: No. The check keeps the limit of 360 s and reads the job. The body forbids a higher limit and the removal of the check. (best practice) [sources: AGENTS.md, openspec/specs/ci-devcontainer-image/spec.md]
- Chosen: Keep the limit of 360 s and add the job. The body forbids a threshold change, and rule 5 makes the breach a P0 bug.
- Rejected: Raise the limit to 480 s. The body and AGENTS.md rule 5 forbid it without the owner.
- Rejected: Remove the check. The body forbids it, and the check proves that the image builds and starts.
- Does this change cut the build time?: No. The cut is deferred. No record names the layers that miss the registry cache, and only live pull request runs show the new mean. (best practice) [sources: openspec/specs/ci-devcontainer-image/spec.md, .github/actions/devcontainer-image/action.yml, .github/workflows/devcontainer-image.yml]
- Chosen: Add the alarm now and defer the cut. The alarm records the breach now, and the cut needs the live measurement of each step.
- Rejected: Cut the build time in this pull request. No record names the uncached layers, and no offline test shows the new mean.
- Does the alternatives check change the plan?: No. The verdict is
partly. The tool reports per-job durations but files no roadmap issue and needs a webhook endpoint and a Prometheus stack. The project keeps its own check. (best practice) [sources: openspec/specs/ci-job-time/spec.md]- Chosen: Keep the item with
devops ci job-time. The check files one P0 issue and needs no new service or endpoint. - Rejected: Adopt
github_actions_exporter. It files no roadmap issue and needs a webhook endpoint and a Prometheus stack.
- Chosen: Keep the item with
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 30, 2026
AGENTS.md rule 5 makes a check averaging over 360 s a P0 bug, and the slow job degrades CI for every pull request.Both bring a CI image job under the 360 s limit, but #7205 fixes the Runner Image job while this candidate fixes the DevContainer Image job.devops-cli-service commentedon Nov 30, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Dec 1, 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)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Dec 1, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
devops-cli-service commentedon Dec 1, 2026
Plan state: branch
fix/7970-devcontainer-image-averages-over-the-360, draft pull request #7997. The pull request plans the item and closes no issue. The stage job and the step fix-plan edit this comment, and a comment of each run tells what the run did.The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:
16 remaining items
devops-cli-service commentedon Dec 1, 2026
Stopped at fix.
Failed check:
pre-push. The end of its log:Failure class:
no_change_in_fix.Action taken: none.
Action left:
wait: wait for a person.pytest on base: tests/github/test_ci_job_time.pypre-pushReason:
Last message of the agent (a claim that no check verified): The
pre-pushcheck still fails here, and I changed nothing. Hold the item for a retry on a runner with more than one CPU, or for a person to change the 40 s limit. This is not a defect in the diff. - What fails: the hookdevops-ci-pre-pushrunstimeout 40 uv run devops ci --check --only lint,format,constructs,swallowed-failures,deps,uv-check,domain.timeoutstops the three slowest rows at 40 s, so the hook exits 124. - Why: the runner has 1 CPU,nprocreturns 1, and the seven rows run at once on it. In the hook command,format,lintanddepspass at 6 s, 20 s and 28 s.uv-check,constructsandswallowed-failuresare cut at 39 s. - The checks pass without the limit: each of the six rows passes when it runs alone or withouttimeout 40.uv-checktakes 9 s,constructs15 s andswallowed-failures13 s. The full set passes in 1 m 10 s without the limit. - Diff:ruff checkandruff format --checkpass onsrcandtests. The diff changes no Python path that these rows read in a way that would slow them. I did not run the same command onorigin/main, so I did not prove it fails there too. I did not raise the limit in.pre-commit-config.yaml. The comment there says the stage must add up to less than the 120 s agent-shell limit. That change is a threshold change for the owner.The item is Blocked, and the job will not run it. Fix the cause. Then comment
implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.The push of the commits that passed failed too.
The patch is refused:
.github/workflows/devcontainer-image.ymlis a workflow file that the plan does not namefix(roadmap): give small runner Jobs 2 CPUs (#8007)
docs(spec): plan #7970 Add the DevContainer Image job to job-time
fix(ci): read the DevContainer Image job in job-time
devops-cli-service commentedon Dec 1, 2026
Released in v0.270.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.270.1
devops-cli-service commentedon Dec 1, 2026
Live since 2026-12-01 16:44 UTC