Comfy-Org / Comfy-Org/ComfyUI_frontend
[test-recorder] SIGINT/SIGTERM can orphan Playwright/dev-server children and resurrect deleted autosave file
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Problem
Ctrl-C/SIGTERM during recording can orphan child processes and recreate sensitive files after cleanup:
- `src/recorder/runner.ts:121-131,133-163` — the signal handler deletes temp files and calls `process.exit(130)` without explicitly terminating the synchronous Playwright child. The child can survive, or flush `_recorded-code.txt` back to disk *after* the handler deleted it.
- `src/devserver/manager.ts:44-76` — immediate exit makes outer dev-server cleanup ordering fragile; a spawned `pnpm dev:cloud` can be left running.
### Suggested fix
Spawn Playwright asynchronously in its own process group; on signal, terminate and await the whole group, then delete temp files and stop the dev server, then set the exit code.
_Line references are against branch `cb/comfy-test-usability` (PR #15837); adjust after merge._
Contributor guide
Assessment
This issue has not been assessed yet.