Skip to content

fix(server): normalize BatchSandbox create status#642

Open
Gujiassh wants to merge 1 commit intoalibaba:mainfrom
Gujiassh:fix/batchsandbox-running-state
Open

fix(server): normalize BatchSandbox create status#642
Gujiassh wants to merge 1 commit intoalibaba:mainfrom
Gujiassh:fix/batchsandbox-running-state

Conversation

@Gujiassh
Copy link
Copy Markdown
Contributor

@Gujiassh Gujiassh commented Apr 4, 2026

Summary

  • normalize create_sandbox responses to return Running once the create wait gate has already accepted a BatchSandbox workload as usable
  • keep the internal wait behavior unchanged while hiding the intermediate Allocated state from the public create response
  • add a focused regression test covering the Allocated to Running normalization path

Testing

  • cd server && uv run pytest tests/k8s/test_kubernetes_service.py -k \"create_sandbox_with_valid_request_succeeds or create_sandbox_normalizes_allocated_status_to_running or wait_for_allocated_pod_returns_immediately\"
  • cd server && uv run ruff check opensandbox_server/services/k8s/kubernetes_service.py tests/k8s/test_kubernetes_service.py

Stop leaking the internal Allocated state once create_sandbox has already passed its usability gate, and cover the create-path contract with a focused regression test.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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