Skip to content

fix(ci): right-size serial central type checks - #197786

Merged
vincentkoc merged 1 commit into
mainfrom
perf/ci-central-type-runner-20261112
Nov 12, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
perf/ci-central-type-runner-20261112

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Ordinary PRs reserve a 4-vCPU runner for serial extension/script type checks whose compiler policy uses at most two Go threads.

User Impact

Reduces the requested runner to 2 vCPUs for this measured workload. Type-check coverage and execution order stay the same. Full, frozen, release, compatibility, root-test and non-hosted plans retain their current allocation.

Why This Change Was Made

The existing ordinary-PR capability and selected graph names identify the narrow workload. Only its admission label changes; the planner's legacy runner identity remains intact.

Evidence

  • Blacksmith's 24-hour sample: 939 central type jobs, maximum memory 29.015% on the current 4-vCPU machine; the sampled workload runs extensions-test then scripts. Maximum-memory job.
  • Planner regression: the two new positive cases fail on the base with the expected 4-vCPU versus 2-vCPU mismatch. All 44 planner tests pass with the change (52.19s file duration, including existing subprocess integration cases).
  • Independent source review and local ClawSweeper found no blockers on baca36ea403c..0e9ff11ca30e.
  • Targeted script lint, script typecheck, test-tooling typecheck, formatting and whitespace checks pass. Exact-head CI and its final gate passed.

Linux results

All samples use the same source tree. Compiler build-info files were removed before each sample; OS page cache was uncontrolled.

Workload Samples Median p95 Peak compiler RSS
4-CPU affinity on the 4-vCPU VM 5 43.064s 44.386s 4.071 GiB
2-CPU affinity on the same VM 5 42.037s 44.981s 4.067 GiB
Physical 2-vCPU VM, 7.65 GiB RAM 5 51.207s 55.028s 4.066 GiB

The paired comparison passed the predeclared rule: median -2.4%, p95 +1.3%, requested CPUs -50%. CPU comparison.

The separate small VM was slower than the affinity samples; those cross-machine times are not a causal performance comparison. It passed all five workloads. Blacksmith measured 4,792,717,312 / 8,218,361,856 bytes (58.3%) peak job memory across 182 samples, including setup, and zero OOM events. Physical capacity qualification.

Both successful Testbox leases were stopped. Their backing Actions jobs can show cancellation because the delegated lifecycle owns teardown. An earlier setup-only attempt stopped before any sample because the harness compared the original commit ID with the transport's carrier commit; the corrected harness verifies the exact source tree instead.

No invoice savings are claimed. The measured result supports using the smaller allocation for these graphs; full and other graph shapes retain their original capacity. The change adds 7 production lines and 44 test lines without a new configuration surface.

Acceptance rule recorded before benchmarking

Use the unchanged committed workload node scripts/run-tsgo-core-test-shards.mjs --ci-graphs-json '["extensions-test","scripts"]' with CI=1. Run five serial A/B pairs on one Linux Blacksmith Testbox, alternating 4-CPU and 2-CPU affinity. Remove only these two graphs' generated build-info files before each sample; OS page cache remains uncontrolled. Record actual CPU/RAM, wall time, peak RSS, exit status, median and p95. Reject any failed sample or a candidate median/p95 wall-time regression of 20% or more. This isolates CPU allocation; it does not simulate lower physical RAM.

Require an actual 2-vCPU runner to complete both graphs with no OOM and less than 80% peak memory, including setup. The PR's own change selects root-test tooling and correctly retains the 4-vCPU job, so the physical 2-vCPU proof uses the existing focused Testbox workflow instead; the criteria are unchanged. Compare complete-job duration and billed allocation with the baseline where workloads match, distinguishing runner qualification from a causal billing claim. The expected gain is half the requested CPU allocation, not a measured invoice reduction.

@vincentkoc vincentkoc self-assigned this Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Nov 12, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 12, 2026 14:56
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 12, 2026
@vincentkoc
vincentkoc merged commit f765f63 into main Nov 12, 2026
196 checks passed
@vincentkoc
vincentkoc deleted the perf/ci-central-type-runner-20261112 branch November 12, 2026 15:28
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant