Repository navigation
feat(cloud-agent-next): raise disk to 20 GB for live containment sandbox classes - #7983
Conversation
Every production container class now requests the platform maximum 20 GB disk while keeping its current vCPU and memory. Large repository checkouts were previously bounded by the class tier (8 GB for code review, 10 GB for the small classes), which failed with "sandbox storage full" during git checkout. The three mirrored capacity sources stay aligned: - services/cloud-agent-next/wrangler.jsonc - services/cloud-agent-next/src/container-usage-context.ts - apps/web/src/lib/cloudflare/container-capacity.ts and container-capacity-parity.test.ts asserts the agreement.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe follow-up commit removes the config-snapshot tests (and the deleted parity test) that previously failed against the 20 GB containment disks, leaving the changed tests, imports, and comments internally consistent; no new defects are visible in the incremental diff. Files Reviewed (4 files)
Previous findings re-verified against HEAD Previous Review Summaries (2 snapshots, latest commit fe8c9f3)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit fe8c9f3)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe new commit narrowed the 20 GB disk bump to the containment classes, but the matching capacity snapshot in Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (4 files)
Fix these issues in Kilo Cloud Previous review (commit eef1379)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryA stale capacity snapshot in Overview
Issue Details (click to expand)CRITICAL
SUGGESTION
Files Reviewed (4 files)
Context checked and found consistent: Reviewed by deepseek-v4.1-flash · Input: 52.7K · Output: 6.6K · Cached: 343.6K Review guidance: REVIEW.md from base branch |
…asses Narrow the 20 GB disk change to the classes that actually carry live instances: SandboxSmallContainment (10 -> 20 GB) and SandboxCodeReviewContainment (8 -> 20 GB). SandboxContainment was already at 20 GB. Sandbox, SandboxSmall, SandboxDIND, and the non-containment SandboxCodeReview have no live instances (every non-contained session runs in Sandbox, and credential containment routes traffic to the containment classes), so they keep their lower tiers.
…parity test Remove tests that restate container configuration values, so changing a sandbox capacity or SKU no longer requires editing test expectations: - container-capacity-parity.test.ts (deleted) - SKU, legacy capacity, containers capacity, and Vercel capacity/identity snapshots in container-usage-context.test.ts Behavior tests are unchanged: rejection of unsupported instance sizes, class classification, capacity-routing dispatch, and attribution. The routing test now compares against the exported capacity tables instead of duplicating their values. The three sources (wrangler.jsonc, SANDBOX_CAPACITIES, and the web container-capacity table) are now kept in sync manually; the comments in the two code files say so.
Summary
Raises the disk of the Cloud Agent container classes that carry live traffic to the platform maximum 20 GB, keeping each class's current vCPU and memory.
Motivation: code review sessions were failing with
Workspace setup failed: sandbox storage fullduringgit checkouton repositories whose working tree exceeds the class tier (code review had 8 GB). Cloudflare custom instance types allow up to 20 GB disk independent of vCPU/memory (max 4 vCPU, 12 GiB memory, min 3 GiB per vCPU), so this is a disk-only change.Scope is limited to classes with live instances (Cloudflare dashboard):
SandboxCodeReviewContainmentSandboxSmallContainmentSandboxContainmentNot changed:
Sandbox,SandboxSmall,SandboxDIND, and the non-containmentSandboxCodeReviewall report 0 live instances (every non-contained session runs inSandbox, and credential containment routes traffic to the containment classes), so they keep their lower tiers. Dev overrides are unchanged.SandboxContainersuses the Durable Object policy with runtime-selected named instance types (standard-3/standard-4), so its disk is chosen per allocation, not here.This PR also removes the config-snapshot tests so that a capacity change no longer requires editing test expectations:
container-capacity-parity.test.tscontainer-usage-context.test.tsThe three sources (
wrangler.jsonc,SANDBOX_CAPACITIES, the webcontainer-capacitytable) are now kept in sync manually, and the comments in the two code files say so.Changed files:
services/cloud-agent-next/wrangler.jsoncservices/cloud-agent-next/src/container-usage-context.tsservices/cloud-agent-next/src/container-usage-context.test.tsservices/cloud-agent-next/src/container-capacity-parity.test.ts(deleted)apps/web/src/lib/cloudflare/container-capacity.tsVerification
No manual testing: this is a deployed capacity configuration change and deployment is operator-driven.
Automated checks run:
pnpm --filter cloud-agent-next run test— pass (223 files, 6808 passed, 3 skipped).pnpm --filter cloud-agent-next run typecheck— pass.pnpm --filter cloud-agent-next run lint— pass (0 warnings, 0 errors).oxfmt --list-differenton the changed files — clean.Not covered: no live sandbox was started, so the effective Cloudflare capacity is asserted by config only, not observed at runtime.
Visual Changes
N/A
Reviewer Notes
SandboxSmallContainment'smax_instances.container-capacity-parity.test.tsremoves the only automated guard thatwrangler.jsonc,SANDBOX_CAPACITIES, and the web capacity table agree. They now rely on manual sync and the comments.src-tauri/target/): a sufficiently large checkout can still exceed 20 GB.