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.