GCWing / GCWing/OpenBitFun

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

クローズ 初心者向け
#2,654 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
2.3k
フォーク
231
平均マージ
2時間 49分
マージ済み PR(30日)
589

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

src/crates/services/terminal/src/exec.rs を開き、1950、1996、2099、2247 行付近の Windows テストブロックを調査し、PowerShell -Command 引数がどのように渡されているかに注目してください。Windows 上で cargo check -p terminal-core と cargo test --lib exec を実行し、4 つの対象テストが間欠的な timeout 失敗なしに成功し、非 Windows ブランチが変更されていなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
powershell, rust
領域
cli, testing
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
88/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。