Skip to content

fix(release): build each arch natively and verify package architecture (#77) - #80

Merged
haywolf merged 2 commits into
masterfrom
fix/77-mac-x64-native-modules
Nov 4, 2026
Merged

haywolf merged 2 commits into
masterfrom
fix/77-mac-x64-native-modules

Conversation

@haywolf

@haywolf haywolf commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #77

Root cause: release built --mac --x64 --arm64 from a single npm ci on arm64 macos-latest, so the x64 app shipped arm64 sharp/libvips, canvas and Prisma engines. Linux x64 also crashed on launch, because libvips-cpp.so.8.17.3 stayed inside the asar.

Changes

  • release.yml: each architecture builds on its own runner (macos-15-intel, macos-latest, windows-latest, ubuntu-latest, ubuntu-24.04-arm).
    • Install uses npm ci --ignore-scripts, and builds run with --publish never.
    • The per-arch latest-mac.yml files are merged; the job fails if an architecture is missing.
  • Windows arm64 installer dropped: Prisma has no win-arm64 engine. Jorben approved dropping it.
  • asarUnpack now includes node_modules/@img/**.
  • build:* scripts build only the host architecture.
  • New scripts/verify-package-arch.mjs, scripts/package-load-check.cjs and the verify:package script check that packaged binaries match the target architecture, that required modules are present, and that they load when the host can run them.
    • The check runs before upload in release, and on a Linux x64 package in CI.
    • 27 unit tests.

Tests:

  • test:unit 973 passed, typecheck and build pass.
  • The Linux x64 package passes verify:package and launches under xvfb (it crashed before the fix).
  • Simulated mac x64, mac arm64, linux arm64 and win x64 packages pass the architecture check.

Not verified: a real launch on an Intel Mac or an arm64 Mac, Windows packaging, and actual runs of release.yml and ci.yml. A release candidate run is needed to confirm these.

Merge order: #72 → #75 → #77 (none of the three PRs touch the same files), then run a release candidate to validate the release pipeline.

… arch (#77)

The x64 mac build reused arm64 node_modules, so sharp/libvips, canvas and
Prisma engines were arm64-only and the app crashed on Intel Macs. Split the
release matrix per arch (macos-15-intel / macos-latest / windows / ubuntu x64
/ ubuntu arm), merge latest-mac.yml, unpack @img libs from asar, and add a
package architecture self-check script used in release and CI.
Windows arm64 installer is dropped (no Prisma win-arm64 engine).

Fixes #77
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

AI Code Review Summary

PR: #80 (fix(release): build each arch natively and verify package architecture (#77))
Preferred language: English

Overall Assessment

No blocking issue was detected in the reviewed diff; keep focused regression testing before merge.

Major Findings by Severity

No major issues identified from the reviewed diff.

Actionable Suggestions

  • Address the highest severity findings first and add targeted tests for changed logic.

Potential Risks

  • Potential hidden risks remain in edge cases not covered by the current diff context.

Test Suggestions

  • Add happy-path + boundary + failure-path tests for touched modules.

File-Level Coverage Notes

  • package.json: File was in scope but not fully reviewed before budget limits. (coverage_incomplete)
  • vitest.config.ts: File was in scope but not fully reviewed before budget limits. (coverage_incomplete)

Inline Downgraded Items (processed but not inline)

  • None

Coverage Status

  • Target files: 2
  • Covered files: 0
  • Uncovered files: 2
  • No-patch/binary covered as file-level: 0
  • Findings with unknown confidence (N/A): 0

Uncovered list:

  • package.json: coverage_incomplete
  • vitest.config.ts: coverage_incomplete

No-patch covered list:

  • None

Runtime/Budget

  • Rounds used: 1/4
  • Planned batches: 1
  • Executed batches: 1
  • Sub-agent runs: 1
  • Planner calls: 2
  • Reviewer calls: 2
  • Model calls: 4/64
  • Structured-output summary-only degradation: YES

Reasons:

  • planner_structured_output_failed_round_1: Structured output failed after repair: You have no permission to access this resource (api_key_source: payg) (request_id: 01627672289e4225855f1b88b1c8bf67)
  • reviewer_structured_output_failed_round_1_general: Structured output failed after repair: You have no permission to access this resource (api_key_source: payg) (request_id: 80afd0940f4b4f93b218d422f3752be2)

@haywolf
haywolf merged commit a837061 into master Nov 4, 2026
3 checks passed
@haywolf
haywolf deleted the fix/77-mac-x64-native-modules branch November 4, 2026 04:28
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.

0.4.9-rc.0 Intel Mac 上启动必现 Cannot find native binding 报错崩溃

1 participant