Repository navigation
fix(common): preserve shell completion and drain stderr - #19
Open
Hanabi9248 wants to merge 3 commits into
Open
Hanabi9248 wants to merge 3 commits into
Hanabi9248 wants to merge 3 commits into
Conversation
Signed-off-by: Hanabi9248 <hanabi210902@gmail.com>
Use real local processes and retain nonzero-exit completion semantics. Signed-off-by: Hanabi9248 <hanabi210902@gmail.com>
Merge stderr into the existing output reader before waiting for an array command to exit. A child with enough stderr output otherwise blocks on its pipe and cannot finish. Preserve argument boundaries and the real exit code without adding a production timeout. Add five real-process regressions for bounded stderr output, normal stdout, nonzero exit status and an argument containing spaces. Each private emitter has its own watchdog so a failing baseline is bounded. The existing timeout-start failure correction remains unchanged. Assisted-by: Codex:0.165.0-alpha.1.2 Signed-off-by: Hanabi <317387557+Hanabi9248@users.noreply.github.com>
Hanabi9248
force-pushed
the
codex/shell-timeout-start-failure
branch
2 times, most recently
from
October 30, 2026 15:43
b0153d6 to
3c4066a
Compare
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.
Two ShellUtil process-completion paths need correction.
execShellWithTimeoutreports true when Runtime.exec throws IOException before starting a process.execShellSpaceParam(String[])reads only stdout, so a child producing enough stderr blocks before it can exit.Initialize the timeout helper result to false while retaining Process.waitFor(time, unit) semantics for launched processes, including nonzero exits. In the array helper, merge stderr into the existing reader with ProcessBuilder.redirectErrorStream(true), preserving argument boundaries and the real exit code. No production timeout or other executor change is added.
Validation uses the complete production ShellUtil and unchanged real ShellResult, compiled with Windows JDK25.0.4.101 --release 8, actual cached commons-lang3 3.10, slf4j-api1.7.30 and Lombok1.18.42. SLF4J has its standard NOP fallback on this focused classpath.
The original startup regression measured one baseline assertion failure and two passing controls, then three passes for the accepted startup fix. That source hunk and runner remain unchanged and were not rerun for the stderr increment.
For the stderr increment, published head f3b0c61 is the baseline: two large-stderr cases reach their private child watchdog exit99 instead of expected exit0/7; three stdout/nonzero/space-containing-argument controls pass. With the additional one-line fix, all five new cases pass. Real finite child output is 512KiB; each child watchdog can halt only itself after8seconds. No Process, Runtime, reader or SSH substitutes. CPU1/whole768MiB/16 processes/privateTMP/BLAS1; peak247607296 bytes.
Compile ShellUtil.java, ShellResult.java and either tests/regression/ShellTimeoutRegression.java or tests/regression/ShellArrayStderrRegression.java with the real project dependencies and Lombok annotation processor. Run
ShellTimeoutRegression <existing-private-work-directory>for the original cases orShellArrayStderrRegressionfor the stderr cases. The stderr runner launches child JVMs using the current Java executable/classpath.Not run: original Lombok1.18.20 configuration, JDK8 runtime, Linux, Maven/full backend or repository tests, live SSH/SCP/deployment, other long-command cleanup or interruption behavior. No observed deployment incident, dependency change or build-configuration change is claimed. The new increment was assisted by Codex0.165.0-alpha.1.2 and carries the contributor sign-off.