Skip to content

ci: remove duplicate checks and build mecated once - #2468

Merged
rdimitrov merged 5 commits into
mainfrom
claude/ci-performance-optimization-b4891e
Oct 22, 2026
Merged

rdimitrov merged 5 commits into
mainfrom
claude/ci-performance-optimization-b4891e

Conversation

@rdimitrov

@rdimitrov rdimitrov commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Removes CI jobs that repeat checks the Test job already runs, stops draft PRs from compiling the whole test suite from scratch, and builds mecated once instead of in ten jobs.

  • Drop microvm-standalone and provider-standalone. task test:race already tests every module in GO_MODULES with GOWORK=off -mod=readonly, including environment/microvm, integration/microvm, and all four provider modules (provider-standalone covered only two). Every microVM path is also Go-relevant, so the Test job runs whenever microvm-standalone would have. Neither module has race-gated tests. The provider job's git-token warm-up dates from when the repository was private and is no longer needed.
  • Fold engine-standalone into Build. It was not fully redundant. Under -race, TestCheckToolArgsDoesNotAllocate and TestDecodeToolArgsAllocatesLikeUnmarshal skip themselves (engine/governance raceEnabled), so this job was the only place they ran on ready PRs and on main. Build now runs task test:module MODULE=engine (non-race, GOWORK=off) over its existing non-race cache. That is about 16 seconds warm locally, and saves a runner plus a cache family.
  • Run -race on drafts too. Drafts restored the race cache, but a non-race build cannot reuse race-compiled objects, so draft runs compiled everything cold. The last four drafts took 9.8 to 13.3 minutes, while warm race runs take about 8. With the engine allocation guards now in Build, drafts lose no coverage and gain race detection.
  • Build mecated once. Ten Linux jobs (SDK e2e, Deno ×2, browser ×3, Slack bot, Studio, Studio browser ×2) each compiled the daemon. Most ran the full task build, compiling all 7 binaries and every nested module, when their suites spawn only bin/mecated. Recent runs spent 2–3 minutes per job on this. A new mecated job builds it once with a new task build:mecated and uploads it as an artifact. Consumers download it, and MECATL_PREBUILT_MECATED=1 makes build:mecated use it as is. Five consumers drop Go setup and the ~1.1 GB go-sdk cache restore. sdk-integration keeps Go for task generate and its fixture daemon. The macOS jobs still build natively. The suite tasks now call build:mecated instead of build, which also makes them faster locally.
  • Update the workflow-shape tests (relevant-changes-workflow_test.sh, microvm-ci-release_test.sh, module-metadata_test.py) to pin the new wiring. The microVM test now asserts that the Taskfile runs both microVM modules with GOWORK=off. A new assertion requires the mecated job's gate to cover every consumer's gate, so no consumer skips for lack of a binary.

Not changed, on purpose

  • Both test:module-metadata runs stay. Build's run, after task tidy, proves tidy is a no-op. Test's run proves the suite left module files unchanged.
  • api-compat stays as a named signal, as its comment documents.
  • The task test:*-standalone Taskfile tasks stay for local use. Only the CI jobs are removed.

Required checks

main has no required status checks (its rulesets enforce PR review only), so the removed job names block nothing.

Test plan

  • bash .github/scripts/relevant-changes-workflow_test.sh, relevant-changes_test.sh, macos-relevant-workflow_test.sh
  • python3 .github/scripts/module-metadata_test.py
  • actionlint on ci.yml
  • microvm-ci-release_test.sh passes its new assertions. It then fails on a darwin-only release-defaults check, which fails the same way on unmodified HEAD; CI runs it on Linux.
  • task test:module MODULE=engine; both allocation tests run and pass, not skip
  • go run ./cmd/mecademo shows tool call, permission ask and approval, and result
  • task build:mecated builds when bin/mecated is absent and skips when MECATL_PREBUILT_MECATED=1 and the binary exists
  • Negative control: narrowing the mecated job's gate fails relevant-changes-workflow_test.sh
  • task docs
  • task lint: clean except one gosec G703 finding in environment/microvm/launch_ownership_darwin.go. That file is darwin-only and untouched by this PR, and CI lints on Linux, where the module reports 0 issues. The modules task lint skipped after that failure were linted directly and are clean.
  • task test:race on macOS: not green, and none of the failures come from this PR, which changes no Go files. 183 packages passed and 27 distinct tests failed across 10 packages. Every one was rerun on the base commit d50481afb:
    • 25 fail the same way on base. They are host-specific: macOS's /var → /private/var symlink, git worktree layout, unix socket paths under /dev/fd, and process handling. Packages: cmd/mecated, cmd/mecatui, internal/app, internal/adapter/forker, internal/adapter/server, internal/executionexecutor, deploy/mecatl-execution-kind.
    • 2 are timing-sensitive under full-suite load: internal/adapter/microvmmanager TestDefaultOperationsStartScrubsDaemonEnvironmentAndDetachesFromRequest and environment/microvm TestRepositoryGuestAuthenticationRejectsCompetingConnectorBeforeDisclosure. Each passes 3 of 3 alone on this branch and passes on base.
    • CI's Linux Test (race) run is the authoritative check.

🤖 Generated with Claude Code

rdimitrov and others added 3 commits October 22, 2026 00:20
task test:race already tests every module with GOWORK=off -mod=readonly,
so the microvm-standalone and provider-standalone jobs repeated it.
engine-standalone was the only non-race run of the engine allocation
guards, which skip under -race; Build now runs that pass instead.

Drafts ran the suite without -race but restored the race cache, which a
non-race build cannot reuse, so every draft compiled from scratch and
finished slower than a warm race run. Drafts now run -race as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The SDK, Slack bot, and Studio jobs each ran the full `task build`,
compiling every binary and nested module, to get bin/mecated, the only
binary their suites spawn. Ten Linux jobs repeated that build.

A new mecated job builds it once with `task build:mecated` and uploads it.
The consumer jobs download it, and MECATL_PREBUILT_MECATED=1 makes
build:mecated use it as is. The suite tasks now build only mecated, which
also speeds them up locally. Five consumers no longer need Go at all and
drop their Go setup and cache restore. sdk-integration keeps Go for
contract generation and its fixture daemon. The macOS jobs still build
their own binary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rdimitrov
rdimitrov merged commit 0036596 into main Oct 22, 2026
45 checks passed
@rdimitrov
rdimitrov deleted the claude/ci-performance-optimization-b4891e branch October 22, 2026 07:42
@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