Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): verify Mach-O arch on cross-arch gate skip; document exception
guyong2e36bfaa4666
diff --git a/apps/desktop/scripts/package-desktop.mjs b/apps/desktop/scripts/package-desktop.mjsindex 878c0c79df..642577ed00 100644--- a/apps/desktop/scripts/package-desktop.mjs+++ b/apps/desktop/scripts/package-desktop.mjs@@ -436,13 +436,16 @@ async function finishDarwin({`CINDY_IOS_SIMULATOR_RELEASE_NATIVE_SMOKE=1 requires a host that can natively run the ${arch} package`,);} else {- // 跨 arch 连打:该产物在本机跑不起来(如 arm64 机上的 x64 app),门禁无法- // exec 它。x64 从不含 native helper、运行期必然回退 WDA/MJPEG,跳过验证不- // 降低真实安全。此处跳过的只会是跨 arch 的 static gate。+ // 跨 arch 连打:该产物在本机跑不起来(如 arm64 机上的 x64 app),launch-based+ // gate 无法 exec 它。沿用 ios-simulator-integration-plan.md 的 cross-architecture+ // 例外(原仅覆盖 Intel 机 + arm64 ad-hoc,现扩至 arm64 机 + x64 Developer-ID 的+ // static gate):x64 从不含 native helper、运行期必然回退 WDA/MJPEG,static gate+ // 验的是构造上已保证的行为。跳过 launch,但仍用 lipo 证明公证后的包确是目标 arch。+ verifyMacBinaryArch(appName, arch);console.log(`==> Skipping iOS Simulator release gate: ${arch} app is not runnable on this ${isPhysicalArm64Mac() ? 'arm64' : 'Intel'- } host`,+ } host (Mach-O arch verified)`,);}@@ -472,10 +475,12 @@ async function finishDarwin({if (hostCanExecArch(arch)) {runIOSSimulatorReleaseGate(appPath, arch, 'untrusted');} else {+ // cross-architecture 例外:跳过 launch-based gate,仍做 Mach-O arch 门禁。+ verifyMacBinaryArch(appName, arch);console.log(`==> Skipping iOS Simulator release gate: ${arch} app is not runnable on this ${isPhysicalArm64Mac() ? 'arm64' : 'Intel'- } host`,+ } host (Mach-O arch verified)`,);}const appZipPath = path.join(artifactDir, `${baseName}-${arch}.zip`);diff --git a/docs/ios-simulator-integration-plan.md b/docs/ios-simulator-integration-plan.mdindex 1d7707a167..f3c8495a9f 100644--- a/docs/ios-simulator-integration-plan.md+++ b/docs/ios-simulator-integration-plan.md@@ -1477,7 +1477,7 @@ Phase 4F-3 验收门槛:只有精确收录组合能得到 per-capability `elig- 默认 `static` gate 不操作用户设备,只验证最终包能从固定 Helper/manifest 布局恢复 artifact identity、签名信任与 SHA-256,按当前 Host/Xcode/runtime/architecture 计算精确 compatibility/admission,并证明未提升或未受信组合不会启动 Sidecar。- 受控发布环境可显式设置 `CINDY_IOS_SIMULATOR_RELEASE_NATIVE_SMOKE=1`。只有 Developer ID verified 且精确 admitted 的组合可以进入 `native` gate;它只创建脚本自有临时 Simulator,在 required OS sandbox 中验证 framebuffer、3 帧 VideoToolbox H.264(至少一个 keyframe)、单指/双指 HID transport、stop 后 artifact identity/摘要重验与 clean restart,最后无条件 shutdown/delete 临时设备。ad-hoc 包请求 native gate 会在启动前失败。- gate report 只保留 artifact source/trust/architecture、runtime identity、逐能力 compatibility、launch reason/fallback route 与有界 native 结果。绝对路径、TeamIdentifier、designated requirement、UDID、DeveloperDir、private framework 诊断和签名凭证不进入可归档输出,也不进入 renderer/Agent。-- Intel Host 无法启动 arm64 ad-hoc App 时沿用既有 cross-architecture 例外,只做 Mach-O architecture 门禁并跳过该本地 static gate;正式 Developer ID release qualification 不使用该例外,应在可运行目标架构的发布机上完成。+- 宿主无法原生启动目标架构 App 时沿用 cross-architecture 例外,只做 Mach-O architecture 门禁并跳过该本地 launch-based gate。该例外覆盖两个镜像方向:Intel Host + arm64 App,以及 arm64 Host + x64 App。后者是单机双架构 Developer ID 连打的现实——CN 发布在同一台 arm64 机上连打 arm64+x64 Developer ID 包,x64 那趟无法在本机 exec(Rosetta 起 x64 Electron 会挂/超时)。x64 正式包从不 bundle native helper、运行期必然回退 WDA/MJPEG,static gate 验证的是构造上已保证的 untrusted→WDA/MJPEG 行为,故此处跳过不降低真实安全;若需在受控发布环境对 x64 做完整 launch-based qualification,应在可运行 x64 的发布机上单独完成。`CINDY_IOS_SIMULATOR_RELEASE_NATIVE_SMOKE=1` 显式要求 native gate 却落在不可运行目标架构的宿主上时,Developer ID 路径直接失败而非跳过,避免把显式门禁静默降级为无门禁。Phase 4F-4 验收门槛:gate 必须运行于最终签名/公证后的 `.app`,且早于任何 DMG/ZIP;verified 精确组合可通过 static admission,untrusted/ad-hoc、runtime build near miss 与缺失 identity 必须保持 WDA/MJPEG;native 模式只准操作 gate 自建临时设备并在 `finally` 删除;H.264/HID/restart 任一步失败都中止打包;输出和子进程环境不得泄漏发布凭证、签名身份、路径、UDID 或 private framework 细节。diff --git a/docs/ios-simulator-release-guide.md b/docs/ios-simulator-release-guide.mdindex c2dfd84dea..7c7d622629 100644--- a/docs/ios-simulator-release-guide.md+++ b/docs/ios-simulator-release-guide.md@@ -51,6 +51,13 @@ arm64 和 x64 产物。公开发版不得使用 `--allow-unsigned`、`--no-sign` 或 `--skip-smoke` 绕过门禁。+> 单机双架构连打的 cross-architecture 例外:在一台 arm64 机上连打 arm64+x64 时,x64+> 那趟无法在本机 exec(Rosetta 起 x64 Electron 会挂),该趟会**跳过 launch-based release+> gate,改为只做 Mach-O 架构门禁**(公证仍照常完成)。x64 正式包不含 native helper、+> 运行期必然回退 WDA/MJPEG,故不降低真实安全;若要对 x64 做完整 launch-based+> qualification,需在可运行 x64 的发布机上单独跑。详见+> `docs/ios-simulator-integration-plan.md` 的 cross-architecture 例外说明。+## 发布检查打包脚本成功退出即表示 Helper 签名、公证和静态 release gate 已通过。发布前可额外抽查: