fix: detach Responses proxy stdio on container runners - #143
Open
sylvesterkaczmarek wants to merge 2 commits into
Open
fix: detach Responses proxy stdio on container runners#143sylvesterkaczmarek wants to merge 2 commits into
sylvesterkaczmarek wants to merge 2 commits into
Conversation
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
Detach the long-lived Responses API proxy from the GitHub Actions step stdout/stderr stream so container-based runners such as ARC do not keep the step transport open after Bash exits.
Fixes #108.
Problem
Start Responses API proxycurrently backgrounds the proxy without redirecting its output:On ordinary GitHub-hosted runners, that background process can outlive the shell without blocking the next step.
On container runners that execute steps through a persistent exec/WebSocket transport, the proxy inherits the step's stdout/stderr file descriptors. The shell exits, but the long-lived proxy keeps those descriptors open, so the runner can treat the step transport as still active and eventually time out before the next step starts.
Fix
Redirect the proxy's stdout and stderr to a per-run log under
runner.tempbefore backgrounding it:The log path is:
This removes the inherited step-stream descriptors while preserving diagnostics.
If the proxy never writes its server-info file, the existing wait step now prints the detached proxy log to stderr before failing, so startup errors remain visible.
Why no
disownThe failure mode in #108 is the inherited stdout/stderr transport, not Bash job-table ownership. The action already backgrounds the process successfully on current runners. Redirecting those descriptors addresses the container-exec hang without adding shell job-control assumptions.
Regression coverage
Added a focused Node-stdlib manifest test that verifies:
runner.tempand scoped bygithub.run_id;Validation
main(c385816875cc2fc8e033ed9d1cba96f8c331210e);action.yml;src/change, so the checked-indist/main.jsbundle remains valid.Risk
Low. Proxy lifetime, API-key handling, server-info format, port selection, and upstream endpoint behavior are unchanged. The only runtime change is where the background proxy writes stdout/stderr.