Skip to content

fix(push): avoid process substitution in signal-sensitive job polling - #49

Merged
LucaLin233 merged 8 commits into
mainfrom
luno/test-push-hup-trap-diagnostics
Sep 8, 2026
Merged

LucaLin233 merged 8 commits into
mainfrom
luno/test-push-hup-trap-diagnostics

Conversation

@LucaLin233

@LucaLin233 LucaLin233 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

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.

@LucaLin233

Copy link
Copy Markdown
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 LucaLin233 changed the title test(push): investigate HUP trap parsing failure fix(push): avoid process substitution in signal-sensitive job polling Sep 8, 2026
@LucaLin233
LucaLin233 marked this pull request as ready for review September 8, 2026 13:44
@LucaLin233
LucaLin233 merged commit aa99013 into main Sep 8, 2026
2 checks passed
@LucaLin233
LucaLin233 deleted the luno/test-push-hup-trap-diagnostics branch September 8, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant