Skip to content

Remove macOS race from detached-child cleanup regression test #66

Description

@Deicyde

tests/test_skeleton.py::test_bounded_command_finds_a_descendant_that_escapes_its_process_group
repeatedly fails on macOS under load after _run_bounded_command correctly
raises SkeletonError: cleanup finds and terminates the detached child before
the child writes detached-child.pid, then the assertion reads a nonexistent
file.

This reproduced on unrelated PR #14, #26, and #28 worktrees, including an
exact-node rerun under Python 3.10. The same code passes in GitHub Linux CI and
often under Python 3.13, so it is not attributable to those PR diffs.

Acceptance criteria:

  • Make the fixture synchronize child startup/PID publication before allowing
    the short-lived parent to exit, without weakening descendant cleanup.
  • Keep asserting that the escaped-session child is discovered and dead after
    cleanup.
  • Avoid fixed sleeps or assuming the PID file wins the race against cleanup.
  • Exercise the regression repeatedly on macOS when available.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions