Skip to content

perf(ci): trim worker compilation for Doctor flows - #197690

Merged
vincentkoc merged 1 commit into
mainfrom
perf/ci-doctor-cohort-runtime-20261112
Nov 12, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
perf/ci-doctor-cohort-runtime-20261112

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Selected Doctor CI tests compile thousands of unused test-only worker files before running.

User Impact

The same selected tests retain their production workers and isolation while compiling fewer files. Broad and unqualified selections retain the full compiler graph. There is no product behavior change.

Why This Change Was Made

Extend the existing runtime-worker eligibility to the remaining seven Doctor files and their focused unit configuration. Keep the shared CI parent and child decisions aligned; no new compiler owner, cache, or test omission.

Evidence

The workload comes from a completed seven-file CI job. Replayed the actual ci-run-node-test-shard.mts entry point at base ce76ed2fe039e97868745fd91273508905578e22, then with only this patch. Both Linux runs used four observed CPUs, 16.56 GB RAM, Node 24.22.1, pinned Bun 1.4.4-canary.1+191755ec1, and one plan/worker.

Acceptance set before execution: identical case membership and outcomes, no skips (including Linux NOCOW), normal worker cleanup, and at least 40% fewer compiled outputs.

Measured value Full Runtime
Passed cases / selected files 41 / 7 41 / 7
Emitted worker files 24,513 7,436
Compiler preparation 34.303 s 24.359 s
Entire shard payload 197.339 s 214.438 s
Child CPU user + system 317.281 s 331.036 s
Largest child peak RSS 4,040,376 KiB 3,055,336 KiB
Local wrapper including setup 255.948 s 345.763 s

69.7% fewer emitted files; preparation was 29.0% shorter. All 41 ordered case identities, including repeated parameterized names, matched; seven invocations passed and generation cleanup verified.

Single full/candidate pair: the shared origin/main ref advanced between commands, so the lease freshness guard required a replacement Testbox with the same observed resources. Full run, candidate run. Timings therefore compare different machines: the candidate payload was 8.7% slower and child CPU 4.3% higher. Wrapper time includes differing hydration/setup. This establishes less compilation and retained coverage, not end-to-end runtime or Blacksmith dollar savings. RSS is the largest child, not aggregate process-tree memory.

Focused checks: 146 tests passed in 3.09 s (wrapper 4.03 s); targeted tooling typecheck, lint, formatting, and diff checks passed. Regression cases cover broad/mixed fallback, packed unit/infra selection, and child artifact-preset forwarding. Independent source review found no actionable issues.

Full local ClawSweeper review: base ce76ed2fe039e97868745fd91273508905578e22, head e13bbf475ed9c1a8e70602e6bc4baea6fd4431bd, high-reasoning complete review; no actionable correctness or security findings. It was a code review, not execution proof.

@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.

@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 10:36
@vincentkoc
vincentkoc enabled auto-merge (squash) November 12, 2026 10:38
@vincentkoc
vincentkoc merged commit 4ea8ace into main Nov 12, 2026
176 checks passed
@vincentkoc
vincentkoc deleted the perf/ci-doctor-cohort-runtime-20261112 branch November 12, 2026 10:46
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

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