Repository navigation
feat: add cloud workspace readiness checks - #120
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR implements cloud workspace provider readiness checking: it extends the WorkspaceProvider protocol with a ChangesCloud Workspace Provider Readiness
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@coding-agent/src/coding_agent/ui/http_server.py`:
- Around line 715-723: The cloud readiness check currently calls the synchronous
cloud_workspace_ready_from_config(...) (which calls _docker_provider_ready() and
uses subprocess.run()) directly inside the async /readyz handler; change this to
run the blocking check off the event loop by invoking it with an async executor
(e.g., asyncio.to_thread or loop.run_in_executor) and awaiting the result, e.g.,
await asyncio.to_thread(cloud_workspace_ready_from_config,
cloud_workspace_config); keep the same try/except behavior and assignment to
checks["cloud_workspace"] and ready, and ensure _load_cloud_workspace_config()
remains called synchronously before offloading the blocking readiness function.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 6a252726-2e8a-44bf-a009-cca22d339161
📒 Files selected for processing (8)
coding-agent/.opencode/prompts/tasks/adr-0019-pr7-provider-readiness.mdcoding-agent/src/coding_agent/environment/__init__.pycoding-agent/src/coding_agent/environment/docker_workspace_provider.pycoding-agent/src/coding_agent/environment/workspace_provider.pycoding-agent/src/coding_agent/ui/http_server.pycoding-agent/tests/coding_agent/environment/test_docker_workspace_provider.pycoding-agent/tests/ui/test_execution_binding.pycoding-agent/tests/ui/test_http_server.py
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Summary
docker info/readyzto reportcloud_workspaceonly when cloud workspaces are enabled, returning503for invalid or unhealthy provider stateVerification
uv run pytest tests/ui/test_http_server.py -k readyz -vuv run pytest tests/coding_agent/environment/test_docker_workspace_provider.py -k readiness -vuv run pytest tests/ui/test_execution_binding.py -k readiness -vuv run pytest tests/ui/test_http_server.py -vuv run pytest tests/coding_agent/environment/test_docker_workspace_provider.py -vuv run pytest tests/ui/test_execution_binding.py -vuv run basedpyright src/coding_agent/ui/http_server.py src/coding_agent/environment/workspace_provider.py src/coding_agent/environment/docker_workspace_provider.py tests/ui/test_http_server.py tests/coding_agent/environment/test_docker_workspace_provider.py tests/ui/test_execution_binding.py/readyzQA for enabled healthy provider (200), enabled unhealthy provider (503), and enabled invalid config (503)Summary by CodeRabbit
New Features
Tests
Documentation