Skip to content

fix(ci): coordinate qwen triage and review automation#4570

Merged
yiliang114 merged 14 commits into
mainfrom
feat/triage-skill
Jun 8, 2026
Merged

fix(ci): coordinate qwen triage and review automation#4570
yiliang114 merged 14 commits into
mainfrom
feat/triage-skill

Conversation

@yiliang114

@yiliang114 yiliang114 commented May 27, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Hardens the Qwen triage workflow so it handles real production scenarios (long-running triage, draft PRs, fork PRs, concurrent runs) without premature exits or race conditions.

Changes to .github/workflows/qwen-triage.yml:

  • Keep automatic triage for new issues and same-repository non-draft PRs.
  • Also run PR triage when a draft PR becomes ready for review, so draft-opened PRs are not silently missed.
  • Raise the workflow timeout from 10 minutes to 30 minutes and remove maxSessionTurns: 25, letting the outer workflow timeout be the single hard stop for longer PR triage runs.
  • Use one concurrency group per issue/PR number instead of splitting by event type, while only allowing real maintainer @qwen-code /triage reruns to cancel an in-progress run.
  • Restrict pull_request_target to same-repository non-draft PRs and remove the unused actions: write permission.

Changes to .qwen/skills/triage/references/pr-workflow.md:

  • Clarify that a Stage 1a template failure is a terminal gate: submit exactly one CHANGES_REQUESTED review and stop, without also posting a Stage 1 issue comment or continuing to Stage 2/3.

Why it's needed

This PR is based on the production behavior seen after the initial triage workflow landed. Several separate issues showed up in real runs: PR triage could hit exit code 53 from the 25-turn session cap before Stage 2/3 completed, the 10-minute workflow timeout was too tight for full triage with test evidence, and issue_comment events produced by bot comments could race with concurrency and cancel an issue-comment-triggered triage run before it finished.

Template-check failures also needed a single public terminal output. If the PR body is missing required sections, triage should request changes once and stop rather than also emitting a Stage 1 comment that can read like a separate verdict.

Reviewer Test Plan

How to verify

  • actionlint passes for qwen-triage.yml with the repository's existing self-hosted runner label warning ignored for ecs-qwen.
  • git diff --check is clean.
  • Reviewed trigger/cancellation matrix for: issues opened, same-repo PR opened, draft PR ready_for_review, maintainer @qwen-code /triage, non-command comments, and bot-generated comments/reviews.

Evidence (Before & After)

N/A — CI-only workflow changes, no user-visible UI.

Tested on

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

Risk & Scope

  • Main risk or tradeoff: Removing maxSessionTurns means the 30-minute workflow timeout is the only execution bound. This is intentional — the turn limit caused premature exit before triage stages could complete.
  • Not validated / out of scope: Triage still runs automatically on new issues; this PR does not remove or merge the separate issue follow-up bot. The fork guard only affects pull_request_target PR triage — fork PRs can still be triaged manually. Review workflow changes are handled separately in Align automated PR review with bundled skill #4843.
  • Breaking changes / migration notes: None.

Linked Issues

Related to #4577, #4768, #4787.

中文说明

这个 PR 做了什么

加固 Qwen triage 工作流,使其能处理真实生产场景(长时间运行的 triage、draft PR、fork PR、并发运行)而不会过早退出或产生竞争条件。

.github/workflows/qwen-triage.yml 的改动:

  • 保留对新 issue 和同仓库非 draft PR 的自动 triage。
  • 当 draft PR 变为 ready for review 时也触发 PR triage,避免 draft-opened 的 PR 被默默跳过。
  • 将工作流超时从 10 分钟提升到 30 分钟,移除 maxSessionTurns: 25,让外层工作流超时作为长 PR triage 运行的唯一硬性停止条件。
  • 使用按 issue/PR 编号统一的并发组,同时仅允许真正的维护者 @qwen-code /triage 重跑取消正在进行的运行。
  • pull_request_target 限制为同仓库非 draft PR,移除未使用的 actions: write 权限。

.qwen/skills/triage/references/pr-workflow.md 的改动:

  • 明确 Stage 1a 模板检查失败是终止门:提交唯一一次 CHANGES_REQUESTED review 然后停止,不再额外发布 Stage 1 issue comment 或继续到 Stage 2/3。

为什么需要

本 PR 基于初始 triage 工作流上线后的生产行为。多个独立问题在真实运行中出现:PR triage 可能在 Stage 2/3 完成前因 25-turn session cap 触发退出码 53,10 分钟工作流超时对带测试证据的完整 triage 过于紧张,bot 评论产生的 issue_comment 事件可能与并发竞争并在 triage 完成前取消运行。

模板检查失败也需要单一的公开终止输出。如果 PR body 缺少必要章节,triage 应一次性请求修改后停止,而非额外发出看起来像独立判定的 Stage 1 评论。

Reviewer Test Plan

如何验证

  • actionlintqwen-triage.yml 通过(忽略 ecs-qwen 的自托管 runner 标签警告)。
  • git diff --check 干净。
  • 审查了触发/取消矩阵覆盖的场景:issues opened、同仓库 PR opened、draft PR ready_for_review、维护者 @qwen-code /triage、非命令评论、bot 生成的评论/review。

证据(前后对比)

N/A — 纯 CI 工作流变更,无用户可见 UI。

测试平台

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

风险与范围

  • 主要风险或折衷:移除 maxSessionTurns 意味着 30 分钟工作流超时是唯一的执行约束。这是有意的——轮数限制导致 triage 阶段无法完成就提前退出。
  • 未验证/范围外:Triage 仍对新 issue 自动运行;本 PR 不移除或合并独立的 issue follow-up bot。Fork guard 仅影响 pull_request_target PR triage——fork PR 仍可由维护者手动 triage。Review workflow 的改动在 Align automated PR review with bundled skill #4843 中单独处理。
  • 破坏性变更/迁移说明:无。

关联 Issues

Related to #4577, #4768, #4787.

@yiliang114

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@yiliang114 yiliang114 force-pushed the feat/triage-skill branch from 0c7e61a to 7385b70 Compare May 27, 2026 09:26
@pomelo-nwu

Copy link
Copy Markdown
Collaborator

@yiliang114 same goal, discuss and merge one of them. #4577

@yiliang114

Copy link
Copy Markdown
Collaborator Author

Excited to get AI doing this for us

@yiliang114 yiliang114 force-pushed the feat/triage-skill branch from 99f4e62 to 507695f Compare May 27, 2026 16:49
@yiliang114

This comment has been minimized.

@yiliang114 yiliang114 added category/cli Command line interface and interaction type/feature-request New feature or enhancement request labels May 28, 2026
@yiliang114 yiliang114 marked this pull request as ready for review May 28, 2026 15:45
Copilot AI review requested due to automatic review settings May 28, 2026 15:45

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.

Pull request overview

Adds a new maintainer-facing /triage skill under .qwen/skills/triage/ to standardize PR intake and issue triage (including gating for safe GitHub side effects), and updates the issue follow-up bot workflow to skip items already handled by maintainer triage markers.

Changes:

  • Introduces the /triage skill spec (SKILL.md) including a staged-report workflow, side-effect gates, PR intake rules, and issue triage rules.
  • Adds supporting triage reference docs (workflow overview + tone guide + rulebooks).
  • Extends the follow-up bot’s marker skip list to include qwen-issue-bot:welcome-pr and qwen-maintain:* markers to prevent duplicate/conflicting comments.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.qwen/skills/triage/SKILL.md Defines /triage routing, gates, staged report format, and safe execution guidance for PRs/issues.
.qwen/skills/triage/references/workflow-overview.md Describes the skill architecture and marker coordination with the follow-up bot.
.qwen/skills/triage/references/tone-guide.md Sets tone/structure expectations for public-facing triage comments.
.qwen/skills/triage/references/pr-intake-rules.md Rulebook for PR intake readiness evaluation and suggested label taxonomy.
.qwen/skills/triage/references/issue-triage-rules.md Rulebook for issue classification, completeness checks, diagnosis routing, and markers.
.github/workflows/qwen-issue-followup-bot.yml Adds triage markers to the bot’s “already handled” skip list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/references/pr-intake-rules.md Outdated
Comment thread .qwen/skills/triage/references/issue-triage-rules.md Outdated

@wenshao wenshao 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.

Note (forward-looking, non-blocking — no single diff line to anchor to): SKILL.md says the skill is "designed to run unattended in CI" with "no human confirmation needed at runtime," yet all its safety controls are natural-language instructions. The followup bot it coordinates with enforces its rails mechanically (a safe_gh shim pinning --repo, a coreTools allowlist, secret-redaction), and the skill can additionally call gh api ... --method PATCH, which the bot's shim forbids. Separately, Step 0 validates the target is numeric only on the bare-number branch (lines 61-72), not the URL branch (58-59). None of this is wired to CI in this PR, so run interactively by a maintainer the risk is low — but if it is ever automated, consider the same enforced layer plus numeric validation/normalization on the URL branch.

— claude-opus-4-8 via Claude Code /qreview

Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .github/workflows/qwen-issue-followup-bot.yml
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/references/workflow-overview.md Outdated
…nd bot coordination

Builds on #4577's triage skill with:

- Tiered gate model (comment gate + label gate) to prevent noise on
  already-reviewed PRs and avoid duplicate labels
- PR/Issue auto-detection for numeric inputs
- Dual marker coordination with followup bot (qwen-issue-bot + qwen-maintain)
- Issue triage rules: P0-P3 priority, completeness check, version staleness,
  auto-fix/welcome-PR eligibility, related vs duplicate search strategy
- PR intake rules: author validation table by PR type, scope thresholds
  (800/1500), deep review handoff conditions, label taxonomy mapping
- Comment anti-patterns and public comment distillation
- Bot workflow skip list updated with 3 new markers
Triggers:
- Issue opened → auto triage
- PR opened → auto triage
- Comment `@qwen /triage` → re-triage (maintainers only)
- Manual workflow_dispatch

Uses qwen-code-action to invoke the triage skill, following the same
pattern as qwen-code-pr-review.yml.
@yiliang114 yiliang114 force-pushed the feat/triage-skill branch from 1fcfd23 to f972389 Compare June 4, 2026 08:32
@yiliang114 yiliang114 changed the title feat(skill): add /triage skill for AI-native PR intake and issue triage feat(skill): supplement triage skill with gate model, intake rules, and CI trigger Jun 4, 2026
@yiliang114

This comment has been minimized.

Comment thread .github/workflows/qwen-triage.yml
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .github/workflows/qwen-triage.yml Outdated
Comment thread .qwen/skills/triage/references/pr-workflow.md Outdated
Comment thread .github/workflows/qwen-triage.yml Outdated
Comment thread .github/workflows/qwen-triage.yml Outdated
Comment thread .qwen/skills/triage/references/issue-workflow.md Outdated
Comment thread .github/workflows/qwen-triage.yml Outdated
Comment thread .github/workflows/qwen-triage.yml
Comment thread .qwen/skills/triage/SKILL.md
@yiliang114 yiliang114 marked this pull request as draft June 8, 2026 02:47
@yiliang114

yiliang114 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

Current state after the latest update:

  • This draft is now a supplement to the existing triage workflow on main, not a standalone replacement for all issue triage.
  • Qwen Triage still runs on new issues.opened events, same-repository non-draft PR intake, explicit @qwen-code /triage, and manual workflow_dispatch.
  • The issue follow-up bot remains a separate lightweight workflow for related-issue lookup, missing-information requests, invalid/spam handling, and lightweight labels.
  • The PR no longer tries to remove automatic full triage from newly opened issues. The two issue workflows are allowed to coexist because their responsibilities differ.
  • The latest commits also tighten PR triage safeguards: same-repository non-draft PRs only, no actions: write, no guessed maintainer mentions, fewer skill reference files, and complete coordination markers in comment templates.

I updated the PR body to match this scope. Older comments that described the temporary pre-adjustment event split should be treated as outdated.

Comment thread .github/workflows/qwen-triage.yml
Comment thread .github/workflows/qwen-triage.yml
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
Comment thread .qwen/skills/triage/SKILL.md Outdated
@yiliang114 yiliang114 changed the title feat(skill): supplement triage skill with gate model, intake rules, and CI trigger fix(ci): harden qwen-triage workflow — timeout, fork guard, permissions cleanup Jun 8, 2026
@yiliang114

Copy link
Copy Markdown
Collaborator Author

PR scope reduced and title/body updated to match the current 2-file diff (workflow hardening only).

All review threads resolved:

  • Fixed in current revision: fork PR guard, actions: 'write' removal, cancel-in-progress conditional, timeout bump, maxSessionTurns removal, Stage 1a terminal gate clarification
  • Pre-existing / out of scope: competing issues: opened trigger with qwen-automated-issue-triage.yml (exists on main already, not introduced here)
  • Stale: all SKILL.md / workflow-overview.md / issue-followup-bot.yml comments — those files are no longer in this PR
  • Follow-up noted: adding ready_for_review to the PR trigger types list (natural companion to the draft == false guard)

@yiliang114 yiliang114 changed the title fix(ci): harden qwen-triage workflow — timeout, fork guard, permissions cleanup fix(ci): coordinate qwen triage and review automation Jun 8, 2026
wenshao
wenshao previously requested changes Jun 8, 2026
Comment thread .github/workflows/qwen-triage.yml
Comment thread .github/workflows/qwen-triage.yml
@yiliang114

yiliang114 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

Evidence for the current scope

Adding the concrete runs/reviews that motivated the current 3-file diff:

Problem observed Evidence Covered by this PR
The workflow-level timeout-minutes: 10 was too short for full PR triage. Qwen Triage run for #4823 was cancelled in Run Qwen Triage after roughly 10 minutes. qwen-triage.yml raises the workflow timeout from 10 to 30 minutes.
Triage could also stop before Stage 2/3 because the action hit the session turn cap. Qwen Triage run for #4834 failed in Run Qwen Triage. qwen-triage.yml removes maxSessionTurns: 25, leaving the workflow timeout as the outer guard.
New PRs could trigger Qwen Triage and bundled /review at the same time, producing conflicting maintainer signals. For #4836, Qwen Triage ran on PR open while Qwen Pull Request Review also ran on the same PR open. qwen-code-pr-review.yml no longer auto-runs on PR opened/reopened/ready events; full /review now requires explicit @qwen-code /review or manual dispatch.
The bundled /review workflow could post LGTM while triage had already found an intake/template blocker. #4836 has a triage CHANGES_REQUESTED path and an independent /review LGTM review. Automatic PR intake is owned by triage; full /review is explicit so these signals do not race on every new PR.
Bot-generated comments/reviews could create issue_comment / review events that race with workflow concurrency before the job-level if has a chance to skip. The recent Qwen Triage run list showed many skipped issue_comment events around real triage runs, which is the trigger pattern behind the self-cancel race. qwen-triage.yml uses one group per target and only lets authorized maintainer /triage commands cancel in-progress triage; qwen-code-pr-review.yml similarly only cancels for authorized /review commands or manual dispatch.
Template failure had two possible public outputs: a Stage 1 comment and a CHANGES_REQUESTED review. #4836 shows how template/intake blockers can coexist with other bot outputs, making the public signal noisy. pr-workflow.md now says Stage 1a template failure is terminal: submit exactly one CHANGES_REQUESTED review and stop.

Additional cleanup/hardening included in the same small diff:

  • qwen-triage.yml now triggers on ready_for_review, so draft PRs skipped at opened are triaged once they become reviewable.
  • qwen-triage.yml keeps pull_request_target limited to same-repository non-draft PRs, reducing the privileged workflow surface for fork PRs.
  • qwen-triage.yml drops the unused actions: write permission.
  • qwen-triage.yml removes event_name from the concurrency group so manual /triage, PR events, and issue events for the same target do not run as separate groups.

The current PR intentionally does not merge issue follow-up, scheduled issue triage, release labeling, or label cleanup. Those are separate workflow-policy questions.

yiliang114

This comment was marked as duplicate.

@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.

Thanks for the PR @yiliang114! The direction here is solid — coordinating triage and review to avoid conflicting signals is a real operational need, and the concurrency/timeout fixes address genuine production issues.

However, the PR body is missing several required sections from the PR template:

  • ## Reviewer Test Plan — the PR has ## Test plan but is missing the required sub-sections: ### How to verify, ### Evidence (Before & After), and ### Tested on table. Even for CI-only changes, these should be present (mark N/A where applicable).
  • ## Linked Issues — issues are referenced inline ("Related to #4577, #4768, #4787") but the formal ## Linked Issues section is absent.
  • <details>中文说明</details> — the bilingual summary block is missing entirely.
  • ## Risk & Scope — heading casing differs and the required bullet structure (Main risk or tradeoff, Not validated / out of scope, Breaking changes / migration notes) isn't followed.

Please update the PR body to match the template. The actual content is good — it's a structural/formatting pass needed for consistency.

中文说明

感谢 @yiliang114 的贡献!方向是对的——协调 triage 和 review 避免冲突信号是真实的运维需求,并发/超时修复也解决了生产中的实际问题。

但 PR 正文缺少模板要求的几个章节:

  • ## Reviewer Test Plan — PR 用的是 ## Test plan,缺少必须的子章节:### How to verify### Evidence (Before & After)### Tested on 表格。即使是纯 CI 改动,也应保留这些章节(不适用的标 N/A)。
  • ## Linked Issues — issue 在正文中引用了("Related to #4577, #4768, #4787"),但缺少正式的 ## Linked Issues 章节。
  • <details>中文说明</details> — 完全缺少中文摘要块。
  • ## Risk & Scope — 标题大小写不一致,且未使用要求的 bullet 结构(Main risk or tradeoffNot validated / out of scopeBreaking changes / migration notes)。

请按模板更新 PR 正文。内容本身没问题,只是需要结构/格式上的调整。

Qwen Code · qwen3.7-max

@yiliang114 yiliang114 marked this pull request as ready for review June 8, 2026 09:53

@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.

No review findings. Downgraded from Approve to Comment: CI still running.

The workflow coordination changes are well-structured: conditional cancel-in-progress expressions are consistent with their respective if conditions, the fork guard and draft check properly scope pull_request_target, removing automatic /review on PR open eliminates the triage-vs-review race documented in the PR body, and the Stage 1a terminal gate clarification reduces noisy duplicate outputs. Previous review feedback (fork guard, actions: write removal, conditional cancellation, ready_for_review trigger, maxSessionTurns rationale) has been addressed with clear evidence.

— qwen3.7-max via Qwen Code /review

The review workflow changes (removing auto-trigger, conditional
cancel-in-progress) conflict with PR #4843 which redesigns the
review flow with a delay mechanism. Revert this file so the two
PRs don't conflict — review workflow improvements belong in #4843.
@yiliang114

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@qwen-code-ci-bot

qwen-code-ci-bot commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the PR @yiliang114!

Template looks good ✓ — all required sections present and filled in properly.

On direction: this is solid CI hygiene. The problems are real and well-evidenced — turn-cap exit code 53 killing triage mid-run, 10-minute timeout too tight for full Stage 2/3, bot comments racing with concurrency. These are the kind of production-warts fixes that only surface after the workflow has been running for a while. Clearly aligned with the project's triage automation investment.

On approach: the scope is tight — 2 files, +29/-9, each change traceable to a specific observed failure. The cancel-in-progress expression intentionally mirrors the job if (minus the redundant github.repository check, since concurrency is workflow-scoped), and the inline comment explains the design choice. The fork guard on pull_request_target is a good security tightening. Removing the unused actions: write permission is clean.

One thing worth confirming: with cancel-in-progress now gated on maintainer association for issue_comment events, any non-maintainer @qwen-code /triage comment will be silently ignored (job if rejects it AND cancel-in-progress stays false). That's the correct behavior — just flagging it so it's an intentional decision, not an accidental gap.

actionlint passes clean on the PR version of the workflow. ✓

Moving on to code review. 🔍

中文说明

感谢贡献 @yiliang114

模板完整 ✓ — 所有章节齐全且填写规范。

方向:这是扎实的 CI 维护工作。问题都是真实的且有生产证据支撑——轮数上限导致 exit code 53 中断 triage、10 分钟超时对完整 Stage 2/3 不够用、bot 评论与并发竞争。这类生产环境的磨损修复只有在工作流运行一段时间后才会暴露,与项目对 triage 自动化的投入完全一致。

方案:范围紧凑——2 个文件、+29/-9,每处改动都可追溯到具体的观测故障。cancel-in-progress 表达式有意镜像 job if(去掉了冗余的 github.repository 检查,因为并发组是 workflow 作用域的),行内注释解释了设计选择。pull_request_target 上的 fork 防护是好的安全收紧。移除未使用的 actions: write 权限很干净。

值得确认一点:cancel-in-progress 现在对 issue_comment 事件加了 maintainer 关联检查,非维护者的 @qwen-code /triage 评论会被静默忽略(job if 拒绝,cancel-in-progress 也保持 false)。这是正确的行为——只是标记一下确保这是有意决策而非意外遗漏。

actionlint 对 PR 版本的工作流文件通过 ✓

进入代码审查 🔍

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

qwen-code-ci-bot commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Code Review

Two files changed, both straightforward. No correctness bugs found.

.github/workflows/qwen-triage.yml — The diff is well-structured. The cancel-in-progress expression is the most complex change, and it correctly mirrors the job if conditions minus the github.repository guard (redundant inside concurrency since the group is workflow-scoped). The inline comment explains this intentional divergence. The ready_for_review trigger addition closes a real gap where draft-opened PRs were silently missed. The fork guard (head.repo.full_name == github.repository) on pull_request_target is correct security hardening — fork PRs can still be triaged manually via maintainer @qwen-code /triage comment. Removing actions: 'write' and maxSessionTurns: 25 are both clean subtractions with clear justification.

.qwen/skills/triage/references/pr-workflow.md — The "terminal gate exception" clarification is a useful addition. It prevents the confusing behavior where a template failure would post both a CHANGES_REQUESTED review AND a Stage 1 comment. The wording is clear and the placement right after the comment table is logical. The adjustment to the "save this comment's ID" paragraph correctly distinguishes template failures (already stopped in 1a) from direction escalations.

Validation

$ actionlint qwen-triage.yml  # PR version
# exit 0 — clean

$ git apply --check  # diff from gh pr diff
# clean — patch applies without conflicts

Tmux Testing

N/A — this is a CI-only workflow change with no user-visible CLI behavior to demonstrate. The changes affect GitHub Actions trigger conditions, concurrency groups, and timeout settings. There is no terminal interaction to capture.

中文说明

代码审查

两个文件改动,都很直接。未发现正确性 bug。

.github/workflows/qwen-triage.yml — diff 结构良好。cancel-in-progress 表达式是最复杂的改动,它正确镜像了 job if 条件,去掉了 github.repository 防护(在并发组内部是冗余的,因为 group 是 workflow 作用域的)。行内注释解释了这个有意的设计差异。ready_for_review 触发器添加关闭了 draft-opened PR 被静默跳过的真实缺口。pull_request_target 上的 fork 防护(head.repo.full_name == github.repository)是正确的安全加固——fork PR 仍可通过维护者 @qwen-code /triage 评论手动触发 triage。移除 actions: 'write'maxSessionTurns: 25 都是有清晰理由的干净减法。

.qwen/skills/triage/references/pr-workflow.md — "终止门例外"的澄清是有用的补充。它防止了模板检查失败时同时发布 CHANGES_REQUESTED review 和 Stage 1 评论的混淆行为。措辞清晰,放在评论表格之后是合理的。对"保存此评论 ID"段落的调整正确区分了模板失败(已在 1a 停止)和方向升级。

验证

$ actionlint qwen-triage.yml  # PR 版本
# exit 0 — 通过

$ git apply --check  # 来自 gh pr diff 的 diff
# 干净 — patch 无冲突地应用

Tmux 测试

不适用——这是纯 CI 工作流变更,无可演示的用户可见 CLI 行为。改动影响 GitHub Actions 触发条件、并发组和超时设置,没有可捕获的终端交互。

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

qwen-code-ci-bot commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Reflection

This PR solves real, well-documented production problems with the triage workflow. The diff is small (+29/-9), each change traces back to a specific observed failure, and the code review found no bugs.

The concurrency/cancellation logic is the trickiest part and it's handled correctly — the cancel-in-progress expression intentionally mirrors the job if minus the redundant repository check, with an inline comment explaining why. The fork guard and ready_for_review trigger are both genuine improvements. The pr-workflow.md clarification prevents a confusing double-output on template failures.

The existing CHANGES_REQUESTED review decision on this PR appears to be from a prior iteration. The current revision addresses all previously raised concerns — scope was reduced from a broader rewrite to focused hardening, all review threads were resolved, and the author has been responsive throughout.

My independent assessment: this is the right fix at the right scope. Nothing to cut, nothing to add.

Approving. ✅

中文说明

总结

此 PR 解决了 triage 工作流中真实的、有充分记录的生产问题。diff 很小(+29/-9),每处改动都可追溯到具体的观测故障,代码审查未发现 bug。

并发/取消逻辑是最复杂的部分,处理正确——cancel-in-progress 表达式有意镜像 job if 并去掉冗余的仓库检查,附带行内注释解释原因。fork 防护和 ready_for_review 触发器都是实质改进。pr-workflow.md 的澄清防止了模板失败时的混淆双重输出。

此 PR 上现有的 CHANGES_REQUESTED review 判定似乎来自之前的迭代。当前修订版解决了之前提出的所有问题——范围从大范围重写缩减为聚焦加固,所有 review 线程已解决,作者在整个过程中响应及时。

我的独立评估:这是正确范围内的正确修复。无需删减,无需增加。

批准 ✅

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.

Reflection

This is a well-motivated workflow hardening PR. The problems it solves are real and well-documented with production CI evidence. The diff is small, focused, and doesn't try to do more than it needs to.

The implementation quality is solid — the concurrency/cancel-in-progress duplication is intentional and correctly explained, the draft guard and same-repo restriction are appropriate security hardening, and the ready_for_review trigger fills a genuine gap.

Two items need resolution before merge:

  1. maxSessionTurns removal — wenshao's concern is valid. The 30-min wall clock is a softer bound than a turn limit. Consider raising the cap (50–75) rather than removing it entirely, or explicitly document that the workflow timeout is the chosen bound and accept the cost tradeoff.

  2. PR body mismatch — the body describes changes to qwen-code-pr-review.yml that aren't in the diff. Minor, but worth updating so the description matches the actual scope.

Neither is a design problem — they're loose ends. Once resolved, this is ready.

中文说明

总结

这是一个动机良好的工作流加固 PR。它解决的问题是真实的,并用生产 CI 证据充分记录。diff 小、专注,没有试图做超出需要的事情。

实现质量扎实——并发/cancel-in-progress 的重复是有意的且正确解释,draft guard 和同仓库限制是适当的安全加固,ready_for_review 触发器填补了真正的空白。

合并前需要解决两个项目:

  1. maxSessionTurns 移除 — wenshao 的担忧是合理的。30 分钟墙钟时间是比轮数限制更软的约束。考虑提高上限(50-75)而不是完全移除,或明确记录工作流超时是选定的约束并接受成本权衡。

  2. PR body 不匹配 — body 描述了不在 diff 中的 qwen-code-pr-review.yml 改动。小问题,但值得更新以使描述与实际范围匹配。

两者都不是设计问题——它们是未收尾的细节。一旦解决,就可以合并。

Qwen Code · qwen3.7-max

@qwen-code-ci-bot qwen-code-ci-bot added the scope/ci-cd Continuous integration/deployment label Jun 8, 2026
@yiliang114

Copy link
Copy Markdown
Collaborator Author

Re: maxSessionTurns — intentionally not adding it back. The 30-min workflow timeout is the single execution bound. Turn limits caused premature exit (code 53) before Stage 2/3 could complete, which was the original problem this PR fixes. The cost tradeoff is acceptable given the timeout acts as the hard stop.

Re: PR body — updated to reflect the reverted qwen-code-pr-review.yml scope.

@yiliang114

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@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. ✅

@yiliang114 yiliang114 dismissed wenshao’s stale review June 8, 2026 12:56

has been fixed

@yiliang114 yiliang114 merged commit 5def282 into main Jun 8, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category/cli Command line interface and interaction scope/ci-cd Continuous integration/deployment type/feature-request New feature or enhancement request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants