Repository navigation
Keep self-hosted uninstall inside its installation - #736
Merged
SaladDay merged 2 commits intoOct 15, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Install defaults to the environment directory and refuses a foreign non-empty directory; uninstall deletes only the installation's own entries, removes its record and executable last, and reports what it keeps. The bootstraps accept a complete partial download and give the grant only to the installer, and the grant variable name has one definition.
SaladDay
deleted the
keep-self-hosted-uninstall-inside-its-installation
branch
October 15, 2026 14:01
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
installdefaults to<Runtime home>/environments/<environment-id>for every mode (one definition,defaultDirectory), says so in the flag help, and refuses a non-empty--install-dirthat holds no installation, naming it. A directory holding only installer entries (a failed earlier install) is accepted so reruns stay clean.uninstalldeletes only the installation's entries (one shared list,nativeInstallationEntries, used by install and uninstall), removes the directory only when it is then empty, and printsKept: <path>for everything else, including a credential file or capability directory outside the installation. It deletesbin/anddaemon/installation.jsonlast so a failed run can be rerun, names the path it could not delete, and no longer touchesnative-download. The running executable is matched withos.SameFile. The output says the Session's install command cannot be reused and what reconnects it.bootstrap.shtreats22:416on a resumed download as complete and lets the checksum decide.oac-daemon installcall.v1.NativeInstallGrantEnvincontracts/agents-api/v1is the single definition of the grant variable name; the Core and daemon copies are gone.Why
Review findings P0-1, P1-1, P2-1 to P2-8 (review-self-hosted.md). P2-5 preflight:
POST /installationcannot report a claimed credential without a new field, and the original installation's own rerun (same secret) must pass it, so it is left out.Verification
go test ./apps/daemon/internal/cli -run 'Native|Uninstall|Install|RemoveTree|Interrupt|Onboard|Discovery|Start': passgo test ./services/core/internal/nativeinstaller ./contracts/...: passgo vet ./...andGOOS=windows go vet ./apps/daemon/internal/cli: passscripts/check-names.py: pass;website/tests/translations.test.mjs: tests 1-2 pass.partinstalls; grant reaches only the installer.Skipped
Need help on this PR? Tag
@codesmith-botwith what you need.