fix(windows): stop service loop on missing install - #1877
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe Windows service wrapper now checks its bundled Bun executable and CLI entry before each launch. Missing files produce one repair message and exit code 3 without retrying. Tests cover both missing-file cases and retained retries after successful launches and crashes. ChangesWindows service startup validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. Possibly related issues
Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant WindowsServiceWrapper
participant BundledFiles
participant ServiceProcess
WindowsServiceWrapper->>BundledFiles: Check Bun executable and CLI entry
BundledFiles-->>WindowsServiceWrapper: Return file availability
alt Both files exist
WindowsServiceWrapper->>ServiceProcess: Spawn service
else A file is missing
WindowsServiceWrapper-->>WindowsServiceWrapper: Log incomplete installation
WindowsServiceWrapper-->>WindowsServiceWrapper: Exit with code 3
end
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
1b9ba76 to
d09c752
Compare
Wibias
left a comment
There was a problem hiding this comment.
Approved. The macOS provider request pacing queue failure is unrelated to this PR: #1877 does not touch request-pacing code/tests, while the service-lifecycle workflow and focused service changes are green. The branch is currently 14 commits behind dev, so it still needs to be updated and exact-head CI rerun before merge.
Summary
Partial fix for #1849: this closes the unbounded missing-file restart loop. Transactional npm package-and-shim rollback remains separate follow-up work.
Why this scope
A missing executable cannot become healthy inside the same wrapper process, so retrying it 1,009 times adds log churn without recovery. A generic crash ceiling would also stop legitimate recovery after unrelated intermittent runtime failures. The wrapper therefore treats only proven missing baked paths as terminal.
The current
devupdater already has stop-first and registry-integrity preflight that were not present in the reported 2.13.0 build. It still does not have a verified transactional restore of both the npm package tree and global launchers. Copying a package directory alone would not safely restore shims, ownership, and lock state, so that broader design is intentionally not guessed in this PR.Verification
bun test tests/service.test.ts— 124 pass, 0 fail.bun run typecheck— passed.bun run privacy:scan— passed.cd docs-site && bun install --frozen-lockfile && bun run build— 385 pages built successfully.git diff --check— passed.dev2-go
No separate Go-native counterpart exists for this behavior; the Windows service asset generator remains in the TypeScript lifecycle control plane.
Review notes
This is self-authored maintainer work, so I will not approve or merge it myself. Exact-head CI, the service-lifecycle workflow, and another maintainer review are required.
Summary by CodeRabbit
Bug Fixes
Documentation