Skip to content

Fix daemon updates when desktop packaging omits README - #3126

Merged
SawyerHood merged 1 commit into
mainfrom
bb/thr_gsmne4wf3n
Sep 5, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/thr_gsmne4wf3n

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Electron Builder excludes top-level dependency README files, but the server unconditionally copied bb-app/README.md when generating an enrolled daemon's update package. In Desktop 0.42.0 this throws ENOENT before npm pack, making /install/bb-app.tgz return HTTP 500 and preventing outdated daemons from updating. The reproduction report verified the omission in two macOS builds; a new regression test reproduces the same failure on unchanged main.

What changed

The artifact service now tolerates ENOENT only for the README copy and preserves the file when present. Required runtime files and other copy errors still fail. This differs from the report's proposed packaging override: documentation is optional when assembling the runtime package, so Electron Builder's default exclusion no longer breaks updates. No daemon wire contract changes or protocol bump are needed.

How you verified

  • Added a missing-README regression test that fails before the fix and passes afterward, running real npm pack and inspecting the tarball for every required runtime file.
  • Added checks that missing runtime files and non-ENOENT README errors still fail. Existing coverage verifies README preservation and artifact caching.
  • pnpm exec turbo run test --filter=@bb/server -- test/app/bb-app-artifact.test.ts test/app/install-machine-script.test.ts — 37 tests passed.
  • pnpm exec turbo run typecheck --filter=@bb/server — passed.
  • git diff --check — passed. EAP codename scan: clean working tree, HEAD, added lines, and commit messages in the push range.
  • Validation ran on Linux; the complete two-machine macOS upgrade was not repeated.

Fixes #3118

AGENT GENERATED

@SawyerHood
SawyerHood merged commit ae6c076 into main Sep 5, 2026
16 checks passed
@SawyerHood
SawyerHood deleted the bb/thr_gsmne4wf3n branch September 5, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS desktop 0.42.0: missing README.md makes daemon auto-update return HTTP 500

1 participant