Repository navigation
perf(ci): share compiled workers across test groups - #146353
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 7:54 PM ET / 23:54 UTC (Revision 5). ClawSweeper reviewWhat this changesShares one lazily compiled worker generation across CI test groups while preserving separate test processes, group settings, verification, and cleanup. Merge readiness✅ Ready for maintainer review The optimization remains useful: current main still prepares workers separately for each project-runner invocation. No actionable correctness or security finding was identified, and the rebase preserves every previously reviewed file. Priority: P2 Review scores
Verification
How this fits togetherThe CI shard runner turns test plans into separate project-runner processes. Those processes lend compiled subprocess code to Vitest, then join their descendants before releasing temporary artifacts. flowchart TD
A[Test group plans] --> B[CI shard runner]
B --> C[Shared lazy compilation]
B --> D[Separate project runners]
C --> E[Verified worker artifacts]
D --> F[Separate Vitest processes]
E --> F
F --> G[Join descendants]
G --> H[Clean up or retain artifacts]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +593, Other +199. Total +792 across 12 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one job-owned lazy compilation with per-borrower verification, independent group execution, and deletion only after verified descendant completion. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this is a performance improvement, supported by the reported seven-group comparison and source showing repeated per-invocation preparation. Is this the best way to solve the issue? Yes. Extending the existing compilation owner avoids a competing cache or execution path while retaining group isolation and portable fallback. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bf95f2b23c63. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
0bb0b7c to
8d80ff1
Compare
8d80ff1 to
d30dd8f
Compare
|
Merged via squash.
|
#150360) Reuse the existing compiled-worker invocation, private bootstrap and IPC borrower in the batch runner. Verify and dispose artifacts before reporting completion or propagating signals; preserve live-source watch behavior. Keep native flags, HOME admission, failure outcomes, and all memory/voice provider choices and deadlines unchanged. Cover successful and failed native batches with two projects sharing one prepared generation. Related: #146353 Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: RomneyDa <[email protected]>
openclaw#150360) Reuse the existing compiled-worker invocation, private bootstrap and IPC borrower in the batch runner. Verify and dispose artifacts before reporting completion or propagating signals; preserve live-source watch behavior. Keep native flags, HOME admission, failure outcomes, and all memory/voice provider choices and deadlines unchanged. Cover successful and failed native batches with two projects sharing one prepared generation. Related: openclaw#146353 Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
CI jobs rebuild the same compiled worker graph for each Node test group. A measured seven-group job spent 33.404 seconds in seven preparations within a 426-second test step. Sharing preparation within the job reduced test execution by 6.09% in a controlled comparison.
Why This Change Was Made
The CI job owns one lazy generation and lends it through the existing bootstrap and IPC owners. Groups retain separate processes, selections, environments and worker limits, and each borrower verifies its artifacts. Compiler budgets derive from all effective group environments. Cancellation stays local to the requesting group; uncertain descendant completion retains artifacts.
Unsupported process-group platforms retain per-group ownership, and the named five-file frozen-release adapter remains lightweight. There is no new cache, configuration option, environment option, workflow, shard or runner.
User Impact
CI avoids repeated compilation while preserving test coverage and process isolation. Product runtime delta 0; tooling net +199 lines expresses cross-process lifetime ownership; tests/support net +593 across 12 files. One representative full-graph test remains, while other lifecycle scenarios use the existing controlled compiler fixture to avoid adding repeated expensive compilations.
Evidence
A baseline/candidate/reversal comparison ran the same seven groups, 12 files, eight native invocations and 122 passing cases per arm on one AWS m7i.large (two logical CPUs, 8.16 GB RAM), with Node 24.19.0 and pnpm 12.3.4 and fresh named caches per arm. Test times were 807.460/757.608/805.957 seconds: 6.09% lower against the controls' mean, with 0.19% control spread. Build plus tests improved 5.33%. Generations were 7/1/7; case multisets, worker limits, source maps, joins, cleanup and OOM checks passed. These measurements remain attributed to
ec9260b/0bb0b7c/ec9260b; they are not a current Blacksmith wall-time forecast.The comparison's final export exited 1 after its complete archive exceeded 24 MiB. All test and validation checks had passed. Canonical directory copy recovered the unchanged evidence; all 158 files/94.1 MB were independently hash-verified before the lease was stopped. The original export failure is retained; no tests were rerun or validation limits relaxed.
Original-red/fixed resource and readiness regressions passed, including 61 owner/shutdown cases. Coverage includes cancellation, disconnect, uncertain joins, budget intersection, portable delegation and the frozen-release boundary. Scoped types, lint, formatting, dead-export gates and independent P2 reviews passed. After the dependency refresh, the real concurrent compiler case passed in 13.957 seconds, proving two real borrowers share one verified generation and clean up; the inherited-filter timing regression also passed.
Exact-head CI 34726317274 passed on
d30dd8f8ea5096a5cc28f938bd5db5937c6b458f: 76 successful jobs and 17 skipped. All 12 reviewed file bodies are unchanged by the final refresh onto repaired main. Earlier shared UI-budget failures are preserved and were resolved by independent main repairs. Latest exact-head ClawSweeper review has no actionable findings or before-merge moves. Native Windows performance is not claimed; required hosted platform checks passed.