fix(install): ad-hoc sign corvus so curl|bash works on Apple Silicon, add uninstall.sh#29
Merged
0x7067 merged 4 commits intoMay 6, 2026
Conversation
… signing Bun's --compile output carries an LC_CODE_SIGNATURE load command with a mismatched signature blob, so `codesign --sign -` fails with "invalid or unsupported format" and silently leaves the binary unsigned. On Apple Silicon the kernel then SIGKILLs on exec, surfacing as the "Apple ID required" Gatekeeper prompt. Remove the stub with `codesign --remove-signature` first, then `codesign --force --sign -`. Applied in install.sh (rescues the current release), cli-ts/scripts/build.sh (local builds), and cli-build.yml (future releases). Added `codesign -dv` to CI so the build fails loudly if signing ever silently no-ops again. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirror install.sh: remove corvus from both /usr/local/bin and ~/.local/bin, use sudo where needed, idempotent if nothing's installed. Does not touch user-installed skills — those belong to `corvus uninstall`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…helper install.sh: - trap temp file on EXIT so mid-run failures don't leak /tmp files - curl --progress-bar for visible download progress - hard-fail on codesign failure instead of shipping a binary Gatekeeper kills - detect existing install and log the version being replaced - tailor the ~/.local/bin PATH hint to the user's shell (zsh/bash/fish); skip the hint entirely if ~/.local/bin is already on PATH uninstall.sh: - --purge flag removes ~/.corvus/ after interactive y/N (requires TTY) - verify each rm actually removed the target; exit non-zero on failure - reject unknown args with usage/exit 2 scripts/sign-macos.sh (new): - shared helper for the Bun xattr/remove-signature/ad-hoc-sign sequence - cli-ts/scripts/build.sh and .github/workflows/cli-build.yml call it - install.sh keeps an inline copy (curl|bash has no repo checkout); a comment marks it as the inline mirror to keep in sync Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Hotfix: corvus install broken on Apple Silicon + new uninstall.sh
This PR ships two things:
curl | bashinstaller, which currently places a binary that is SIGKILL'd on launch on Apple Silicon.uninstall.shcompanion script for symmetric teardown.A follow-up commit (
3eaa245) tightens the UX and de-duplicates the signing logic; see the "Follow-up" section below.1. Install fix
Problem
curl -fsSL .../install.sh | bashcompletes successfully, butcorvus --versionexits 137 on arm64 Macs with a "cannot verify developer / Apple ID required" Gatekeeper dialog.Root cause
Bun's
bun build --compileoutput carries a malformedLC_CODE_SIGNATUREstub (load command declaresdatasize=140912, embedded blob header declares480562). Anycodesign --sign -call reads the broken stub first and bails withinvalid or unsupported format for signature. The arm64 kernel then refuses to exec the unsigned Mach-O.Three places should have caught this and all three silently swallowed the failure:
install.sh—codesign --sign - … 2>/dev/null || truecli-ts/scripts/build.sh— same pattern.github/workflows/cli-build.yml— no verification, so the broken binary was published tocli-latestascode object is not signed at allThe fix
Two-command sequence, applied in all three places:
Ad-hoc signing (identity
-) is the $0 path used by Homebrew bottles, uv, fnm, etc. It satisfies the kernel's "must have a valid signature" check without a $99 Developer ID.CI regression guard
Added
codesign -dv "$outfile"after signing incli-build.yml. This is what would have caught today's bug — without it, CI can silently ship an unsigned binary again.2. New
uninstall.shSymmetric companion to
install.sh, for clean teardown and for testing install/reinstall cycles.Behavior
corvusfrom/usr/local/binand~/.local/binsudo rmwhen the target directory isn't user-writablecorvus uninstall <skill>)Usage
curl -fsSL https://raw.githubusercontent.com/ravnhq/ai-toolkit/main/uninstall.sh | bashFollow-up: tightening (commit
3eaa245)A small round of UX and robustness fixes on top of the hotfix. Scripts grew from 50 + 27 lines to ~80 + ~80; no new dependencies.
install.shtrap 'rm -f "$TMP"' EXIT— mid-run failures no longer orphan temp files in/tmp.curl -fL --progress-bar(was-fsSL) — visible download progress instead of silent pause.xcode-select --install.Replacing existing corvus (<version>)…so re-runs aren't silent overwrites.~/.local/binfallback now (a) only prints the PATH nag if the dir isn't already on$PATH, and (b) tailors the suggestion to the user's$SHELL(zsh/bash/fish) — exact copy-pasteable command instead of a vague "add it to your PATH".uninstall.sh--purgeflag — also removes~/.corvus/(config +corvus install <skill>state) after listing its contents and asking[y/N]. Requires a TTY; piped stdin is refused.rmactually removed the target; exits non-zero if anything is still present afterward.scripts/sign-macos.sh(new)Extracts the xattr/remove-signature/ad-hoc-sign sequence into a shared helper.
cli-ts/scripts/build.shand.github/workflows/cli-build.ymlnow call it instead of inlining.install.shkeeps an inline copy (curl|bash has no repo checkout) with a comment flagging it as the mirror — future Bun fixes touch two places instead of three.Testing
What's verified
mainon macOS 26.2 / Apple Silicon:corvus --version→ exit 137,codesign -dv→code object is not signed at all.corvus --version→0.1.1exit 0,codesign -dv→Signature=adhoc.uninstall.shremoves the binary and is idempotent.bash -n.sign-macos.shrejects missing arg (exit 2) and missing file (exit 1).uninstall.sh --purgerefuses without a TTY;uninstall.sh --bogusexits 2 with usage.Still to check
codesign -dvstep passes for both darwin slices.cli-latestbinary isSignature=adhocdirectly from the release, not relying on client-side fixup.bash install.shagainst the rebuilt release, thenbash uninstall.sh --purgein an interactive shell.Try it without merging
Out of scope
oven-sh/bun(worth a follow-up issue).install.sh(requires publishing checksums from the release workflow — separate PR).