Skip to content

fix: add the mac notary preflight that #411 did not contain - #414

Merged
elkaix merged 3 commits into
mainfrom
fix/notary-preflight
Nov 16, 2026
Merged

elkaix merged 3 commits into
mainfrom
fix/notary-preflight

Conversation

@elkaix

@elkaix elkaix commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Requirement or Bug

#411 says it adds a macOS notarization preflight. The merged commit has no workflow change. It added 888 MB of GitNexus index cache to the repository instead. Refs #412.

Bug Reproduction Steps

  1. Run git show --stat 1b51dc42d. The commit has 568 .gitnexus/** files (parse caches, meta.json, gitnexus.json), six .agents/skills/gitnexus-* files, and rewrites of AGENTS.md and CLAUDE.md.
  2. Run grep -n notarytool .github/workflows/desktop-release.yml. There is no preflight step.
  3. Desktop mac jobs still build and sign for about 4 minutes, then fail with HTTP status code: 403. A required agreement is missing or has expired.

Root Cause

The #411 branch committed a local GitNexus index run, and the intended workflow change never landed. .gitnexus/ is not in .gitignore, so any gitnexus analyze in a checkout can stage the index again.

The 403 itself is Apple account state: the Developer Program or App Store Connect agreement must be renewed. No code change fixes that. This PR makes the failure fast and explicit.

Code Changes

  • Revert fix: fail fast mac notarization agreement preflight #411 completely: remove the index cache, the six skill files, and the AGENTS.md/CLAUDE.md rewrite.
  • .gitignore: ignore .gitnexus/.
  • New apps/desktop/scripts/check-notary-access.ts: run xcrun notarytool history with the credentials that finalize-mac-artifacts.ts already uses. On failure it prints Apple's output. On an agreement error it also says that the account holder must accept the agreements.
  • desktop-release.yml: add a "Check Apple notary access" step after "Require signing" and before electron-builder.
  • finalize-mac-artifacts.ts: export defaultCommandRunner so the check can use it.
  • Tests: the preflight builds the correct command, adds the agreement hint for 403, and omits it for other errors. The workflow spec checks the step order.

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
Desktop mac job with an expired Apple agreement Fails after packaging and signing (~4 min) Fails at the preflight with the agreement hint Nobody None needed
Desktop mac job with valid credentials Packages One extra notarytool history call, then packages n/a None needed
.gitnexus/ index Tracked (888 MB) Ignored; local index stays on disk Local GitNexus users: their index is regenerated by gitnexus analyze Run gitnexus analyze

The preflight runs only in the mac desktop job. CLI native mac bundles in release.yml already fail within about 1 minute at notarization, so they are unchanged.

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.

[skip changeset] Release CI and repository tooling only. Users see no change.

#411 described a notarization preflight but its squash contained no
workflow change: it committed 888 MB of GitNexus index cache (568 files),
six GitNexus skills, and an AGENTS.md/CLAUDE.md rewrite. Revert it, stop
tracking the local .gitnexus index, and add the actual check: run
`notarytool history` with the release credentials before electron-builder,
so an expired Apple agreement (HTTP 403) fails in seconds with a clear
message instead of after packaging and signing.
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Walkthrough

Warning

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

@pkg-pr-new

pkg-pr-new Bot commented Nov 16, 2026 •

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

commit: cb1a495

@elkaix
elkaix merged commit 861c5a3 into main Nov 16, 2026
25 checks passed
@elkaix
elkaix deleted the fix/notary-preflight branch November 16, 2026 11:16
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