From fe6847a1c066912e35157bb085a8062853a3072f Mon Sep 17 00:00:00 2001 From: Hubert Date: Wed, 28 Oct 2026 10:31:06 +0800 Subject: [PATCH 1/2] ci(ocr): add z.ai rate-limit budget and effort settings 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. --- .github/workflows/ocr-review.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ocr-review.yml b/.github/workflows/ocr-review.yml index c9d0817..f79c0e2 100644 --- a/.github/workflows/ocr-review.yml +++ b/.github/workflows/ocr-review.yml @@ -37,3 +37,8 @@ jobs: # GLM 关闭思考输出(上游 action 默认格式) llm_extra_body: '{"thinking": {"type": "disabled"}}' language: Chinese + # z.ai 免费档并发上限很低:默认无限并发时全部审查项都会 rate_limited。 + # 收敛到 2 串行化 LLM 调用;预算与 effort 与生产验证过的配置一致。 + review_concurrency: 2 + max_tokens_budget: '2000000' + effort: medium From 3a2b1888dd5493811dbf22cb12fdf9f6b77c8e43 Mon Sep 17 00:00:00 2001 From: Hubert Date: Wed, 28 Oct 2026 10:31:56 +0800 Subject: [PATCH 2/2] ci(release): retry stapler when Apple CloudKit drops the connection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/release.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df4745c..4a4efff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -304,8 +304,25 @@ jobs: exit 1 fi + # stapler downloads the ticket from Apple's CloudKit, which can drop + # the connection transiently (-1005) — retry before giving up. + staple_with_retry() { + local target="$1" + for attempt in 1 2 3 4 5; do + if xcrun stapler staple "$target"; then + return 0 + fi + echo "staple attempt $attempt for $target failed, retrying in 10s..." + sleep 10 + done + return 1 + } + echo "Stapling notarization ticket to app..." - xcrun stapler staple "$APP_PATH" + if ! staple_with_retry "$APP_PATH"; then + echo "##[error]stapler staple failed for app after 5 attempts" + exit 1 + fi echo "Verifying notarization..." xcrun stapler validate "$APP_PATH" @@ -339,7 +356,10 @@ jobs: --wait \ --timeout 120m - xcrun stapler staple "$DMG_FILE" + if ! staple_with_retry "$DMG_FILE"; then + echo "##[error]stapler staple failed for DMG after 5 attempts" + exit 1 + fi cp "$DMG_FILE" "$ARM64_DMG_FILE" rm -rf dmg_temp