Repository navigation
perf(ci): consolidate workers, eliminate redundant builds, and tighten scoping - #7013
Merged
Astro-Han merged 7 commits intoNov 19, 2026
Merged
Conversation
…n scoping Reduce CI job count, queue pressure, cache eviction, and compilation time on rust-preview without reducing test coverage: - Consolidate root-tests sharding from 22 partitions (8 native, 6 cli, 8 rest-1..4) to 6 balanced partitions (3 native, 2 cli, 1 rest) and switch replay jobs to lightweight runtime-only Linux packages without npm install. - Merge Linux root verification workers (contracts, product, native-build, native, linux-desktop, bridge) into a single linux-checks worker that restores the root compiler cache read-only, and merge nsh + linux-nsh into one nsh worker so Linux caches stop evicting macOS and Windows caches past the 10 GiB limit. - Set CARGO_PROFILE_DEV_DEBUG=0 and CARGO_PROFILE_TEST_DEBUG=0 across CI jobs and remove the artificial CARGO_BUILD_JOBS=2 throttle. - Replace --workspace test compilation on native-macos and native-windows with targeted package/binary Cargo arguments, drop redundant --no-default-features helper builds, split macos-nsh and windows-nsh into independent on-demand workers, and run local helper-backed nextest suites directly instead of round-tripping through .tar.zst archives. - Scope non-Rust product, skill, and external fixture inputs in plan.mjs to their actual consumer packages instead of falling back to all(), and skip untouched vendored third-party workspaces on branch pushes while keeping full root coverage. Generated-by: Google Antigravity
…est replay Eliminate repeated dependency recompilation inside native-macos, native-windows, and linux-checks, and fix the two issues surfaced in the first hosted run: - Add unified cargoScope package sets to native-macos and native-windows so prepareWorker compiles all needed crates once under a single Cargo feature union (and builds runtime helpers in the same union), cutting redundant dependency rebuilds and shrinking per-worker caches well below the 10 GiB cap. - Align linux-checks heavy Rust targets (ui_types, linux-desktop, Linux native check) with the --workspace feature union so they reuse the root compiler cache. - Exclude target/ and ~/.cargo from Windows Defender real-time scanning in ci-setup on Windows runners. - Stage prebuilt librusty_v8 into both target/debug/gn_out/obj and target/debug/build/gn_out/obj to match Cargo 1.100 OUT_DIR nesting and prevent concurrent v8 build.rs truncation. - Enable javascript setup only for the rest partition in root-tests where maka-workbench tests load node_modules at runtime, while keeping native and cli partitions npm-free. Generated-by: Google Antigravity
… macOS/Windows E2E Push CI latency further without reducing test coverage: - Install lld on Linux compile workers and link x86_64-unknown-linux-gnu targets with clang + -fuse-ld=lld. - Include HEAD:third-party tree SHA in root compiler cache keys, keep vendored third-party/* path crate outputs during cache prune, and stabilize third-party/ mtimes on exact cache hits so unchanged nsh/reqwest/sqlx/deno crates stay Fresh across runs. - Split macOS E2E into parallel native-macos (desktop + platform suites) and native-macos-agent (macos-agent-execution, read-only shared cache), and split Windows desktop E2E into parallel count:1/2 and count:2/2 workers (read-only shared cache). - Fix contracts verification by invoking the compiled target/debug/examples/ui_types binary directly instead of passing --workspace to cargo run. Generated-by: Google Antigravity
GitHub Actions evaluates null != false as false, which caused cache-owning workers without an explicit saveCache field to skip ci-cache. Generated-by: Google Antigravity
…, and local runs Address all verified findings from adversarial review: - Keep non-Rust fixtures inside backend Rust crates (e.g. maka-decisions-api) routed through their owning crate, and route shared product contract directories (bundle, plugin-sdk, plugins/shared, gateway) to maka-agent-native, maka-skills-core, maka-skills-native, macos-agent-execution, and windows-skills while keeping pure UI edits scoped. - Add nsh-cli to macos-nsh suite packages so changes to nsh-cli/src/test.rs trigger macos-nsh on branch pushes. - Include HEAD:third-party tree SHA in compiled_prefix so fallback cache restores never mix vendored outputs across different third-party trees. - Align CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=0 and CARGO_PROFILE_TEST_BUILD_OVERRIDE_DEBUG=0 with dev/test profiles to prevent compiling shared build/normal deps (maka-ui-build) twice. - Resolve ui_types example executable from Cargo JSON output in contracts verification instead of hardcoding target/debug/examples/ui_types. - Forward local Cargo build flags (--release, --cargo-profile, --target, --target-dir, features) into buildRuntimeHelpers and skip helper builds on --help/-h/--no-run. - Add targeted prepareTargets for sidecar parallel shards (native-macos-agent, native-windows-desktop-2) so they reuse the primary cargoScope dependency graph without linking unrelated test binaries. Generated-by: Google Antigravity
…ache fallback - Restore bundled non-workbench product inputs on macos-agent-execution so plugin edits still run macOS agent reopen tests. - Build local runtime helpers in a single workspace-scoped cargo build so qualified --features flags work with just test. - Exclude src/ template README files from documentation filtering in plan.mjs. - Replace worker prepareTargets with per-suite targetArgs unioned dynamically across selected suites. - Keep thirdPartyTree in exact compiled cache keys only and clean third-party path crates on fallback restores so registry caches survive third-party edits. Generated-by: Google Antigravity
…reuse, and local flags - Remove stale artifact.cargoArgs spread in prepareRuntimeHelpers that broke root-build archive creation. - Prevent scoped native PR workers from overwriting shared exact compiler caches when only a subset of suites is selected. - Use cargo build instead of cargo check for Linux native suite under cacheRole=root so it reuses root-build .rlib outputs. - Forward --config, --offline, and --frozen to local runtime helper builds. Generated-by: Google Antigravity
Astro-Han
marked this pull request as ready for review
November 19, 2026 10:42
4 of 5 tasks
4 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recent
rust-previewCI runs spawned up to 35 jobs (~492 runner-minutes total, ~195m wall clock), frequently timing outnative-macosat 180m and failingnative-windowsat 150-177m. Profiling hosted runs showed four compounding bottlenecks rather than excessive test volume:root-testsspawned 22 Ubuntu runners (many running 30-120s of tests after 10-18m of ASF queue wait), each installing build-time-devpackages and runningnpm install -g npm@latest+npm cieven when replay never compiles or touchesnode_modules.cargo5-6 times with different-psets (triggering repeated Cargo feature unification rebuilds), evicting caches to 0 and forcing 100-129m cold builds.CARGO_BUILD_JOBS=2throttled compilation, Linux linked with default GNUld, Windows Defender scannedtarget/,prunecleaned untouched vendoredthird-party/*crates on every run,verifyRootround-tripped local binaries through.tar.zstarchives, andnative-macos/native-windowsran their slowest E2E suites serially on one runner.rootall()and triggered unrelated backend/platform suites, and branch pushes always re-ran untouched vendoredthird-party/nshandthird-party/termina.This PR keeps the full test coverage intact while eliminating that waste:
root-testsfrom 22 to 6 balanced partitions (native: 3,cli: 2,rest: 1), upload 3 archives instead of 6, switch replay setup to runtime-only Linux packages (dependencies: replay), and keepjavascript: trueonly for therestpartition wheremaka-workbenchtests loadnode_modules.lld, and protect the cache pool: mergecontracts,product,native-build,native,linux-desktop, andbridgeintolinux-checks(restoring therootcompiler cache read-only viacache_role: root+saveCache: false, and usingcargo build --locked --workspace --bin makaso Linuxnativereuses 1,504/1,505root-build.rlibunits instead of recompiling 1,061cargo checkunits), mergensh+linux-nshintonsh, link Linux CI builds withclang+-fuse-ld=lld, alignCARGO_PROFILE_{DEV,TEST}_DEBUG=0andCARGO_PROFILE_{DEV,TEST}_BUILD_OVERRIDE_DEBUG=0across CI, and dropCARGO_BUILD_JOBS=2.third-party/cache reuse: add unifiedcargoScopepackage sets with per-suitetargetArgsdynamically unioned across selected suites sonative-macosandnative-windowscompile once per worker (and only save shared exact caches when all suites on the worker are selected), includeHEAD:third-partytree SHA in exact compiled cache keys while keepingcompiled_prefixfree ofthirdPartyTree(stabilizing mtimes on exact hits and runningclean-third-partyon fallback restores so untouched registry crates survivethird-party/edits), stage prebuiltlibrusty_v8into bothtarget/debug/gn_out/objandtarget/debug/build/gn_out/objfor Cargo 1.100, and excludetarget/+~/.cargofrom Windows Defender.cargo nextest runwith a single workspace-scoped helper build forwarding local Cargo flags (--features,--config,--offline,--frozen,--release,--target*,--cargo-profile), resolveui_typesfrom Cargo JSON artifacts, splitmacos-nsh(includingnsh-cli) andwindows-nshinto independent on-demand workers, split macOS into parallelnative-macos+native-macos-agent(read-only shared cache), and split Windows desktop E2E into parallelcount:1/2+count:2/2(read-only shared cache)./src/template READMEs from documentation filtering, keep bundled non-workbench product inputs onmacos-agent-execution, map shared product contract directories (bundle,plugin-sdk,plugins/shared,gateway) to their full backend/skill consumers while keeping pure workbench UI edits scoped to UI/product crates, and skip untouched vendoredthird-party/nshandthird-party/terminaon branch pushes while keeping fullrootcoverage.Benchmark Progression & Evidence
All hosted metrics below are taken directly from GitHub Actions runs on
apache/maka.root-buildlinux-checksnative-macosnative-macos-agentnative-windowsnative-windows-desktop-2rust-preview)DEBUG=0+ dropJOBS=2)cargoScope+ Defender + V8 dual-stage)clang+lld+third-partycache + native splits)saveCache+BUILD_OVERRIDE_DEBUG=0)clean-third-partyfallback)rust-previewbase runKey per-optimization measurements:
cargoScope+DEBUG=0+ Defender exclusion: cutnative-macoscold compile from 124m → 31.6m (-75%) andnative-windowscold compile from 106m → 32.5m (-69%) (measured in #44457489955).native-macosverify from 27–51m to ~15m alongsidenative-macos-agent(verify 9.9–12.9m, total 37.1m green on post-mergerust-preview#44523459467), and split Windows desktop E2E into two ~6–9m verify shards (both green in #44475727934, #44492026748, and #44515944546).CARGO_PROFILE_{DEV,TEST}_BUILD_OVERRIDE_DEBUG=0: shrank the savedroot-buildcompiler cache from 2.31 GiB → 1.75 GiB (-24%) in #44475727934.nativecache alignment (cargo buildvscargo check): Cargo--unit-graphunder CI profile env vars confirmedcargo check --locked --workspace --bin makamissed 1,061 / 2,257 external units againstroot-build, whereascargo build --locked --workspace --bin makareuses 1,504 / 1,505 (99.93%) external units.root-testsconsolidation (22 → 6) +dependencies: replay+ selective JS: all 6 partitions ran cleanly in 3–14m each (restexecuted 895 tests in 3.1–7.2m).fullRootvendored scoping:macos-nshdropped to 5.3–5.8m on warm cache (#44457489955, #44482637336); non-vendored PRs andrust-previewpushes (#44527452235, #44523459467) automatically skip all 4 vendored NSH/termina jobs (14 jobs total vs 35 baseline).desktop_composer_references_a_room_without_postingonnative-macosreproduced identically on baselinerust-preview#44476602729, andcontinue_run_recovers_across_interrupted_boundarieshit a singleElapsedtimeout flake (passed in rounds 1–4).Verification
node --test scripts/ci.test.mjs— 22/22 passed.biome format .andnode scripts/asf-license-headers.mjs check— passed.cargo metadataand Cargo--unit-graphfor scoped native worker target unions, Linuxcargo buildvscargo checkunit reuse, backend fixture & plugin routing, local helper flag forwarding,archive()fallback helper builds, narrow-PRsaveCache: falseguards, andclean-third-partyfallback cleanup.AI use
Select exactly one:
Tool(s) and scope: Google Antigravity profiled hosted CI runs and implemented the workflow and
scripts/ci/*changes; GPT 6.2 Sol performed three rounds of independent adversarial reviews whose verified findings were addressed in this branch.Checklist
Does this PR entail a change in behavior?