Skip to content

fix: honor Azure Sandbox memory limits and worker sizes - #201024

Merged
roboclaw-bot merged 8 commits into
mainfrom
galiniliev/Sandbox-memory-limits-and-worker-sizing
Nov 23, 2026
Merged

roboclaw-bot merged 8 commits into
mainfrom
galiniliev/Sandbox-memory-limits-and-worker-sizing

Conversation

@galiniliev

@galiniliev galiniliev commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Azure Sandbox worker commands inherit the Gateway's host memory reserve and can be stopped below the Sandbox's own limit. Worker sizing also exposes generic machine classes instead of Azure's native CPU, memory, and disk tiers.

User Impact

Dedicated Azure Sandbox workers on updated node hosts use the provider's outer memory boundary. Operators can select native tiers from XS through 3XL in the machine picker or configure settings.type; generic classes keep their existing 2 CPU / 4 GiB mapping. Gateway commands and workers on shared hosts retain host memory protection.

Older node-host supervisors retain the previous safeguard until the node host is updated. Refreshing only the worker bundle does not enable the new behavior or require replacing the retained workspace.

Why This Change Was Made

Ports feaa5332d4b, including the prerequisite launch-descriptor and exec plumbing. Only a deployed worker with authenticated provider launch authority uses the Sandbox memory boundary. Tool arguments and environment variables cannot grant it. Older supervisors receive a compatible descriptor without forcing reprovisioning or replaying started work.

The refreshed baseline preserves Gateway cgroup discovery and reuse, idle cache reclaim, and cleanup after process extinction alongside the dedicated-worker change.

Evidence

  • At a9cd529291 (main parent b151c83071), 11 focused Linux test files passed, including cgroup and supervisor tests, real process cleanup, worker launch negotiation, inventory, and Azure sizing. Core and full extension test types, targeted type-aware lint, formatting, and git diff --check passed; there were zero static import cycles.
  • Independent source review of the refreshed integration found no P0–P2 issues. The added and removed product lines match the previously reviewed range, where full committed-range autoreview (35a75a4a73, Codex gpt-6.1-sol, P0–P2) found no actionable findings. The local ClawSweeper and autoreview attempts for the refreshed range produced no verdict.
  • At 81953704f8 (main parent 577af7ba2a), the full updated subagent-completion restart fixture passed with pinned Bun, and five focused worker, supervisor, cgroup, and profile files passed. The update incorporates the upstream restart/custody repair (fix: preserve restarted child results and gateway test ownership #203839). Independent integration review found no new P0–P2 issues; all 34 PR paths have identical before/after blobs and modes compared with the previous candidate.
  • Hosted CI for 81953704f8 failed. Each of its six failed jobs reproduced independently on the exact tested main parent e42e2404dc, with the same pinned Bun version for the test fixtures. The failures were formatting in unchanged src/update/AGENTS.md and tests for worker destination preparation, Gateway update CLI, device-folder creation, imported PR actions, and PR workspace preparation. The relevant failing inputs are identical in the CI merge. security-fast passed. The aggregate CI gate remains red; this evidence supports only the repository’s inherited-failure route, not a passing CI result.

Proof gaps: Live Azure provisioning and a full latest-stable upgrade with retained leases and workspaces were not run. The tests exercise the profile and negotiated launch boundaries.

Previous CI and implementation proof

Run 44784820554, attempt 1 was red on the prior head 35a75a4a73. The hook concurrency, delegated effects, and Telegram final restart failures matched on its exact main parent 09bef75c4f with the pinned Bun runtime. The Steer FIFO database rollback did not reproduce locally on that parent or on the tested PR merge; it remained unclassified. The refreshed baseline includes the upstream delegated-effects test repair (#202655) and changes in the state read path. Fresh CI is needed to assess the effect of those changes.

Secretless AWS implementation proof verified source tree 8813aed38ec381d40090f2bbbe09d744afeb8003 before execution: 251 focused tests passed and the CI artifact build verified all 163 public Plugin SDK subpaths. Its Control UI size-budget overruns were advisory; no budget was changed.

The base-supervisor negative control stopped the command under the host reserve; the corrected worker completed it. The base launch adapter also failed by sending an unsupported field; the corrected old/new-host cases passed while preserving workspace and launch identity.

Original PR by @galiniliev.

Work sessions

Linked for team reference; these sessions aren’t public.

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@galiniliev
galiniliev marked this pull request as ready for review November 18, 2026 05:51
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling extensions: crabbox size: M labels Nov 18, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 5b579fe49a0802203028aafd1e92a86b48ea867d, but the PR head is now 632ab6a442e140bbdb25d15723fb3b33b5d86e1c. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-18T06:09:39.885Z sha 5b579fe :: blocked before merge. :: [P2] Remove the reverse import into supervisor types | [P2] Make the native-size module independent of the profile module

roboclaw-bot and others added 2 commits November 18, 2026 06:37
Resolve the two static import cycles, negotiate Sandbox memory authority with the running node supervisor, and cover legacy Azure sizing compatibility.

Co-authored-by: galiniliev <[email protected]>
Preserve the reviewed budget predicate while removing its reverse supervisor type import and keeping the supervisor within its enforced line budget.

Co-authored-by: galiniliev <[email protected]>
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 81953704f889321bbd3d7d79f584a5e9d83f51a6
  • Maintainer: @galiniliev
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/server/ws-connection/connect-hello.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

Contextually type invalid-size cases with WorkerProfile so the fixture union cannot introduce optional undefined values outside PluginJsonValue. Extension test types and all 27 profile tests pass.

Co-authored-by: galiniliev <[email protected]>
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) November 18, 2026 07:21
@clawsweeper

clawsweeper Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: applying reviewed decision.

I am applying the reviewed decision for this pull request: fix: honor Azure Sandbox memory limits and worker sizes This is item 1/1 in the current shard. Shard 1/1.

This transient lease prevents a newer review from overlapping label, comment, or close mutations.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 20, 2026
Baseline-Refresh: 8445d98219c359f38cb055de994c62b138bd9851
Co-authored-by: galiniliev <[email protected]>
roboclaw-bot and others added 3 commits November 20, 2026 17:34
Baseline-Refresh: 319506a4d0501d0b9ba7b3042f1adb15374357e7
Co-authored-by: galiniliev <[email protected]>
Baseline-Refresh: f83df5a9358592e444e2ad60c0aee9a4143bfbdd
Co-authored-by: galiniliev <[email protected]>
@roboclaw-bot
roboclaw-bot merged commit 2545889 into main Nov 23, 2026
181 of 189 checks passed
@roboclaw-bot
roboclaw-bot deleted the galiniliev/Sandbox-memory-limits-and-worker-sizing branch November 23, 2026 05:31
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
…es (#203241)

* fix(gateway): shutdown never first-imports chunks an in-place update replaced

* test(gateway): guard built shutdown against late first-imports

* fix(gateway): keep broker close functions visible to dead-export scan

* fix(process): supervisor shutdown warnings never first-import their logger; guard tracks pre-signal modules

* test(ci): watch supervisor shutdown owners for the late-import guard

* test(gateway): readable late-import entry parsing

* test(gateway): stop the guard Gateway after startup maintenance settles

* test(gateway): guard only hashed dist chunks that a swap removes

* test(gateway): skip the SIGTERM guard where taskkill stops the Gateway

* fix(gateway): prime supervisor shutdown logger from the shutdown runtime; add restart worker to PR wrapper inventory

* fix(memory-core): own the manager runtime loader in a leaf module so closing never loads the provider

* fix(state): agent lease cleanup handler loads with the state worker; guard stop budget and watch paths

* fix(cron): claimed runs load their finalization before shutdown can need it; watch memory loader owners

* fix(cron): scheduled runs also load finalization with their scheduler

(cherry picked from commit 78a6ca1)

Release adaptation: Preserve the stable cron dispatch preamble and command set, without main-only cron.importLegacyMemberSources; scheduler and queue still prepare finalization together. The shutdown-runtime overlap is supplied by the preceding #203185 backport.

Companions: #203185 selected and applied first. #203839 replaces test process ownership separately and is not required for this guard: the stable fixture supports the same child, entrypoint and stop APIs. #203790, #202507, #202495 startup/resource changes, #201024 cgroup sizing, #197395 cron backoff, and #204210/#203458/#203271 wrapper-only overlaps are not dependencies.
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
)

* feat(sandbox): enforce worker memory limits and native sizing

* fix: preserve retained Azure worker launches across updates

Resolve the two static import cycles, negotiate Sandbox memory authority with the running node supervisor, and cover legacy Azure sizing compatibility.

Co-authored-by: galiniliev <[email protected]>

* fix: keep worker memory policy in an independent leaf contract

Preserve the reviewed budget predicate while removing its reverse supervisor type import and keeping the supervisor within its enforced line budget.

Co-authored-by: galiniliev <[email protected]>

* test: keep Azure size fixtures JSON-safe

Contextually type invalid-size cases with WorkerProfile so the fixture union cannot introduce optional undefined values outside PluginJsonValue. Extension test types and all 27 profile tests pass.

Co-authored-by: galiniliev <[email protected]>

* fix: keep merged supervisor imports within policy

Co-authored-by: galiniliev <[email protected]>

---------

Co-authored-by: galiniliev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation extensions: crabbox gateway Gateway runtime P2 Normal backlog priority with limited blast radius. security-sensitive-changed size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants