#4702 Enable interactive dev session tests on Windows
Tests still skipped on Windows with EPIPE error comment. 2+ years old with no activity or fix. Technical debt tracking issue.
Add help wanted label or close as wontfix if Windows CI not a priority
Analysis Report
Issue Review: cloudflare/workers-sdk#4702
Summary
Internal tracking issue to re-enable interactive dev session tests on Windows CI that were disabled due to EPIPE errors.
Findings
- Created: 2024-01-04
- Updated: 2024-01-04
- Version: N/A (internal testing issue)
- Component: wrangler (interactive-dev-tests fixture)
- Labels: None
- Comments: 0
Key Evidence
Issue Origin: This is a tracking issue created by the wrangler team immediately after merging PR #4693, which added interactive dev session tests. The PR author noted in the PR description: "Still need to make sure these tests work on Windows."
Current Test Status: The tests at
fixtures/interactive-dev-tests/tests/index.test.tsare explicitly skipped on Windows with the comment:// These tests are failing with `Error: read EPIPE` on Windows in CI. There's still value running them on macOS and Linux. if (process.platform === "win32") { baseDescribe("interactive dev session tests", () => { it.skip("skipped on Windows", () => {}); }); }No Fix Found: No PRs or changelog entries reference fixing issue #4702. The tests remain skipped on Windows after 2 years.
Issue Age: This issue is now over 2 years old (created Jan 2024, current date Jan 2026) with no activity.
No Labels: The issue has no labels, suggesting it may have been deprioritized or forgotten.
Recommendation
Status: KEEP OPEN
Reasoning: This is a legitimate technical debt tracking issue. The interactive dev session tests are still skipped on Windows CI, meaning the underlying problem (Error: read EPIPE) has not been fixed. While the issue is stale, the problem it tracks still exists in the codebase.
Action: Add a good first issue or help wanted label if contributions are welcome, or consider closing with a note explaining if Windows CI test support is not a priority. Alternatively, investigate the EPIPE error which is likely related to node-pty PTY handling differences between Windows and Unix systems.
Suggested Comment
This issue is still relevant - the tests at
fixtures/interactive-dev-tests/tests/index.test.tsare still skipped on Windows with:// These tests are failing with `Error: read EPIPE` on Windows in CI.Is there interest in addressing this? If so, this could be a good candidate for a
help wantedlabel. The EPIPE error likely relates to differences in how Windows handles PTY streams vianode-pty.If Windows CI test coverage for interactive dev sessions is not a priority, this issue could be closed as
wontfix.
Solution Recommendation
Root Cause Analysis
The EPIPE error is caused by an outdated version of node-pty used in the tests.
Current dependency: @cdktf/node-pty-prebuilt-multiarch@0.10.2 (outdated fork)
The issue: On Windows, node-pty uses ConPTY (Console Pseudo Terminal) which communicates via named pipes. When pty.kill() is called while there's pending I/O, a race condition causes EPIPE errors.
The fix exists: node-pty PR #626 (merged October 2023) fixed this by improving cleanup code. This fix is available in node-pty@1.1.0.
Proposed Solution
Option A: Upgrade to latest node-pty (Recommended)
- Update
fixtures/interactive-dev-tests/package.json:
{
"optionalDependencies": {
"node-pty": "^1.1.0"
}
}
- Update imports in
fixtures/interactive-dev-tests/tests/index.test.ts:
// Change from:
import type pty from "@cdktf/node-pty-prebuilt-multiarch";
const pty = await import("@cdktf/node-pty-prebuilt-multiarch");
// To:
import type pty from "node-pty";
const pty = await import("node-pty");
Remove Windows skip block (lines 22-26)
Add defensive error handling as safety net:
ptyProcess.on?.('error', (err: Error) => {
if (err.message.includes('EPIPE')) {
return; // Expected on Windows during cleanup
}
throw err;
});
Implementation Difficulty: Medium
| Factor | Assessment |
|---|---|
| Lines of code | ~20-30 lines |
| Risk | Low - tests already skipped, no regression risk |
| Testing | Medium - need to verify on Windows CI |
| Dependencies | Medium - node-pty requires native compilation |
| CI changes | None needed |
Key Challenge: node-pty@1.1.0 requires native compilation, which may need Visual Studio Build Tools in CI. The prebuilt package avoids this but is outdated.
Files to Modify
fixtures/interactive-dev-tests/package.json- Update dependencyfixtures/interactive-dev-tests/tests/index.test.ts- Update imports, remove Windows skip, add error handling
Testing Recommendations
- Create test branch with dependency update
- Run CI to verify native compilation works on Windows
- Run full test suite on macOS, Linux, and Windows
- Test rapid start/stop cycles (stress test)
- Verify no zombie
workerdprocesses left behind
Notes & Feedback (0)
No notes yet.