fix(ci): kill the Windows child via taskkill, not a signal

Review found kill -TERM against a native Windows binary (bun.exe)
under Git Bash is best-effort thread injection, not a real
signal, and can fail to land -- reproducing the exact hang this
watchdog exists to prevent. taskkill //F //T is a real
TerminateProcess call.

Also: cite the run id instead of a branch name (branches get
deleted), and add the missing shell: bash the repo's other
Windows steps already set explicitly.
This commit is contained in:
Miguel Angel Simon Sierra
2026-09-19 19:17:17 -04:00
parent 33145fa4b6
commit 7ff370de5c
3 changed files with 11 additions and 2 deletions
+1
View File
@@ -508,6 +508,7 @@ jobs:
run: bash scripts/ci/install-workspace-dependencies.sh --ignore-scripts
- name: Install dependencies
if: runner.os == 'Windows'
shell: bash
run: bash scripts/ci/install-workspace-dependencies.sh --ignore-scripts --linker=hoisted
- run: bun run --cwd packages/cli test src/utils/npxCommand.test.ts src/commands/skills.test.ts
+1 -1
View File
@@ -105,7 +105,7 @@ COPY packages/engine/package.json packages/engine/
COPY packages/producer/package.json packages/producer/
# A corrupt tarball extraction can print an error and then hang instead of
# exiting (fix/regression-docker-build-timeout). Bound each attempt and retry.
# exiting (run 35468046055). Bound each attempt and retry.
RUN npm install --global bun && \
(timeout 300 bun install --frozen-lockfile || timeout 300 bun install --frozen-lockfile) && \
npm uninstall --global bun
+9 -1
View File
@@ -18,7 +18,15 @@ run_with_timeout() {
local elapsed=0
while kill -0 "$pid" 2>/dev/null; do
if ((elapsed >= seconds)); then
kill -TERM "$pid" 2>/dev/null
# Git Bash's `kill -TERM` on a native Windows binary (bun.exe) is a
# best-effort thread-injection emulation, not a real signal, and can
# fail to land -- the exact hang this function exists to prevent.
# taskkill //T (kills the child tree) //F (TerminateProcess) is real.
if [[ "${OS:-}" == "Windows_NT" ]]; then
taskkill //F //T //PID "$pid" 2>/dev/null
else
kill -TERM "$pid" 2>/dev/null
fi
wait "$pid" 2>/dev/null
return 124
fi