Skip to content

Treat zombied descendants as terminated in dev-lane isolation tests - #11

Merged
xormania merged 1 commit into
devfrom
codex/review-dev-lane-tools-for-issues
Sep 2, 2026
Merged

Treat zombied descendants as terminated in dev-lane isolation tests#11
xormania merged 1 commit into
devfrom
codex/review-dev-lane-tools-for-issues

Conversation

@xormania

@xormania xormania commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Motivation

  • Some dev-lane process-isolation tests treated zombies as live workers because os.kill(pid, 0) returns success for zombied processes, causing flaky failures in CI/container environments where PID 1 reaping can be delayed.
  • The intent is to make process-group / orphan cleanup assertions measure runnable descendants rather than the host's reaping behaviour.

Description

  • Add a procfs check against /proc/<pid>/stat to detect Z (zombie) state and treat such PIDs as terminated in pid_is_alive in ops/devlane/dispatch/tests/launch_support.py.
  • Apply the same zombie-aware check to the _alive helper in ops/devlane/task/tests/test_run.py used by the orphan/termination tests.
  • Preserve the existing portable fallback behaviour (kill(pid, 0) and Permission/Lookup handling) when procfs is unavailable or unreadable.

Testing

  • Ran python3 -m pytest -q ops/devlane/dispatch/tests and the suite passed (247 passed).
  • Ran python3 -m pytest -q ops/devlane/task/tests and the suite passed (151 passed, 26 subtests passed).
  • Ran the remaining dev-lane suites and compile check: fixtures, harness, hooks, telemetry, and workflow all passed (see individual counts in the run).
  • Ran python3 -m compileall -q ops/devlane which succeeded, and ran the repo lint check ops/devlane/workflow/checks/lint.py which correctly refused due to the repository lacking a root ruff.toml (this is a pre-existing configuration omission, not a regression from this change).

Codex Task

Process-group termination can leave dead descendants in zombie state until container PID 1 reaps them. Make the isolation assertions distinguish those non-runnable processes from surviving workers instead of relying on kill(pid, 0) alone.

Source: original
Co-Authored-By: OpenAI Codex <codex@openai.com>
@xormania
xormania merged commit 27af79f into dev Sep 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant