Repository navigation
ci(midscene): 模型额度耗尽(429)时跳过用例且不评论合入的 PR - #2673
Merged
Merged
Conversation
- 新增 model-check job 先探一次模型;额度耗尽(HTTP 429 且报错指明额度)时写出 quota_exhausted / quota_reset,Dashboard、飞书排队与飞书用例都显示为跳过, run summary 写一句额度耗尽与重置时间;其它预检失败照旧失败并通知 - 飞书 job 排队后再检查一次:额度此时才耗尽则仍失败,但导出标记,通知不评论 - 通知脚本区分额度引起的失败:全部由额度引起时只写 run summary;还有其它失败时 照常评论,列表去掉 429 用例并注明数量 - 只在 master push 与手动 dispatch 运行(#2527)保持不变 Refs #2670 Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
November 2, 2026 06:16
Owner
Author
|
合后核验(作者侧):
评审留下的 P3(不阻断):model-check 对网络错误 / 5xx / 普通限流加短退避; |
deepcoldy
added a commit
that referenced
this pull request
Nov 3, 2026
维护者决定不打码:模型名和租户地址都不是凭据,拿到了也访问不了; API key 不会出现在报告和评论里,已发布内容中也没有。 撤回 c1febb5(#2678): - 删除 scripts/midscene-redact.mjs 和 test/midscene-redact.test.ts - prepare-midscene-pages.mjs、render-midscene-summary.mjs 恢复原样 - 工作流不再给生成站点、写 run summary 这两步传模型配置 #2673(额度耗尽时跳过用例、不评论)保留,不受影响。 This reverts commit c1febb5. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🚀 Released in v3.57.0 |
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.
关联 #2670(不关闭:额度本身换不换由维护者决定)
改了什么
维护者决定 Midscene 模型服务 429 额度耗尽先忽略,也不再去合入的 PR 下发失败评论。本 PR 让 CI 把「额度耗尽」和真实失败分开:
scripts/check-midscene-model.mjs:预检遇到额度耗尽(HTTP 429 且报错指明是额度,例如insufficient_quota、quota … exhausted)时,向 step outputs 写quota_exhausted=true和quota_reset=<重置时间>。重置时间只接受完整的时间格式;其它情况写quota_exhausted=false。--allow-quota-exhausted时,额度耗尽退出 0;不带时仍退出 1(标记照写)。scripts/midscene-quota.mjs,预检和通知共用。midscene-e2e.ymlmodel-checkjob,最先探一次模型。额度耗尽时,Dashboard、飞书排队(不再白等几个小时)、飞书用例这几个 job 都显示为跳过,报告和通知也不跑,整次运行不出红叉。model-check在 run summary 写一句「额度耗尽,将于 X 重置,本次跳过用例、不评论 PR」。model-check因其它原因失败时照旧失败,并通知 PR(新原因「Midscene 模型服务预检失败」)。model-check之后几秒就开始,重复了。quota_exhausted/quota_reset作为 job 输出传给通知。scripts/midscene-notify-failure.mjs:先判断失败是否都由额度引起。test/midscene-e2e-workflow.test.ts里「PR 不触发运行」的用例保持不变。关于「跳过 / 中性」:GitHub Actions 的 job 只有 success / failure / cancelled / skipped 四种结论,没有 neutral。skipped 只能由 job 级
if在 job 开始前决定,所以要在前面单独放一个model-checkjob。运行开始时额度已经耗尽(11-15 前每次都是这样),各 suite 就是跳过。额度在飞书排队期间才耗尽时,飞书 job 已经开始,只能保持红,但不评论。对照 11-01 的两次实际运行
65e4e9c18(Dashboard 预检就拿到 429):改后model-check通过并标记,其余 job 全部跳过,不评论。d2abdcf7f(用例跑到一半 429):28 个失败里 23 个是 429,另有 4 个 30 分钟超时和 1 个Replanned 20 times。这 5 个从报错上看不出是额度引起的,按「真实失败照常评论」处理:仍会评论,但只列这 5 个,并注明另有 23 个因额度耗尽失败。影响面
只改 Midscene E2E 工作流和它用的三个脚本,不涉及
src/、主 CI、发版流程。secrets 没改:model-check只读取已有的MIDSCENE_MODEL_*三项。排队脚本按 job 名判断席位,job 名没改;被跳过的排队 job 结论是 skipped,不会被当成占着席位。测试验证
test/midscene-model-quota.test.ts(7 例):quota_exhausted=false;429 额度耗尽时写出标记和重置时间,带参数退出 0 并写 summary 和 warning,不带参数退出 1;限流和 503 照常失败,日志不回显服务商原文。test/midscene-notify-failure.test.ts新增 8 例:notify():额度耗尽时一个请求都不发、只写 summary;真实失败时评论照发,且不含 429 行、含数量说明。test/midscene-e2e-workflow.test.ts新增 4 例(用表达式求值器跑真实 job 条件):model-check报额度耗尽时,master push 和手动运行都只跑它自己,其余全部跳过、不通知;model-check因其它原因失败时会通知。model-check和飞书 job 的输出连到预检 step。MODEL_CHECK_RESULT、FEISHU_QUOTA_EXHAUSTED、QUOTA_RESET。--allow-quota-exhausted;model-check控制;model-check控制;model-check不带--allow-quota-exhausted。GITHUB_OUTPUT内容。model-check通过、其余跳过、不评论」。不发版、不部署。🤖 Generated with Claude Code