airi/services
Alan-Yu-2077 445b597041
Some checks failed
CI / Lint (push) Has been cancelled
CI / Build Test (stage-tamagotchi) (push) Has been cancelled
CI / Build Test (stage-tamagotchi-godot) (push) Has been cancelled
CI / Build Test (stage-web) (push) Has been cancelled
CI / Build Test (ui-loading-screens) (push) Has been cancelled
CI / Build Test (ui-transitions) (push) Has been cancelled
CI / Unit Test (push) Has been cancelled
CI / Type Check (push) Has been cancelled
CI / Check Provenance (push) Has been cancelled
Cloudflare Pages (Admin UI) / Deploy - ui-admin (push) Has been cancelled
Cloudflare Pages (Auth UI) / Deploy - ui-server-auth (push) Has been cancelled
Cloudflare Workers / Deploy - stage-web (push) Has been cancelled
fix(computer-use-mcp): don't orphan background processes on terminal timeout (#2006)
## Description

Noticed this reading the terminal runner: when a `terminal_exec` command
times out we only `SIGTERM` the shell. The shell isn't spawned
`detached`, so anything it backgrounded (`server &`, `nohup`, a dev
server) gets reparented to init and keeps running — an orphan leak on
every timed-out command that backgrounded something.

Fix: spawn the shell `detached` and signal the whole process group
(negative PID) on timeout, SIGTERM → 5s → SIGKILL — same pattern as
`apps/stage-tamagotchi/scripts/desktop-overlay-live-window-smoke.ts`.
Falls back to a single-process kill, non-timeout path unchanged.

## Linked Issues

None — just something I noticed.

## Additional Context

Added a regression test (backgrounds a `sleep`, times out, asserts the
pid is gone) — fails on `main`, passes here. `moeru-lint` clean. Left
PTY teardown (`pty-runner.ts`) out on purpose: job control puts
background jobs in their own groups, needs session-wide cleanup — happy
to follow up.
2026-06-23 12:35:12 +08:00
..
computer-use-mcp fix(computer-use-mcp): don't orphan background processes on terminal timeout (#2006) 2026-06-23 12:35:12 +08:00
discord-bot build(deps): migrate workspace dependencies to catalogs 2026-06-03 17:12:13 +08:00
minecraft refactor(minecraft): restore services to neutral Minecraft semantics (#1950) 2026-06-10 06:51:56 +00:00
satori-bot chore: update package dependencies and remove specific catalog references 2026-06-07 19:45:28 +08:00
telegram-bot chore: update package dependencies and remove specific catalog references 2026-06-07 19:45:28 +08:00
twitter-services chore: cleanup and lint fix 2026-06-07 20:31:22 +08:00