Skip to content

fix: cloud machine picker loses CPU and RAM with larger catalogs - #130684

Merged
steipete merged 1 commit into
mainfrom
steipete/ram-and-cpu-display-regression-593489
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/ram-and-cpu-display-regression-593489

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #130660

Additional instructions

Maintainer edits are enabled; this branch is in the upstream repository.

What Problem This Solves

Fixes an issue where operators choosing a cloud machine would lose CPU/RAM details and additional machine classes when Crabbox's provider catalog grew beyond 64 KiB. The New session picker showed only Standard, Fast, Large, and Beast, even though the provider reported specifications plus Tiny and Small.

Why This Change Was Made

The bundled Crabbox plugin was reading structured catalog JSON through the lifecycle-command wrapper's truncating 64 KiB log capture. The observed catalog is 81,716 bytes: the command exited successfully, but its captured JSON was invalid and the loader cached an empty catalog.

The catalog owner now uses the existing injected runner with a bounded 1 MiB capture, retaining its timeout and process-tree cleanup. Lifecycle commands keep their existing 64 KiB limit. The UI, provisioning, configuration, machine selection, and cache policy are unchanged; no specifications are hardcoded.

Best-fix judgment: repair the structured-data capture at its owner. Hardcoding UI specifications would drift from Crabbox; raising the shared lifecycle-log limit would widen unrelated operations. A provider-specific command/parser rewrite is unnecessary for this already-supported catalog contract.

Provenance: the latent capture-limit mismatch was introduced by the CPU/RAM feature in #125696 on August 18, 2026 (code author and merger: @steipete). The renderer remains intact. Crabbox's richer catalog in openclaw/crabbox#1404 made this mismatch observable with the current payload; the exact first historical binary to cross the cap was not rebuilt.

User Impact

Provider-reported CPU/RAM and the full available class list return. In the verified AWS catalog, Standard shows 32 vCPU · 64 GB, and Beast shows 192 vCPU · 384 GB; Tiny and Small are visible again. Default and explicit machine selection still work.

Unknown specifications stay unknown. Machine0 currently advertises an unmapped static class catalog, so this change does not invent CPU/RAM for it or alter its provisioning contract. An existing Gateway must run the updated code and restart to replace its process-lifetime catalog snapshot.

Evidence

Real before/after flow: two isolated, normally authenticated Gateways built from the original and fixed source, each with its own state, OS home, port, and synthetic Git project. Both call the same actual Crabbox development binary (0.46.0-18-g19bd2f51-dirty), not a mocked command. Browser access used the normal one-time openclaw dashboard --json owner handoff and a real Chromium browser. No mocked Gateway, injected catalog, DOM edits, disabled pairing, or fabricated scopes.

The recorder observed real environments.list WebSocket responses and checked the rendered menu. Before: four label-only rows. After: six rows with the actual AWS CPU/RAM values. In both variants, selecting Beast and returning to Standard preserved selection and the Default marker. No cloud worker was provisioned and no model was invoked. Attached screenshots were inspected and cropped to exclude the machine name and private paths.

Regression and sibling proof: the extended existing provider test emits a catalog larger than 64 KiB through a real child process and OpenClaw's actual output-capture implementation. It failed before the production change with the exact four label-only fallback symptom; afterward all 165 provider tests and 38 picker/selection tests passed.

Commands run:

node scripts/run-vitest.mjs extensions/crabbox/src/crabbox-worker-provider.test.ts
node scripts/run-vitest.mjs ui/src/pages/new-session/cloud-target.test.ts ui/src/pages/new-session/where-chip.test.ts ui/src/pages/new-session/discovery.test.ts ui/src/pages/new-session/draft-place-state.test.ts
node scripts/check-changed.mjs -- extensions/crabbox/src/crabbox-worker-machine-options.ts extensions/crabbox/src/crabbox-worker-provider.test.ts

The complete changed-file gate passed, including types, formatting, lint, boundary checks, and runtime import cycles. Fresh Codex autoreview reported no accepted/actionable findings. AI-assisted implementation and verification.

Build note: the original full pnpm build passed. The fixed runtime build passed compilation/postbuild but its first UI performance check exceeded the unchanged startup gzip budget by 5 bytes due to build-timestamp compression variation. Rebuilding the unchanged UI with the original build's recorded timestamp through normal build tooling passed at 343,435 B against the unchanged 343,442 B cap, and the UI outputs are byte-identical between variants. Separate runtime manifests and source hashes identify the before/after runtime code; no generated UI or budget baseline was edited. Exact-head CI remains the landing gate.

Scope: production +5/−6 (net −1); tests +32/−17 (net +15). Two changed files, no dependencies or configuration changes.

Before: cloud machine picker shows four names without CPU or RAM

After: cloud machine picker shows six classes with provider-reported CPU and RAM

Preserve structured provider catalogs beyond the lifecycle log capture limit so the cloud machine picker shows CPU/RAM and all available classes again. Keep lifecycle output limits and machine selection unchanged.

Fixes #130660.
@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 27, 2026 04:19
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for head 11fc66dc25d7632dec1c5dc0276bf662e7096896.

The real before/after Gateway flow is verified. Both variants used normal dashboard owner pairing and the same actual Crabbox binary; the browser observed real environments.list responses. The before screenshot shows four label-only choices; the after screenshot shows all six AWS classes and provider CPU/RAM. Beast → Standard selection and Default behavior passed. Captures were inspected and sanitized. No cloud worker or model call was started, and both proof Gateways are stopped.

The owner-boundary fix preserves complete structured catalog output without widening lifecycle-log capture. Production is +5/−6 (net −1), tests +32/−17; the committed patch is byte-identical to the reviewed and live-tested diff. The regression test failed before the fix with the exact missing-specifications symptom, then the provider suite passed 165/165 and picker/selection suites passed 38/38:

node scripts/run-vitest.mjs extensions/crabbox/src/crabbox-worker-provider.test.ts
node scripts/run-vitest.mjs ui/src/pages/new-session/cloud-target.test.ts ui/src/pages/new-session/where-chip.test.ts ui/src/pages/new-session/discovery.test.ts ui/src/pages/new-session/draft-place-state.test.ts
node scripts/check-changed.mjs -- extensions/crabbox/src/crabbox-worker-machine-options.ts extensions/crabbox/src/crabbox-worker-provider.test.ts

The complete changed-file gate and fresh independent Codex autoreview are clean. Exact-head CI run 33039058678 succeeded, including the required openclaw/ci-gate; the exact-head watcher ended GREEN and no remaining failing/pending checks were reported.

The PR body records the unrelated local timestamp-sensitive UI gzip check and its controlled rebuild. All 1,827 UI files were independently verified byte-identical across the live variants; distinct compiled runtime hashes identify the actual code change. No budget baseline was edited. Machine0's unmapped static catalog remains an explicitly separate follow-up, not fabricated numeric proof.

The latest ClawSweeper entry is currently a review-start placeholder with no Rank-up moves published. It will be checked again immediately before native prepare/merge; any actionable feedback must be resolved or an evidence-backed skip recorded.

@steipete
steipete merged commit d9506ff into main Aug 27, 2026
165 checks passed
@steipete
steipete deleted the steipete/ram-and-cpu-display-regression-593489 branch August 27, 2026 04:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 27, 2026
…-retirement-v13

* origin/main: (243 commits)
  fix: preserve Gateway error reasons in text logs (#130645)
  refactor(video): deduplicate generation contracts (#130635)
  fix(agents): preserve direct-message sender identity (#124548)
  fix(agents): preserve silent reply after settled tools (#130675)
  fix(talk): preserve replacement speech when an old utterance is canceled (#130687)
  fix(browser): preserve literal names and formatter-owned snapshot refs (#130599)
  fix(auth): reset only the profile replaced by a successful login (#124014)
  fix: bind session creation to admitted Gateway (#130686)
  refactor(qa-lab): reuse model reference splitter (#130317)
  docs(gateway): clarify independent HTTP endpoint switches (#130690)
  fix(ui): Control UI smooth scrolling ignores the reduced-motion preference (#130428)
  refactor(lmstudio): remove unreachable catalog merge (#130689)
  fix(crabbox): restore cloud machine CPU and RAM (#130684)
  fix(secrets): compare proxy bearer tokens directly (#127054)
  fix(matrix): show recovery key availability in text status (#128051)
  fix(ios): restore approval settings navigation and remove duplicate shell state (#130651)
  refactor(agents): use fixed tool-loop defaults directly (#130681)
  refactor(qa-lab): share process tree metric reader (#130419)
  refactor(models): simplify prepared owner access (#130683)
  fix(parallels): main install and update smoke cannot complete (#130658)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
Preserve structured provider catalogs beyond the lifecycle log capture limit so the cloud machine picker shows CPU/RAM and all available classes again. Keep lifecycle output limits and machine selection unchanged.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cloud machine picker loses CPU and RAM with larger Crabbox catalogs

1 participant