GCWing / GCWing/OpenBitFun

[Bug]: terminal exec windows tests intermittently fail on quoted PowerShell sleep scripts

Open Beginner friendly
#2,654 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.2k
Forks
229
Avg merge
2h 46m
Merged PRs (30d)
577

Description

## Summary

The windows test scripts passed the PowerShell command as one quoted argument (`-Command "Start-Sleep -Milliseconds 250"`); depending on the shell quoting layer this can be parsed as a literal string rather than a command, producing flaky timeouts. The scripts drop the quotes so the tokens reach PowerShell directly.

## Area

src/crates/services/terminal/src/exec.rs (windows test scripts only). Crate: terminal-core.

## Reproduction or evidence

At 32f2427697 the windows test commands still quote the -Command payload (exec.rs windows test blocks, 4 sites :1950/:1996/:2099/:2247); intermittent failures show the sleep never starting, tripping the timeout assertion. Test-only change; production code is untouched.

## Environment

Windows runners (powershell quoting layer differences); baseline 32f2427697. The cfg(windows) test face was exercised by real local runs on a Windows host (not a cfg-excluded false green); the ubuntu/macos faces are covered by the compile check (those branches are unchanged).

---
AI-assisted change. Testing: verified locally on Windows (`cargo check -p terminal-core` exit 0; `cargo test --lib exec` 37 passed, 0 failed, including the four affected tests delayed_poll / lifecycle / tty_poll / control_kill).

Contributor guide

Open the contributing guide

Research direction

Open src/crates/services/terminal/src/exec.rs and inspect the Windows test blocks around lines 1950, 1996, 2099, and 2247, focusing on how the PowerShell -Command arguments are passed. Run cargo check -p terminal-core and cargo test --lib exec on Windows; done means the four affected tests pass without intermittent timeout failures while non-Windows branches remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, rust
Domain
cli, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.