Skip to content

fix: fail fast mac notarization agreement preflight - #411

Merged
elkaix merged 3 commits into
mainfrom
copilot/fix-failing-github-actions-mac
Nov 15, 2026
Merged

elkaix merged 3 commits into
mainfrom
copilot/fix-failing-github-actions-mac

Conversation

@elkaix

@elkaix elkaix commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Requirement or Bug

The Desktop Release workflow mac job failed late during electron-builder notarization with Apple HTTP 403 (required agreement is missing or expired). This change makes the job fail early with a clear preflight error before packaging work starts.

Bug Reproduction Steps

  1. Run .github/workflows/desktop-release.yml with mac signing + notarization credentials configured.
  2. Use an Apple account/team where legal agreements are missing or expired.
  3. Observe current failure at pnpm exec electron-builder --mac dmg zip --publish never with Failed to notarize via notarytool and HTTP 403.

Root Cause

The workflow validated credential presence, but it did not validate Apple notary service access before packaging/signing.
Result: the job spent minutes building/signing, then failed at notarization.
This is a fundamental fix (preflight gate), not a workaround.

Code Changes

  • Workflow preflight gate

    • Added an explicit macOS notary access check before packaging in .github/workflows/desktop-release.yml.
    • The step runs xcrun notarytool credential validation and fails immediately on agreement/authorization errors.
  • Test coverage update

    • Updated desktop workflow spec to assert the new preflight step exists and is in the mac release path before electron-builder.

Example snippet:

- name: Validate Apple notarization access
  shell: bash
  run: |
    set -euo pipefail
    xcrun notarytool history --key "$APPLE_API_KEY" --key-id "$APPLE_API_KEY_ID" --issuer "$APPLE_API_ISSUER" >/dev/null

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
mac release when Apple legal agreements are missing/expired Fails late during electron-builder notarization after build/sign work Fails early at explicit notarization-access preflight with direct cause Desktop release maintainers using Apple notarization credentials None (intentional hard fail for releasability)
mac release when notarization access is valid Proceeds through build/sign/notarize path Unchanged release path; preflight passes and build continues Desktop release maintainers N/A

Affected modules and test coverage:

  • .github/workflows/desktop-release.yml — covered by apps/desktop/tests/desktop-release-workflow.spec.ts assertions for mac workflow gates.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

elkaix and others added 2 commits November 14, 2026 04:13
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@elkaix elkaix changed the title [WIP] Fix failing GitHub Actions job mac fix: fail fast mac notarization agreement preflight Nov 14, 2026
@elkaix
elkaix marked this pull request as ready for review November 14, 2026 04:23
@pkg-pr-new

pkg-pr-new Bot commented Nov 14, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pymodel/pythinker-code@03df9e2
npx https://pkg.pr.new/@pymodel/pythinker-code@03df9e2

commit: 03df9e2

@elkaix
elkaix merged commit 1b51dc4 into main Nov 15, 2026
27 checks passed
@elkaix
elkaix deleted the copilot/fix-failing-github-actions-mac branch November 15, 2026 23:32
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