GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(windows): stop service loop on missing install by Ingwannu · Pull Request #1877 · lidge-jun/opencodex

Conversation

@Ingwannu

@Ingwannu Ingwannu commented Aug 17, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Owner

Summary

  • verify the Task Scheduler wrapper's baked Bun runtime and CLI entry before every child start;
  • log one actionable incomplete-install message and exit when either path is absent;
  • preserve the existing five-second restart behavior for a proxy child that actually launched and then failed;
  • document the recovery command and the reason this slice does not attempt an unsafe npm directory copy-back.

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 dev updater 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

    • Improved Windows service startup validation by detecting incomplete installations before launch.
    • Services now stop cleanly with an actionable message instead of repeatedly retrying when required files are missing.
    • Existing restart behavior remains available when a service starts successfully but later crashes.
  • Documentation

    • Added guidance explaining how incomplete Windows service installations are handled and repaired.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Ingwannu
Ingwannu requested review from Wibias and lidge-jun as code owners August 17, 2026 00:32
@Ingwannu Ingwannu mentioned this pull request Aug 17, 2026
[Bug][Windows] Failed ocx update leaves a file-less package skeleton; service wrapper restart-loops 1,009 times with no integrity check or backoff #1849
Closed
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the bug Something isn't working label Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 89864c7d-aaf6-4c72-9461-d01385689b6c

📥 Commits

Reviewing files that changed from the base of the PR and between 9830ab1 and 1b9ba76.

📒 Files selected for processing (4)
  • docs-site/src/content/docs/reference/cli/lifecycle.md
  • src/service.ts
  • structure/06_docs-and-release.md
  • tests/service.test.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Windows service startup validation

Layer / File(s) Summary
Startup preflight and regression coverage
src/service.ts, tests/service.test.ts
The wrapper checks the bundled Bun runtime and CLI entry before spawning. It exits with code 3 when either file is missing. Tests verify both failure cases and retry-loop ordering.
Recovery behavior documentation
docs-site/src/content/docs/reference/cli/lifecycle.md, structure/06_docs-and-release.md
Documentation describes the incomplete-installation message, exit behavior, preserved crash retries, and reinstall-and-repair procedure.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1b9ba

The change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Possibly related issues

  • [Bug][Windows] Failed ocx update leaves a file-less package skeleton; service wrapper restart-loops 1,009 times with no integrity check or backoff #1849 — The PR implements the issue’s proposed preflight checks for missing Bun and CLI files and prevents retrying an incomplete installation.

Possibly related PRs

  • lidge-jun/opencodex#306 — Directly related Windows service-wrapper logic and regression tests in src/service.ts and tests/service.test.ts.
  • lidge-jun/opencodex#980 — Related Windows service repair and startup behavior in the same implementation and test files.
  • lidge-jun/opencodex#838 — Related handling of Windows service viability and missing on-disk service assets.

Suggested reviewers: lidge-jun

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
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: stopping the Windows service loop when required installation files are missing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ingw/fix-windows-service-missing-install-1849

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Ingwannu
fix(windows): stop service loop on missing install
d09c752
@Ingwannu
Ingwannu force-pushed the ingw/fix-windows-service-missing-install-1849 branch from 1b9ba76 to d09c752 Compare August 17, 2026 00:47
Wibias
Wibias approved these changes Aug 17, 2026
View reviewed changes

@Wibias Wibias left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Wibias
Wibias merged commit 01b2125 into dev Aug 17, 2026
28 of 30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun
lidge-jun deleted the ingw/fix-windows-service-missing-install-1849 branch August 17, 2026 10:52
This was referenced Aug 18, 2026
[Bug][Windows] ocx update is not transactional: a failed update deletes the working install with no rollback #1942
Closed
docs(devlog): record the Wave 5 WP5 triage outcome (#1849 split, #1049 assessed) #1943
Merged
luvs01 pushed a commit to luvs01/opencodex that referenced this pull request Aug 18, 2026
@lidge-jun
docs(devlog): record the WP5 outcome for lidge-jun#1849 and lidge-jun…
526aef8
…#1049

lidge-jun#1849 was two defects wearing one issue number. lidge-jun#1877 stopped the service
wrapper hammering a missing install and shipped in v2.24.0; nothing has been
done about how the install went missing, which is npm install -g removing the
existing package before the replacement is verified. That half is now lidge-jun#1942 and
the umbrella stays open so the original evidence stays attached to it.

lidge-jun#1049 I assessed and did not start. The design is complete in the write-substrate
contract and none of it exists: adoption-pending appears 37 times in the devlog
and zero times in src. What is missing is not an adoption branch but the whole
publication protocol - a complete-database temp publisher, atomic no-clobber
publication, fsync ordering, and the positive-authority gate.

That is crash-safety machinery for durable state in the user's Codex home, where
a subtly wrong publication corrupts an install rather than failing a test. It is
implemented completely with its fixture matrix or not at all, and squeezing a
partial version into a wave beside unrelated fixes is the worst of the options.
@coderabbitai coderabbitai Bot mentioned this pull request Aug 19, 2026
fix(update): stage, verify, and swap npm self-updates with rollback #2079
Merged
3 tasks done
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@Wibias
Merge pull request lidge-jun#1877 from lidge-jun/ingw/fix-windows-ser…
3f31778
…vice-missing-install-1849

fix(windows): stop service loop on missing install
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@lidge-jun
docs(devlog): record the WP5 outcome for lidge-jun#1849 and lidge-jun…
cea8ab2
…#1049

lidge-jun#1849 was two defects wearing one issue number. lidge-jun#1877 stopped the service
wrapper hammering a missing install and shipped in v2.24.0; nothing has been
done about how the install went missing, which is npm install -g removing the
existing package before the replacement is verified. That half is now lidge-jun#1942 and
the umbrella stays open so the original evidence stays attached to it.

lidge-jun#1049 I assessed and did not start. The design is complete in the write-substrate
contract and none of it exists: adoption-pending appears 37 times in the devlog
and zero times in src. What is missing is not an adoption branch but the whole
publication protocol - a complete-database temp publisher, atomic no-clobber
publication, fsync ordering, and the positive-authority gate.

That is crash-safety machinery for durable state in the user's Codex home, where
a subtly wrong publication corrupts an install rather than failing a test. It is
implemented completely with its fixture matrix or not at all, and squeezing a
partial version into a wave beside unrelated fixes is the worst of the options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lidge-jun lidge-jun Awaiting requested review from lidge-jun lidge-jun is a code owner
1 more reviewer
@Wibias Wibias Wibias approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Ingwannu @Wibias
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.