build: a failed release build leaves the complete INSECURE debug bundle loadable in dist/ #333

Closed
opened 2026-08-20 14:25:23 +02:00 by clawbot · 1 comment
Collaborator

Raised by the review of #330 (#330 (comment)) as a design choice rather than a defect. Filing it because the decision should be recorded either way.

After #309, running make build in a shell with AUTISTMASK_DEBUG=1 exported correctly fails with exit 2. But dist/ is left holding the complete debug bundle — loadable, and every wallet it creates uses the publicly committed test recovery phrase from src/shared/constants.js.

The failure is loud and the red DEBUG / INSECURE banner is on, so an operator who loads it is warned. Keeping the artifact as evidence of what went wrong is defensible. The counter-argument is that the entire point of #309 was that a debug bundle must not be mistakable for a release one, and a failed release build that leaves a loadable debug build behind is a smaller version of that same trap — particularly in CI, or for anyone who runs the build, sees it fail, and loads dist/chrome/ anyway.

Definition of done

  • Decide and implement one of: a failed release build removes dist/, or it keeps it and README.md states explicitly that a failed build may leave a loadable debug bundle behind.
  • Whichever is chosen, the failure message says what is now in dist/.
  • A script/test-verify-build case asserts the chosen behaviour, so it cannot silently flip.
  • make check green.
Raised by the review of https://git.eeqj.de/sneak/AutistMask/pulls/330 (https://git.eeqj.de/sneak/AutistMask/pulls/330#issuecomment-67589) as a design choice rather than a defect. Filing it because the decision should be recorded either way. After https://git.eeqj.de/sneak/AutistMask/issues/309, running `make build` in a shell with `AUTISTMASK_DEBUG=1` exported correctly **fails** with exit 2. But `dist/` is left holding the complete debug bundle — loadable, and every wallet it creates uses the publicly committed test recovery phrase from `src/shared/constants.js`. The failure is loud and the red `DEBUG / INSECURE` banner is on, so an operator who loads it is warned. Keeping the artifact as evidence of what went wrong is defensible. The counter-argument is that the entire point of #309 was that a debug bundle must not be mistakable for a release one, and a failed *release* build that leaves a loadable debug build behind is a smaller version of that same trap — particularly in CI, or for anyone who runs the build, sees it fail, and loads `dist/chrome/` anyway. ## Definition of done - [ ] Decide and implement one of: a failed release build removes `dist/`, or it keeps it and `README.md` states explicitly that a failed build may leave a loadable debug bundle behind. - [ ] Whichever is chosen, the failure message says what is now in `dist/`. - [ ] A `script/test-verify-build` case asserts the chosen behaviour, so it cannot silently flip. - [ ] `make check` green.
clawbot added this to the 1.0.0 milestone 2026-08-20 14:25:23 +02:00
Author
Collaborator

Decision, so the implementer does not have to make it: a failed release build removes dist/. Reversible, internal, and it is the option that preserves what #309 was for — a build that failed must not leave something loadable behind that an operator can mistake for its output. Documenting the trap instead relies on the operator having read the README at the moment they are staring at a failure, which is the weaker control.

Implementation requirements:

  • Only the release path (make build) wipes on failure. make build-debug keeps its dist/; a debug build that fails is not producing a mistakable artifact.
  • The failure message states that dist/ was removed and why, so the removal is never silent.
  • The script/test-verify-build case asserts the post-failure state of dist/ directly, not just the exit code.
  • No change to what verify-build inspects — this is about what happens after it says no.
Decision, so the implementer does not have to make it: **a failed release build removes `dist/`.** Reversible, internal, and it is the option that preserves what https://git.eeqj.de/sneak/AutistMask/issues/309 was for — a build that failed must not leave something loadable behind that an operator can mistake for its output. Documenting the trap instead relies on the operator having read the README at the moment they are staring at a failure, which is the weaker control. Implementation requirements: - Only the **release** path (`make build`) wipes on failure. `make build-debug` keeps its `dist/`; a debug build that fails is not producing a mistakable artifact. - The failure message states that `dist/` was removed and why, so the removal is never silent. - The `script/test-verify-build` case asserts the post-failure state of `dist/` directly, not just the exit code. - No change to what `verify-build` inspects — this is about what happens after it says no.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#333