Skip to content

feat: enable labels for prime sandboxes + tunnels - #1604

Merged
mikasenghaas merged 2 commits into
feat/nano-as-v1from
feat/prime-sandbox-labels
Jun 10, 2026
Merged

feat: enable labels for prime sandboxes + tunnels#1604
mikasenghaas merged 2 commits into
feat/nano-as-v1from
feat/prime-sandbox-labels

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Add PrimeConfig.labels: list[str] (settable via --harness.runtime.labels), passed to CreateSandboxRequest and to every Tunnel. A run's prime sandboxes and tunnels can then share a label so they're findable / cleanable together.

Verification (e2e against prime)

uv run eval gsm8k-v1 -n 2 -r 2 --harness.id default --harness.runtime.type prime:

  • Mid-run, SandboxClient.list(labels=[label]) returned the run's sandboxes, each carrying the label (with name still the per-rollout trace id).
  • All 4 rollouts completed reward=1.0 through the prime sandbox + tunnel; no sandboxes leaked after (list(exclude_terminated=True) → 0).
  • Tunnel labeling confirmed via a live Tunnel(labels=[…])TunnelClient.list_tunnels(labels=[…]) round-trip (status=connected, labels=[…]).

Note: auto-defaulting the labels to the eval run uuid was dropped for now — set them explicitly via --harness.runtime.labels.


Note

Low Risk
Additive config wiring to Prime sandbox/tunnel APIs with no changes to auth, exec, or teardown logic.

Overview
Adds PrimeConfig.labels so Prime eval runs can tag every sandbox and tunnel with the same strings (via --harness.runtime.labels), making resources listable and cleanable as a group.

On sandbox create, labels are forwarded to CreateSandboxRequest. On expose, the same list is passed into Tunnel (empty config becomes None for the tunnel API). Labels are opt-in; there is no automatic run-uuid default in this change.

Reviewed by Cursor Bugbot for commit 7748616. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add labels support to prime sandbox and tunnel creation in PrimeRuntime

Adds a labels: list[str] field to PrimeConfig in prime.py. Labels are forwarded to CreateSandboxRequest on sandbox start and to tunnel construction in the expose method (passed as None when the list is empty).

Macroscope summarized 7748616.

Add `PrimeConfig.labels` (settable via `--harness.runtime.labels`), passed to both
`CreateSandboxRequest` and every `Tunnel`. `run_eval` defaults the labels to the eval
run's uuid when unset — after `save_config`, so re-running `@ config.toml` gets a fresh
uuid rather than reusing the saved one. Every sandbox and tunnel a run creates then
shares the run's uuid label, so they can be found and cleaned up together.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mikasenghaas mikasenghaas changed the title feat: label prime sandboxes + tunnels with the eval run uuid feat: enable labels for prime sandboxes + tunnels Jun 10, 2026
Leave `PrimeConfig.labels` settable (sandbox + tunnels), but don't auto-default them to
the eval run uuid in run_eval for now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mikasenghaas
mikasenghaas marked this pull request as ready for review June 10, 2026 18:10
@mikasenghaas
mikasenghaas merged commit b0e18a1 into feat/nano-as-v1 Jun 10, 2026
4 checks passed
@mikasenghaas
mikasenghaas deleted the feat/prime-sandbox-labels branch June 10, 2026 18:11
pull Bot pushed a commit to Stars1233/verifiers that referenced this pull request Jun 23, 2026
…1604)

* feat(v1): label prime sandboxes + tunnels with the eval run uuid

Add `PrimeConfig.labels` (settable via `--harness.runtime.labels`), passed to both
`CreateSandboxRequest` and every `Tunnel`. `run_eval` defaults the labels to the eval
run's uuid when unset — after `save_config`, so re-running `@ config.toml` gets a fresh
uuid rather than reusing the saved one. Every sandbox and tunnel a run creates then
shares the run's uuid label, so they can be found and cleaned up together.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): drop the run-uuid default for prime labels for now

Leave `PrimeConfig.labels` settable (sandbox + tunnels), but don't auto-default them to
the eval run uuid in run_eval for now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant