Repository navigation
feat: add uninstall command with user-controlled configuration cleanup - #14
Merged
Merged
Conversation
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 changed
vibeguard uninstallnow bundles the existing uninstallers for offline use and asks the user whether to retain configuration before any cleanup.--keep-configretains data;--purge --yesremoves~/.vibeguard. Noninteractive callers must explicitly select a policy, and--yesalone does not select one.Uninstall stops proxies, removes autostart and CA trust, cleans installer shell/profile helpers, and removes the installed binary. Cleanup errors are surfaced; CA failures preserve the executable and recovery material. Stale PIDs cannot kill unrelated processes or the uninstaller. Missing service files no longer hide cached services or enablement symlinks. Linux without a systemd user manager still supports detached uninstall.
Windows defers removal of the running executable until CLI exit and prints a result-file path (
complete/failed: ...). Added Windows CI exercises real executable self-deletion. Shared directories, project overrides, external custom files, exported certificates and shell/profile safety backups stay user-owned; both READMEs document the boundary and terminal restart.Validation
go test ./...: passed.Unix isolated integration tests: 24 passed, including real temporary proxy processes, interactive/explicit keep/purge, missing selections, stale/missing PIDs, lost service files, cached units, trust/signal/delete failures and repeated cleanup.
PowerShell regression fixtures, PEM fingerprint parsing and worker execution against a temporary synthetic binary: passed.
go vet . ./cmd/vibeguard,bash -n uninstall.sh, Go formatting andgit diff --check: passed.Native macOS build; Linux amd64 and Windows amd64/arm64 cross compilation: passed.
Independent code review: no remaining important findings.
Real Docker deployment tests: 2 passed using the project Dockerfile, UUID-scoped containers/volumes, both keep/purge policies, retained manager-password record/CA/log/WAL, unrelated-container preservation and repeated cleanup.
Docker failures now return an error (availability, query, container/volume removal); piped Docker cleanup requires explicit
--yesbefore mutations. Large listings are covered to prevent pipefail/SIGPIPE false absence.Added Docker build and actual deployment tests to Ubuntu CI. Host-side Docker uninstall policy/password behavior is documented; invoking the CLI inside a container cannot remove host resources.
Fixed the Windows log-rotation regression exposed after integrating PR #13: capture file identity through
File.Stat()before replacement. Unix WAL permission assertions are now limited to platforms supporting those bits; encryption and restore assertions run everywhere.Local tests passed after integrating merged PR #13. Latest combined-head CI passed on Linux/macOS/Windows, including actual Docker deployments and Windows CLI self-deletion: https://github.com/inkdust2021/VibeGuard/actions/runs/37966120099. Host services/trust stores and existing user Docker deployments were not modified in tests.
Full
go vet ./...reports the pre-existinginternal/wsproxy/transform_conn.go:117ReadFrom signature warning; unrelated to this change.