Repository navigation
fix(ci): preserve recovered macOS DMG diagnostics - #2393
Conversation
PsiACE
left a comment
There was a problem hiding this comment.
LGTM, thanks for the contribution!
hidb4ai
left a comment
There was a problem hiding this comment.
The retry behavior and diagnostic retention look reasonable. The successful macOS CI runs validate packaging; the recovered-failure upload path still needs evidence from an actual failing macOS run.
| build_status=$? | ||
| fi | ||
| capture_macos_state ".artifacts/macos-build-attempt-${attempt}-state.log" | ||
| if [ "$attempt" -eq 3 ] || ! grep -Fq 'hdiutil: create failed - Resource busy' "$attempt_log"; then |
There was a problem hiding this comment.
[P2] 重试判据仍只匹配 create failed,而 master 已扩到 couldn't eject;当前冲突正落在这行
本 head 该行是:
if [ "$attempt" -eq 3 ] || ! grep -Fq 'hdiutil: create failed - Resource busy' "$attempt_log"; thenmaster 2853ed98 上已经是:
if [ "$attempt" -eq 3 ] || ! grep -Eq "hdiutil: (create failed - Resource busy|couldn't eject .* - Resource busy)" "$attempt_log"; then本 PR 的 merge-base 是 e192e08c,那行当时还是 -Fq,所以差异来自 base 前进而非本 PR 改动;PR 当前 mergeable_state=dirty,冲突出现在同一段。
影响:若冲突消解时取本 PR 版本,形如 hdiutil: couldn't eject "diskX" - Resource busy 的打包失败将不再重试。这不是假设——2026-11-04 #2306 的 head 5f783f29(run 41803592923 / job 126498786985)在 macOS 上正是这个形态:hdiutil: couldn't eject "disk2" - Resource busy ×3 → failed to bundle project: error running bundle_dmg.sh。
测试覆盖不到这一点:本 PR 新增的 test_macos_dmg_build_preserves_transient_failure_evidence 的 busy 序列只输出 hdiutil: create failed - Resource busy,参数表里没有 eject 形态,因此收窄判据不会让任何用例变红。
建议:rebase 到当前 master 后保留 -Eq 双形态判据,并在参数表补一条 busy_eject 序列(stderr 写 hdiutil: couldn't eject "disk2" - Resource busy),断言仍然重试且 retried=true 被写出。
ffc8054 to
61da3aa
Compare
Which issue or RFC does this PR close?
Refs #2230. This captures evidence for the intermittent macOS Intel DMG failure; the underlying cause remains unconfirmed until a failing host run provides diagnostics.
Rationale for this change
The original
bundle_dmg.shfailure exposed no underlying command error. The existing selective retry can recover aResource busyfailure, but a successful retry previously skipped diagnostic artifact upload, losing the first failure's evidence.What changes are included in this PR?
.artifactsdirectory in the narrowly scoped diagnostic upload.hdiutil: create failed - Resource busysignature; unrelated failures retain their exit status.Are there any user-facing changes?
No application behavior, public API, or persisted format changes. CI may retain a diagnostic artifact after a recovered packaging failure.
How was this change tested?
python -m pytest tests/test_desktop_macos_workflow.py tests/test_workflow_actions.py tests/test_ci_changes.py -q: 109 passed, 5 Windows skips.git diff --check, and repository-widety check --python-platform linux: passed.hdiutilbehavior require this PR's remote macOS jobs; the shell scenarios only validate local control flow.AI usage statement
OpenAI Codex (GPT-6) assisted with investigation, implementation, review, and regression tests. Local checks above were executed; macOS host behavior has not been claimed from simulation.