Skip to content

ci(review): default review timeout to 180 minutes, allow up to 240 - #6706

Merged
wenshao merged 2 commits into
QwenLM:mainfrom
wenshao:ci/review-default-timeout-180
Jul 11, 2026
Merged

ci(review): default review timeout to 180 minutes, allow up to 240#6706
wenshao merged 2 commits into
QwenLM:mainfrom
wenshao:ci/review-default-timeout-180

Conversation

@wenshao

@wenshao wenshao commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Raises the default timeout for the automated PR review workflow from 120 minutes to 180 minutes, and raises the maximum allowed override from 180 to 240 minutes so @qwen-code /review --timeout=240 becomes available for the largest PRs. All three places that establish the default move together: the workflow_dispatch input default, the script-level default used by lifecycle and comment triggers, and the dispatch fallback value. The timeout-cap validation and the timeout fallback comment now reference 240, and the job-level timeout grows from 200 to 260 minutes to keep the same headroom (max review time plus setup and fallback-comment posting) established in #5961.

Why it's needed

Large PRs routinely exceed the 120-minute default and fail with a timeout comment asking the author to retry with a longer timeout (see the timeout on #6680). Since retrying at the previous 180-minute maximum was the standard remedy, defaulting to it removes a predictable failure-and-retry round trip. Raising the cap to 240 keeps an escalation path available for reviews that exceed the new default instead of leaving the default and the ceiling at the same value.

Reviewer Test Plan

How to verify

  1. Confirm the default is established consistently: the dispatch input default, DEFAULT_TIMEOUT_MINUTES, and the dispatch fallback all read 180.
  2. Confirm the override ceiling: the validation rejects values above 240, and --timeout=240 passes validation.
  3. Confirm the timeout fallback comment degrades correctly: a run timing out below 240 minutes suggests retrying with --timeout=240, while a run that already used 240 states the maximum was reached.
  4. Confirm the job-level budget: the review job allows 260 minutes, preserving the ~20-minute headroom over the maximum review duration for checkout, CLI install, and fallback-comment posting.

Evidence (Before & After)

N/A — CI workflow configuration change, no TUI surface.

Tested on

OS Status
🍏 macOS N/A
🪟 Windows N/A
🐧 Linux N/A

Environment (optional)

N/A — YAML-only change, validated by parsing the workflow file.

Risk & Scope

  • Main risk or tradeoff: reviews that would previously fail at 120 minutes now hold a runner for up to 60 additional minutes by default, and an explicit --timeout=240 can hold a self-hosted runner slot for up to 4 hours plus headroom; genuinely hung reviews occupy the slot longer before the fallback comment posts.
  • Not validated / out of scope: no change to the --timeout= override syntax, trigger authorization, or the resolve job.
  • Breaking changes / migration notes: none.

Linked Issues

N/A (motivated by the review timeout on #6680)

中文说明

本 PR 做了什么

将自动 PR review 工作流的缺省超时从 120 分钟提高到 180 分钟,并把允许的最大覆盖值从 180 提高到 240 分钟,使超大 PR 可以使用 @qwen-code /review --timeout=240。三处缺省值同步修改:workflow_dispatch 输入的默认值、lifecycle 与评论触发使用的脚本级默认值,以及 dispatch 的回退值。超时上限校验和超时回退评论现在引用 240;job 级超时从 200 提高到 260 分钟,以保持 #5961 中确立的余量设计(最大 review 时长加环境准备与回退评论开销)。

为什么需要

大型 PR 经常超过 120 分钟的缺省值,失败后机器人会留言要求作者用更长超时重试(见 #6680 上的超时)。既然按之前 180 分钟最大值重试就是标准处理方式,直接把缺省值设为 180 可以消除一次可预期的"失败-重试"往返。把上限提高到 240 则为超过新缺省值的 review 保留了升级手段,避免缺省值与上限相同而无路可退。

Reviewer 测试计划

如何验证

  1. 确认缺省值一致:dispatch 输入默认值、DEFAULT_TIMEOUT_MINUTES 和 dispatch 回退值均为 180。
  2. 确认覆盖上限:校验拒绝超过 240 的值,--timeout=240 可通过校验。
  3. 确认超时回退评论正确降级:低于 240 分钟超时的运行会建议用 --timeout=240 重试;已使用 240 的运行会提示已达最大值。
  4. 确认 job 级预算:review job 允许 260 分钟,在最大 review 时长之上保留约 20 分钟余量用于 checkout、CLI 安装和回退评论。

前后证据

N/A——CI 工作流配置变更,无 TUI 界面。

测试平台

OS 状态
🍏 macOS N/A
🪟 Windows N/A
🐧 Linux N/A

环境(可选)

N/A——仅 YAML 变更,已通过解析工作流文件验证。

风险与范围

  • 主要风险或取舍:原本在 120 分钟失败的 review 现在缺省最多多占用 runner 60 分钟;显式 --timeout=240 会让 self-hosted runner 槽位被占用最长 4 小时加余量;真正卡死的 review 在回退评论发出前占用时间更久。
  • 未验证 / 不在范围内:不改变 --timeout= 覆盖语法、触发授权或 resolve job。
  • Breaking changes / 迁移说明:无。

关联 Issue

N/A(由 #6680 上的 review 超时引发)

@wenshao
wenshao requested a review from Copilot July 11, 2026 04:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Thanks for the PR!

Template looks good ✓

Problem: Observed operational issue — large PRs like #6680 routinely hit the 120-minute default and get a timeout comment asking the author to retry with --timeout=180. Since 180 is already the cap, the retry is always the same answer. This is a real, recurring friction point.

Direction: Aligned. Raising the default to the existing cap removes a predictable fail-and-retry round trip without changing any upper bound. The 200-minute job-level budget still leaves 20 minutes of headroom for setup and fallback-comment posting.

Size: Not applicable — only .github/workflows/qwen-code-pr-review.yml is touched, no core infrastructure paths.

Approach: Clean and minimal. All three default-establishing values move together (dispatch input, script constant, dispatch fallback). No scope creep. The degradation path is correct: with default = cap, a timeout takes the "already used the maximum 180 minute timeout" branch instead of suggesting a retry at the same value. Exactly the right change.

Moving on to code review. 🔍

中文说明

感谢贡献!

模板完整 ✓

问题:已观测到的运维问题——#6680 等大型 PR 经常超过 120 分钟缺省值,超时后机器人会要求用 --timeout=180 重试。既然 180 已经是上限,重试的答案永远相同。这是一个真实、反复出现的痛点。

方向:对齐。将缺省值提高到现有上限,消除可预见的"失败-重试"往返,不改变任何上限。job 级 200 分钟预算仍留有 20 分钟余量用于环境准备和回退评论。

规模:不适用——仅触及 .github/workflows/qwen-code-pr-review.yml,无核心基础设施路径。

方案:干净且最小化。三处缺省值同步修改(dispatch 输入、脚本常量、dispatch 回退)。无范围蔓延。降级路径正确:缺省值等于上限后,超时会走"已使用最大 180 分钟超时"分支,而不是建议用相同值重试。改动恰到好处。

进入代码审查 🔍

Qwen Code · qwen3.7-max

@wenshao wenshao changed the title ci(review): raise default PR review timeout from 120 to 180 minutes ci(review): default review timeout to 180 minutes, allow up to 240 Jul 11, 2026
@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Code review: Clean. Three value changes, all consistent, no new logic introduced.

  • The three default-establishing values (dispatch input default, DEFAULT_TIMEOUT_MINUTES, dispatch fallback) all move from 120 → 180 together. No stray 120 remains in the default path.
  • The 180-minute hard cap at line 688 (timeout_minutes must not exceed 180 minutes) is unchanged.
  • The fallback comment degradation is correct: line 805 checks TIMEOUT_MINUTES -lt 180 — with default now at 180, a default-timeout run takes the "already used the maximum" branch instead of suggesting a retry at the same value.
  • The job-level timeout-minutes: 200 (line 350) still provides 20 minutes of headroom beyond the review cap.
  • YAML parses cleanly.

No critical blockers. No AGENTS.md violations.

Testing: N/A — this is a CI workflow configuration change with no TUI surface. There's nothing to drive in tmux. Verification is structural: YAML validity, value consistency across the three change sites, and correct degradation of the fallback comment path. All three check out.

中文说明

代码审查: 干净。三处值修改,全部一致,无新增逻辑。

  • 三处缺省值(dispatch 输入默认值、DEFAULT_TIMEOUT_MINUTES、dispatch 回退值)同步从 120 → 180。缺省路径中无残留的 120
  • 180 分钟硬上限(第 688 行)未变。
  • 回退评论降级正确:第 805 行检查 TIMEOUT_MINUTES -lt 180——缺省值现在为 180,缺省超时运行会走"已使用最大超时"分支,不再建议用相同值重试。
  • job 级 timeout-minutes: 200(第 350 行)仍留有 20 分钟余量。
  • YAML 解析正常。

无阻断性问题。无 AGENTS.md 违规。

测试: 不适用——这是 CI 工作流配置变更,无 TUI 界面。tmux 中没有可驱动的内容。验证为结构性的:YAML 合法性、三处修改的值一致性、回退评论路径的正确降级。三项均通过。

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

This is a tight, well-motivated config change. The problem is real and observable — #6680 hit the 120-minute timeout and the only remedy was a manual retry at 180, which is already the cap. The fix is exactly what I would have done: move all three defaults to 180 so the fail-and-retry loop just doesn't happen.

The degradation path works correctly too. A timeout at the new default (180) now produces "already used the maximum 180 minute timeout" instead of the useless "retry with --timeout=180" suggestion. That's the right behavior when default meets cap.

Tradeoff is acknowledged and acceptable: reviews that would have failed at 120 minutes now occupy a runner for up to 60 more minutes. The 200-minute job budget still has 20 minutes of headroom.

LGTM — approving.

中文说明

这是一个紧凑、动机明确的配置变更。问题真实可观测——#6680 超过了 120 分钟超时,唯一的补救方式是手动以 180 重试,而 180 已经是上限。修复方案正是我会做的:将三个缺省值都改为 180,这样"失败-重试"循环就不会发生。

降级路径也正确。新的缺省值(180)超时后会产生"已使用最大 180 分钟超时"消息,而不是无用的"用 --timeout=180 重试"建议。当缺省值等于上限时,这是正确的行为。

取舍已确认且可接受:原本在 120 分钟失败的 review 现在最多多占用 runner 60 分钟。200 分钟的 job 预算仍有 20 分钟余量。

LGTM — 批准。

Qwen Code · qwen3.7-max

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, looks ready to ship. ✅

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed — no blockers. Suggestions are inline.

startsWith(github.event.review.body, format('@qwen-code /review{0}', '\n'))) &&
needs.authorize.outputs.should_review == 'true'))
timeout-minutes: 200
timeout-minutes: 260

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Suggestion] The three-tier timeout architecture (default 180, max 240, job 260) requires these values to move together, but this relationship is undocumented. The 20-minute headroom between the validation cap (240) and the job-level timeout-minutes (260) exists so the shell timeout can kill the review process and let the error-reporting step run before GitHub's hard kill — this is non-obvious.

A future maintainer raising the cap to, say, 300 might not realize they also need to bump timeout-minutes to 320 to preserve that headroom. A one-line comment here would prevent that mistake.

Suggested change
timeout-minutes: 260
# Must exceed the validation cap (currently 240) by enough margin for error reporting
timeout-minutes: 260

— qwen3.7-max via Qwen Code /review

@wenshao
wenshao added this pull request to the merge queue Jul 11, 2026
Merged via the queue into QwenLM:main with commit a25ef69 Jul 11, 2026
69 of 72 checks passed
VectorPeak pushed a commit to VectorPeak/qwen-code that referenced this pull request Jul 11, 2026
…LM#6706 timeout changes (QwenLM#6720)

PR QwenLM#6706 updated review-pr workflow timeout values (job timeout to 260m,
default to 180m, max to 240m) but did not update the corresponding test
expectations, causing CI failures on all subsequent PRs.
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.

4 participants