Repository navigation
Description
Problem or Motivation
The Design Tokens job of ci.yml tests its paths in a step with dorny/paths-filter, so it takes a runner on each push to a pull request, also when no design file changed. #4653 moved four checks of the same form (Rule Pack Tests, Docs Site Build, Image Pins and Third-Party Image Scan) into workflows of their own with the native on.pull_request.paths filter. Design Tokens came with #4738, after the audit that measured the four, so it still has the step filter. It is not a required check. The account runs at most 20 hosted jobs at one time, so each job that does no work makes the queue of each pull request longer.
Proposed Solution & Architectural Design
- Move the job
design-tokensinto.github/workflows/design-tokens.ymlwithon.pull_request.pathsequal to its current filter, with the workflow file in place of.github/workflows/ci.yml. Keep the job name and its limits. - Remove the
dorny/paths-filterstep, the step conditions andpull-requests: read. - Change
test_the_design_tokens_job_builds_the_tokens_only_when_a_path_of_its_filter_changesandJOB_LIMIT_MINUTESintests/invariants/test_workflow_contracts.py, the parity allowlist intests/commands/test_ci.py, and the section ofdocs/SDLC.md. Add the workflow toPATH_CHECKSof the contract tests.
Target Subsystem
SDLC, Git & PR Governance (.github/workflows/, tests/invariants/test_workflow_contracts.py, tests/commands/test_ci.py, docs/SDLC.md).
Existing Tool Considered
The native on.pull_request.paths filter of GitHub Actions, as #4653 uses. No new tool. Cost: about 25,000 tokens and 1 hour.
Acceptance Criteria
- A pull request that changes no path of the filter starts no
Design Tokensjob. - The check keeps its name
Design Tokens. - A change to
ci.ymlalone does not start it.
Dependencies
#4653 (the PATH_CHECKS table and the SDLC rule).
Source: #4653
Alternatives check of 2026-11-15: not-applicable.
Class: perf, no search.
Tool: none found.
Proposed design
Problem statement
The Design Tokens job of .github/workflows/ci.yml tests its paths in a step with dorny/paths-filter. The job therefore takes a runner on each push to a pull request, also when no design file changed. The account runs at most 20 hosted jobs at one time, so each job that does no work makes the queue of each pull request longer. The change moves the job into .github/workflows/design-tokens.yml and uses the native on.pull_request.paths filter, as #4653 does for four other checks. The job keeps its name, and the step filter, its step conditions and its pull-requests: read permission go.
Acceptance criteria
Requirement: The design-tokens job runs from its own workflow
The design-tokens job SHALL run from .github/workflows/design-tokens.yml, and the check SHALL keep the name Design Tokens.
Scenario: The new workflow holds the job
- WHEN the contract test reads
.github/workflows/design-tokens.yml - THEN it finds one job
design-tokenswhosenameisDesign Tokens.
Requirement: The native paths filter replaces the step filter
The new workflow SHALL start on pull_request only for the paths of the current filter, and it SHALL hold no dorny/paths-filter step.
Scenario: No step filter remains
- WHEN the contract test reads the
on.pull_request.pathslist and the steps of.github/workflows/design-tokens.yml - THEN the list holds at least one entry and no step uses
dorny/paths-filter.
Requirement: The workflow file replaces ci.yml in the filter
The paths filter SHALL list .github/workflows/design-tokens.yml in place of .github/workflows/ci.yml.
Scenario: A change to ci.yml alone starts no check
- WHEN the contract test reads the
pathslist of.github/workflows/design-tokens.yml - THEN the list holds
.github/workflows/design-tokens.ymland does not hold.github/workflows/ci.yml.
Requirement: The job keeps its runner and its limit
The JOB_LIMIT_MINUTES table SHALL name .github/workflows/design-tokens.yml for the job design-tokens with the same limit, and the job SHALL keep runs-on: ubuntu-26.04.
Scenario: The limit table names the new file
- WHEN the contract test reads
JOB_LIMIT_MINUTESattests/invariants/test_workflow_contracts.py:55and the job of the new workflow - THEN the entry for
design-tokensnames the new file with the limit ofci.yml, andruns-onisubuntu-26.04.
Requirement: The old job leaves ci.yml
.github/workflows/ci.yml SHALL hold no design-tokens job.
Scenario: The job is removed from ci.yml
- WHEN the contract test reads the
jobsmap of.github/workflows/ci.yml - THEN the map holds no key
design-tokens.
Requirement: The new workflow asks only for contents
The new workflow SHALL ask for contents: read and MUST NOT ask for pull-requests: read.
Scenario: The pull request read permission is gone
- WHEN the contract test reads the
permissionsof.github/workflows/design-tokens.yml - THEN
contentsisreadand no keypull-requestsis present.
Requirement: A new push cancels the run before it
The new workflow SHALL cancel the run of an older push to the same pull request.
Scenario: The concurrency block cancels in progress
- WHEN the contract test reads the
concurrencyblock of.github/workflows/design-tokens.yml - THEN
cancel-in-progressistrueand the group holdsgithub.workflowandgithub.ref.
Requirement: The contract test reads the new workflow
test_the_design_tokens_job_builds_the_tokens_only_when_a_path_of_its_filter_changes SHALL read the filter from .github/workflows/design-tokens.yml.
Scenario: The updated test reads the paths list
- WHEN the test at
tests/invariants/test_workflow_contracts.py:1927runs - THEN it reads
on.pull_request.pathsof the new workflow and asserts that no step filter remains.
Requirement: The path checks cover the new workflow
PATH_CHECKS SHALL list .github/workflows/design-tokens.yml.
Scenario: The new workflow is in the path checks
- WHEN the contract test reads
PATH_CHECKSattests/invariants/test_workflow_contracts.py:1636 - THEN the table holds
.github/workflows/design-tokens.yml.
Requirement: The CI parity allowlist names the new workflow
The parity allowlist in tests/commands/test_ci.py SHALL name .github/workflows/design-tokens.yml in place of the design-tokens job of ci.yml.
Scenario: The allowlist names the new workflow
- WHEN the tests of
tests/commands/test_ci.pyread the allowlist - THEN it holds
.github/workflows/design-tokens.ymland no entry for adesign-tokensjob of.github/workflows/ci.yml.
Requirement: The SDLC document names the new workflow
The list of path-filtered workflows in docs/SDLC.md SHALL name .github/workflows/design-tokens.yml.
Scenario: The document lists the new workflow
- WHEN a test that reads
docs/SDLC.mdreads its list of path-filtered workflows - THEN the list holds
.github/workflows/design-tokens.ymland nodesign-tokensjob of.github/workflows/ci.yml.
Existing Tool Considered
Use the native on.pull_request.paths filter of GitHub Actions, as #4653 uses. The change builds no code and keeps no new tool. The alternatives check of 2026-11-15 gave not-applicable for class perf, made no search and found no tool. The native filter lacks negative patterns, content predicates and a per-job scope: it starts or skips the whole workflow only. The body estimates about 25,000 tokens and 1 hour for the move.
Key questions
- Which filter starts the
Design Tokenscheck after the move?: The nativeon.pull_request.pathsfilter, with the entries of the currentdesign-tokensfilter, and with.github/workflows/design-tokens.ymlin place of.github/workflows/ci.yml. (best practice) [sources: .github/workflows/ci.yml, tests/invariants/test_workflow_contracts.py:1927]- Chosen: native
on.pull_request.paths. GitHub reads the changed files before it starts the workflow, so a pull request that changes no listed path takes no runner. - Rejected: keep the
dorny/paths-filterstep inci.yml. The job takes a runner before the step reads the paths, which is the cost that the item removes. - Rejected: a
dorny/paths-filterstep in the new workflow. The workflow still starts a runner for each pull request, so the queue stays long.
- Chosen: native
- Is
Design Tokensa required check of themainruleset?: No. ADR 0004 namesStatic Analysis,Tests & CoverageandSemantic PR titleas the required checks, so the move changes no ruleset. [sources: docs/adr/0004-ci-is-the-authoritative-gate.md] - Does this item need perf(ci): move the four path checks into filtered workflows #4653 done first?: No.
PATH_CHECKSexists attests/invariants/test_workflow_contracts.py:1636at this commit, so perf(ci): move the four path checks into filtered workflows #4653 is in place and the item adds one entry to that table. [sources: tests/invariants/test_workflow_contracts.py:1636] - Which permissions does the new workflow ask for?:
contents: readonly. The permissionpull-requests: readserves thedorny/paths-filterstep, which the move removes. (best practice) [sources: .github/workflows/ci.yml]- Chosen:
contents: readonly. No step reads the pull request API, and a permission that no step uses widens the token of the job. - Rejected: keep
pull-requests: read. It serves no step after the move.
- Chosen:
- Does a new push to a pull request cancel the run before it?: Yes. The new workflow sets a
concurrencygroup that holdsgithub.workflowandgithub.ref, withcancel-in-progress: true, asci.ymldoes. (best practice) [sources: .github/workflows/ci.yml]- Chosen: copy the concurrency block of
ci.yml. The run of an older push stops, so one pull request holds one run of the check. - Rejected: no concurrency block. Each push queues a full run, which makes the queue longer.
- Chosen: copy the concurrency block of
- Which events start the new workflow?:
pull_requestonly, with the paths filter, as the body proposes. (best practice) [sources: .github/workflows/ci.yml]- Chosen:
pull_requestwithpaths. The body gives this form, and the check reads the changed files of a pull request. - Rejected:
pull_requestandpushtomain. The body scopes the item to the pull request trigger. - Rejected: keep the step filter. The runner cost stays.
- Chosen:
- Does the job keep its name, its runner and its limit?: Yes. The job keeps the name
Design Tokens, the runnerubuntu-26.04and the limit thatJOB_LIMIT_MINUTESrecords, and that table names the new file. (best practice) [sources: tests/invariants/test_workflow_contracts.py:55]- Chosen: keep the name, the runner and the limit. The name shows on each pull request and the limit table already bounds the job; a rename delivers no result.
- Rejected: rename the check. It changes what a person reads on each pull request and breaks the parity allowlist for no gain.
- Which part of
docs/SDLC.mdchanges?: The list of path-filtered workflows that perf(ci): move the four path checks into filtered workflows #4653 added. It names.github/workflows/design-tokens.ymland drops thedesign-tokensjob from.github/workflows/ci.yml. (best practice) [sources: docs/SDLC.md]- Chosen: update the list of path-filtered workflows. The rule of perf(ci): move the four path checks into filtered workflows #4653 names each such workflow, so the new one joins the list.
- Rejected: leave the document as it is. The list would name a job of
ci.ymlthat no longer exists.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
perfprefix of the title gives the type.(ci)scope of the title gives the scope.It saves runner-minutes and shortens queue time but does not block a release or fix a defect.It removes one idle runner per PR push and shortens the queue for all PRs.The body states about 25,000 tokens and 1 hour to move one job and update four test files.Both reduce unnecessary CI runs, but #4637 targets release PRs while this targets the Design Tokens job on any PR.devops-cli-service commentedon Nov 15, 2026
Alternatives check: not-applicable
Class: perf. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 16, 2026
Status set to Ready at fccb781 (see proposed design in issue body).