Skip to content

shell: add a script for manual ephemeral sandbox shell - #3330

Merged
psarna merged 1 commit into
mainfrom
psarna/sandbox-shell-script
Sep 11, 2026
Merged

psarna merged 1 commit into
mainfrom
psarna/sandbox-shell-script

Conversation

@psarna

@psarna psarna commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Can be used to create an ephemeral sandbox and connect to its tty to perform any kind of manual tests.

repo/Gym$ uv sync --extra sandbox

repo/Gym$ python -m nemo_gym.sandbox.shell --config nemo_gym/sandbox/providers/opensandbox/configs/opensandbox.yaml

Creating ephemeral sandbox from 'docker.io/library/python:3.12-slim'...
Sandbox ready. Exit the remote shell to destroy it.

bash-5.2# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.6
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format/copyright pass).
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

Can be used to create an ephemeral sandbox and connect to its
tty to perform any kind of manual tests.

```
repo/Gym$ uv sync --extra sandbox

repo/Gym$ python -m nemo_gym.sandbox.shell --config nemo_gym/sandbox/providers/opensandbox/configs/opensandbox.yaml

Creating ephemeral sandbox from 'docker.io/library/python:3.12-slim'...
Sandbox ready. Exit the remote shell to destroy it.

bash-5.2# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.6
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
```

Signed-off-by: Piotr Sarna <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@psarna
psarna force-pushed the psarna/sandbox-shell-script branch from 9c40c9d to d9b2122 Compare September 11, 2026 19:16
@bxyu-nvidia

Copy link
Copy Markdown
Contributor

/ok to test d9b2122

@psarna
psarna marked this pull request as ready for review September 11, 2026 19:37
@psarna
psarna merged commit 43415b5 into main Sep 11, 2026
40 checks passed
@psarna
psarna deleted the psarna/sandbox-shell-script branch September 11, 2026 19:45
kajalj22 added a commit that referenced this pull request Sep 14, 2026
## Background

The full test suite failed on `main` with exact coverage **94.46%**.
Root cause (per triage on PR #3330's merge): the coverage gate compares
at zero-decimal precision, so an actual **94.97%** rounded to 95% and
incorrectly passed the 95% gate before merge.

This PR addresses only that rounding gap. It intentionally excludes the
stale-PR-head / merge-current-main fix tracked separately in #3338, and
does not add tests to close the pre-existing coverage gap (a separate
concern).

## What changed

- `pyproject.toml`: set `[tool.coverage.report] precision = 2` so
`fail_under` compares the exact percentage — 94.97 < 95 now exits
nonzero.
- `tests/unit_tests/test_ci_environment.py`: assert `precision == 2` and
`fail_under == 95.0` in the coverage config.

## Note

With this change alone, the repo's aggregate coverage is still below
95%, so the coverage-gated CI job on this PR is expected to fail until
coverage is separately brought up. This PR only fixes the gate's
precision, not the underlying coverage shortfall.

## Test plan

- [x] `pytest tests/unit_tests/test_ci_environment.py` passes locally
- [x] `pre-commit run --files pyproject.toml
tests/unit_tests/test_ci_environment.py` passes
- [x] DCO sign-off on the commit

---------

Signed-off-by: Kajal Jain <[email protected]>

This branch was previously deployed

1 inactive deployment
public — d9b21224 Deployed Sep 11, 2026 by copy-pr-bot[bot] via release / finalize / notify #2812
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants