Repository navigation
Conversation
…HE-4186) Use the existing organization profile pointer and preserve personal overrides. Carry the selected profile image with its launch snapshot across sandbox backends. No migration, parent inheritance, copying, or per-automation image picker. Local draft: validated with the candidate SDK wheel. The normal Mypy hook still targets the released SDK and remains a release/dependency alignment gate; it is explicitly skipped for this unpublished local commit. Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
|
📁 PR Artifacts Notice This PR contains a
|
|
Two follow-up concerns to make the sandbox profile contract explicit:
This comment was created by an AI agent (OpenHands) on behalf of the user. |
|
Thanks, Rohit. The launcher that provisions the sandbox owns the |
|
On the second point, I’d keep |
jlav
left a comment
There was a problem hiding this comment.
I'm onboard with this feature at a high level, but I just need to make sure this is well understood by all parties that are making sandbox changes:
We support several providers already, and plan to introduce more. Many providers require that the specifications for a sandbox environment are defined before the sandbox is actually created:
- K8S Agent Sandbox has a warm pool, where the sandbox image, cpu, memory, and other environment details are configured.
- E2B has Templates, which are similar to above.
- Runtime API also has a warm pool
Many other providers follow the same pattern.
We must separate the environment definition from Sandbox creation to remain flexible as to what providers we can support.
I'm raising this concern now because I see that OpenHands/software-agent-sdk#6948 has a sandbox object with a spec_id to "[leave] room for additional typed sandbox settings, such as CPU and memory requests".
We should absolutely not begin building features out under the assumption that we can modify CPU, memory, and many other details of the runtime environment on demand like that because, largely, we cannot do that across sandbox providers. I know we're not doing that right now, but I want to call it out so we're aligned.
Last, we're inconsistently calling sandbox specs "images". Since runtime API has a runtime config, agent sandbox has a warm pool config, and e2b has a template, we should just centralize on the term "Sandbox Spec", or something generic like "Sandbox Environment". Image is too specific, since most of the specs determine much more than just the image.
#1448 # Conflicts: # frontend/src/i18n/declaration.ts # frontend/src/i18n/translation.json # frontend/src/routes/app-settings.tsx
…rors/docs Reviewer feedback (review 5994210033 on #1448): the chosen Sandbox Spec controls image/resources via the provider's preconfigured definition; launches select a spec, not an image, so user-facing copy, comments, and error text should say 'sandbox spec' rather than 'image'. No API field renames, no SDK resource overrides, no profile schema change. Preserves {{image}} interpolation key and actual image diagnostics.
|
Thanks, Joe. Your feedback helped clarify where the sandbox configuration belongs. I updated the PR title, description, and English settings UI to use Sandbox Spec. The Agent Profile stores This PR uses the existing image-backed catalog. The same field can reference a named spec when #948 lands. |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HUMAN:
AGENT:
Implemented with OpenHands using Bedrock Opus. Coordinator review, integration testing and small client/docs follow-through were agent-operated.
SDK dependency: Enterprise main now pins SDK 1.63.1 in the app and Mypy hook. The local #1448 candidate integrates those pins and passes Mypy. GitHub CI for that candidate and packaged Compose acceptance are still pending. SDK bump · Mypy alignment
Dependency and merge order
SDK PR #6948 added the optional Sandbox Spec reference to Agent Profiles. Revalidate native Compose acceptance against the released dependencies before merging.
Why
Organizations that maintain a custom tools image need a shared default environment. An owner or admin can designate a shared Agent Profile as the organization default. The profile can reference an existing Sandbox Spec, and members can select another profile or keep a personal Sandbox Spec preference.
An Agent Profile stores an optional
sandbox.spec_idthat refers to an existing Sandbox Spec. The provider defines the environment before launch, including the image tag and any supported CPU and memory settings. Enterprise resolves the reference when a new sandbox is needed. This draft uses the deployment's existing image-backed Sandbox Specs.This follows the smaller profile-based proposal.
Summary
Sandbox selection precedence
Enterprise selects the agent profile in this order.
agent_profile_id) supplied in the conversation start API request. This one-time override applies only to that conversation. The member's saved profile selection stays the same.When provisioning a new sandbox, Enterprise uses an explicit spec if the launch path supplies one, then a valid saved personal preference, then the resolved Agent Profile’s spec, then the deployment default. A profile with no spec leaves selection to the other tiers. Existing sandboxes keep their environment.
The named Sandbox Spec catalog and organization allowlist are follow-up integration work with #948. In that integration, the launcher checks each candidate spec ID against the effective organization’s policy. A saved profile cannot launch a spec the organization has removed. PRD-197 tracks what the user should see when that happens.
Before enabling named-spec policy for an organization with saved profiles, account for existing image-backed IDs. The policy checks exact named spec IDs. If a profile still stores an image reference, the administrator needs to choose the intended allowed spec or explicitly map it during rollout. Multiple specs can share an image, so the old image reference alone may be ambiguous.
Issue Number
OHE-4186
How to Test
The historical validation below used an isolated environment with the candidate SDK. On the updated standalone candidate with the released SDK 1.63.1, five PostgreSQL-backed suites passed 764 tests with one skip. The worker's frontend checks passed 40 tests with one skip. Mypy, Ruff, and the package and version checks passed locally.
Validation completed before rebasing onto Enterprise base
b0d455745:After rebasing onto
b0d455745, 717 backend tests passed and 1 skipped, covering profiles, conversation creation, auth/secrets, integration resolver contexts and remote sandboxes. Against the updated frontend lockfile, 24 focused tests, typecheck and production build passed. A test-only union narrowing was added after typecheck identified the issue. The native Compose and browser results above were collected before this rebase.The normal Mypy hook passed on the updated local candidate. GitHub CI and packaged Compose acceptance for that candidate remain pending.
Video/Screenshots
Synthetic local fixtures only:
Type
Notes
No database migration or organization image column is added. Organization defaults point to existing shared profiles. Automations retain existing profile selection and use the ordinary spec resolution path when provisioning a new sandbox. Parent inheritance, profile copying and GitOps management are out of scope.
This remains a draft pending GitHub CI and packaged Compose acceptance for the updated candidate.
Enterprise server image for this PR: