refactor(tools): restore stdin=DEVNULL on subprocess probes dropped during compaction

voice_mode WSL playback probe, subagent_worktree._run_git, cua_backend
loginctl/xprop probes lost their explicit stdin= (and one line-wrapped past
the encoding= same-line rule); lazy_deps._run carries it via _SUBPROCESS_KW
so mark it for the guard. Fixes tests/tools/test_subprocess_stdin_guard.py
and tests/scripts/test_footgun_subprocess_encoding.py (green on base).
This commit is contained in:
Teknium
2026-09-02 14:25:03 -07:00
parent 8813eba345
commit b6a3d3f440
3 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -1358,7 +1358,8 @@ def _wsl_powershell_player_cmd(file_path: str) -> Optional[List[str]]:
import uuid
def _out(cmd):
return subprocess.check_output(cmd, stderr=subprocess.DEVNULL, timeout=3).decode(errors="replace").strip()
return subprocess.check_output(cmd, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL,
timeout=3).decode(errors="replace").strip()
win_tmp_wsl = _out(["wslpath", "-u", _out(["cmd.exe", "/c", "echo %TEMP%"])])
if not win_tmp_wsl: