GCWing / GCWing/OpenBitFun

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

Geschlossen Anfängerfreundlich
#2,654 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
2.3k
Forks
231
Ø Merge
2 Std. 49 Min.
Gemergte PRs (30 T.)
589

Beschreibung

## 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).

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell, rust
Bereich
cli, testing
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Aktiv
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
88/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.