Skip to content

Support visibility for cloud sandboxes - #38

Open
scsmithr wants to merge 1 commit into
mainfrom
feat/sandbox-visibility
Open

scsmithr wants to merge 1 commit into
mainfrom
feat/sandbox-visibility

Conversation

@scsmithr

@scsmithr scsmithr commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Cloud sandbox creation and adapt sandbox sh accept --visibility organization|private. Omitted visibility uses the Platform default of organization. Signed-in users can select private to restrict access to their sandbox contents. The standard sandbox list shows the visibility returned by Platform.

The local backend reports that the flag requires cloud. JSON output continues to pass through the API response.

Verified with cargo test --workspace --locked and cargo fmt --all -- --check.

The API and dashboard implementation is in Platform PR #340.

@the-adaptile the-adaptile Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confidence Score: 5/5

Summary

Adds organization/private visibility to cloud sandbox creation and temporary shells, plus terminal list display. Scope and code risk are low; access enforcement remains server-side.

Local validation:

  • cargo test --workspace --locked -j 2: 158 passed, none failed or ignored.
  • cargo fmt --all -- --check: passed.
  • cargo clippy --workspace --locked --all-targets -j 2 -- -D warnings: passed.
  • 14 supplemental mock-API checks passed: omitted/explicit visibility, --data precedence, shell forwarding and failure cleanup, local rejection, JSON passthrough, and terminal table rendering.

The request/response contract matches companion Platform PR #340, which must be deployed and enabled for private creation. Live server authorization was not exercised.

Important Files Changed

File Changes
src/cli.rs Defines validated visibility values shared by sandbox creation and temporary shells.
src/commands.rs Forwards explicit visibility while preserving omitted values and JSON input precedence.
src/backend/local.rs Rejects visibility before local runtime initialization.
src/output.rs Displays server-returned visibility in terminal tables without altering JSON.
tests/cli.rs Covers invalid visibility and private creation request serialization.
tests/backend/mod.rs Checks local rejection without credentials or runtime side effects.
README.md Documents visibility defaults, private contents, and organization-wide listing.
docs/cli-reference.md Adds a private sandbox creation example.

Run info

Field ID
Agent 0d6ccd7e-b62f-4075-a561-199d1a7b1bf0
Automation ec14e69d-634f-4af0-a6dd-27aa06a1f6b3
Run 2d1a93be-3dd9-43c8-9023-6a457550bc28

Reviewed: fa0bff6-e4ed9bd · ↻ Re-run review

This branch has not been deployed

No deployments
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