Windows sandbox: a command that fails before starting leaves sandbox-helper.exe running
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust, typescript
調査の方向性
src/main/tools/sandbox_windows.tsのHelperProcess.fail()とsandbox_windows.test.ts:291のfake-helperテストから始め、native/sandbox-helper/src/win.rs:216-252にある実際のhelperのstdin EOF時の動作と比較してください。stdinが閉じられるまでfake helperが終了しないように更新し、その後fail()の後にhelperが終了することを確認して、Windows sandboxのテストを実行してください。
索引モデルが issue の本文から書いたものです。
説明
Found in the 2026-10-07 code review (traced on both the TypeScript and Rust sides).
Problem
HelperProcess.finish() (src/main/tools/sandbox_windows.ts:365-377) ends the helper's stdin, but fail() (:356-363) does not. The helper's serve loop (native/sandbox-helper/src/win.rs:216-252) only exits when stdin reaches EOF. After run() returns Err, it sends Error{id} and waits for more input. ShellRunner treats 'error' as finished and never calls killTree. Background entries get exitCode = null, so stopBackground skips them too.
Scenario
Every error before the command starts leaves one idle helper process with three pipes: a lock timeout, missing git metadata, a CreateAppContainerProfile/CreateProcessW failure, no free drive letter, or a cancel during preparation. A model that retries a failing command piles them up until Patch quits.
Why the tests miss it
The fake helper in sandbox_windows.test.ts:291 calls process.exit(0) after sending error. The real helper doesn't exit.
Fix
private fail(message: string): void {
if (this.done) return;
this.done = true;
this.helper.stdin?.end(); // the helper exits once its input closes
this.stdout.end();
this.stderr.end();
this.emit('error', new Error(message));
this.emit('close', null);
}
Make the fake helper stay alive until its stdin closes, and assert that the helper process exited after fail().
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 2
- 平均マージ
- 8時間 28分
- マージ済み PR(30日)
- 26
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PierrunoYT/patch のほかの issue
-
enhancement priority: low severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PierrunoYT/patch#305 ·
メンテナーはふだん 1 日以内に返信
-
security: isAppPageUrl checks devRendererUrl with startsWith instead of comparing parsed URL originsオープンpriority: low security severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PierrunoYT/patch#300 ·
メンテナーはふだん 1 日以内に返信
-
Claude Code chats: tool calls made inside Claude Code subagents leave cards that end as "(stopped)"オープンbug priority: low severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
PierrunoYT/patch#289 ·
メンテナーはふだん 1 日以内に返信
-
bug priority: medium severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PierrunoYT/patch#285 ·
メンテナーはふだん 1 日以内に返信
-
priority: medium security severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
PierrunoYT/patch#283 ·
メンテナーはふだん 1 日以内に返信
PierrunoYT/patch の issue をすべて見る
似ている issue
-
check:passed streams:edit
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area:mcp bug has repro platform:vscode regression
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
anthropics/claude-code#103970 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextオープンbug javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信