#!/usr/bin/env bash
set -euo pipefail

echo "[host] cleanup v1 legacy containers (best-effort)"

LEGACY=(mvp-ray-head mvp-ray-worker-0 mvp-ray-worker-1)

for c in "${LEGACY[@]}"; do
  if docker ps -a --format '{{.Names}}' | grep -qx "${c}"; then
    echo "[host] removing legacy container: ${c}"
    docker rm -f "${c}" >/dev/null 2>&1 || true
  fi
done

echo "[host] legacy cleanup done"

