fix(runner): job-control noise and timeout grace - #1344
Merged
Conversation
Two defects a --parallel full-suite run surfaced. A worker turns on job control so each test is its own process group. Bash's parent-side setpgid loses a harmless race against a child that already exec'd, macOS answers EPERM, and bash reports every errno but ESRCH. The line was replayed under "Stderr from <file>" for a file that wrote nothing. The child sets the group itself before it execs, so the group was always right and only the message was wrong. The timeout watchdog gave the body a flat 0.3s between its SIGTERM and its SIGKILL. That window has to cover killing whatever the body blocked on, waking bash, reaching its EXIT trap and running tear_down, which a loaded machine did not manage: the hook was skipped in about one parallel full-suite run in three. The grace now polls for the body to exit, bounded at 2s, so the common case ends sooner than the old sleep and a slow hook still completes.
Chemaclass
enabled auto-merge (squash)
September 7, 2026 14:32
JesusValeraDev
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 Background
A
--parallelfull-suite run reported bash's own job-control diagnostic as the stderr of a file that wrote nothing, and skipped thetear_downof a timed-out test about one run in three. Both were found while validating the tree for 0.50.2.💡 Changes
child setpgiddiagnostic from replayed worker stderr, and omit the whole block when nothing else remains. The child sets its own process group before it execs, so the group was always right and only the message was wrong.tear_downstill completes on a loaded machine and the common case ends sooner than the old sleep.main: a slowtear_downagainst a 1s budget, and worker stderr made of nothing but noise.