fix(gateway-state): accept Running phase as alive alongside Ready#3146
Conversation
On some deployments (e.g. Brev launchables) the sandbox stays in "Running" phase which is functionally equivalent to "Ready" — the agent is live and the gateway is reachable inside. Previously the CLI treated this as "not ready" which caused false-negative health reports. Changes: - isSandboxReady() now matches both "Ready" and "Running" columns - ensureLiveSandboxOrExit() no longer exits on "Running" phase - Two new tests for Running phase detection (plain + ANSI) Fixes #3138
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR expands sandbox liveness detection to recognize both ChangesSandbox Phase Liveness Detection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Fixes #3138 — On some deployments (e.g. Brev launchables) the sandbox stays in
Runningphase which is functionally equivalent toReady. The CLI previously treated this as "not ready", causing false-negative health reports, dashboard showing the agent as stopped, and recovery logic not triggering.Changes
src/lib/state/gateway.tsisSandboxReady()now matches bothReadyandRunningcolumnssrc/lib/actions/sandbox/gateway-state.tsensureLiveSandboxOrExit()no longer exits onRunningphasetest/onboard-readiness.test.tsTesting
test/onboard-readiness.test.ts— 36/36 passedtest/gateway-state.test.ts— 37/37 passedContext
This is the CLI-side prerequisite for brevdev/nemoclaw-image#10, which replaces the onboard-ui's reinvented health checks with NemoClaw CLI calls. Originated from #2258 (sub-item #4), which was closed with work redirected to the nemoclaw-image repo.
Summary by CodeRabbit
Release Notes
New Features
Tests