Skip to content

fix(desktop): keep packaged symlinks inside the app so codesign accepts it - #116

Merged
chaqchase merged 1 commit into
mainfrom
fix/release-bundle-symlinks
Oct 15, 2026
Merged

chaqchase merged 1 commit into
mainfrom
fix/release-bundle-symlinks

Conversation

@chaqchase

Copy link
Copy Markdown
Member

Summary

With the signing fix from #115, the v0.0.67 mac build got past certificate setup but then failed at codesign --verify --deep --strict with "invalid destination for symbolic link in bundle".

Cause: after-pack copies electron-updater and the server runtime into the app with fs.cp, which rewrites relative symlinks as absolute paths on the build machine. bun nests semver (with a .bin/semver link) under electron-updater, so the bundle shipped Contents/Resources/node_modules/electron-updater/node_modules/.bin/semver, pointing at the CI checkout.

Fix:

  • Copy with verbatimSymlinks and leave out package .bin shims, which the app never runs.
  • after-pack now fails with the offending links if any symlink in the packaged resources is absolute, dangling, or points outside the app. Before, this only surfaced at codesign.

The v0.0.67 tag builds the old after-pack code, so this ships as v0.0.68. v0.0.67 (no assets) is now marked as a pre-release, so auto-update keeps seeing v0.0.66 as the latest version until then.

Test plan

  • G0 (367 test files), plus new after-pack tests: relative links stay relative, .bin is skipped, and escaping/absolute/dangling links are reported.
  • Unsigned build:desktop:mac locally: no .bin directories and no absolute symlinks in Sentinel.app, and the bundle audit passes.
  • v0.0.68 publish-release: signed, notarized mac build.

🤖 Generated with Claude Code

…ts it

The v0.0.67 mac release failed at codesign --verify: "invalid destination
for symbolic link in bundle". after-pack copies electron-updater (and the
server runtime) with fs.cp, which rewrites relative symlinks into absolute
paths on the build machine; bun had nested semver with a .bin/semver link
under electron-updater, so the bundle shipped a link to the CI checkout.

- Copy with verbatimSymlinks and leave package .bin shims out (the app
  never runs them).
- after-pack now fails with the offending links when any symlink in the
  packaged resources is absolute, dangling or leaves the app, instead of
  failing later at codesign.

Gate: G0 green (367 test files); unsigned build:desktop:mac passes with no
.bin directories or absolute symlinks in Sentinel.app, bundle audit passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chaqchase
chaqchase merged commit 2f666b3 into main Oct 15, 2026
8 checks passed
@chaqchase
chaqchase deleted the fix/release-bundle-symlinks branch October 15, 2026 22:06
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.

1 participant