edit | blame | history | raw

MD-EDC-02 signed / notarized DMG artifact

日期:2026-07-07
项目:Mindraw
任务:MD-EDC-02 / P-20260707-signed-notarized-dmg
角色:Coder@mindraw

用户目标

PMO 在 Owner 完成 macOS Keychain / codesign Developer ID 私钥授权后,续派 Coder 从 fixed worktree /private/tmp/mindraw-md-edc-02-signed-notarized-20260707、fixed source commit 583d507f679866f670b4fec82f1e631d4a9dbf54 重试生成 1.2.4 / Build202607071930 macOS Apple Silicon Developer ID signed / notarized / stapled DMG。

已完成事项

  • 按项目入口和 MEXP15 派工重新读取规则、统一台账、工程地图、发布 / 代码 / 交付 / QA 规则。
  • 确认 fixed source worktree 在 branch codex/md-edc-02-signed-notarized,HEAD 为 583d507f679866f670b4fec82f1e631d4a9dbf54,没有 source/config/script 新改动。
  • 使用 clean package target /tmp/mindraw-md-edc-02-package-target-202607071930-r2 运行 packaging,未复用上次中断后的 target。
  • 静默读取 /tmp/mindraw-notary-profile.env,只在 shell 内传给 notarytool;未记录 profile alias、Apple ID、app-specific password、API key、私钥、.p12 或 Keychain secret。
  • 生成 signed / notarized / stapled DMG artifact,并补齐 SHA、manifest、build-info、notary JSON、release tag 和验证证据。
  • 更新:
  • 02-P/MEXP15-SignedNotarizedDMG/qa/md-edc-02-signed-notarized-dmg-check-20260707.md
  • 02-P/MEXP15-SignedNotarizedDMG/qa/md-edc-02-signed-notarized-dmg-check-20260707.json
  • 02-P/MEXP15-SignedNotarizedDMG/review/md-edc-02-review-request-crg-583d507f679.md
  • 02-P/plan-progress.markdown

核心事实 / 变更快照

  • 变更对象:MEXP15 MD-EDC-02 App artifact 状态。
  • 变更前:notary profile 与 codesign 私钥授权均已恢复,但 artifact 尚未生成。
  • 变更后:artifact ready,仍等待 QA-EDC-04 fresh machine / clean macOS user 安装路径验证和 PM-EDC-REGATE-04
  • Version / build:1.2.4 / Build202607071930
  • Source commit:583d507f679866f670b4fec82f1e631d4a9dbf54
  • Base commit:b694a42d46fd02dcd6873e1f3f2406d3166fb28a
  • Review Gate:crg-583d507f679=PASS_SOURCE_DIFF_ONLY
  • Release tag:v1.2.4-build20260707.1930-mexp15-signed-notarized -> 583d507f679866f670b4fec82f1e631d4a9dbf54
  • DMG:/private/tmp/mindraw-md-edc-02-signed-notarized-20260707/03-O/C2.builds/releases/Build202607071930/Mindraw_1.2.4_aarch64-Build202607071930.dmg
  • DMG SHA256:5a053f02910463507879b42bb63445810eae3bfb2a9730c65f753e32e5d74df3
  • Manifest:/private/tmp/mindraw-md-edc-02-signed-notarized-20260707/03-O/C2.builds/releases/Build202607071930/release-manifest.json
  • Manifest SHA256:1c9af6795bb239f3d92d84bd864e7df524845683219de37d6c021f8cdeb20931
  • Build info SHA256:20183838c2647c2497fdc3331a4d4dc2b8e6cab3d7cd02e945506fd6c6a1562f
  • Notary submission JSON SHA256:cd49280a316c7802f0036781be1d4659b20ff2304f67e870adb9dc1befe23e15
  • Notary submission id:fc55d6cb-140e-4915-889f-d8f1c0a48662
  • Notary status:Accepted
  • Stapler status:pass
  • Mounted metadata:DMG root contains Mindraw.app and Applications symlink;App metadata 1.2.4 / Build202607071930 / com.mindraw.desktopmindraw:// and .mindraw declarations present。

关键决策

  • 不改 source/config/script,不创建新的 Review Gate;沿用 crg-583d507f679 的 source-diff-only PASS。
  • CODEGRAPH.md / CHANGELOG.md 不再修改:fixed source commit 已记录 MEXP15 version line、releaseClass 和 notary redaction boundary。
  • INDEX.md 不再修改:MEXP15 自查 / JSON / review entry 已在索引中登记。
  • 不把本轮 artifact-ready 写作 QA 结论、用户验收或正式发布结论。

可复用命令 / Runbook

用途:从 fixed source commit 重跑 MEXP15 signed / notarized / stapled DMG packaging。不得使用 set -x,不得打印 profile alias 或任何凭据。

前置条件:

  • /tmp/mindraw-notary-profile.env 存在。
  • Owner 已授权当前 shell 可使用 Developer ID signing identity。
  • 工作目录为 /private/tmp/mindraw-md-edc-02-signed-notarized-20260707
  • git rev-parse HEAD 必须为 583d507f679866f670b4fec82f1e631d4a9dbf54

执行命令:

cd /private/tmp/mindraw-md-edc-02-signed-notarized-20260707
git status --short --branch
git rev-parse HEAD

rm -rf /tmp/mindraw-md-edc-02-package-target-202607071930-r2

set -euo pipefail
set +x
source /tmp/mindraw-notary-profile.env
PROFILE="${MINDRAW_NOTARY_PROFILE:-${NOTARY_PROFILE:-${NOTARYTOOL_KEYCHAIN_PROFILE:-}}}"
test -n "$PROFILE"
IDENTITY="$(security find-identity -v -p codesigning | awk '/Developer ID Application/ {print $2; found=1; exit} END {if (!found) exit 1}')"

BUILD_ID=202607071930 \
MINDRAW_BUILD_AGENT=coder@mindraw \
MINDRAW_RELEASE_CLASS=mexp15-signed-notarized-dmg \
MINDRAW_SIGNING_IDENTITY="$IDENTITY" \
MINDRAW_NOTARY_PROFILE="$PROFILE" \
CARGO_TARGET_DIR=/tmp/mindraw-md-edc-02-package-target-202607071930-r2 \
npm run package:mindraw

验证步骤:

DMG="/private/tmp/mindraw-md-edc-02-signed-notarized-20260707/03-O/C2.builds/releases/Build202607071930/Mindraw_1.2.4_aarch64-Build202607071930.dmg"
APP="/tmp/mindraw-md-edc-02-package-target-202607071930-r2/release/bundle/macos/Mindraw.app"

shasum -a 256 "$DMG"
xcrun stapler validate "$DMG"
spctl --assess --type open --context context:primary-signature --verbose=4 "$DMG"
hdiutil verify "$DMG"
codesign --verify --deep --strict --verbose=2 "$APP"
spctl --assess --type execute --verbose=4 "$APP"

清理 / 恢复:

  • 不删除旧用户成功证据或旧 build。
  • 可删除 /tmp/mindraw-md-edc-02-package-target-202607071930-r2 重新生成临时 build target。
  • 不把 /tmp/mindraw-notary-profile.env 内容写入日志、聊天或仓库文件。

搜索关键词:MD-EDC-02Build202607071930mexp15-signed-notarized-dmgfc55d6cb-140e-4915-889f-d8f1c0a486625a053f02910463507879b42bb63445810eae3bfb2a9730c65f753e32e5d74df3

未决问题

  • QA-EDC-04 需要在 fresh machine 或 clean macOS user 上验证安装、首次打开、.mindrawmindraw://、Codex sidebar、Edit / double-click 和保存刷新路径。
  • PM-EDC-REGATE-04 仍需组合复核;本轮 artifact-ready 不等于用户验收或正式发布。

后续建议

  • PMO 派 QA-EDC-04 基于现有验证矩阵执行。
  • PMO 收齐 QA 与运营补充后再进入 PM-EDC-REGATE-04