Skip to content

t1k:ci-speed

FieldValue
Modulet1k-devops
Version4.1.3
Effortmedium
Tools—

Keywords: ci audit, ci too slow, ci-speed, critical path, flaky test, fold jobs, github actions speed, longest-first, lpt scheduling, micro-jobs, post-merge only, runner minutes, runner mix, slow ci, step count, test sharding, wall-to-green

/t1k:ci-speed
measure | audit | critical-path | flake

CI Speed — Cut GitHub Actions Wall-to-Green

Section titled “CI Speed — Cut GitHub Actions Wall-to-Green”

Turns “CI is slow” into a measured critical path and a short list of levers. Every lever here was measured on The1Studio/theonekit-core (2026-09-29): PR wall-to-green went from 30–90 min to a ~5 min median (n=15).

Apply when: a PR takes too long to go green, a workflow is being added or reviewed for cost, or a check is flaky. Trigger/runner authoring rules stay in modules/t1k-devops/rules/ci-cd-trigger-design.md; this skill is the speed workflow on top of them.

IntentPath
“CI is slow” — no numbers yetMeasure first → references/measuring-wall-to-green.md
“Which job do I fix?”Critical path, not total
“Review this repo’s workflows for speed”references/audit-checklist.md — heaviest-first
“Windows/macOS leg dominates” / “too many jobs” / “long tail after the last step”references/workflow-levers.md
“The test job is the critical path”references/test-suite-speed.md
“A check is flaky”references/test-suite-speed.md § Flakes — never rerun hoping
“Red after I fixed the workflow” / “release step 403s” / “old base”Gotchas
  1. Wall-to-green = last push of the head SHA → last check run completed on it. Not the duration of one workflow, not the sum of jobs.
  2. Per-job and per-step durations from the jobs of the run: bun "$G" get repos/<o>/<r>/actions/runs/<id>/jobs --group g3 (per-step started_at / completed_at; $G and its exit codes: skills/t1k-git/references/gh-status-lookup.md). The proxy projection omits runner_name and labels; read those with the direct gh api form in references/measuring-wall-to-green.md § 3.
  3. Always report n and the runner. On a mixed self-hosted pool the SAME step took ~90 s on server runners (label cicd) and 140–340 s on donor desktops; a “PR vs main” gap was really runner mix. One run is an anecdote.

Exact commands: references/measuring-wall-to-green.md.

Find the ONE job every required check waits on — the latest completed_at among required checks. Shaving any other job is noise for wall-to-green (it still saves runner minutes, which is the audit’s axis, not this one). Re-measure after each lever; the critical path moves.

LeverTypical winDetail
Slow platform leg (Windows ~800–1150 s) → post-merge only, PR-side no-op matrix entry keeps the check name reporting, plus a “failing on main” auto-issue jobLargest single cutreferences/workflow-levers.md §1
Trigger hygiene — pull_request: branches:[main] + push to main only; no paths: on required checks, decide relevance in a changes jobRemoves duplicate/blocked runs§2
Fold micro-jobs (each pays ~20–60 s pickup + checkout + setup) into one job with per-step if: !cancelled() && steps.setup.outcome == 'success'~minutes on fan-in§3
Cut step count (~1 s/step log upload tail) with a manifest-driven runner119 → 9 steps§4
Test suite: longest-first scheduling, shard the giant file, parallel syntax loopsCritical-path test jobreferences/test-suite-speed.md

Runner pinning is a queueing trade-off, not a free win. Pinning to cicd removes donor-desktop variance but contends for ~6 shared org runners; theonekit-core’s owner chose NOT to pin. Present both numbers and let the owner decide. Credential/Docker jobs are not a choice: they pin cicd (runner policy: docs/ci-cd-trigger-design.md § “Rule 9”).

Mostly judgment — which job is the critical path, which lever pays, whether a pin’s queueing cost is acceptable — so it runs in t1k-devops-engineer (or inline). Routing SSOT: docs/orchestration-rules.md § “Task-Type → Agent Routing”.

StepAgent
Pull per-job/step durations and runner names for N runs, tabulatet1k-metrics-reporter
Wait for a re-measure run to settlet1k-ci-watcher
Pick the critical path and lever; edit workflowst1k-devops-engineer (not cheap)
Root-cause a flaket1k-debugger (not cheap)
  • references/measuring-wall-to-green.md — commands for wall-to-green, per-job/step, runner mix, baseline hygiene, infra faults, API budget
  • references/workflow-levers.md — post-merge legs, trigger hygiene, job folding, step count
  • references/test-suite-speed.md — LPT scheduling, sharding, parallel loops, pool sizing, flakes
  • references/sharding-recipe.md — shard partition + aggregator check, selector leak, wall-to-green with queue, CPU quota, commit scopes
  • references/audit-checklist.md — reviewing any repo’s workflows, heaviest-first