CliAgentEnv: add SandboxMixin, refactor InterceptionServer#847
Merged
CliAgentEnv: add SandboxMixin, refactor InterceptionServer#847
CliAgentEnv: add SandboxMixin, refactor InterceptionServer#847Conversation
SandboxMixin. refactor InterceptionServerCliAgentEnv: add SandboxMixin, refactor InterceptionServer
22b09c3 to
8cee0f6
Compare
The [tool.hatch.build] include list was missing prompt.txt, which is referenced by load_environment() via system_prompt_path default (Path(__file__).parent / 'prompt.txt'). Without it, installing the package would cause a FileNotFoundError at runtime. Co-authored-by: rasdani <rasdani@users.noreply.github.com>
|
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
13 tasks
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.
Description
Necessary error handling and retrying to make
CliAgentEnvwork at scale.Includes updates from #811
Extract sandbox lifecycle management into a reusable mixin for CliAgentEnv.
Can be used in
SandboxEnvtoo.Changes
Type of Change
Testing
uv run pytestlocally.Checklist
Additional Notes
Note
Medium Risk
Touches core sandbox lifecycle/interception paths (
CliAgentEnv/HarborEnv) and changes teardown/retry behavior, which could affect stability and cleanup semantics despite added tests.Overview
Refactors sandbox-backed agent environments to be more reliable at scale by introducing a reusable
SandboxMixinthat centralizes sandbox creation/deletion, retries with exponential backoff, connection-pooledThreadedAsyncSandboxClient, and teardown-time bulk cleanup to prevent orphaned sandboxes.CliAgentEnvnow usesSandboxMixinand a new sharedInterceptionServerhelper (moved intoverifiers.utils.interception_utils) to simplify interception/streaming response handling and reduce per-call client creation;HarborEnv/TerminusHarborEnvare updated to the newpost_sandbox_setup(state)signature and to run Harbor test/reward collection via background jobs with retry and better error handling (including skipping tests on prior infra errors).Adds/updates the
opencode_harborenvironment to support an uploaded system prompt and disabled tool configuration via generatedopencode.json, includes a bundledprompt.txt, and adds tests to validate the generated config renders as valid JSON after shell expansion; docs are updated to mentionSandboxMixintuning knobs, and core deps now requireprime-tunnel>=0.1.0.Written by Cursor Bugbot for commit ae3cd0c. This will update automatically on new commits. Configure here.