Repository navigation
fix(windows): keep agent hooks when an Orca registration names no install location - #35668
Merged
Merged
Conversation
…tall location The uninstaller's other-install check treated an Orca registration whose InstallLocation reads empty as "none", so it would remove the agent hooks. That registration could still be another install, so it now reports "unknown", which keeps the hooks; every doubtful case leaves them in place.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[Low impact] The PR appears safe to merge. SummaryThe Windows uninstaller now keeps agent hooks when an opened Orca registration has an empty
Reviews (1) · Last reviewed commit: "fix(windows): keep agent hooks when an O..." · Reviewed by Greptile |
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.
ELI5
When Orca is uninstalled on Windows, the uninstaller removes Orca's status-hook entries from agents' settings, but only if no other Orca install remains for that user. Otherwise it keeps them, because the remaining install still uses them (#35588). One doubtful case slipped through: if another Orca registration exists but its install folder reads empty, the check counted it as "no other install" and removed the hooks. It now counts that as "unknown" and keeps them, so every doubtful case leaves the hooks in place.
What Changed
config/nsis/orca-other-install-check.nsh: inORCA_CHECK_ONE_REGISTRATION, when an Orca registration key opens butInstallLocationreads empty, the result is now"unknown"instead of falling through to"none". The "other install" branch is otherwise unchanged. The header comment lists the new "unknown" case.agent-hooks-uninstall-preflight.test.ts: a contract test that an opened key with an emptyInstallLocationyields"unknown"before the$INSTDIRcomparison. One existing assertion is updated to the${elseIf}form.Why
The uninstaller removes the hooks only on a definite "no other install". A registration that names no location can't be proven to be ours or gone, so the safe answer is to keep the hooks. The cost of keeping them is a leftover entry that does nothing; the cost of removing them wrongly is broken agent status in an install that's still in use. Requested in review of #35588.
Linked Issue
N/A. Follow-up to #35588.
Visual Proof
N/A. Installer logic only.
Testing
agent-hooks-uninstall-preflight.test.tsandnsis-process-check.test.mjspass.pnpm tcandpnpm run typecheck:cipass. So do oxlint, the anti-slop lint, the ast-grep gates,check:process-host-importsandcheck:code-quality:changed.package (windows)job compiles the NSIS change.AI Disclosure
Review
Agent skill upstream boundary
Notes
Windows only.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)