Skip to content

test(daemon): stop skipping killStaleDaemon checks on Windows - #13154

Merged
nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/daemon-health-win32-skips
Aug 8, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/daemon-health-win32-skips

Conversation

@nwparker

@nwparker nwparker commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

What

Removes three skipIf(process.platform === 'win32') guards in daemon-health.test.ts.

Why

While verifying #12882 on a real Windows host, I stripped every win32 guard in the daemon suite and ran it. Most of the skips are structural and must stay — 31 of the unskipped tests fail with listen EACCES: permission denied C:\Users\...\Temp\..., because they bind Unix domain sockets at filesystem paths, which Windows does not provide.

But these three pass on Windows:

  • does not unlink a live socket when the pid file does not match this daemon
  • returns false for start times outside tolerance
  • does not SIGTERM when the saved startedAtMs mismatches the current process

They assert PID-record and start-time logic, and the file's own daemonTestSocketPath helper already returns a real named pipe (\\.\pipe\...) on win32 — so nothing in them needs a Unix socket. The guards were costing coverage for no reason.

That matters because killStaleDaemon's ownership decisions are exactly what #12882 changed, and Windows was the one platform where none of that logic ran.

What stays

The fourth guard in this file is kept deliberately. That test spawns a real child process and binds a filesystem socket path, and it genuinely fails on Windows.

Verification

Windows host, full daemon suite with all 31 guards stripped: these three passed. macOS: daemon-health.test.ts green (33 tests) — unchanged there, since the guard only ever applied to win32.

The Windows-only failures observed in that run (daemon-preflight-client-replacement, pty-subprocess WSL) are pre-existing and unrelated — an identical failure set reproduces on the commit before #12882.

Made with Orca 🐋

These three assert PID-record and start-time logic, and the file's
daemonTestSocketPath already hands back a real named pipe on win32, so nothing
in them needs a Unix socket. Verified by running the suite on a Windows host
with the guards stripped: all three pass.

That restores Windows coverage of killStaleDaemon's ownership decisions — the
code stablyai#12882 changed — on the one platform where none of it was exercised.

The fourth guard in this file stays: that test spawns a real child and binds a
filesystem socket path, which fails with listen EACCES on Windows.
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a934497-a668-4cfa-99d5-24f61920ba38

📥 Commits

Reviewing files that changed from the base of the PR and between c991bb2 and 0490efa.

📒 Files selected for processing (1)
  • src/main/daemon/daemon-health.test.ts

📝 Walkthrough

Walkthrough

Three daemon health tests now run on Windows. The tests cover live-socket preservation, start-time tolerance rejection, and PID identity protection. Test behavior and assertions remain unchanged.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change and verification, but it omits the required Testing, AI Review Report, Security Audit, and Screenshots sections. Add the missing template sections, record test checklist results, state whether there is visual change, and include AI review and security audit findings.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the change: stopping Windows skips for killStaleDaemon checks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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.

@nwparker
nwparker merged commit f858c5a into stablyai:main Aug 8, 2026
52 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…ai#13154)

Three guards in daemon-health.test.ts skipped tests that assert PID-record and
start-time logic. The file's daemonTestSocketPath already returns a real named
pipe on win32, so none of them needed a Unix socket — the skips cost coverage
for nothing.

Verified on a Windows host: the file goes from 29 passed / 4 skipped to
32 passed / 1 skipped, restoring Windows coverage of killStaleDaemon's
ownership decisions, which stablyai#12882 changed.

The fourth guard stays: that test spawns a real child and binds a filesystem
socket path, which fails with listen EACCES on Windows.
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