Skip to content

feat(sandbox): custom disk sizing + fix stop→/stop parity - #91

Merged
robertohluna merged 3 commits into
mainfrom
feat/sandbox-custom-disk-cli
Aug 29, 2026
Merged

feat(sandbox): custom disk sizing + fix stop→/stop parity#91
robertohluna merged 3 commits into
mainfrom
feat/sandbox-custom-disk-cli

Conversation

@robertohluna

Copy link
Copy Markdown
Contributor

Summary

Two sandbox CLI fixes.

1. Custom disk sizing (--disk combines with --size)

miosa sandbox create --size small --disk 20gb now works. The --disk value acts as a floor over the shape selected by --size: it can only grow the disk beyond the size's default. vCPU and memory continue to pin the shape from --size (they are not changed by --disk). This lets a caller keep a shape's compute profile while requesting more disk.

2. stop now posts to /stop (parity fix)

miosa sandbox stop now posts to POST /sandboxes/:id/stop. It was wrongly posting to /pause, so a command named stop actually performed a pause — the account/resource state did not match what the user asked for. This aligns the verb with the endpoint.

Tests

38/38 passing in test/commands/sandbox.test.ts.

Previously the only way to set disk was the full --cpu/--memory/--disk triple,
and it had to match a named size exactly - so there was no way to ask for, say,
20 GB on a small shape. The natural '--size small --disk 20gb' errored.

Disk is a floor the platform grows the rootfs to; vCPU and memory are pins that
name the shape. So --disk now overrides the disk on top of any size, --cpu and
--memory still pin the shape, and vCPU/memory that name no shape (or a disk the
server rejects) fail with a specific message instead of being guessed at here.

Tests: 38 pass, incl. the new '--size small --disk 20gb' case.
`miosa sandbox stop` posted to /sandboxes/:id/pause, so the command named "stop"
performed a pause. The backend has a distinct /stop transition that accepts from
running OR paused (pause accepts only running), preserves the filesystem, and
returns the paused state. Pointing stop at /stop makes the command match its
name and the account state the user sees, and lets stop work on an
already-paused sandbox instead of 409-ing.

Test updated to assert the /stop endpoint.
Bumps above npm's current 1.1.18 (which was published from an uncommitted
version) so this release moves the latest tag and ships the disk-sizing +
stop-parity fixes rather than a stale, lower number.
@robertohluna
robertohluna merged commit a44de77 into main Aug 29, 2026
2 checks passed
@robertohluna
robertohluna deleted the feat/sandbox-custom-disk-cli branch August 29, 2026 12:10
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