Agent Diagnostic
Skills loaded: openshell-cli, create-spike, create-github-issue
Traced the full call chain:
main.rs:1738-1746 → run::gateway_admin_destroy → openshell_bootstrap::gateway_handle + handle.destroy() →
destroy_gateway_resources in crates/openshell-bootstrap/src/docker.rs:911.
destroy_gateway_resources is intentionally idempotent: every Docker "not found"
error is explicitly treated as Ok(()):
- Container:
docker.rs:950-953 — if !is_not_found(&err) { return Err(...) }
- Volume:
docker.rs:1004-1007 — same pattern
- Network:
docker.rs:1070 — force_remove_network returns Ok(()) immediately on not-found
The function returns Ok(()) whether it destroyed resources or found nothing.
gateway_admin_destroy in run.rs:1648 then unconditionally prints
✓ Gateway {name} destroyed. with no signal from the callee about whether
anything was actually present.
No existing check guards the success message path. check_existing_deployment()
exists in openshell-bootstrap and would detect this, but is not called here.
Complexity: Low (~2 files, isolated change).
Description
Actual behavior: openshell gateway destroy prints:
• Destroying gateway openshell...
✓ Gateway openshell destroyed.
every time it is run, including when no gateway container, volume, or network
exists. Running it N times always reports N successful destructions.
Expected behavior: When no gateway resources are found, the command should
report that there was nothing to destroy (e.g., No gateway 'openshell' found.)
rather than falsely claiming a successful destruction. This makes it impossible
to tell from the output whether a gateway was actually present and removed.
Reproduction Steps
- Deploy a gateway:
openshell gateway start
- Destroy it:
openshell gateway destroy — expected success
- Run again:
openshell gateway destroy — falsely reports success with no gateway present
- Repeat step 3 any number of times — always "succeeds"
Environment
- OS: Linux (Ubuntu, NVIDIA DGX)
- Docker: (running)
- OpenShell: 0.0.33
Logs
(base) nvidia@localhost:~$ openshell gateway destroy
• Destroying gateway openshell...
✓ Gateway openshell destroyed.
(base) nvidia@localhost:~$ openshell gateway destroy
• Destroying gateway openshell...
✓ Gateway openshell destroyed.
Agent-First Checklist
Agent Diagnostic
Skills loaded: openshell-cli, create-spike, create-github-issue
Traced the full call chain:
main.rs:1738-1746→run::gateway_admin_destroy→openshell_bootstrap::gateway_handle+handle.destroy()→destroy_gateway_resourcesincrates/openshell-bootstrap/src/docker.rs:911.destroy_gateway_resourcesis intentionally idempotent: every Docker "not found"error is explicitly treated as
Ok(()):docker.rs:950-953—if !is_not_found(&err) { return Err(...) }docker.rs:1004-1007— same patterndocker.rs:1070—force_remove_networkreturnsOk(())immediately on not-foundThe function returns
Ok(())whether it destroyed resources or found nothing.gateway_admin_destroyinrun.rs:1648then unconditionally prints✓ Gateway {name} destroyed.with no signal from the callee about whetheranything was actually present.
No existing check guards the success message path.
check_existing_deployment()exists in
openshell-bootstrapand would detect this, but is not called here.Complexity: Low (~2 files, isolated change).
Description
Actual behavior:
openshell gateway destroyprints:every time it is run, including when no gateway container, volume, or network
exists. Running it N times always reports N successful destructions.
Expected behavior: When no gateway resources are found, the command should
report that there was nothing to destroy (e.g.,
No gateway 'openshell' found.)rather than falsely claiming a successful destruction. This makes it impossible
to tell from the output whether a gateway was actually present and removed.
Reproduction Steps
openshell gateway startopenshell gateway destroy— expected successopenshell gateway destroy— falsely reports success with no gateway presentEnvironment
Logs
Agent-First Checklist
debug-openshell-cluster,debug-inference,openshell-cli)