- publish-deb: keep the token out of the process list (curl -K config
file via mktemp, no JSON round-trip through node argv), mktemp the
response file with trap cleanup, add --max-time to the upload
- build-deb: umask 022 + chmod -R a+rX so the payload is world-readable
even when built with umask 077
- install-apt: only fall back to [trusted=yes] on an actual signature
verification failure; other apt-get update failures stay fatal
- auth logout: warn that a manually supplied token stays active on the
server and point at the web UI revocation page
- repo import-batch: resolve the source token inside the per-item try so
one bad item no longer aborts the whole batch
- auth status: print me.login (the /user response has no username field)
and exit 1 when not authenticated
- chmod 0644 every keyring and sources.list entry after writing: tee
inherits the caller's umask, and under e.g. umask 077 apt's
unprivileged _apt user could not read the keyring
- Tests now run the script under umask 077 and assert the 0644 modes
(mutation-checked: dropping the chmod fails a test), and remove their
temp directories on exit
- Refusal error now states that metadata was already refreshed before
concluding the existing nodesource.list is unsuitable
Verified on fresh debian:13 under umask 077: all four files 0644,
install succeeds. npm test 32/32.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Covers the scenarios codex-reviewer recommended: suitable candidate
already present (incl. epoch stripping), missing metadata healed by a
refresh, bootstrap on too-old distro nodejs, bootstrap failure, and the
refuse-to-overwrite branch for a user-managed nodesource.list. Every
scenario runs under a localized LC_ALL with an apt-cache stub that only
emits the English Candidate: label under LC_ALL=C, so locale-safe
parsing is regression-tested (mutation-checked: dropping LC_ALL=C fails
3 tests).
install-apt.sh gains STOKE_APT_ETC to redirect /etc/apt to a throwaway
directory under test, following the script's existing env-override
pattern. Real-container flow re-verified on debian:13.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>