Skip to content

Uninstall self-hosted machines - #727

Merged
SaladDay merged 2 commits into
mainfrom
uninstall-self-hosted-machines
Oct 15, 2026
Merged

SaladDay merged 2 commits into
mainfrom
uninstall-self-hosted-machines

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • New oac-daemon uninstall (run as the installation's bin/oac-daemon): stops the daemon, lists what it deletes (installation directory with credential file, native history and Harnesses; the native-download directory with the download lock), asks [y/N], deletes, and prints the Web follow-up (Revoke in Executor credentials, or Delete the Session). The workspace is never deleted, and uninstall refuses if it sits inside the installation directory. A second run in an empty place prints that nothing is installed and exits 0. On Windows the running exe is kept, everything else is deleted, and a detached cmd removes the rest after exit.
  • The daemon started by oac-daemon start now exits with the rejection message (credential revoked/rotated, Session deleted, binding conflict, incompatible version) instead of parking, so a later start reports the same reason. This is selected by an explicit exitOnRejection argument of runEnvironmentConnect; oac-daemon connect (Docker unless-stopped) still parks. The native message names oac-daemon start / oac-daemon uninstall.
  • Docs: new "Remove a machine" section, reboot note, uninstall row, rejected-daemon behaviour (EN + zh, source_hash refreshed); credential contract line updated (EN + zh).
  • Smoke: native-onboarding-smoke.mjs ends with an uninstall step.

Why

Audit F5 (no removal command or docs, daemon parks forever, no reboot note); decisions 1 and 4.

Justification of new surface

  • uninstall command: the user decision. No flag: no unattended caller exists, so confirmation is always interactive.
  • exitOnRejection parameter: explicit selection from the native start path; no name check.

Verification

  • go test ./apps/daemon/internal/cli pass; go vet ./... pass; GOOS=windows go vet ./apps/daemon/... pass.
  • python3 scripts/check-names.py pass; translation guard tests 1-2 pass.
  • Skipped: translation test 3 (needs vitepress); local native-onboarding-smoke.mjs (needs the full CI bundle build), left to the Native workflow.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@SaladDay
SaladDay force-pushed the uninstall-self-hosted-machines branch from ea531a4 to f971212 Compare October 15, 2026 12:53
@SaladDay
SaladDay merged commit 3b4c9b0 into main Oct 15, 2026
21 checks passed
@SaladDay
SaladDay deleted the uninstall-self-hosted-machines branch October 15, 2026 13:01
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