Skip to content

ci: run analysis and Studio work in parallel jobs - #2430

Merged
rdimitrov merged 2 commits into
mainfrom
claude/festive-mclean-7dc29f
Oct 20, 2026
Merged

rdimitrov merged 2 commits into
mainfrom
claude/festive-mclean-7dc29f

Conversation

@rdimitrov

@rdimitrov rdimitrov commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Cuts CI wall-clock from 14.4 min to 8.7 min by running independent work in parallel jobs instead of in sequence inside the two longest jobs.

  • Analysis now holds only the root golangci-lint and workflow checks.
    • The nested-module lint passes move to Analysis (module lint). It is one job, not a matrix: each pass takes under a minute, so a matrix would mostly add runner setup.
    • The action-script tests move to Test GitHub Actions scripts.
  • Mecatl Studio (apps/) keeps install, checks, Vitest, and the integration test.
    • The Playwright journeys move to Mecatl Studio browser journeys, one runner per project (chromium-desktop, chromium-mobile). The suite runs on a single worker, so sharding by project halves its time.
    • The image build, runtime check, and scan stay in the Studio job. A separate job would repeat the Node and Go setup and the mecated build for no wall-clock gain.
    • task studio:browser now forwards CLI args to Playwright.
  • Aggregators. Lint now needs every analysis job and checks each result exactly: skipped for docs-only and non-Go changes, success otherwise. A new Mecatl Studio (gate) does the same for the two Studio jobs. Studio had no aggregator before. relevant-changes-workflow_test.sh pins both gates and the new jobs' if: conditions; I checked by mutation that dropping a job from either gate fails the test.

Which action-script test was slow

microvm-ci-release_test.sh accounts for almost all of the old step's time. The other three scripts take about 2 s combined. It needs Go: it builds mecated five times and mecatui once with -trimpath and release linker stamps, and runs one go test. -trimpath changes Go's build-cache keys, so the first build recompiles the whole dependency graph.

Inside Analysis it took ~220 s, because the root lint had already warmed the build cache. In its own job it takes ~470 s and is now the critical path (504 s). It still finishes inside the 8-9 min target. Making that test cheaper is the next lever; see follow-ups.

Timings

Both runs were dispatched at the same time with workflow_dispatch, which runs every job.

before (main) after (this branch)
Wall clock 865 s 520 s
Mecatl Studio (apps/) 855 s 194 s
↳ browser journeys (422 s step) 316 s / 306 s (mobile / desktop)
Analysis 776 s 372 s
↳ module lint (~123 s of steps) 304 s
↳ action scripts (283 s step) 504 s
Test (race) 370 s 425 s

Note: on recent PR runs Test (race) sometimes takes 19-23 min (for example runs 39345392075 and 39311925011). When that happens it, not Analysis, is the critical path, and this PR does not change it.

After folding the image job back into Studio, a PR run on 204e04d (run) passed with a 1034 s wall clock, because Test (race) took 1022 s there. Without that outlier, the longest jobs were Test GitHub Actions scripts (599 s) and Mecatl Studio (561 s; integration test 256 s, image build and scan 143 s).

Wire API compatibility

Not applicable: CI configuration only.

Test plan

  • actionlint (pinned v1.7.7 with the existing ignore)
  • relevant-changes-workflow_test.sh, docs-only-workflow_test.sh, macos-relevant-workflow_test.sh, classifier tests, check-action-templates.sh
  • GOOS=linux task lint. On macOS, plain task lint fails on a gosec G703 finding in environment/microvm/launch_ownership_darwin.go:754. That finding already exists on main, and CI never compiles the darwin file.
  • Full CI run on this branch, green, including Lint, Mecatl Studio (gate), and User docs (gate)

Follow-ups

  • Speed up microvm-ci-release_test.sh: share one -trimpath compile across its builds, or warm the cache first.
  • The rulesets on main require no status checks. If any of the job names above are meant to be required, point the requirement at Lint and Mecatl Studio (gate).

🤖 Generated with Claude Code

Analysis and Mecatl Studio were the two longest CI jobs because each ran
independent work back to back. Split them so the pieces run side by side:

- Analysis keeps the root golangci-lint and workflow checks. The
  nested-module lint passes move to "Analysis (module lint)", and the
  action-script tests move to "Test GitHub Actions scripts".
  microvm-ci-release_test.sh takes ~220s of that step: it builds mecated and
  mecatui several times with -trimpath and release linker stamps.
- Studio keeps install, checks, Vitest, and the integration test. The
  Playwright journeys run in their own job, one runner per project
  (desktop and mobile), and the image build, validation, and scan run in
  "Mecatl Studio image". `task studio:browser` now forwards CLI args to
  Playwright.
- Lint now needs and checks every analysis job. A new "Mecatl Studio
  (gate)" checks every Studio job the same way, so a job skipped by
  mistake cannot pass silently. The workflow contract test pins both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The separate studio-image job repeated setup-node, setup-go, and the
mecated build that the Studio integration task already does. Merged, the
Studio job still finishes under Test (race), so wall-clock is unchanged
and CI uses one runner fewer. Studio's gate now checks studio and
studio-browser.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rdimitrov
rdimitrov merged commit 2d93184 into main Oct 20, 2026
43 checks passed
@rdimitrov
rdimitrov deleted the claude/festive-mclean-7dc29f branch October 20, 2026 11:35
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 23, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant