fix(update): skip redundant GUI restart after npm self-update - #515
Conversation
npm ocx update already restarts the service; a second service install stopped the healthy proxy on 10100 and often failed elevation from the non-interactive worker.
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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 (5)
📝 WalkthroughWalkthroughChangesGUI update restart flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant runGuiUpdateWorker
participant finishGuiUpdateRestart
participant proxy
participant restartAfterUpdate
runGuiUpdateWorker->>finishGuiUpdateRestart: complete GUI update restart
finishGuiUpdateRestart->>proxy: probe identity-verified health
alt npm proxy already healthy
finishGuiUpdateRestart-->>runGuiUpdateWorker: skip redundant restart
else proxy unhealthy or non-npm installer
finishGuiUpdateRestart->>restartAfterUpdate: perform explicit restart
finishGuiUpdateRestart->>proxy: confirm restarted health
proxy-->>finishGuiUpdateRestart: stable health result
end
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Address CodeRabbit/Codex review: only probe-first for service-managed npm installs, require PID change or target version before skipping, and keep UpdateJobState fixtures type-complete.
Windows CI failed when a prior Debug test left a warm module cache for debug-settings:http://localhost, skipping the cold-start GET so pollCount stayed 0. Clear stores around the test and stub window.event for React 19.
A no-op or failed explicit restart could leave the pre-update proxy healthy and still report success. Re-check PID/version evidence after npm restart and fail when the old process remains.
Summary
node ocx.mjs update, which stops the proxy and reinstalls/starts the managed service (or falls back to a direct start on the captured port, default 10100).service install, which callsstopWindows()on that healthy listener and often fails elevation from the non-interactive update worker — leaving the proxy dead until a manual restart.Test plan
bun test tests/update-job.test.tsbun x tsc --noEmitbun run privacy:scanocx startSummary by CodeRabbit
Bug Fixes
Documentation