Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ocr-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +42 to +44

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

24 changes: 22 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +315 to +318

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

}

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"
Expand Down Expand Up @@ -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
Expand Down
Loading