Repository navigation
Reap the reparented probe descendant so it cannot outlive the test - #1021
Conversation
PR Summary by QodoReap leaked probe descendants before test-host teardown
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
2464f7f to
022c070
Compare
022c070 to
75877ed
Compare
…-teardown # Conflicts: # test/Capacitor.Cli.Daemon.Tests.Unit/DaemonRunnerVersionProbeTests.cs
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 23d41f5 |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…psed time Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit a5da81d |
… stub's pid path Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit b25e1ea |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 6db281f |
Closes #1019 — AI-2960
What & why
A_descendant_holding_the_pipe_open_is_bounded_and_still_reads_the_versiondeliberately leaves a sleeping descendant holding the stub CLI's stdout after the CLI exits. Once reparented it is nobody's child, so it outlived the test by about 18 s and was still running when the test host tore down on a loaded macOS runner, where the host intermittently exited 139. The stub now launches that descendant with a per-test marker in its command line and records its pid. The test reaps it in afinally: it captures the pid's identity, confirms the command line still carries the marker, re-checks the identity, and only then kills.ProcessTreegains aKill(pid, identity)overload that signals only while the pid still carries the captured identity.Where to look
Ownership is proven by the marker, not by timing, so a descendant that exited early, or a pid reused since, is never signalled. The 139 is rare and load-sensitive; this removes the identified lingering descendant but is not proven to be the only cause.
Verification
The version-probe tests pass locally on the branch merged with main, and no marked process remains afterwards. With the kill replaced by a log line, the reap path was reached and the marked descendant stayed alive, so the reap is what removes it.
🤖 Generated with Claude Code