Repository navigation
perf: speed up fresh cloud worker activation - #147945
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 14, 2026, 4:08 AM ET / 08:08 UTC (Revision 6). ClawSweeper reviewWhat this changesDelays publishing a cloud worker’s runtime link until required plugins finish activating, avoiding unnecessary migration work on fresh workers and adding failure-path coverage. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, focused optimization absent from fetched main and the latest release. No actionable correctness or security defect was found; the maintainer-authored, protected PR is not a cleanup candidate. Priority: P2 Review scores
Verification
How this fits togetherThe Crabbox plugin prepares remote cloud workers from a verified OpenClaw package, enables their required plugins, and launches a node connected to the Gateway. Doctor checks the worker’s state directory during plugin activation to determine whether legacy migrations are needed. flowchart TD
A[Cloud worker request] --> B[Verify and prepare runtime]
B --> C[Validate runtime link location]
C --> D[Activate required plugins]
D --> E{Activation succeeds?}
E -->|Yes| F[Publish runtime link]
F --> G[Launch connected node]
E -->|No| H[Stop without publishing link]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1, Tests +46. Total +47 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep runtime publication in the bootstrap owner after successful activation, preserving Doctor’s existing migration rules and node-launch prerequisites. Do we have a high-confidence way to reproduce the issue? Yes, from source: fresh enrollment publishes a runtime link that fails Doctor’s config-only state predicate before plugin activation. No runtime reproduction or tests were executed during this read-only review. Is this the best way to solve the issue? Yes. Reordering publication fixes the unnecessary migration trigger at its producer without adding a bypass, duplicate migration policy, or new configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 069710f909f0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
7d64db5 to
d5cdb66
Compare
4a4ddf0 to
84493da
Compare
|
Merged via squash.
|
* commit 'a08cdc50bc049074ed7ad2db9e18e0ed3f5415ec': (81 commits) perf: reuse stateless plugin scope defaults (#148080) fix(gateway): flush slow-consumer 1008 close frame before terminating socket (#147707) fix: keep model catalogs loading during other session updates (#147878) fix: show queued external chat messages and their source (#147848) refactor(chat): share math label configuration (#148073) perf(ui): trim eager debug overlay icon payload (#147954) improve(logbook): sample batch frame metadata in SQLite (#147999) fix(ui): dismiss suggested task cards without waiting (#148021) fix(maturity): cover governance, interoperability, fleet, and state (#143528) chore(ui): restore core lint and startup budget checks (#148010) fix: chat startup loads unnecessary session setup text (#147973) perf: speed up fresh cloud worker activation (#147945) fix: recover PR preparation after committed merge conflicts (#148063) test(plugins): isolate ClawHub Docker fixture identity (#148074) fix(release): acknowledge ClawHub risk on moving installs (#148041) fix: restore context reads for installed official Discord and Slack plugins (#143341) fix: identify source capsule filesystem failures (#147778) fix(linux): keep Quick Chat widgets bound to their Gateway (#146049) refactor(infra): consolidate update campaign reset ownership (#146555) refactor: simplify Gateway health response parsing (#147834) ...
* commit '7d485aa2e89af7fdbd09e8ed0489b06d250b07e3': test(scripts): check the configurable ClawHub sweep spec fix: show queued external chat messages and their source (openclaw#147848) refactor(chat): share math label configuration (openclaw#148073) perf(ui): trim eager debug overlay icon payload (openclaw#147954) improve(logbook): sample batch frame metadata in SQLite (openclaw#147999) fix(ui): dismiss suggested task cards without waiting (openclaw#148021) fix(maturity): cover governance, interoperability, fleet, and state (openclaw#143528) chore(ui): restore core lint and startup budget checks (openclaw#148010) fix: chat startup loads unnecessary session setup text (openclaw#147973) perf: speed up fresh cloud worker activation (openclaw#147945) fix: recover PR preparation after committed merge conflicts (openclaw#148063) test(plugins): isolate ClawHub Docker fixture identity (openclaw#148074) fix(release): acknowledge ClawHub risk on moving installs (openclaw#148041) fix: restore context reads for installed official Discord and Slack plugins (openclaw#143341) fix: identify source capsule filesystem failures (openclaw#147778) fix(linux): keep Quick Chat widgets bound to their Gateway (openclaw#146049) refactor(infra): consolidate update campaign reset ownership (openclaw#146555) refactor: simplify Gateway health response parsing (openclaw#147834)
What Problem This Solves
Fresh cloud workers enter unnecessary legacy-state migration work while enabling their required plugins.
User Impact
Cloud worker activation is faster. In three alternating local runs through the generated bootstrap and real built plugin CLI, median plugin activation fell from 3.98 seconds to 2.17 seconds (45%). This measures activation; provider provisioning, installation, and VNC connection time are separate.
Why This Change Was Made
Bootstrap published its runtime symlink before enabling plugins. That extra entry made a new state directory fail Doctor's existing pristine-state check. Publish the symlink after plugin activation, while retaining occupied-path validation before activation and publication before node launch.
Existing state still follows the same migration rules. Failed activation leaves the runtime pointer unpublished, and a retry can reuse the verified installation. No config, schema, dependency, or migration-policy changes are required.
Evidence
The full candidate build passed. A fresh AWS Linux Tiny session created through the Control UI used the computer screenshot tool, returned
READY, and displayed its XFCE desktop through VNC without a retry. Canonical reclaim and destroy confirmed cleanup, and the isolated Gateway, tunnel, and credential window were stopped. The Desktop panel was opened after the turn; first-pixel latency was not measured.The cloud patch remains identical after rebasing onto main
8e6fe8e02ddb, and all 160 focused tests pass again at84493dae713c. Two inherited test-file lint failures were repaired without changing limits or assertions; equivalent cleanups landed independently in #147869 and are now inherited from main, so this PR contains only the cloud bootstrap change and its regressions. Earlier UI performance comparison passed the unchanged startup-size budget. The full build, timings, and live cloud proof above precede this patch-identical rebase; exact-head CI passed.