Repository navigation
ci: admission counts no more matrix legs than max-parallel runs at once - #12100
Conversation
GitHub lists the matrix legs that max-parallel holds back as queued jobs, but they hold no runner. The admission count read them as live jobs, so a pull-request run at tight width (two Node legs running, six held back) counted eight jobs instead of two, and CI turned runs away while far fewer than ninety jobs ran. Each leg of a matrix with max-parallel now runs a first step that names its limit, and the count takes at most that many live legs of the matrix.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Before | After | Change | |
|---|---|---|---|
| Job-minutes per PR update | 180 | 176.6 | −3.5 |
| Runner pool, runner-minutes a day | 67,168 | 65,878 | −1,290 (−1.9%) |
| Average concurrent jobs | 46.6 | 45.7 | −0.9 |
| Time to green (median → this run) | 50.5 min | — | — |
| Runs a day | 373 | 373 | 0 |
Changed jobs: swizzle-proof changed: standard · test-node changed: standard · test-ui changed: standard
Not measured (the jobs that use these keep their recent minutes above): .github/actions/ci-admission/action.yml, .github/actions/ci-admission/count.mjs, .github/scripts/ci-admission.test.mjs.
Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.
Current run: CI concluded failure; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested: one correction to the description; the code, workflow and tests need no change.
- The "Intended invariant" says
spec:AST-030FR16 and DEC-16 state that a pull-requestpeakcounts each widening matrix at its tight width, but neither does (that rule is the admission action's own contract in.github/actions/ci-admission/action.yml), so cite DEC-16's "Each CI or Main run counts its live jobs" and "holds no runner and counts nothing" for this change and attribute or drop the tight-width sentence.
The Testing command also names .github/scripts/ci-impact.test.mjs, which does not exist; the suite is .github/scripts/lib/ci-impact.test.mjs, and it passes there. The four new tests fail on the base and pass on this head.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claims:
- Held-back legs were counted as live, so a tight-width run counted eight Node legs while two ran: verified (the base count took every queued job;
ci.ymlmax-parallel). test-uiandswizzle-proofwere overcounted the same way: verified (ci.yml:1060,:1589).- The governing record says each run counts the jobs it holds: verified against DEC-16 ("counts its live jobs", "holds no runner and counts nothing").
- The governing record says a pull-request peak counts widening matrices at tight width: false (the finding above).
- Each
max-parallelmatrix runs a first step that names its limit, taken from the strategy: verified (ci.yml:1072,:1262,:1601). - The count caps each such matrix and counts every live leg when no limit is named: verified (
count.mjs:85-110;ci-admission.test.mjs:746). - No ceiling, peak, wait or required-context rule changes: verified.
- The tests cover tight and full widths, several matrices, no limit, legs before their first step, an admission that now fits, and the step contract: verified (
ci-admission.test.mjs:688,:727,:746,:1088). - The CI cost is one short echo step per leg: verified.
- The load measurements (peaks, median and largest held-leg counts): not checkable from the repository.
- The listed test files all pass: verified on this head, apart from the one path that does not exist.
- No public API, product behavior or internal context: verified.
- Held-back legs were counted as live, so a tight-width run counted eight Node legs while two ran: verified (the base count took every queued job;
- Files:
.github/actions/ci-admission/action.yml: clear.github/actions/ci-admission/count.mjs: clear.github/scripts/ci-admission.test.mjs: clear.github/workflows/ci.yml: clear
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
The description now cites spec:AST-030 DEC-16 for this change and attributes the tight-width peak to the admission action's own contract, and its test list names the right files; the code, workflow and tests needed no change. One optional wording point: in DEC-16, "holds no runner and counts nothing" is said of a run not updated in two hours, so "Each CI or Main run counts its live jobs" is the sentence that carries this change.
Claims and files checked
Review mode: incremental; reason: none
Changed rules (0): none
- Claims:
- Legs that max-parallel holds back were counted as live, so a tight-width run counted eight Node legs while two ran: verified (the base count took every queued job; this pull request's own CI run lists two running and six queued Node legs).
- The UI shards and the swizzle proof were overcounted the same way: verified (their max-parallel settings in the CI workflow).
- The load measurements (peaks, median and largest held-leg counts): consistent with the code; they are run data the repository does not hold.
- The governing decision says each CI or Main run counts its live jobs: verified, an exact quote.
- It says that what holds no runner counts nothing: the words are exact but describe a stale run (the optional wording point above).
- The admission action's own contract counts each widening matrix at its tight width in its peak: verified (the action's header and its peak input).
- Each max-parallel matrix runs a first step named from its own limit: verified in all three matrices.
- The count caps each such matrix, and a matrix whose legs name no limit counts every live leg: verified in the count and its tests.
- No ceiling, peak, wait or required-context rule changes: verified.
- The tests cover tight and full widths, several matrices, no limit, legs before their first step, an admission that now fits, and the step contract: verified; the four new tests fail on the base and pass on this head.
- The CI cost is one short echo step per leg: verified.
- The listed test files all pass: verified on this head.
- No public API, product behavior or internal context: verified.
- Files:
.github/actions/ci-admission/action.yml: clear.github/actions/ci-admission/count.mjs: clear.github/scripts/ci-admission.test.mjs: clear.github/workflows/ci.yml: clear
…gs than its limit
|
/approve-spec 8681169 |
There was a problem hiding this comment.
Changes requested: one fix so the workflow and an existing CI test agree; the count change itself conforms to the CI spec, and the DEC-16 sentence is owner-approved at this head.
- Found by CI: the new first step of
test-node(.github/workflows/ci.yml:1262) breaksscripts/vitest-node-legs.test.mjs:145, which requires the budget stop step to come first, so the requiredtest-nodelegs and thetestcheck fail on this head; assert the stop step right after the new step there (or look it up by name) and update the comment atci.yml:1247-1248.
Optional: the new DEC-16 sentence and the action header say a max-parallel matrix counts at most that many live legs, but the count caps it only once a running leg reports its limit, so naming that fallback would match count.mjs. The description's second DEC-16 quote ("holds no runner ... counts nothing") is said of a stale run, not of a held-back leg.
Claims and files checked
Review mode: full; reason: spec-record
- Claims:
- Legs that max-parallel holds back were counted as live, so a tight-width run counted eight Node legs while two ran: verified (the old count took every queued job; the new admission test fits a run that the old count turned away).
- The UI shards and the swizzle proof were overcounted the same way: verified (their max-parallel settings in the CI workflow).
- The load measurements (peaks, held-leg counts, small-workflow jumps, the waiting main check's count): run data the repository does not hold; consistent with the code.
- The governing decision says each CI or Main run counts its live jobs: verified, an exact quote.
- It says that what holds no runner counts nothing: the words are exact but describe a stale run.
- The admission action's own contract counts each widening matrix at its tight width in its peak: verified (the action's header and its peak input).
- Each max-parallel matrix runs a first step named from its own limit, so it matches the width admission picked: verified in all three matrices and in this head's CI run (two for the UI shards, eight for the Node legs at full width).
- The count caps each such matrix, and a matrix whose legs name no limit counts every live leg: verified in the count and its tests.
- The CI spec's decision now says so in one sentence: verified.
- No ceiling, peak, wait or required-context rule changes: verified; the required test check fails for the reason above.
- The tests cover tight and full widths, several matrices, no limit, legs before their first step, an admission that now fits, and the step contract: verified; the four new tests fail on the base and pass on this head.
- The CI cost is one short echo step per leg: verified.
- The listed test files all pass: verified on this head; the list leaves out the Node leg plan test, which fails.
- No public API, product behavior or internal context; the writing rubric finds no narration or status in the record edit: verified.
- Files:
.github/actions/ci-admission/action.yml: optional wording (the fallback).github/actions/ci-admission/count.mjs: clear.github/scripts/ci-admission.test.mjs: clear.github/workflows/ci.yml: blocking (the new first step oftest-nodebreaks the Node leg plan test; stale comment at 1247-1248)docs/specs/AST-030/spec.md: optional wording (the fallback)
| matrix that limits its legs with `max-parallel` counts at most that many of | ||
| its live legs, since GitHub lists the legs it holds back as queued but they | ||
| hold no runner; a pull-request run still waiting counts the jobs it runs, the job that waits, a |
There was a problem hiding this comment.
Optional: liveJobs caps a matrix only once one of its live legs reports its limit (count.mjs:88-95); before that it counts every live leg (ci-admission.test.mjs:746-751). Wording that matches: "a matrix whose running legs report their max-parallel counts at most that many of its live legs". The same applies to the header at .github/actions/ci-admission/action.yml:40-42.
|
/approve-spec 8876338 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
The admission count change conforms to the CI spec's DEC-16, the DEC-16 sentence is owner-approved at this head, and the Node leg plan test now agrees with the new first step of test-node.
Optional: the new DEC-16 sentence says a max-parallel matrix counts at most that many live legs, but the count caps it only once a running leg reports its limit; naming that fallback, as the action header now does, would match count.mjs.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claims:
- Pull-request runs wait their full time and stop with "CI is full" while far fewer than ninety jobs run: the twelve-minute wait and the message are verified in the admission action; the load figures are run data the repository does not hold.
- Legs that
max-parallelholds back were counted as live, so a tight-width run counted eight Node legs while two ran: verified (the old count took every queued job; the new tests count two). - The UI shards and the swizzle proof were overcounted the same way: verified (their
max-parallelsettings in the CI workflow). - The governing decision says each CI or Main run counts its live jobs: verified, an exact quote.
- The admission action's own contract counts each widening matrix at its tight width in its peak: verified (the action header and its peak input).
- A matrix counts every live leg until one of its running legs names its limit: verified in the count and its tests.
- Each
max-parallelmatrix runs a first step named from its own limit, so it matches the width admission picked: verified in all three matrices and in the previous head's CI run (two for the UI shards, eight for the Node legs at full width). - The count caps each such matrix, and a matrix whose legs name no limit counts every live leg, as before: verified.
- The CI spec's decision says so in one sentence: verified.
- No ceiling, peak, wait or required-context rule changes: verified.
- The load measurements (a waiting main check's 37 to 38 jobs, small-workflow jumps of 15 to 18, held legs adding 12 jobs at the median and 34 at most): run data the repository does not hold; the 18-job reserve is verified in the count.
- The tests cover tight and full widths, several matrices, no limit, legs before their first step, an admission that now fits, and the step contract: verified.
- The CI cost is one short
echostep per leg: verified. - The listed test files all pass: verified on this head; the Node leg plan test, not listed, passes too.
- No public API, product behavior or internal context, and the writing rubric finds no narration or status in the record edit: verified.
- Files:
.github/actions/ci-admission/action.yml: clear.github/actions/ci-admission/count.mjs: clear.github/scripts/ci-admission.test.mjs: clear.github/workflows/ci.yml: cleardocs/specs/AST-030/spec.md: optional wording (the fallback)scripts/vitest-node-legs.test.mjs: clear
Maintainer impact
Pull-request runs wait their full twelve minutes and then stop with "CI is full" while CI runs far fewer than ninety jobs. Over a recent three-hour window, the jobs that held a runner peaked at about seventy and sat near thirty most of the time, yet the admission count read between ninety and one hundred thirty at each turn-away. A large part of the gap is matrix legs that
max-parallelholds back: GitHub lists them as queued jobs, but they hold no runner, and the count read every one as live. A run at tight width (two Node legs running, six held back) counted eight jobs for its Node legs instead of two.test-ui(two of four at once) andswizzle-proofat tight width did the same.Intended invariant
spec:AST-030DEC-16: "Each CI or Main run counts its live jobs". A leg thatmax-parallelholds back holds no runner, so it is not a live job of the run. The admission action's own contract (.github/actions/ci-admission/action.yml) counts each widening matrix at its tight width inpeak, which matches. A matrix counts every live leg until one of its running legs names its limit.Change
max-parallel(test-ui,test-node,swizzle-proof) runs a first step namedRun at most ${{ strategy.max-parallel }} legs at once. The limit comes from the strategy itself, so the step always matches the width admission picked or the fixed limit.count.mjsliveJobscounts at most that many live legs of each such matrix. A matrix whose running legs name no limit (nomax-parallel, or no leg past its first step yet) counts every live leg, as before.spec:AST-030DEC-16 says so in one sentence, after "Each CI or Main run counts its live jobs:".Evidence
test-nodelegs and 6 queued legs with no runner, and the count reported it as holding all of them. Held legs added 12 jobs to the count at the median and up to 34 at the most.ci-admission.test.mjscovers the count (tight and full widths, several matrices, a matrix with no limit, legs before their first step) and an admission that now fits beside a tight-width run. A contract test requires the step first in every leg of each matrix withmax-parallel.echostep (under a second each, same runners). Runner-minutes per run do not change. Admission frees up to the held legs' count per run at tight width, so waiting runs start sooner and fewer stop with "CI is full".Scope
Components: CI admission
Testing
pnpm exec vitest run --project node .github/scripts/ci-admission.test.mjs .github/scripts/ci-admission-count.test.mjs .github/scripts/ci-free-runners.test.mjs .github/scripts/ci-test-routing.test.mjs .github/scripts/ci-swizzle-proof.test.mjs .github/scripts/ci-run-scripts-parse.test.mjs .github/scripts/ci-actionlint.test.mjs .github/scripts/ci-heavy-deferral.test.mjs .github/scripts/ci-test-join.test.mjs .github/scripts/ci-node-leg-bounds.test.mjs .github/scripts/ci-duration-guard.test.mjs .github/scripts/ci-checkout-timeout.test.mjs .github/scripts/ci-pr-gate.test.mjs .github/scripts/lib/ci-impact.test.mjs .github/scripts/workflow-paths.test.mjs: all pass.Writing rubric results
R1 narration: none; the added sentence states how the count treats a held-back leg, in the present tense.
R2 research: none in the record; the load measurements stay in this description.
R3 evidence: none changed.
R4 rejected alternatives: none added.
R5 change references: none.
R6 open questions: none.
R7 project status: none.