fix(service): propagate native uninstall failures - #1351
Conversation
|
Warning Review limit reached
Next review available in: 4 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe uninstall flow now accepts injectable test hooks. Native WinSW removal errors propagate, scheduler cleanup runs first, and install state remains when native removal fails. Tests reset hooks and cover this behavior. ChangesUninstall lifecycle
Estimated code review effort: 3 (Moderate) | ~15–30 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/service.ts`:
- Around line 2487-2490: Update the scheduler-removal flow around the
queryWindowsTask and uninstallWindowsTask hooks so the catch only handles a
confirmed absent task; do not swallow uninstallWindowsTask failures, and
propagate them before removeInstallState can run. Preserve successful removal
and explicitly already-absent behavior, then add a regression test verifying
removeInstallState is not called when uninstallWindowsTask throws.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f03f94b5-d154-4cfb-bfac-85e0a67f9d4b
📒 Files selected for processing (2)
src/service.tstests/uninstall.test.ts
|
Please rebase this PR onto the latest |
c77b920 to
c84bada
Compare
|
Tip For best results, initiate chat on the files or code changes.
The prior request also requires exact-head CI checks after the rebase. Confirm that GitHub reports those checks as successful for commit You are interacting with an AI system. |
Rate Limit Exceeded
|
|
Thanks for the focused fix here — especially preserving install-state metadata on scheduler/WinSW removal failures and adding regressions for both failure paths. Nice hardening of the Windows uninstall lifecycle. 🙏 |
Summary
The previous Windows path could swallow scheduler or native removal errors and delete install state while a service backend remained installed.
Verification
bun run typecheck— passed.bun run privacy:scan— passed.git diff --check origin/dev...HEAD— passed.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit