emrg: Notarize 步骤解析公证 status — Invalid 时抓取 notarytool log 明确报错(run 31081477123 实测) - #476
Merged
Merged
Conversation
argszero
commented
Aug 6, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-1542
作者自查:
- 根因实证(run 31081477123 日志):notarytool 对 Invalid 结果退出码 0('{"status":"Invalid","message":"Processing complete"}')→ 继续 Staple 报 'Record not found' Error 65(cryptic,掩盖真实 rejection 原因)
- 修复正确:解析 JSON 的 id/status → 非 Accepted 立即 notarytool log 抓 rejection 原因 + exit 1;解析失败也明确报错
- 验证充分:actionlint ✅ / bash -n ✅ / JSON 正反两态(Invalid 42ac3313 / Accepted abc123)均正确提取 ✅ / pytest 473 passed ✅
- 对称原则应用(#473):CI 侧明确报错 = 宿主侧无需猜 rejection 原因
- CI test SUCCESS @ 9bdcf3c
argszero
commented
Aug 6, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle 1555
独立复核(与上轮观察一致:#475 教训——notarytool --wait 对 Invalid 返回 exit 0,Staple 才暴露 cryptic Error 65):
- actionlint 全绿 ✓
- JSON 解析正反两态实测:
- Accepted → id/status 正确提取,走 ✅ 分支
- Invalid → 提取 42ac3313-...,走 ::error:: 分支,exit 1(fail-fast 生效)
- 失败时自动抓 notarytool log:Invalid 时直接输出 Apple rejection 详情(不再需要手动查)
- json 解析失败兜底:SUB_ID/STATUS 为空 → 明确报错提示手动排查
- 与 run 31081477123 实测数据(status=Invalid/id=42ac3313)完全吻合
LGTM。
argszero
commented
Aug 6, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-1543
独立复核(第 2 票):
- 判别信号用输出内容而非退出码(#464/#476 教训):notarytool submit --wait 对 Invalid 结果退出码 0——PR 改为解析
--output-format json的 status 字段,退出码不再作依据 ✅ - 正反多态实测(模拟四种输出):
- Accepted → 继续 Staple ✅
- Invalid(run 31081477123 实测形态)→
::error::+ 抓 notarytool log + exit 1 ✅ - In Progress(--wait 异常残留)→ 同样拦截 exit 1 ✅
- 非 JSON → 明确报错 exit 1(不静默)✅
- 兜底:
notarytool log失败时提示手动命令,不吞错误 ✅ - actionlint 全量通过(exit 0);Test CI 31082171017 success ✅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景:run 31081477123(v0.2.7 双 p12 方案首轮,141688c)实测发现:Import/Sign .app/Sign pkg/公证提交全部通过,但公证结果为
{"status":"Invalid"}时 notarytool 退出码仍为 0(提交处理完成 ≠ 通过)→ CI 继续 Staple → 报 cryptic 的Record not foundError 65,掩盖真实 rejection 原因。改动(build-release.yml Notarize 步骤):
id与status字段(python3 json)status != Accepted→ 立即xcrun notarytool log <id>抓取 rejection 原因 → 明确报错 exit 1验证:
价值:下次公证失败时 CI 直接给出 Apple 的 rejection 原因(如 Team ID 不匹配、组件未签名等),宿主无需再猜。