Repository navigation
fix: honor Azure Sandbox memory limits and worker sizes - #201024
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: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
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]>
|
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]>
|
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. |
Baseline-Refresh: 8445d98219c359f38cb055de994c62b138bd9851 Co-authored-by: galiniliev <[email protected]>
Co-authored-by: galiniliev <[email protected]>
Baseline-Refresh: 319506a4d0501d0b9ba7b3042f1adb15374357e7 Co-authored-by: galiniliev <[email protected]>
Baseline-Refresh: f83df5a9358592e444e2ad60c0aee9a4143bfbdd Co-authored-by: galiniliev <[email protected]>
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…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]>
) * 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]>
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
a9cd529291(main parentb151c83071), 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, andgit diff --checkpassed; there were zero static import cycles.35a75a4a73, Codexgpt-6.1-sol, P0–P2) found no actionable findings. The local ClawSweeper and autoreview attempts for the refreshed range produced no verdict.81953704f8(main parent577af7ba2a), 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.81953704f8failed. Each of its six failed jobs reproduced independently on the exact tested main parente42e2404dc, with the same pinned Bun version for the test fixtures. The failures were formatting in unchangedsrc/update/AGENTS.mdand 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-fastpassed. 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 parent09bef75c4fwith 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
8813aed38ec381d40090f2bbbe09d744afeb8003before 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.