Comfy-Org / Comfy-Org/ComfyUI_frontend

[test-recorder] SIGINT/SIGTERM can orphan Playwright/dev-server children and resurrect deleted autosave file

Open
#15,840 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
area:testing Bug Potential Bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.