Use server-provided RunURL in sandbox commands#368
Merged
Conversation
Sandbox commands (start --id, exec, CheckExistingSandbox) were constructing URLs as https://cloud.rwx.com/mint/runs/<id>, which missed the org slug and ignored RWX_HOST. Now the server-provided RunURL is persisted in SandboxSession and used when available. When no server-provided URL exists (e.g. reattach via --id), RunURL is left empty so --open is a no-op rather than opening a broken URL.
a5691fc to
22d3e95
Compare
dan-manges
approved these changes
Feb 19, 2026
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.
Summary
start --id,exec,CheckExistingSandbox) were constructing URLs ashttps://cloud.rwx.com/mint/runs/<id>, which missed the org slug and ignoredRWX_HOSTRunURL(fromInitiateRun) is now persisted inSandboxSessionand used when availableRunURLis left empty so--openis a no-op rather than opening a broken URLWhen is RunURL empty?
start --id <run-id>— reattaching to an existing run by ID doesn't callInitiateRun, so there's no server-provided URL. This is the "connect to a sandbox you didn't create" case.RunURLin the stored JSON. These are transient and will be replaced on the nextresetorstart.In all other flows (
start,execauto-create,reset), the server-provided URL with the correct org slug is stored and used.Test plan
go build ./cmd/rwxcompilesgo test ./internal/cli/... ./cmd/...passesgolangci-lint run ./...cleanrwx sandbox startthenrwx sandbox exec --openopens correct URL with org slugrwx sandbox start --id <id> --opendoes not open browser (no server URL available)