enh: sanbox variants#6
Merged
Merged
Conversation
…pyter/colab/modal/datalayer)
There was a problem hiding this comment.
Pull request overview
This PR updates the documented/expected sandbox_variant values to align with the expanded Code Sandboxes variants and bumps the library version.
Changes:
- Document the supported
sandbox_variantoptions across README and docs (eval/monty/docker/jupyter/colab/modal/datalayer). - Update executor sandbox timeout logic to key off
sandbox_variant="datalayer"(300s) vs others (30s). - Bump package version to
0.1.4.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Expands sandbox_variant docs to list supported variants. |
| docs/docs/programmatic-tools/index.mdx | Updates examples and documents sandbox variants; needs fixes for invalid config param. |
| docs/docs/integrations/index.mdx | Updates examples to new variant names; needs fixes for invalid config param. |
| agent_codemode/types.py | Clarifies sandbox_variant documentation and lists supported variants. |
| agent_codemode/composition/executor.py | Adjusts datalayer timeout logic to match the new variant name. |
| agent_codemode/version.py | Bumps version to 0.1.4. |
Comments suppressed due to low confidence (3)
docs/docs/programmatic-tools/index.mdx:250
- The example passes
default_timeouttoCodeModeConfig, butCodeModeConfigforbids unknown fields (extra="forbid") and does not definedefault_timeout, so this snippet will raise a validation error. Consider removing it and passing a timeout toexecutor.execute(..., timeout=...)instead.
This issue also appears on line 257 of the same file.
config = CodeModeConfig(
sandbox_variant="eval", # eval | monty | docker | jupyter | colab | modal | datalayer
workspace_path="/workspace", # Working directory
generated_path="/tmp/generated", # Where to put generated bindings
default_timeout=30.0, # Default execution timeout
)
docs/docs/integrations/index.mdx:316
- This
CodeModeConfigexample includesdefault_timeout, butCodeModeConfigdoes not accept that parameter (and forbids extras), so the snippet will raise a validation error. Remove it and pass the timeout to the execution call instead.
config = CodeModeConfig(
sandbox_variant="datalayer", # Isolated cloud sandbox
default_timeout=30.0, # Limit execution time
workspace_path="/safe/workspace", # Restricted workspace
)
docs/docs/programmatic-tools/index.mdx:257
- This section describes the sandbox as “isolated”, but the
evalvariant is explicitly “in-process” (no separate process/container), so it isn’t isolated in the usual OS/container sense. Clarify this to avoid over-promising safety/isolation for the default configuration.
- **eval**: In-process Python execution on the same machine (default)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.