Skip to content

feat: add uninstall command with user-controlled configuration cleanup - #14

Merged
inkdust2021 merged 4 commits into
mainfrom
codex/uninstall-command
Oct 9, 2026
Merged

inkdust2021 merged 4 commits into
mainfrom
codex/uninstall-command

Conversation

@inkdust2021

@inkdust2021 inkdust2021 commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

What changed

vibeguard uninstall now bundles the existing uninstallers for offline use and asks the user whether to retain configuration before any cleanup. --keep-config retains data; --purge --yes removes ~/.vibeguard. Noninteractive callers must explicitly select a policy, and --yes alone 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 and git 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 --yes before 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-existing internal/wsproxy/transform_conn.go:117 ReadFrom signature warning; unrelated to this change.

@inkdust2021
inkdust2021 merged commit 5629b9e into main Oct 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant