Skip to content

release-mac: build only in a worktree, check deps before credentials - #53

Merged
BunsDev merged 1 commit into
mainfrom
release-preflight
Oct 1, 2026
Merged

BunsDev merged 1 commit into
mainfrom
release-preflight

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

The first real scripts/release-mac.sh run resolved the 1Password credentials and the right certificate, then failed in prepare-terminal.mjs with Cannot find module 'node-pty/package.json': the primary checkout's node_modules is partial, and by AGENTS.md builds don't happen there.

  • Refuses the primary checkout (except --verify and CI) and says how to make a worktree.
  • Checks node-pty, electron, electron-builder and @electron/osx-sign are installed before any credential is read.
  • Reads .env.release from the worktree, falling back to the primary checkout's copy.
  • Stops passing -c.mac.notarize=true twice.
  • docs/release-signing.md: the local release steps now start with a worktree.

Tested in a throwaway repo: the primary checkout is refused with the instruction, and a worktree without deps stops at the dependency check.

🤖 Generated with Claude Code

The first real run from the primary checkout resolved credentials, then failed in the build
because that checkout's node_modules is partial (no node-pty). The primary checkout only
receives `git pull`, so the script now refuses it, checks node_modules is complete before
touching a credential, and reads .env.release from the worktree or else the primary checkout,
so one copy serves every release worktree. It also stops passing notarize=true twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 13:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Credentials are still resolved before dependency validation, contradicting the PR’s primary objective.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates macOS release tooling to enforce worktree builds and improve preflight validation.

Changes:

  • Rejects local release builds from the primary checkout.
  • Adds dependency checks and shared .env.release fallback.
  • Simplifies notarization arguments and updates release documentation.
File Description
scripts/​release-mac.sh Adds worktree, environment, and dependency handling.
docs/​release-signing.md Documents the worktree-based release process.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/release-mac.sh
Comment on lines +36 to +39
if [ -z "${MODEX_RELEASE_ENV_LOADED:-}" ] && [ -f "$env_file" ]; then
command -v op >/dev/null || die "$env_file present but the 1Password CLI (op) is not installed"
export MODEX_RELEASE_ENV_LOADED=1
exec op run --env-file="$root/.env.release" -- "$0" "$@"
exec op run --env-file="$env_file" -- "$0" "$@"
@BunsDev
BunsDev merged commit c1dd0b8 into main Oct 1, 2026
3 checks passed
@BunsDev
BunsDev deleted the release-preflight branch October 1, 2026 23:24
BunsDev added a commit that referenced this pull request Oct 1, 2026
* docs: bring status.md up to date with what is in flight

In flight said "Nothing", but approval rules part 1 (#54) merged with
part 2 pending, four contributor PRs are open, and three worktrees hold
unlanded work. Record those, the #53 release-script change, the EPIPE
failure on main CI for c9dcc7d, and #39 as an icon candidate for v0.0.5.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: record the second terminal-cleanup CI failure

#63's push run failed "cleanup timeout retains ownership and a later
close can retry" with kill ESRCH from its SIGCONT cleanup; the
pull_request run of the same commit passed. Widen the rough edge to
cover both intermittent failures in terminal-cleanup.test.ts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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