fix(nanoclaude): infra status — exited 컨테이너가 있어도 데이터 반환

ok=False(일부 컨테이너 exited)와 error_type(SSH 실패)를 구분.
컨테이너 목록은 항상 반환되도록 수정.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-04-13 14:04:19 +09:00
parent 2268e47067
commit ff3c6f5903
+2 -1
View File
@@ -21,7 +21,8 @@ logger = logging.getLogger(__name__)
async def status(host: str = "gpu") -> dict:
"""Docker container status overview."""
result = await docker_status(host)
if not result.ok:
# SSH/연결 실패 시에만 에러 반환. 컨테이너가 exited여도 데이터는 전달.
if result.error_type:
return {"ok": False, "tool": "infra", "operation": "status",
"data": [], "summary": "", "error": result.error or "확인 실패"}