fix(cookbook): stop local Windows process trees

Track the inner Bash runner PID for local Windows Cookbook tasks and stop the full child process tree during cleanup.
This commit is contained in:
Dividesbyzer0
2026-06-15 02:12:48 -04:00
committed by GitHub
parent ec4f91afdd
commit 8cff1f87ee
3 changed files with 18 additions and 3 deletions
+10
View File
@@ -706,6 +706,16 @@ def test_llama_cpp_rebuild_cmd_clears_cached_build_paths():
assert 'curl' not in cmd and 'wget' not in cmd
def test_local_windows_download_pid_tracks_inner_bash_and_stop_kills_tree():
routes_src = (Path(__file__).resolve().parents[1] / "routes" / "cookbook_routes.py").read_text(encoding="utf-8")
running_src = (Path(__file__).resolve().parents[1] / "static" / "js" / "cookbookRunning.js").read_text(encoding="utf-8")
assert 'printf \'%s\\\\n\' \\"$$\\" > {pp}' in routes_src
assert "function Stop-Tree([int]$Id)" in running_src
assert "ParentProcessId = $Id" in running_src
assert "Stop-Tree ([int]$p)" in running_src
def test_llama_cpp_rebuild_cmd_runs_clean_on_a_fresh_home(tmp_path):
"""The command should succeed even when neither path exists yet."""
import os