Skip to content

feat(sandbox): sandbox service#105

Merged
rogercloud merged 7 commits intoxorbitsai:mainfrom
yyquiet:feature/sandbox
Mar 14, 2026
Merged

feat(sandbox): sandbox service#105
rogercloud merged 7 commits intoxorbitsai:mainfrom
yyquiet:feature/sandbox

Conversation

@yyquiet
Copy link
Contributor

@yyquiet yyquiet commented Mar 6, 2026

Add abstract base classes for sandbox lifecycle management:

  • Sandbox: Interface for sandbox instance operations
  • SandboxService: Interface for sandbox lifecycle management
  • Support for template-based creation (image/snapshot)
  • File operations (upload/download/read/write)
  • Code execution (Python/JavaScript)
  • Snapshot management

Add implementation based on BoxLite.

@qinxuye
Copy link
Contributor

qinxuye commented Mar 8, 2026

I am OK with this, @rogercloud could give a review.

@qinxuye
Copy link
Contributor

qinxuye commented Mar 9, 2026

if any implementation is introduced, this PR title might need to be modified.

@yyquiet yyquiet changed the title feat(sandbox): abstract interface for sandbox service feat(sandbox): sandbox service Mar 9, 2026
liyuan added 6 commits March 9, 2026 21:34
Add abstract base classes for sandbox lifecycle management:
- Sandbox: Interface for sandbox instance operations
- SandboxService: Interface for sandbox lifecycle management
- Support for template-based creation (image/snapshot)
- File operations (upload/download/read/write)
- Code execution (Python/JavaScript)
- Snapshot management
@qinxuye qinxuye mentioned this pull request Mar 11, 2026
69 tasks
rogercloud

This comment was marked as abuse.

Copy link
Collaborator

@rogercloud rogercloud left a comment

Choose a reason for hiding this comment

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

Sandbox feature code review. Found 9 issues (see inline comments).

Summary:

  • Style: 3 (naming, shadowing, redundant imports)
  • Minor: 3 (redundant imports)
  • Design: 2 (private access, snapshot interface)
  • UX: 1 (silent exception)
  • Validation: 1 (input validation)

Overall: Code is fundamentally sound and ready to merge. All issues are minor.

- Rename variables and methods for clarity
- Remove redundant imports
- Migrate dataclass to pydantic for auto-validation
- Add supports_snapshots method to SandboxService
- Add missing comments
- Fix silent exception handling in BoxliteSandbox.info()
Copy link
Collaborator

@rogercloud rogercloud left a comment

Choose a reason for hiding this comment

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

All 9 review comments have been addressed:\n- ✅ Naming: SandBoxTemplate → SandboxTemplate\n- ✅ Redundant imports removed (uuid, tempfile)\n- ✅ Private access comment added for _box._runtime\n- ✅ Input validation added (ge=1 for cpus, ge=128 for memory)\n- ✅ Variable naming: list → sandbox_names\n- ✅ supports_snapshots property added\n- ✅ Exception handling improved\n- ✅ Relative import used\n\nCode quality is good and all issues have been resolved.

@rogercloud rogercloud merged commit 5c06d91 into xorbitsai:main Mar 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants