Skip to content

ci(release): retry stapler when Apple CloudKit drops the connection - #86

Merged
hubo1989 merged 2 commits into
mainfrom
hubo/translate-improve
Oct 28, 2026
Merged

hubo1989 merged 2 commits into
mainfrom
hubo/translate-improve

Conversation

@hubo1989

Copy link
Copy Markdown
Owner

背景

v1.0.3 发版(run 40620552648)公证已通过——--timestamp 修复实证有效:

id: 6aaacec9-8b89-469e-a4cc-3f8226361241
status: Accepted

但随后 stapler staple 拉票据时撞上 Apple CloudKit 瞬时断连:

NSURLErrorDomain Code=-1005 "The network connection was lost."
api.apple-cloudkit.com/.../records/lookup  → exit 68

变更

  • stapler staple 加重试(5 次、间隔 10s),app 与 DMG 两处
  • 仅网络抖动需要重试;公证状态判定(Invalid / 非 Accepted)仍硬失败

说明

本 PR 同时包含分支上已有的 fe6847a ci(ocr): add z.ai rate-limit budget and effort settings(他人工作,原样保留)。

验证

重跑发版流水线,期望公证 Accepted + staple 成功 + appcast EdDSA 签名可被 sign_update --verify 验证。

review_concurrency 2 avoids the free-tier limit that marks every review
item rate_limited; max_tokens_budget and effort match the production
verified configuration.
Notarization is now Accepted (submission 6aaacec9...) — the timestamp
fix is proven. The job then died in 'stapler staple' with

  NSURLErrorDomain Code=-1005 'The network connection was lost.'
  ...api.apple-cloudkit.com/.../records/lookup

Stapling downloads the ticket from Apple's CloudKit and is exposed to
transient disconnects; retry up to 5 times (10s apart) for both the
app and the DMG instead of failing the whole release.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-28T02:32:44.204455Z
We couldn’t complete this review. Comment @codex review to try again.
3a2b188 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 377a2ff9-f396-43e9-8064-a15ac2ca98e6
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hubo1989
hubo1989 merged commit 0f4e6f1 into main Oct 28, 2026
2 checks passed
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🔍 OpenCodeReview found 2 issue(s) in this PR.

  • ✅ Successfully posted inline: 2 comment(s)

Comment on lines +42 to +44
review_concurrency: 2
max_tokens_budget: '2000000'
effort: medium

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other · low
这里新增的三个输入(review_concurrency / max_tokens_budget / effort)属于第三方 action(alibaba/open-code-review)的 with 参数。GitHub Actions 对 action 不认识的输入名不会报错,只会静默忽略——如果上游 action.yml 中并未定义这些输入(或拼写/命名不同,如 maxTokensBudget),本配置将完全不生效且无任何告警,与注释中"收敛到 2 串行化"的意图相悖。建议对照上游 v1.13.3 的 action.yml 确认输入名与取值格式(尤其是 max_tokens_budget 用字符串 '2000000' 是否被 number 类型接受),并在 PR 说明中附上验证依据。

Suggestion:

Suggested change
review_concurrency: 2
max_tokens_budget: '2000000'
effort: medium
# 以上游 action.yml 实际定义的输入名为准
review_concurrency: 2
max_tokens_budget: '2000000'
effort: medium

Comment on lines +315 to +318
echo "staple attempt $attempt for $target failed, retrying in 10s..."
sleep 10
done
return 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style · low
重试循环在最后一次失败后仍会 sleep 10s 才返回 1,白白增加 10 秒流水线耗时。建议将 sleep 移到判断之后(最后一轮不再等待),例如改用 attempt < 5 && sleep 10 或先判断再 sleep。

Suggestion:

Suggested change
echo "staple attempt $attempt for $target failed, retrying in 10s..."
sleep 10
done
return 1
echo "staple attempt $attempt for $target failed"
if [ "$attempt" -lt 5 ]; then
echo "retrying in 10s..."
sleep 10
fi
done
return 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant