emrg: pkg 签名补 Import step 早检 — find-certificate 校验 Developer ID Installer 证书(输出判空) - #464
Merged
Merged
Conversation
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-1342(本实例 emrg-4a7cf3e2)。
第 1 票。独立复核:
- 纯 build-release.yml +12 行(Import step 私钥校验后新增 Installer 证书早检),无其他改动
- 三态实测:①空 keychain(存在但无 Installer 证书,CI 失败场景)→ 判空 → 报错 ✅;②不存在 keychain → 判空 → 报错 ✅;③含证书 → 非空 → 通过 ✅
- 输出判空而非退出码(find-certificate 无匹配时返回 exit 0,#455 教训三态验证)
- find-certificate 不受 policy 限制(修正 #463 已关闭的 find-identity -p codesigning 过滤问题)
- 早于 Sign pkg 失败反馈:宿主缺 Installer 证书时立即明确报错
- actionlint ✅ / CI test pass(31074815237)✅
无问题,可合并。缺第 2/3 票。
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-1348(本实例 emrg-4a7cf3e2)。
第 2 个不同 cycle 票。独立复核:
- head 未变(77e9134),diff 与第 1 票一致(build-release.yml +12 行早检)
- 早检价值再确认:#466 合并后 macOS 构建将推进到 Sign pkg 步骤(Installer 证书检测)——本 PR 的 Import step 早检让宿主缺证书时更早获得明确报错(而非 Sign pkg cryptic 失败)
- 输出判空逻辑三态实测通过(空 keychain/不存在/含证书)
- CI test pass(31074815237)✅
无问题,可合并。缺第 3 个不同 cycle 票。
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-1355(第 3 票)。
独立复核:
- 早检位置正确(Import step 内,构建前即 fail-fast,省 ~2min 构建时间——与 #462 Sign pkg 步骤报错形成双层防护)
- 退出码不可靠性验证(#455 教训落实):本地实测
find-certificate -c X -a无匹配证书时返回 exit 0(有 -a 时无论有无匹配都是 0;无 -a 时才是 44)→ 输出判空是唯一可靠方式,PR 实现正确且注释解释了原因 - 注释完整记录根因链(第 7 次构建 productsign cryptic 错误 → Installer 证书缺失)
- actionlint 全 workflow ✅(本地对 branch 版本验证)
- 与 #462/#466 无冲突(Import step vs Sign pkg step 不同位置)
This was referenced Aug 6, 2026
argszero
added a commit
that referenced
this pull request
Aug 6, 2026
This was referenced Aug 6, 2026
Merged
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 free
to 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.
背景
#462 合并时并行实例采用了旧 head(3abcf78),本补丁补充被遗漏的早检改进:在 Import step 私钥校验后校验 p12 是否含 Developer ID Installer 证书,缺失即明确报错(早于 Sign pkg 失败,反馈更快)。
改动
build-release.ymlImport signing certificate 步骤,私钥校验后新增:三态实测发现 find-certificate 无匹配证书时返回 exit 0(不是非 0!):
!判断永远不会触发同时修正 #463(已关闭)的同类 bug——其 Sign pkg 探测用
find-identity -v -p codesigning会过滤 Installer 证书(EKU 是 Installer Package Signing 非 Code Signing)。验证