Skip to content

fix(windows): keep agent hooks when an Orca registration names no install location - #35668

Merged
nwparker merged 1 commit into
mainfrom
nwparker/uninstall-hooks-empty-install-location
Oct 29, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/uninstall-hooks-empty-install-location

Conversation

@nwparker

@nwparker nwparker commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​9 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3

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: in ORCA_CHECK_ONE_REGISTRATION, when an Orca registration key opens but InstallLocation reads 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 empty InstallLocation yields "unknown" before the $INSTDIR comparison. 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.

  • Flag-off: N/A. This is the Windows uninstaller and isn't WSL-gated.
  • User risk: very low. It only changes which uninstalls keep agent hook entries: one with an empty-location registration now keeps them, where it used to remove them.

Linked Issue

N/A. Follow-up to #35588.

Visual Proof

N/A. Installer logic only.

Testing

  • The new contract test fails against fix(windows): remove Orca's agent hooks and PATH entry when uninstalling #35588's script and passes with this change.
  • agent-hooks-uninstall-preflight.test.ts and nsis-process-check.test.mjs pass.
  • pnpm tc and pnpm run typecheck:ci pass. So do oxlint, the anti-slop lint, the ast-grep gates, check:process-host-imports and check:code-quality:changed.
  • The package (windows) job compiles the NSIS change.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Windows only.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…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.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ca24c0a1-ab48-405e-bf5b-ae186a938b03
Commits

Reviewing files that changed from the base of the PR and between d334119 and f42c571.

Files selected for processing: 2
  • config/nsis/orca-other-install-check.nsh
  • src/main/startup/agent-hooks-uninstall-preflight.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

The Windows uninstaller now keeps agent hooks when an opened Orca registration has an empty InstallLocation.

  • The Windows uninstaller keeps agent hooks when a registration has no install location.

Reviews (1) · Last reviewed commit: "fix(windows): keep agent hooks when an O..." · Reviewed by Greptile

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