Fix macOS release: remove invalid stapling of bare CLI binary#121
Merged
Conversation
Agent-Logs-Url: https://github.com/AJenbo/phpantom_lsp/sessions/00ed6ce9-2f5c-4366-868c-82a342836eb7 Co-authored-by: AJenbo <204594+AJenbo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix macOS release workflow for Apple targets
Fix macOS release: remove invalid stapling of bare CLI binary
May 14, 2026
AJenbo
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xcrun stapler(Error 73) does not support stapling notarization tickets onto raw Mach-O executables — only.app,.pkg, and.dmgcontainers. Notarization was succeeding; only the staple step was broken, causing every Apple-target release job to fail.Changes
.github/workflows/release.yml— remove thexcrun stapler staplecall from the macOS notarization stepThe binary remains code-signed (Developer ID + hardened runtime) and notarized. Gatekeeper verifies notarization online without a stapled ticket, so there is no regression in user trust experience. Stapling would only matter for offline verification, which is not a requirement here.
The
tar.gzartifact name and format are unchanged, so the Zed extension requires no updates.Original prompt
Create a pull request in
AJenbo/phpantom_lspto fix the macOS release workflow for Apple targets.Background
The
0.8.0release failed for Apple targets in theReleaseworkflow. The workflow is in.github/workflows/release.yml.Observed behavior from the failing release run:
codesign.xcrun notarytool submit ... --wait.target/${{ matrix.target }}/release/phpantom_lsp.The staple and validate action failed! Error 73.Goal
Fix the workflow so macOS release builds succeed while keeping the distributed artifact usable by the Zed extension in this repository.
Constraints / decision guidance
Required work
.github/workflows/release.ymland any repo code/config related to the Zed extension release asset format expectations.Acceptance criteria
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: The AJenbo/phpantom_lsp 0.8.0 release failed for apple targets, I think because it was unable to stable the binery, but how else should we sign the release?
Assistant: Yes — the failure looks like the stapling step, not the signing step.
From the failed Release run:
.github/workflows/release.ymlrelease.ymllines 127–128The key error in the logs is:
The staple and validate action failed! Error 73.Your workflow currently does:
codesignthe raw binaryThat last part is the problem.
Why it failed
For macOS distribution, stapling a standalone CLI Mach-O binary is generally not the right target.
stapleris meant for supported distributable containers like:.app.pkg.dmgA raw Unix executable typically isn’t something you “staple” in the same way, even if notarization succeeds. That matches your failure: notarization was accepted, then stapling failed.
So how should you sign the release?
For a CLI tool like
phpantom_lsp, the normal approach is:Good baseline
In other words, for your current tar.gz release artifacts, the practical fix is:
codesignnotarytool submitxcrun stapler staple target/.../phpantom_lspRecommended release strategy
Option A — simplest, likely best for this repo
For
tar.gzCLI releases:tar.gz, you can still ship the signed binary, but stapling the raw binary is not neededOption B — bes...
This pull request was created from Copilot chat.