fix(push): avoid process substitution in signal-sensitive job polling - #49
Merged
Merged
Conversation
Owner
Author
|
Added tests/test-hup-parser.sh: 18 bounded inert controls (plain loop, command substitution, process substitution; six fixed delays each), 4s timeout plus 1s kill grace per case. Requires HUP-handler marker AND exit 129, fails on first bad result, no retry-to-green. Existing tests/test-*.sh selection covers the new suite without mapping changes; worker-registration suite remains selected by its existing diff. No production code change. This is a candidate reproducer, not confirmed reproduction or proof of root cause; marker/delay cannot fix exact parser timing. Local syntax/diff checks only; CI pending. |
LucaLin233
marked this pull request as ready for review
September 8, 2026 13:44
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.
Evidence and candidate fix
Run 34226553908 reproduced trap EOF with exit 2 in a standalone Debian Bash 5.2.37 process-substitution control, without loading production code. Ubuntu reproduced the same error in the real worker signal suite. This identifies a reproducible trigger class, not Bash internal root cause.
Replace the only process substitution in tools/push.sh (job_is_active) with command-substitution snapshot plus quoted here-string. Preserve jobs -pr running-job semantics, exact PID matching and failure status; no signal masking or cleanup changes.
Tests
Add actual helper checks for active/missing/reaped direct child. Preserve original HUP/INT/TERM publication matrix plus three bounded HUP probes. Parser controls gate plain/command/snapshot modes, six delays each; handler marker and exit 129 required. Legacy known-failing process mode remains opt-in via HUP_PARSER_INCLUDE_LEGACY=true; its red evidence is preserved, not reported fixed. No assertion weakening in production regression suites.
Validation and boundaries
Three files only, based on main 597fce3. Local bash -n and diff --check passed; all behavior tests run in CI. New CI pending. No production execution, deployment, real credentials, xtrace, timeout increases, or #41 changes. #47 remains blocked until candidate validated and reviewed. Revert this PR for rollback. Draft; do not merge without explicit confirmation.