Fix action hang when descendants keep stdio open - #151
Open
Ce1ling wants to merge 1 commit into
Open
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
igerber
added a commit
to igerber/diff-diff
that referenced
this pull request
Aug 28, 2026
…pletes) (#797) Reverts the v1.12 bump from #791. Since v1.12, heavy review runs on Linux never return after the codex turn completes: the action passes the runner's stdout/stderr descriptors to the whole codex process tree, and a surviving descendant keeps them open, so the step idles until timeout-minutes kills the job with the verdict already written (openai/codex-action#150). The CLI-side mitigation (codex 0.150.x) did not resolve it for this repo's drop-sudo runs; the action-side fix (openai/codex-action#151) is unmerged. Both attempts of the PR #796 review died this way (attempt 1 killed at the 60-minute timeout, attempt 2 stuck identically after the analysis finished). Also adds a dependabot ignore for openai/codex-action 1.12 so the broken version is not re-proposed; drop the ignore once the fixed release ships.
Author
|
Issue #150 has been fixed upstream in Codex CLI 0.150.0, so this PR is no longer strictly necessary. Either way, thanks for tracking this down and getting the CLI fix out so quickly. |
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.
Summary
runCodexExecfrom the direct child process exit and close the private pipes so surviving descendants cannot keep the runner transport openThe Linux
sudo -> sh -> setpriv -> envprivilege-isolation chain is unchanged. The fix only changes the boundary between that process tree and the action runner's log streams.Fixes #150.
Root cause
runCodexExecpassed the runner's stdout and stderr descriptors directly to the entire Codex process tree. A descendant that survived the direct Codex process could retain those descriptors after the result had been written, preventing the GitHub Actions runner from observing the end of its log transport.Waiting for Node's
closeevent also couples command completion to inherited stream closure. The action now forwards private child pipes and uses the direct child'sexitevent as the command result, then tears down those private pipes.Test plan
corepack pnpm run checkcorepack pnpm test(145 tests: 142 passed, 3 platform-dependent skips)ETIMEDOUTfinal-messagegit diff --check