feat(volume): add host and pvc volume types to OpenAPI spec#166
Merged
ninan-nn merged 10 commits intoalibaba:mainfrom Feb 6, 2026
Merged
feat(volume): add host and pvc volume types to OpenAPI spec#166ninan-nn merged 10 commits intoalibaba:mainfrom
ninan-nn merged 10 commits intoalibaba:mainfrom
Conversation
Implements the OpenSpec definition for host and pvc volume backends as described in OSEP-0003. This includes: - OpenAPI schema definitions for Volume, HostBackend, PVCBackend, AccessMode - Server-side Pydantic models with validation - Comprehensive validator functions for volume configurations - Volume-related error codes - Unit tests for schema models and validators (73 tests) - Auto-generated SDK models The proposal status is updated to 'implementing'. Refs: OSEP-0003
11 tasks
Add retry mechanism and initialization delay to reduce flaky test failures in multi-language context tests: - Add run_with_retry helper with exponential backoff (max 3 retries) - Add 0.2s delay after context creation for kernel initialization - Apply retry logic to test_06 cross-language execution tests This addresses intermittent failures where execution returns empty results due to kernel not being fully ready.
Improve test stability by catching and retrying on network errors: - Add exception handling for RemoteProtocolError, connection reset, etc. - Add create_context_with_retry helper for context creation - Increase initial retry delay to 2s for better recovery - Add cleanup retry in managed_ctx to handle server disconnects - Detect retryable errors by checking error message keywords This addresses CI failures where the server disconnects mid-request.
Increase sleep from 5ms to 2000ms to allow NetworkPolicy sidecar to fully initialize before testing egress rules. The previous 5ms delay was insufficient for the sidecar to be ready, causing curl to github.com to succeed when it should have been blocked.
Pangjiping
reviewed
Feb 5, 2026
Pangjiping
reviewed
Feb 5, 2026
Implement high-level volume support in all three SDKs: Python SDK: - Add HostBackend, PVCBackend, Volume domain models with validation - Add model_validator for exactly-one-backend constraint - Update Sandbox.create() with volumes parameter - Add unit tests for Volume models Kotlin SDK: - Add AccessMode, HostBackend, PVCBackend, Volume domain models - Add Volume.Builder with validation - Update Sandbox.Builder with volume() and volumes() methods - Add VolumeModelsTest unit tests JavaScript/TypeScript SDK: - Add AccessMode, HostBackend, PVCBackend, Volume type definitions - Update SandboxCreateOptions with volumes parameter - Export new types from index.ts CI: - Add sdk-unit-tests.yml workflow for SDK unit tests Co-authored-by: Cursor <cursoragent@cursor.com>
ninan-nn
requested changes
Feb 5, 2026
API Changes: - Rename HostBackend -> Host, PVCBackend -> PVC (remove Backend suffix) - Replace accessMode enum (RW/RO) with readOnly boolean (default false) Validation Improvements: - Simplify host path validation: remove os.path.normpath usage - Directly reject path traversal (..) and non-normalized paths (//) - Clearer error messages Updates across: - OpenAPI spec (sandbox-lifecycle.yml) - Server schema and validators - Python, Kotlin, JavaScript SDKs - OSEP design document - All related tests Co-authored-by: Cursor <cursoragent@cursor.com>
Add volumes=None to test calls that were missing the new required parameter. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Add missing volumes parameter to: - SandboxSync.create() - SandboxesSync protocol - SandboxesAdapterSync.create_sandbox() This fixes the E2E test failures where the sync SDK was missing the volumes parameter that was added to the async SDK. Co-authored-by: Cursor <cursoragent@cursor.com>
- Regenerate OpenAPI types with Volume, Host, PVC definitions - Add mutual exclusivity validation for volume backends in Sandbox.create() Co-authored-by: Cursor <cursoragent@cursor.com>
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
Implements the OpenSpec definition for host and pvc volume backends as described in OSEP-0003. This includes:
The proposal status is updated to 'implementing'.
Refs: OSEP-0003
Testing
Breaking Changes
Checklist