Skip to content

feat: add sandbox expiry - #8

Merged
BhautikChudasama merged 1 commit into
mainfrom
feat/sandbox-expiry
Nov 23, 2026
Merged

BhautikChudasama merged 1 commit into
mainfrom
feat/sandbox-expiry

Conversation

@BhautikChudasama

@BhautikChudasama BhautikChudasama commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Devin Review

@devin-ai-integration devin-ai-integration 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.

Devin Review found 3 potential issues.

Devin Review

Comment thread src/createos/models.py
Comment on lines +257 to +262
timeout_minutes: int = _json(
"timeout_minutes", omit_default=True, default=0
)
sigterm_before_expiry: bool = _json(
"sigterm_before_expiry", omit_default=True, default=False
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Misbound positional sandbox creation arguments

Existing positional calls to CreateSandboxRequest bind network lists and disk sizes to the new expiry fields. The SDK sends them under expiry keys instead of applying the requested network and disk settings.

Learn more

CreateSandboxRequest is a public dataclass, so its generated constructor accepts fields positionally in declaration order. Client.create_sandbox passes the request to the transport, which uses Model.to_dict to serialize the fields by name without checking their types.

Example: CreateSandboxRequest('', 's-4vcpu-4gb', 'devbox:1', 'demo', {}, [], 8192) used to send disk_mib: 8192 and omit the empty networks list. It now sends timeout_minutes: [] and sigterm_before_expiry: 8192 instead.

Recommended fix: Move both expiry fields after the existing request fields to preserve the public positional signature. Add a regression test that serializes a request using the old positional arguments.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread src/createos/models.py
Comment on lines +257 to +259
timeout_minutes: int = _json(
"timeout_minutes", omit_default=True, default=0
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Undocumented zero timeout behavior

CreateSandboxRequest has no docstring explaining that zero omits the timeout rather than sending it for validation. The expiry guide lists only 2–1440 minutes.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread tests/test_sdk.py
Comment on lines +229 to +230
"expires_at": "2026-11-23T12:10:00Z",
"sigterm_before_expiry": True,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Unverified expiry wire contract

The test supplies expires_at and sigterm_before_expiry itself, so it cannot verify the control-plane response. The control-plane and Go SDK checkouts were unavailable for the required parity check.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@BhautikChudasama
BhautikChudasama merged commit 486f44c into main Nov 23, 2026
11 checks passed
@BhautikChudasama
BhautikChudasama deleted the feat/sandbox-expiry branch November 23, 2026 07:38
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