mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #310] [CLOSED] fix(api): default autoPause to false, matching the E2B API #337
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#337
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/310
Author: @nblintao
Created: 9/21/2026
Status: ❌ Closed
Base:
main← Head:fix/auto-pause-default📝 Commits (1)
dc07100fix(api): default autoPause to false, matching the E2B API📊 Changes
9 files changed (+70 additions, -21 deletions)
View changed files
📝
docs/src/concepts/sandboxes/auto-eviction.md(+8 -8)📝
docs/src/concepts/sandboxes/index.md(+1 -1)📝
scripts/tests/e2e/lib/helpers.sh(+9 -0)📝
scripts/tests/e2e/suites/03_sandbox_timeout.sh(+38 -1)📝
src/api/generated/src/models.rs(+3 -3)📝
src/api/impls/sandbox.rs(+4 -4)📝
src/api/openapi.yml(+3 -3)📝
src/orchestrator/store/metadata.rs(+1 -1)📝
src/orchestrator/tests.rs(+3 -0)📄 Description
What
autoPausedefaults tofalseon sandbox creation, as the schema documentsand as E2B's API behaves. A create that does not mention it now deletes the
sandbox at its timeout instead of pausing it.
Why
AgentENV's README offers the E2B SDK "without any code changes", and this is
one default where the same code gets a different sandbox.
autoPausetofalse(spec/openapi.yml);AgentENV carries the same field with the same description and
default: truewhile the handlers read a missing value as a pause.
the Python SDK says sending
false"would be indistinguishable from anexplicit
"kill"and would override the default the API owns", anddocuments the API's default to its users as
"kill". An implementationcannot rely on clients spelling
falseout.SandboxLifecycleis byte-identical in both specs, so one unchanged createreports
onTimeout: "kill"from E2B and"pause"here.to the node's disk, and nothing reclaims it —
evict_expired_sandboxesskipsanything that is not
Running,cleanup_orphan_artifactskeeps everyartifact that still has a record, and the store has no quota.
Related issue
N/A — a spec-conformance fix; the divergence is visible in the two specs.
Scope and non-goals
Included: the two create handlers, the metadata default, the three create
schemas and their generated constructors, the two docs pages that state the
default, and e2e coverage of the mapping on both create paths. Excluded:
autoPauseMemory, which AgentENV does not implement;any reclamation policy for sandboxes that are paused deliberately.
Design and behavior changes
autoPause: true, andDefault for SandboxMetadatafollows.POST /sandboxes/{id}/pausebehaves as before.Compatibility and operations
field, its type and its description are unchanged.
autoPausenow deletes atthe timeout.
autoPause: truerestores the previous behavior. Happy togate this on a server-side configuration flag instead if you would rather
not move the default in one step.
Validation
make fmtmake clippymake test-unit03_sandbox_timeoutcovers the newdefault; run locally in compose mode, see below
make -C services test— N/A (services/untouched)maketarget(
make agentenv-server)Skipped checks and reasons: none beyond the N/A items above.
Risks and reviewer notes
03_sandbox_timeoutnow reads backlifecycle.onTimeoutafter a createthat omits
autoPause, one that sets it, and a cold create that omits it.Asserting the field rather than waiting out a TTL keeps the suite fast and
free of timing, and it covers both create paths.
15_volume.shsendsautoPause: falseexplicitly and is unaffected.Defaultand exercised thepause branch; it now names
SandboxTimeoutAction::Pause.e2e-tests (docker-compose)is red on17_buildkit'stest_concurrent_builds("Timed out waiting for concurrent builders ondifferent nodes"), which this branch does not touch — it changes a timeout
action, not build scheduling. The same tree passed that job on an earlier run
of this branch, and
17_buildkitis the suite behind the recentmainfailures too (runs 35551456023 and 35055252596; 6 of
main's last 20Integration Tests runs are red).
e2e-tests (single-node)passes here, andit runs the same suites. I cannot rerun a job from a fork.
Checklist
make agentenv-serveron this spec produces exactly the threeauto_pause: Some(false)constructors in the diff. It also reformats one unrelatedblock in
models.rs—Node'sFromStr, whichcargo fmtcollapses onto one line —and that hunk is left out to keep this to one change. Say the word if you would rather
have the target's output verbatim.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.