orca icon indicating copy to clipboard operation
orca copied to clipboard

fix: skip daemon-pty-adapter tests on Windows

Open sudoeren opened this issue 5 months ago â€ĸ 1 comments

Summary

The entire \DaemonPtyAdapter\ test suite relies on
ode:net\ Unix socket semantics (unlinkSync, socket file cleanup, respawn-on-death checks) that don't map to Windows named pipes. This causes ~61 test failures on Windows.

Change

  • Replaced \const itOnPosix\ with \const describeOnPosix\ at the module level, matching the pattern in \shell-ready.test.ts\
  • Changed \describe(...)\ to \describeOnPosix(...)\ to skip the entire suite on Windows
  • Converted the 2 existing \itOnPosix\ tests back to regular \it\ (already covered by the describe-level skip)

Verification

  • Tests continue to run on Linux/macOS (CI) as before
  • No functional change — only test infrastructure

Cross-platform notes

  • Windows: this is the fix — the suite is now skipped instead of failing
  • macOS/Linux: unchanged, all tests still run
  • The daemon PTY infrastructure is exercised through the terminal-perf E2E suite on Ubuntu CI

sudoeren avatar Jul 02 '26 23:07 sudoeren

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

Run ID: 068b2a50-fc73-42e9-b924-f9349ab93635

đŸ“Ĩ Commits

Reviewing files that changed from the base of the PR and between 2b2cf2371392df47c3f9509e242b4a6130df1d0e and cb756fbf7447b47b7ba5437fc49722cf29aa8218.

📒 Files selected for processing (1)
  • src/main/daemon/daemon-pty-adapter.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/daemon/daemon-pty-adapter.test.ts

📝 Walkthrough

Walkthrough

Changes

This change refactors the POSIX-only test gating in daemon-pty-adapter.test.ts. A new describeOnPosix helper wraps the entire DaemonPtyAdapter (IPtyProvider) suite to skip it on Windows, replacing the previous per-test itOnPosix helper. Two tests that previously used itOnPosix were updated to use it directly, since they now inherit the suite-level platform skip.

Compact Metadata

  • Type: Test refactor
  • Scope: Single test file
  • Impact: No production code changes; test gating mechanism only

Related PRs: None identified.

Suggested labels: tests, refactor

Suggested reviewers: None identified.

Poem A rabbit hopped through test-file grass, Found skips per-test, said "let this pass" — One gate for all, atop the suite, Windows steps aside, tests execute, Hop, hop, cleaner code at last.

đŸšĨ Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check âš ī¸ Warning The description covers summary, change, verification, and cross-platform notes, but misses required Screenshots, Testing, AI Review Report, Security Audit, and Notes sections. Add the missing template sections, especially Testing, AI Review Report, Security Audit, Screenshots, and Notes, with concrete details.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: skipping daemon-pty-adapter tests on Windows.
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.

coderabbitai[bot] avatar Jul 02 '26 23:07 coderabbitai[bot]