[Bug]: terminal exec windows tests intermittently fail on quoted PowerShell sleep scripts
- Lingua principale
- Rust
- Stelle
- 2.3k
- Fork
- 231
- Merge medio
- 2h 46m
- PR unite (30g)
- 577
Descrizione
## 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).
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell, rust
- Ambito
- cli, testing
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 88/100