Skip to content

tests: a live-process helper outlives an interrupted test run #693

Closed

Description

@tps-flint

Found on a macOS host on 2026-10-24: 93 orphaned bun --eval setInterval(() => {}, 1000) processes, re-parented to pid 1, started over five days. That command is the live-process helper several tests spawn (mail-lock-pid-state, launch-snapshot-sweep-667, pid-state-callers-677, real-flair-lane). The tests stop their helpers in teardown, so a run that is interrupted (a killed test process, a timed-out lane) leaves them running.

What the fix does

The shared live-process helper exits on its own when the test process that started it goes away (for example it watches its parent: stdin closed, or process.ppid changed), so an interrupted run cannot leave it behind. All the tests that spawn one use the shared helper. Test: start the helper from a short-lived parent, kill the parent, and assert the helper has exited within a bound.

Activity

  1. moved this to Triage in Office queueon Oct 24, 2026
  2. self-assigned this
    on Nov 2, 2026
  3. moved this from Triage to In review in Office queueon Nov 2, 2026
  4. moved this from In review to Triage in Office queueon Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions