Repository navigation
feat(sandbox): release agent-tools drives every box can rely on (PR A, draft) - #9929
Merged
Merged
Conversation
The release publishes the bundle's agents drive in every region and fails before the image, the golden or any row when a region with an environment has no drive, or a drive without claude, codex or pdev. A kept-previous agent warns with its region and the version that failed. Every environment row moves to the new bundle, archived ones too, so their workspaces' drives are not pruned. Only a --production release prunes, and it keeps each row's drive and the 3 newest released bundles in every region. The drive a box mounts is named by the box's own region on a wake. The golden, the probe and real-sandbox mount the drive, and the probe checks each cloud preset resolves into /opt/agents and that the wake relinks.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
2 of 6 tasks
|
No installed development build can load this pull request as an update: its native fingerprint is |
Contributor
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
saddlepaddle
marked this pull request as ready for review
November 18, 2026 03:55
saddlepaddle
added a commit
that referenced
this pull request
Nov 18, 2026
Main's #9929 (agent-tools drives every box can rely on) touched files this branch also changed. The merge result kept this branch's side for all of #9929's files, so they were reset to main's versions: packages/sandbox agent-tools, environments/probe and release, real-sandbox, trpc vercel and vercel.test, and the sandbox README (plus this branch's one README line). claim.ts is main's version plus this branch's box log lines. main reduced trpc lib/sandbox/agent-tools.ts to one PostHog call (agentToolsDriveEnabled), so the claim now asks that flag through organizationFlagEnabled in feature-flags.ts and agent-tools.ts and its test are removed.
This was referenced Nov 18, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
--productionprunes.real-sandboxboxes mount the drive and check that the agents run from it.Pseudocode
What a customer sees
Nothing changes on any box: the flag still decides who mounts the drive, and every box still has its disk agents. Two visible effects:
Evidence
packages/sandboxbun test: 67 pass. New tests:agentToolsGaps(needed region with missing drive or missing required agent; optional agent and un-needed region ignored),referencedAgentToolsDrives(row drives + recent bundles × regions), the kept-previous warning text with region and version, andavailablefrom a publish.packages/trpcbun test: 986 pass. New test: a wake mountsagent-tools-<sandbox.region>-…even when the claim's environment is elsewhere.bun run lint:fix,bun run typecheck(root): clean.52cb11cb); not re-run on this head (no credentials here).bun run release,real-sandbox,agent-tools(no credentials; creating sandboxes is not allowed here). No drive publish time was measured (see decision 4).Superset, default branch, read-only SELECT): 3 live workspaces in 2 archived environments, on 1 frozen (region, bundle) drive.deploy-production.yml,deploy-paradev-staging.yml,deploy-preview.ymlandsandbox.ymlall readsecrets.VERCEL_SANDBOX_TEAM_ID/VERCEL_SANDBOX_PROJECT_ID. Staging runs in theproductionGitHub environment with production'sDATABASE_URL, so it shares production's rows. Preview runs in thepreviewenvironment on a Neon branch of production. The token here cannot list environment secrets (403), so I could not confirm whetherpreviewoverrides the project id. The mismatches doc (~812) says everything lives in onesandboxesproject. Conclusion: assume one project for every database. Onlysandbox.yml'srelease --productionruns in CI; a release from a dev or preview database would see only its own rows, so this PR makes every non-production release skip the prune.Risks and rollback
kept-previous) when the new one fails its check, so this fails only when a region has no earlier drive either.Needs before merge
real-sandboxdispatch on this head.Decisions for the product owner
agent-tools:line per region with a timestamp; the first release on this head gives both numbers (all regions vs the few with environments).Sequencing
deploy-production.yml), independently of the sandbox release; this PR is safe in either order because it changes no box.Summary by cubic
Publishes the agent-tools drive in all 19 regions on every release so a box in any region can mount its bundle's agents, and fails the release before the image, golden, or rows change when a region with an environment has no drive or a drive missing claude, codex, or pdev. Previously drives were published only for regions with environments and an incomplete one only warned.
A wake now mounts the drive named by the box's own region instead of its environment row's, and archived environments' workspaces move to the current bundle on their next wake instead of staying on the bundle from when they were archived.
--productionrelease prunes drives; it keeps every environment row's drive plus the 3 newest released bundles in all regions, so rollback and mid-release environments keep their mounts./opt/agentsand the wake relinks them.Written for commit fb4ed84. Summary will update on new commits.