Two build/release hygiene gaps disclosed by the review of #347 (#347 (comment)). Neither blocked that PR.
1. DEBUG_MNEMONIC survives in release bundles
The 12-word BIP-39 test phrase in src/shared/constants.js survives as a dead string literal in both release bundles — verified by grepping the unpacked artifacts, present in all four index.js files.
It is unreachable and harmless today: both bundles verify autistmask-build-debug=off, so no wallet is ever created from it, and the phrase is publicly committed anyway. It is also pre-existing, untouched by that PR.
What changed is that #310 made this the first build that ships a distributable artifact at all. A BIP-39 phrase embedded in a distributed wallet binary is worth removing on its own terms — it is the kind of string that scanners, auditors and users will find and have to reason about.
Not in milestone 1.0.0: it cannot be reached at runtime and the phrase is not secret.
2. The committed-private-key guard matches by filename extension only
tests/extensionId.test.js guards against committed private key material by checking filename extensions, so key material committed under an unexpected name passes it. Defense-in-depth gap rather than a defect — the review confirmed no key material is in the tree today.
Definition of done
The test recovery phrase does not appear in any emitted release bundle. Guard it behind the __BUILD_DEBUG__ define so esbuild folds it away in a release build.
script/verify-build fails if a BIP-39 test phrase appears in any emitted release bundle, so this cannot silently return.
The committed-key guard matches on content (a PEM/key header) rather than on filename alone.
Test for each. State the mutation and observed result for the verify-build check.
make check and both e2e suites green.
Two build/release hygiene gaps disclosed by the review of https://git.eeqj.de/sneak/AutistMask/pulls/347 (https://git.eeqj.de/sneak/AutistMask/pulls/347#issuecomment-69107). Neither blocked that PR.
## 1. `DEBUG_MNEMONIC` survives in release bundles
The 12-word BIP-39 test phrase in `src/shared/constants.js` survives as a dead string literal in **both** release bundles — verified by grepping the unpacked artifacts, present in all four `index.js` files.
It is unreachable and harmless today: both bundles verify `autistmask-build-debug=off`, so no wallet is ever created from it, and the phrase is publicly committed anyway. It is also pre-existing, untouched by that PR.
What changed is that https://git.eeqj.de/sneak/AutistMask/issues/310 made this the first build that ships a distributable artifact at all. A BIP-39 phrase embedded in a distributed wallet binary is worth removing on its own terms — it is the kind of string that scanners, auditors and users will find and have to reason about.
Not in milestone 1.0.0: it cannot be reached at runtime and the phrase is not secret.
## 2. The committed-private-key guard matches by filename extension only
`tests/extensionId.test.js` guards against committed private key material by checking filename extensions, so key material committed under an unexpected name passes it. Defense-in-depth gap rather than a defect — the review confirmed no key material is in the tree today.
## Definition of done
- [ ] The test recovery phrase does not appear in any emitted release bundle. Guard it behind the `__BUILD_DEBUG__` define so esbuild folds it away in a release build.
- [ ] `script/verify-build` fails if a BIP-39 test phrase appears in any emitted release bundle, so this cannot silently return.
- [ ] The committed-key guard matches on content (a PEM/key header) rather than on filename alone.
- [ ] Test for each. State the mutation and observed result for the verify-build check.
- [ ] `make check` and both e2e suites green.
DEBUG_MNEMONIC is now behind the __BUILD_DEBUG__ define in src/shared/constants.js, so a release build folds the test phrase to null and no emitted bundle carries it; it had survived as dead text kept live by module.exports. script/verify-build now fails a release build if the phrase appears in any emitted file, with script/test-verify-build cases for both the release failure and the debug allowance. tests/extensionId.test.js matches committed key material by PEM private-key header content instead of filename extension.
Mutation check: with DEBUG_MNEMONIC reverted to an unconditional literal, make build fails at script/verify-build ("carries the BIP-39 test recovery phrase"); restoring the guard makes it green.
Both items done, though the issue tagged the phrase removal as post-1.0.
Model: opus-4-8
Done in https://git.eeqj.de/sneak/AutistMask/pulls/397.
`DEBUG_MNEMONIC` is now behind the `__BUILD_DEBUG__` define in `src/shared/constants.js`, so a release build folds the test phrase to `null` and no emitted bundle carries it; it had survived as dead text kept live by `module.exports`. `script/verify-build` now fails a release build if the phrase appears in any emitted file, with `script/test-verify-build` cases for both the release failure and the debug allowance. `tests/extensionId.test.js` matches committed key material by PEM private-key header content instead of filename extension.
Mutation check: with `DEBUG_MNEMONIC` reverted to an unconditional literal, `make build` fails at `script/verify-build` ("carries the BIP-39 test recovery phrase"); restoring the guard makes it green.
Both items done, though the issue tagged the phrase removal as post-1.0.
Model: opus-4-8
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Two build/release hygiene gaps disclosed by the review of #347 (#347 (comment)). Neither blocked that PR.
1.
DEBUG_MNEMONICsurvives in release bundlesThe 12-word BIP-39 test phrase in
src/shared/constants.jssurvives as a dead string literal in both release bundles — verified by grepping the unpacked artifacts, present in all fourindex.jsfiles.It is unreachable and harmless today: both bundles verify
autistmask-build-debug=off, so no wallet is ever created from it, and the phrase is publicly committed anyway. It is also pre-existing, untouched by that PR.What changed is that #310 made this the first build that ships a distributable artifact at all. A BIP-39 phrase embedded in a distributed wallet binary is worth removing on its own terms — it is the kind of string that scanners, auditors and users will find and have to reason about.
Not in milestone 1.0.0: it cannot be reached at runtime and the phrase is not secret.
2. The committed-private-key guard matches by filename extension only
tests/extensionId.test.jsguards against committed private key material by checking filename extensions, so key material committed under an unexpected name passes it. Defense-in-depth gap rather than a defect — the review confirmed no key material is in the tree today.Definition of done
__BUILD_DEBUG__define so esbuild folds it away in a release build.script/verify-buildfails if a BIP-39 test phrase appears in any emitted release bundle, so this cannot silently return.make checkand both e2e suites green.Done in #397.
DEBUG_MNEMONICis now behind the__BUILD_DEBUG__define insrc/shared/constants.js, so a release build folds the test phrase tonulland no emitted bundle carries it; it had survived as dead text kept live bymodule.exports.script/verify-buildnow fails a release build if the phrase appears in any emitted file, withscript/test-verify-buildcases for both the release failure and the debug allowance.tests/extensionId.test.jsmatches committed key material by PEM private-key header content instead of filename extension.Mutation check: with
DEBUG_MNEMONICreverted to an unconditional literal,make buildfails atscript/verify-build("carries the BIP-39 test recovery phrase"); restoring the guard makes it green.Both items done, though the issue tagged the phrase removal as post-1.0.
Model: opus-4-8