Part of epic tracebloc/backend#1142 (Theme F / copy + correctness). Found by Lukas running tb delete live.
tb delete (offboarding) had several bugs — two that make it feel broken, plus a functional teardown bug and jargon:
- 🅐 Manifest printed before the safety checks.
renderOffboardSummary ran before the work-guard and confirm, so tb delete dumped the full "Removed from this machine …" manifest and then errored ("still online, nothing happened") — a destruction receipt for something that didn't occur. - 🅑 Manifest worded as a result ("Removed", "revoked") though it's a pre-confirm preview, and several steps are best-effort (may not deliver what it claims).
- 🅒 Work-guard blocked a healthy idle environment. It refused on
status == online — but a healthy environment is always online (heartbeating) — and told the user to "stop its training jobs first" when there were none. So a normal environment couldn't be offboarded without --force, with a false reason. - 🅕 Image reclaim removed by image ID (
docker rmi <id>) → failed on a multi-repo image (conflict … must be forced). And 🅖 the raw docker/daemon error leaked to the user. - 🅓 Jargon throughout: banner, "client", "Helm release", "local cluster", "ghcr.io/tracebloc/*", "Docker/kubectl/k3d/helm".
Fix: preconditions first (fail fast before printing); guard on running experiments (num_running_experiments), not "online"; manifest → preview ("This will remove:") after the guard/before confirm; image reclaim by reference (repo:tag, never -f); soften the reclaim failure (no daemon jargon); plain "secure environment" terminology.
Part of epic tracebloc/backend#1142 (Theme F / copy + correctness). Found by Lukas running
tb deletelive.tb delete(offboarding) had several bugs — two that make it feel broken, plus a functional teardown bug and jargon:renderOffboardSummaryran before the work-guard and confirm, sotb deletedumped the full "Removed from this machine …" manifest and then errored ("still online, nothing happened") — a destruction receipt for something that didn't occur.status == online— but a healthy environment is always online (heartbeating) — and told the user to "stop its training jobs first" when there were none. So a normal environment couldn't be offboarded without--force, with a false reason.docker rmi <id>) → failed on a multi-repo image (conflict … must be forced). And 🅖 the raw docker/daemon error leaked to the user.Fix: preconditions first (fail fast before printing); guard on running experiments (
num_running_experiments), not "online"; manifest → preview ("This will remove:") after the guard/before confirm; image reclaim by reference (repo:tag, never-f); soften the reclaim failure (no daemon jargon); plain "secure environment" terminology.