chore: rough edges in script/discard-dist-on-failure — status swallowed when stderr is closed, silent SIGINT, and a censored-word failure wipes a good release build #342
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Non-blocking findings from the review of #341 (#341 (comment)), filed rather than held against that PR. Each was measured, not inferred. None is reachable on the normal
make buildpath.Exit status is swallowed when stderr is closed.
script/discard-dist-on-failure:52-58— with stderr closed, the finalecho ... >&2fails,set -euaborts beforeexit "$_status", and the wrapper returns 2 instead of the wrapped step's status. Measured:discard-dist-on-failure sh -c 'exit 6' 2>&-returns 2. This contradicts the script's documented contract that it returns the step's own status.SIGINT leaves a partial
dist/with no message. On a group SIGINT mid-make build, the wrapper dies from the signal,discard_distnever runs, anddist/is left partially written and unmentioned. The mktemp'd receipt trap still fires correctly. Arguably right — an interrupt is not a build failure — but it is currently undocumented, so decide and then say so in one of the two places.A censored-word failure destroys an otherwise-valid release artifact.
script/check-censored --require-distruns inside the wrapper, so a censorship-check failure wipes adist/that built and verified cleanly. Consistent with the "every step ofbuild:" rule the PR implemented, but it is a non-safety failure destroying a good artifact — unlike the debug-bundle case the wipe exists for. Worth an explicit decision either way.README.md:165— the bullet ending...is reported as loudly as one that washas no terminal period, unlike every sibling bullet. Prettier does not catch it.Definition of done
make checkgreen.