Repository navigation
docs(sandbox): clarify task process cleanup timing - #4614
Merged
ananthsub merged 2 commits intoOct 14, 2026
Merged
Conversation
Signed-off-by: yaoyu-33 <[email protected]>
The Hermes sandboxed runner never signals its supervisor, which is why it requests no cleanup on close; a stop file only fences delayed launches. In-flight tools are killed during the drain after the grace period, so a service they parent is adopted and drained then. Adoption follows the launching process's exit, and descendants of a preserved process also survive. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
yaoyu-33
marked this pull request as ready for review
October 14, 2026 21:12
Contributor
Author
|
/ok to test 8770226 |
yaoyu-33
added a commit
to yaoyu-33/Gym
that referenced
this pull request
Oct 14, 2026
Cross-checking the Stirrup sandbox adapter in NVIDIA-NeMo#4178 against this guide found gaps the guide did not state: - Return 4xx for deterministic seed and request errors, since the Environment Server retries 5xx and re-seeds the sandbox. - Size the episode timeout to cover seed, install, run, close and verification, and use admission to queue before the deadline starts. - Handle SIGTERM in the sandbox runner and write partial output. - Serialize non-string grant tool results instead of validating them as arguments. - Constrain transitive dependencies of in-sandbox installs and document package-index egress. - Keep direct_http session cookies, which reach non-tool routes, out of files the model can read. Also align the termination section with NVIDIA-NeMo#4614: preserved children include unfinished background jobs, services must be adopted before the stop, and descendants of a preserved process are not drained. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
ananthsub
approved these changes
Oct 14, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38653346189 |
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.
Clarify the cleanup contract for task recipes and shared sandbox sessions, following the non-blocking approval notes on #3902 and the service-timing comment.
make &, which can keep writing during verification. Describe the service-launch timing needed before a forced stop and the cleanup of newly orphaned children.SandboxSession's service-lifetime docstring, including the natural-exit limitation.The associated #3902 description correction scopes the evidence: Pi/Codex/OpenCode certificate runs exercise deadline drain under a real model; preservation of services already adopted before a forced stop is covered only by Linux regressions. Synthetic service controls exercise normal completion.
No separate issue is needed for these small corrections to the existing review. Runtime behavior, configuration and benchmark scoring are unchanged.
Validation:
pre-commit run --from-ref origin/main --to-ref HEADandgit diff --checkpass. A Python AST comparison confirmssandbox_session.pyhas identical executable code tomainafter stripping docstrings.process_supervisor.py,supervisor_client.pyandhermes_sandboxed_agent/app.pyare unchanged onmainsince the reviewed #3902 head (30b121d4b), so the documented behavior still matches the code. Runtime tests and fresh model smoke: N/A for prose-only changes.Supersedes #4604, which closed automatically when #3902 merged and its
pull-request/3902CI mirror base was deleted. This branch is rebased ontomain(after the #3902 squash merge, 8bd25f3), so the diff contains only these three files.🤖 Generated with Claude Code