fix(launcher): signal deaths exit 128+signal, not 0 (v1.0.1) - #46
Closed
duharry0915 wants to merge 2 commits into
Closed
fix(launcher): signal deaths exit 128+signal, not 0 (v1.0.1)#46duharry0915 wants to merge 2 commits into
duharry0915 wants to merge 2 commits into
Conversation
execFileSync throws with status: null when the child dies from a signal; the launcher's 'status' in e check passed, so process.exit(null) turned SIGTERM/SIGSEGV/OOM-kill/Ctrl-C into exit 0 — any script or agent checking $? saw success from a killed process. npm path only; the direct binary and installer paths were unaffected. Now: numeric status passes through unchanged, signal deaths exit 128+signum per shell convention (SIGTERM -> 143, SIGSEGV -> 139), unknown signals -> 1. Verified with a stub binary: 42/TERM/SEGV/0 -> 42/143/139/0. Version -> 1.0.1 (Cargo.toml + lock) so the release tag matches the version guard. This hand-patches generated ci.yml deliberately: a regeneration would also resurrect the deferred win32 matrix and the unfixed launcher, so the generator-side fix is filed with Fern and this carries us until the next full regen.
Both publish jobs only recognized *-alpha* and *-beta*. A v1.1.0-rc.1 or v1.0.0-next.1 tag fell through to a bare `npm publish`, which would have moved the `latest` dist-tag to a prerelease — every `npm i -g agentmail-cli` user upgraded onto it. Now any identifier after the first "-" becomes the dist-tag (rc, next, alpha, beta, ...), with build metadata stripped and a `prerelease` fallback. Release versions still take the existing latest/backport path. Verified: 1.0.1 -> latest/backport path 1.1.0-rc.1 -> --tag rc 1.1.0-next.1 -> --tag next 2.0.0-alpha.3 -> --tag alpha (unchanged) 1.0.0-beta -> --tag beta (unchanged) 1.0.0+build7 -> latest/backport path 1.0.0-rc.1+meta -> --tag rc 1.0.0- -> --tag prerelease Hand-patch on generated ci.yml, same as the launcher fix; filed with Fern for the template.
Contributor
Author
|
Superseded by generator 0.38.6: both patches here — the launcher signal exit codes and the prerelease dist-tag handling — are now native and verified (stub test 42/143/139/0; prerelease logic additionally handles all-numeric identifiers, which this patch did not). Adoption is in agentmail-to/agentmail-docs#214. |
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.
The npm launcher turned signal deaths into exit 0:
execFileSyncthrows withstatus: nullon a signal,'status' in ewas true, andprocess.exit(null)is exit 0. A SIGTERM'd (timeout), OOM-killed, or crashedagentmailreported success to any caller checking$?. npm path only — the direct binary returns 143 correctly.Fix: pass numeric statuses through; on signal death exit
128+signum(TERM→143, SEGV→139), unknown→1. Verified against a stub binary:Version bumped to 1.0.1 (guard-checked at tag time). Deliberately hand-patches generated
ci.yml: regenerating would resurrect the deferred win32 matrix and the unfixed launcher; the generator-side fix is filed with Fern.After merge: tag
v1.0.1to republish npm (4 platforms + launcher).