Skip to content

fix(ci): correct "damaged" guidance for PR installer builds#3278

Merged
gantoine merged 1 commit into
mainfrom
posthog-code/fix-installer-damaged-instructions
Jul 8, 2026
Merged

fix(ci): correct "damaged" guidance for PR installer builds#3278
gantoine merged 1 commit into
mainfrom
posthog-code/fix-installer-damaged-instructions

Conversation

@gantoine

@gantoine gantoine commented Jul 8, 2026

Copy link
Copy Markdown
Member

Problem

We added a CI job that builds a macOS installer when the build-installer label is added to a PR. But pulling down one of those images and opening it fails with "PostHog Code" is damaged and can't be opened. You should eject the disk image.

The build is code-signed but deliberately not notarized (to stay fast). When the artifact is downloaded through a browser, macOS stamps it with the com.apple.quarantine attribute, and on current macOS Gatekeeper rejects a quarantined, unnotarized app as "damaged" — the older "right-click → Open" bypass the sticky comment promised no longer works. So the file isn't corrupt; the guidance was just wrong.

Changes

Keep the build unnotarized (fast) but fix the misleading docs in pr-build-installer.yml:

  • Rewrite the sticky PR comment: explain that "damaged" is the expected missing-notarization state, not a corrupt download, and give the one command that fixes it — xattr -dr com.apple.quarantine "/Applications/PostHog Code.app".
  • Drop the stale "right-click → Open" instruction.
  • Update the two source-level comments (file header + SKIP_NOTARIZE) to match.

How did you test this?

  • Rendered the updated success-comment bash locally and confirmed the Markdown (escaped quotes, fenced code block) comes out correctly.
  • Confirmed the edits are limited to comment text / echo strings within the existing run: | block — no structural or indentation changes to the workflow.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

The PR installer is signed but not notarized. On current macOS, Gatekeeper
rejects a quarantined, unnotarized download as "damaged and can't be opened",
and the "right-click -> Open" bypass the sticky comment promised no longer
applies. Update the sticky comment (and the two matching source comments) to
tell testers this is expected and to clear the quarantine flag with
`xattr -dr com.apple.quarantine`.

Generated-By: PostHog Code
Task-Id: 0798655f-ada5-466a-97f9-3e70676bca64
@trunk-io

trunk-io Bot commented Jul 8, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@gantoine gantoine marked this pull request as ready for review July 8, 2026 18:31
@gantoine gantoine added the build-installer Build a macOS installer for this PR label Jul 8, 2026
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(ci): correct "damaged" guidance for ..." | Re-trigger Greptile

@gantoine gantoine added Stamphog This will request an autostamp by stamphog on small changes and removed build-installer Build a macOS installer for this PR labels Jul 8, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR touches a GitHub Actions workflow file, which is blocked by the CI/CD deny-list and requires human review regardless of the change content.

@stamphog stamphog Bot removed the Stamphog This will request an autostamp by stamphog on small changes label Jul 8, 2026
@gantoine gantoine requested a review from charlesvien July 8, 2026 18:40
@gantoine gantoine merged commit 5376e46 into main Jul 8, 2026
33 of 35 checks passed
@gantoine gantoine deleted the posthog-code/fix-installer-damaged-instructions branch July 8, 2026 18:43
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.

2 participants