feat(cli): X7 — uninstall machine-global teardown (spec 13) — X7 complete - #61
Merged
Conversation
…MPLETE
Removes every machine-global devstack artifact, in spec order, holding the flock:
1. `compose down -v` every managed stack (containers + their named volumes,
including the shared Postgres/Redis/MinIO data) — enumerated from the SDK by
tool label, grouped by Compose project;
2. `docker network rm devstack_shared` (compose refuses external networks — a
not-found is the desired end state, not a warning);
3. remove the root CA from every trust store via `trust.Uninstall` (mkcert
-uninstall: host + Firefox/NSS + Windows) — the load-bearing security step,
warns loudly if it can't be cleared;
4. remove the marker-fenced /etc/hosts block;
5. remove alias symlinks (+ registry entries);
6. remove the ledger / template cache / config (XDG data/cache/config dirs).
Best-effort: each step records a warning and the rest proceed (a half-broken
install must still be removable); a non-zero exit reports the warning count. Gated
by confirmation (type `uninstall`; `--yes` skips; `--json` requires `--yes`).
Network/volume removal shells the docker CLI via the existing Runner — the SDK
Client stays read-only.
The sequencer is `runUninstall(ctx, uninstallEnv{...})`, unit-tested with a mock
client + fake runner + fake trust runner + temp XDG/hosts paths: every stack down
-v, network removed, CA cleared, hosts block gone, dirs removed; and a not-found
network counts as removed (no warning).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
devstack uninstall— removes every machine-global devstack artifact, in spec-13 order, holding the flock. Withworkspace destroy(PR #56) this completes X7.Sequence (
runUninstall)compose down -vevery managed stack (containers + named volumes, incl. shared DB data) — enumerated from the SDK by tool label, grouped by Compose project.docker network rm devstack_shared(compose refuses external networks; a not-found is the desired end state, not a warning).trust.Uninstall(mkcert -uninstall: host + Firefox/NSS + Windows) — the load-bearing security step; warns loudly if it can't be cleared./etc/hostsblock.Design
uninstall;--yesskips;--jsonrequires--yes).Runner— the SDKClientstays read-only.Tests
runUninstallunit-tested with mock client + fake runner + fake trust runner + temp XDG/hosts paths: every stackdown -v, network removed, CA cleared,/etc/hostsblock gone, dirs removed; plus a not-found network counts as removed (no warning);--jsonrequires--yes.make cigreen.Spec acceptance (spec 13)
uninstallleaves no external network, shared volume, CA (host+Firefox+Windows), alias symlink, template cache, or ledger behind; reports each store cleared.--yesskips;--jsonemits a machine-readable result.🤖 Generated with Claude Code