Skip to content

Conversation

@ammario
Copy link
Member

@ammario ammario commented Oct 7, 2025

Problem

The previous code signing attempts failed with:

security: SecKeychainItemImport: Unknown format in import.

Root Cause

The MACOS_CERTIFICATE secret contains 54 newlines (formatted at ~76 chars/line). When using the base64: prefix, electron-builder's internal base64 decoder couldn't handle the newlines properly.

Solution

Instead of relying on electron-builder's base64 decoder, we:

  1. Decode the certificate ourselves using base64 --decode (which handles newlines correctly)
  2. Write it to a temporary file
  3. Pass the file path to electron-builder via CSC_LINK

This approach:

  • ✅ Handles newlines in the base64 string correctly
  • ✅ Avoids electron-builder's internal decoder issues
  • ✅ Only sets CSC_LINK when the secret is available (graceful fallback for unsigned builds)

Testing

Successfully tested on the debug-cert-format branch with CSC_FOR_PULL_REQUEST=true:

• signing  file=release/mac/Cmux.app identity=BDB050EB749EDD6A80C6F119BF1382ECA119CCCC
• signing  file=release/mac-arm64/Cmux.app identity=BDB050EB749EDD6A80C6F119BF1382ECA119CCCC

Both x64 and arm64 builds were successfully signed.

Generated with cmux

The MACOS_CERTIFICATE secret contains newlines which caused
electron-builder's internal base64 decoder to fail with:
'SecKeychainItemImport: Unknown format in import'

Solution: Decode the certificate ourselves and provide a file path
instead of using the base64: prefix. This approach:
- Handles newlines in the base64 string correctly
- Avoids electron-builder's internal decoder issues
- Only sets CSC_LINK when the secret is available

Tested successfully on debug-cert-format branch with both x64 and
arm64 builds being signed correctly.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Changed base64 --decode to base64 -D for macOS BSD compatibility.
@ammario
Copy link
Member Author

ammario commented Oct 7, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

@ammario ammario merged commit 523d693 into main Oct 7, 2025
6 of 7 checks passed
@ammario ammario deleted the fix-macos-signing-final branch October 7, 2025 19:28
ammario added a commit that referenced this pull request Oct 7, 2025
When Codex doesn't find any issues, it leaves a regular comment saying
"Didn't find any major issues. Delightful!" These comments should not
block PR merges since they indicate the code is good.

Before: All regular Codex comments blocked merge
After: Only actionable Codex comments block merge

Fixes issue where PR #80 was blocked despite Codex approval.

_Generated with `cmux`_
ammario added a commit that referenced this pull request Oct 7, 2025
## Problem

When Codex reviews a PR and doesn't find any issues, it leaves a regular
comment:

> Codex Review: Didn't find any major issues. Delightful!

The current `check_codex_comments.sh` script treats **all** regular
Codex comments as blocking, including these "all clear" messages. This
caused PR #80 to be blocked even though Codex approved it.

## Solution

Filter out Codex comments that contain "Didn't find any major issues" so
they don't block the merge.

## Testing

- ✅ PR #80 (has "Delightful" comment): Now passes
- ✅ PR #74 (has actual review comment): Still blocks correctly

## Changes

- Updated `scripts/check_codex_comments.sh` to use `jq` filter that
excludes "all clear" comments
- Only actionable Codex feedback will now block PRs

_Generated with `cmux`_
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