Repository navigation
perf: prepare cloud project runtimes faster - #148952
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 15, 2026, 5:18 AM ET / 09:18 UTC. ClawSweeper reviewWhat this changesThe PR overlaps cloud worker archive downloads with runtime installation, preserves cleanup ordering, and adds regression coverage and timing documentation. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, bounded performance improvement absent from current main and the latest release. No actionable correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Crabbox plugin prepares OpenClaw runtimes on cloud machines before project image capture and node enrollment. It receives authenticated runtime archives and publishes verified installations for subsequent reuse. flowchart TD
A[Gateway runtime archives] --> B[Verify runtime archive]
B --> C[Install runtime with npm]
B --> D[Download and verify worker archive]
C --> E[Wait for both operations]
D --> E
E --> F[Verify and publish runtime]
E --> G[Clean staging after settlement]
F --> H[Project image capture and enrollment]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +13, Tests +132, Docs +2. Total +147 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep preparation in the existing installer, overlap independent work, and publish only after both operations finish successfully. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this optimizes existing behavior. Current source confirms serial preparation, and the supplied real Linux comparisons measure the proposed improvement. Is this the best way to solve the issue? Yes. Scheduling the independent operations within the existing installer avoids a competing implementation while preserving verification, cache identity, and cleanup ordering. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a10df27f8d55. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit '1226eecf4ff909de172a6837422cfa64723fade8': (39 commits) test: align model auth and setup fixtures with current behavior (#149023) refactor: reuse web search request context (#148949) fix(ci): remove duplicate Copilot auth metadata (#149016) test(agents): align auth fixtures with runtime store reads (#149004) improve: reduce data fetched during reminder maintenance (#148996) fix(cron): skip availability checks when session pruning is idle (#148920) fix(auth): guard GitHub Copilot device flow authority (#148999) fix(agents): prevent early recovery aborts of foreground exec (#148959) fix(github-copilot): remove retired Raptor mini (#116505) improve(feishu): reduce preparation work for documents with tables (#148997) improve: reduce database work when recording participants (#148841) test: accept Bun error labels in plugin assertions (#148955) fix(models): clarify saved account health and catalog status (#148987) test(plugins): align Copilot auth-choice registry expectations (#148981) fix(channels): reject blank integer channel add options (#145534) fix(ui): preserve archive undo after chat navigation (#148831) feat: show cited source previews in macOS and iOS chat (#148906) fix: avoid redundant tab updates while chats stream (#148865) test(qa): run Discord through Crabline (#116446) perf(crabbox): prepare project runtimes during worker download (#148952) ...
What Problem This Solves
Preparing a cloud project image waits for the worker archive to download before npm can install the already-verified node runtime.
User Impact
Fresh project images can become ready sooner. On a two-vCPU AWS Linux machine, three alternating before/after pairs reduced median runtime preparation from 44.9 s to 38.4 s (14%). This measures project runtime preparation, before image capture and node enrollment; it is not a complete session-to-VNC speedup. Cached runtime reuse and ordinary enrollment behavior remain unchanged.
Why This Change Was Made
Start npm while the optional worker archive downloads, after verifying the node archive. Join both operations before publishing the runtime or removing staging files, including when either fails. Keep npm dependency selection, lifecycle policy, credential stripping, and timeout limits unchanged. The combined phase marker records overlapping work without attributing all of it to npm or transport.
Evidence
The real generated runtime-preparation command installed the same 26.5 MB node archive and retained the same verified 12.3 MB worker archive in six fresh Linux homes/caches (Node 24.18.1, npm 11.16.0, two-vCPU AMD EPYC). All six runs verified the CLI, completed lifecycle scripts, created no enrollment identity, and installed identical dependency trees.
Network and registry variability affect total times, particularly the first npm install; the complete median difference is not an isolated estimate of the scheduling change. No artificial transfer delay or cache-preference flags were used.