Repository navigation
fix(ci): use live review bot for manual re-review - #17848
yiliang114 wants to merge 1 commit into
Conversation
|
|
|
Thanks for the PR! Template looks good ✓ — all required headings present, including the bilingual summary. Problem: this is an observed bug, not theoretical hardening, and I re-verified the core evidence independently via the API rather than taking the description's word for it:
Direction: aligned. This is internal CI maintenance that keeps the manual re-review channel functional — squarely within the repo's developer-tooling mission. No direct CHANGELOG reference for a bot-identity switch (the re-review entries there are about review logic, not which account receives requests), but the area is relevant. Size: not applicable — no core paths touched. Two files, +25/−15: one workflow and its meta-test. Approach: the scope feels right. It is a minimal identity swap — three Risk: no elevated risk signals — none of the changed paths match the high-risk revert-correlated set. Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ —— 所有必需标题齐全,含中文说明。 问题:这是已观测到的 bug,而非理论性加固。我通过 API 独立复核了核心证据,而非只采信描述:
方向:对齐。这是保持手动 re-review 通道可用的内部 CI 维护,属于仓库开发者工具使命范畴。CHANGELOG 没有关于 bot 身份切换的直接条目(那里的 re-review 条目讲的是 review 逻辑,而非哪个账号接收请求),但领域相关。 规模:不适用 —— 未触及核心路径。两个文件,+25/−15:一个 workflow 及其 meta-test。 方案:范围合理。这是一次最小化的身份替换——三个 风险:无升级风险信号——改动路径均不匹配高 revert 相关的高风险集合。 进入代码审查 🔍 — Qwen Code · qwen4-max Reviewed at |
|
Code review. My independent baseline before reading the diff: the manual lane dies because three job gates and the
No critical blockers and no AGENTS.md violations. The change is minimal, internally consistent, and the test pins it. (Small focused PR — no sequence diagram or files table needed.) Test evidence — the PR's own CI, read via the API (I did not run any PR code). Snapshot at the reviewed commit; no failures so far. Final CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 Sandboxed lane (2b-bis) — explicitly not applicable here. The central claim is a GitHub Actions event-gate ("requesting the live bot now starts the review jobs instead of all skipping"), not product runtime behavior. Real-scenario testing (2c): N/A. Unattended CI run, and this is a CI/workflow change with no CLI, TUI, Web UI, or Web Shell surface — nothing user-visible to drive. 中文说明代码审查。 读 diff 前我的独立判断:手动通道失效,是因为三个 job gate 和
无关键阻塞项,无 AGENTS.md 违规。改动最小、内部一致,且测试钉住了它。(小型聚焦 PR——无需时序图或文件表。) 测试证据——通过 API 读取 PR 自身 CI(我未运行任何 PR 代码)。 所审 commit 的快照;目前无失败。 沙箱通道(2b-bis)——此处明确不适用。 核心主张是 GitHub Actions 事件 gate("请求有效 bot 现在会启动 review job,而非全部跳过"),并非产品运行时行为。 真实场景测试(2c):N/A。 无人值守 CI 运行,且这是 CI/workflow 改动,无 CLI、TUI、Web UI 或 Web Shell 界面——没有可供驱动的用户可见面。 — Qwen Code · qwen4-max Reviewed at |
|
Confidence: 5/5 — clean across every stage; a minimal, independently-verified fix I would merge without hesitation once CI is green. Stepping back: the problem is proven (I re-ran the API checks myself — old account 404, new account a live This is not a pushover approve: the burden of proof was on the author and it was met with evidence I could and did verify independently, not with framing. The only thing I cannot confirm pre-merge is the live end-to-end trigger, which is inherent to The fork-refactor guardrail does not apply (same-repo, 中文说明置信度:5/5 —— 各阶段均干净;这是一个最小化、且经独立核实的修复,CI 转绿后我会毫不犹豫地合并。 整体来看:问题已被证明(我亲自复核了 API——旧账号 404、新账号为有效 这不是"老好人"式批准:举证责任在作者,而他以我能且确实独立核实的证据满足了它,而非靠话术。合并前唯一无法确认的是 live 端到端触发,这是 fork-refactor 护栏不适用(同仓库、 — Qwen Code · qwen4-max Reviewed at |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
Not fully linted (tool limitation, not a blocker): .github/workflows/qwen-code-pr-review.yml — actionlint ran workflow-level checks; embedded run: shell deferred (source mapping not yet supported).
中文说明
已审查。 建议见行内评论。
未完整检查(工具限制,非阻断):.github/workflows/qwen-code-pr-review.yml——actionlint 已运行 workflow 级检查;内嵌 run: shell 延迟处理(源映射尚未支持)。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.27.4)
| id: 'values' | ||
| run: |- | ||
| echo "bot_login=qwen-code-ci-bot" >> "$GITHUB_OUTPUT" | ||
| echo "bot_login=qwen-code-review-bot" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
[Suggestion] R1-1: The review bot's login is now a bare literal at four sites in this workflow, so the next time the account is renamed the manual re-review lane goes silently dead again — the exact failure mode this PR exists to fix. qwen-autofix.yml:75 already keeps the same kind of identity behind a repo variable (AUTOFIX_BOT: "${{ vars.AUTOFIX_BOT_LOGIN || 'qwen-code-dev-bot' }}"), and issue #16832's triage thread recommends that shape here. Without it, a future rename leaves the three gates comparing against a login nobody holds: the review_requested run still starts, every job reports skipped rather than failing, and the meta-test stays green because botLogin is parsed out of this very bot_login line and then asserted against itself.
Witness:
witness: not run — `review scratch-tree` refused (available: false: repo-local includeif credentials config the screen could not read to the bottom), so no isolated probe was possible and the shared worktree was not edited. Confirmation rests on source facts a probe could not add to: grep finds zero occurrences of vars.REVIEW_BOT_LOGIN in the tree, and scripts/tests/qwen-pr-review-workflow.test.js:40 parses bot_login=([A-Za-z0-9-]+) out of the same line its :3457 assertion pins.
A sketch (all four sites plus the test move together):
# job-level if: expressions — vars is available here, env is not
(github.event.action != 'review_requested' ||
github.event.requested_reviewer.login == (vars.REVIEW_BOT_LOGIN || 'qwen-code-review-bot'))
# review-config output
echo "bot_login=${{ vars.REVIEW_BOT_LOGIN || 'qwen-code-review-bot' }}" >> "$GITHUB_OUTPUT"scripts/tests/qwen-pr-review-workflow.test.js extracts the login with /bot_login=([A-Za-z0-9-]+)/, so the indirection needs the extractor reworked to resolve the variable form rather than read a literal — and the four-sites-agree assertions retargeted at the shared source. Note this is a sketch, not an exercised change.
scripts/tests/qwen-pr-review-workflow.test.js — the resolves the bot login from review-config, not a paraphrase test must assert the login resolves through the variable with the literal only as fallback; removing the indirection and re-pinning a bare literal must turn it red. Today no assertion pins that property.
The identity must stay resolvable without needs.review-config.outputs.bot_login, because line 236 is review-config's own gate and the job that publishes that output cannot consume it.
— deepseek-v4.1-flash-1017 via Qwen Code /review
中文说明
[建议] 评审 bot 的登录名现在在本 workflow 的四个位置都是裸字符串,因此账号下次改名时,手动重新评审通道会再次静默失效——正是本 PR 要修的那种故障。qwen-autofix.yml:75 已经把同类身份放在 repo variable 后面(AUTOFIX_BOT: "${{ vars.AUTOFIX_BOT_LOGIN || 'qwen-code-dev-bot' }}"),issue #16832 的 triage 评论也建议这里采用同样的写法。不这样做的话,将来改名会让三个 gate 继续比对一个人人都不持有的登录名:review_requested run 仍会启动,所有 job 报 skipped 而不是失败,meta-test 也照样是绿的——因为 botLogin 就是从这一行 bot_login 里解析出来的,然后再拿它和自己断言。
证据:witness: not run —— review scratch-tree 拒绝创建(repo-local includeif 凭据配置无法完整读取),因此无法做隔离验证,也没有改动共享 worktree。结论基于源码事实:全树 grep 不到 vars.REVIEW_BOT_LOGIN,而 scripts/tests/qwen-pr-review-workflow.test.js:40 用 bot_login=([A-Za-z0-9-]+) 解析的正是 :3457 断言所固定的同一行。
改法示意(四个位置加测试需要一起改):
# job 级 if 表达式——此处可用 vars,不可用 env
(github.event.action != 'review_requested' ||
github.event.requested_reviewer.login == (vars.REVIEW_BOT_LOGIN || 'qwen-code-review-bot'))
# review-config 的输出
echo "bot_login=${{ vars.REVIEW_BOT_LOGIN || 'qwen-code-review-bot' }}" >> "$GITHUB_OUTPUT"scripts/tests/qwen-pr-review-workflow.test.js 用 /bot_login=([A-Za-z0-9-]+)/ 提取登录名,所以引入间接层时需要同时改写提取器,让它解析变量形式而不是读字面量,并把「四处一致」的断言改为指向同一来源。注意这只是示意,并未实际执行验证。
scripts/tests/qwen-pr-review-workflow.test.js 中 resolves the bot login from review-config, not a paraphrase 这个测试应断言登录名经由变量解析、字面量仅作 fallback;把间接层去掉并重新写死字面量时该测试必须变红。目前没有任何断言固定这一点。
该身份必须能在不依赖 needs.review-config.outputs.bot_login 的情况下解析出来,因为第 236 行正是 review-config 自己的 gate,发布该输出的 job 无法消费它。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.27.4)
|
CI Failure Patrol: this failure could not be confidently classified: Log only shows the aggregate gate (BUILD success, SHARDS failure); no failing test or transient error is named, so nothing supports a rerun or a PR-caused verdict. No automatic action was taken. Inspect the failed job before rerunning or updating the branch. 中文说明CI 失败巡逻:无法确信归类此失败:日志只有汇总判定(BUILD 成功、SHARDS 失败),未指出具体失败测试或瞬时错误,无法支持重跑或归因于 PR 的结论。 未采取自动动作。请先人工查看失败 job,再决定重跑或更新分支。 |
|
CI Failure Patrol: this failure could not be confidently classified: Deterministic 'ru' settings coverage assertion (2 missing entries) unrelated to the CI-workflow files this PR touches; no causal link and no transient evidence. No automatic action was taken. Inspect the failed job before rerunning or updating the branch. 中文说明CI 失败巡逻:无法确信归类此失败:确定性的 'ru' 设置覆盖断言失败(缺少 2 个条目),与本 PR 改动的 CI 工作流文件无关,既无因果关系也无瞬时故障证据。 未采取自动动作。请先人工查看失败 job,再决定重跑或更新分支。 |
|
PR 17848 round 1 verification — Verdict: merge-ready — 85/85 scripted assertions passed, 0 failed. Verified head: 中文摘要结论:merge-ready。 85 项脚本化断言全部通过,0 失败。验证的 head 为 A/B 结论(见 01-gate-ab-matrix.png): 用 GitHub Actions 表达式语义逐条求值 workflow 的 job
S2 的 base 3/3 是求值器的正控制:它证明这些门不是恒 false,base 的 0/3 是登录名不匹配造成的。PR 引用的真实 run 44522592919( 变异矩阵(见 02-mutation-matrix.png): 作者套件 head 285/285 通过;base 文件对 base 测试 285/285 通过;把 head 测试放到 base workflow 上、或把 base 测试放到 head workflow 上,都恰好红在 非阻断观察(本 PR 之外、既有问题): 仓库里其他 workflow 仍持有已删除的 未覆盖: 合并后的 live 触发无法在合并前证明( Central claim and A/BClaim. The manual Instrument.
Two independent witnesses support the base arm beyond the evaluator: the cited Actions run 44522592919 is a A/B evidence: Mutation evidence: Reviewer Test Plan, step by step
Existing review findings
CorrectionsThe PR description's scope justification says the untouched consumers are "separate consumers or are masked by the collaborator association branches". Measured, that holds for part of
This is a correction to the description's mechanism, not a request to widen this PR: the manual re-review lane itself is complete, and the manual lane on owned PRs never runs Non-blocking observations (pre-existing, outside this diff)
CI state at the verified head
Not covered
MethodologyBoundary. The gate A/B is — DeepSeek-V4.1-Flash-1017@fda99a87 via Qwen Code /verify-pr (v0.28.0; skill eeebc98be317) |
|
评审完成,主检出未受影响。以下为正式评审结论(将作为评论发布): Review summary — no blocking issuesReviewed at head Verified at this head
CI state — inherited red, already fixed on main. The two red checks ( Existing non-blocking items (not re-reported)
Residual. The live trigger is inherently post-merge-only ( Verdict: no blocking issues — consistent with the round-1 verification (merge-ready, 85/85 assertions) and triage's approve-on-green. Merge main to pick up the CI fix. 中文摘要结论:无阻塞问题。 在 head CI 两红为继承红:main run 既有非阻塞项不重复报告:R1-1(repo variable 间接层建议)前提在本 head 仍成立,可作跟进;一轮验证报告的 Corrections(「被 collaborator association 掩盖」仅部分成立)仍有效,所涉消费者均为既有且明确不在本 PR 范围,描述措辞可选收紧。live 触发只能合并后观测,作者测试计划第 5 步已覆盖。 |



What this PR does
Switches the manual
review_requestedlane inqwen-code-pr-review.ymlfrom the deletedqwen-code-ci-botaccount to the liveqwen-code-review-botaccount, and updates the workflow meta-test fixtures to the same identity. The three job gates and thereview-configbot_loginoutput now agree on the account that actually receives review requests and posts PR reviews.This is intentionally scoped to the manual re-review channel. Other workflows still reference
qwen-code-ci-botand are deliberately left alone here:qwen-autofix.yml(REVIEW_BOTand review-event routing),qwen-autofix-fork-bridge.yml,qwen-autofix-fork-signal.yml,qwen-pr-safety-precheck.yml(manual-precheck comment ownership), andpr-force-push-reminder.yml(automation exclusion). Those are separate consumers or are masked by the collaborator association branches, so changing them would broaden this PR beyond #16832. TheRELEASE_SYNC_ACTORfallbacks inci.ymlandsdk-python.ymlare also unchanged because release sync likely uses a different actor identity and I found no evidence thatqwen-code-review-botis its replacement.Why it's needed
Requesting
qwen-code-ci-botas a reviewer is not usable:GET /users/qwen-code-ci-botreturns 404, and requesting it on an owned PR returned HTTP 422 (Reviews may only be requested from collaborators). Requestingqwen-code-review-boton the same owned PR was accepted, and the account is a live collaborator (GET /users/qwen-code-review-botresolves as aUser; the collaborator check returns 204). Recent PR reviews in this repository are authored byqwen-code-review-bot; there is no GitHub App identity involved in the observed review author.The old gate still produced an event run but made every job skip. On PR #17841, requesting
qwen-code-review-botgeneratedpull_request_targetrun 44522592919, and all review jobs reportedskippedbecause the workflow compared the live request with the dead login.Reviewer Test Plan
How to verify
.github/workflows/qwen-code-pr-review.ymlhas noqwen-code-ci-botreferences and thatprecheck-pr,review-config,authorize, and thebot_loginoutput all useqwen-code-review-bot.npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/qwen-pr-review-workflow.test.js.grep -R ".github/workflows/qwen-code-pr-review.yml" scripts/tests/and check the dependent suites listed below.qwen-code-review-botas a reviewer and confirm the🧐 Qwen Pull Request Reviewrun's jobs start instead of all reportingskipped. This live path cannot be proven before merge becausepull_request_targetreads the workflow from the base branch.Evidence (Before & After)
N/A — this is a CI/workflow change with no CLI, TUI, Web UI, or Web Shell surface. The discriminating evidence is the GitHub API/workflow behavior above plus the workflow meta-tests.
Tested on
Environment (optional)
macOS arm64, Node 22.23.4, Vitest 3.2.7. The workflow behavior was reproduced through the GitHub REST API on owned PR #17841 only; the successfully added reviewer was removed afterward.
Risk & Scope
actionlintis available at 1.7.7 but is unusable as a signal on this existing workflow: the full invocation exceeded 120 seconds while invoking ShellCheck, and-shellcheck=then rejected the pre-existingdeployment: falseenvironment key as a schema error. The changed workflow is parsed and exercised by the meta-tests.qwen-code-ci-botrepository collaborator entry still needs admin cleanup outside this PR. This PR does not touch the auxiliary consumers listed above or the release-sync actor fallback.Verification run on commit
de64fd1ac96cc6f72be73e0d29f5ba180ab64fb8(base933497af52d24d77aceea5c01c1eb4ad6fb400e1):npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/qwen-pr-review-workflow.test.js— passed: 282 tests, 3 skipped.grep -R ".github/workflows/qwen-code-pr-review.yml" scripts/tests/found the dependent suites;qwen-resolve-workflow.test.jspassed in the dependent-suite invocation.qwen-triage-workflow.test.js— passed: 216 tests, 11 skipped.review-artifact-upload.test.js— passed: 19 tests.review-worktree-cleanup-workflow.test.js— passed: 24 tests.qwen-autofix-workflow.test.js— the candidate suite had 354 passing tests and three failures; the two checkout-attributable failures passed when rerun after adding the missing sparse-checkout fixtures. The remainingattributes deletions, empty files, renames and octopus merges correctlytest hits its explicit 120-second timeout both in this branch and on the clean baseline checkout, so it is a pre-existing local-host timeout, not evidence from this diff.npx prettier --check .github/workflows/qwen-code-pr-review.yml scripts/tests/qwen-pr-review-workflow.test.js— passed.git diff --check— passed.qwen review run --effort low --json --timeout-minutes 20— review-gate unverified: the single attempt produced no verdict before it was stopped; per the issue queue instruction it was not retried.Linked Issues
Fixes #16832
中文说明
这个 PR 做了什么
把
qwen-code-pr-review.yml里手动review_requested通道从已删除的qwen-code-ci-bot账号切换到当前仍在使用的qwen-code-review-bot账号,并把对应的 workflow meta-test fixture 更新为同一个身份。三个 job gate 和review-config的bot_login输出现在都指向实际接收 review 请求并发布 PR review 的账号。本次改动刻意限定在手动 re-review 通道。其他仍然引用
qwen-code-ci-bot的 workflow 刻意不在本 PR 修改:qwen-autofix.yml(REVIEW_BOT和 review 事件路由)、qwen-autofix-fork-bridge.yml、qwen-autofix-fork-signal.yml、qwen-pr-safety-precheck.yml(manual precheck 评论归属)以及pr-force-push-reminder.yml(自动化排除列表)。这些是独立消费者,或者被 collaborator association 分支掩盖;修改它们会把本 PR 扩大到 #16832 之外。ci.yml和sdk-python.yml里的RELEASE_SYNC_ACTORfallback 也未修改,因为 release sync 很可能使用另一个 actor 身份,而且我没有找到能证明qwen-code-review-bot就是其替代身份的证据。为什么需要
请求
qwen-code-ci-bot作为 reviewer 已经不可用:GET /users/qwen-code-ci-bot返回 404,并且在我自己的 PR 上请求它返回 HTTP 422(Reviews may only be requested from collaborators)。在同一个自有 PR 上请求qwen-code-review-bot成功,该账号也是有效 collaborator(GET /users/qwen-code-review-bot返回User;collaborator 检查返回 204)。本仓库最近的 PR review 由qwen-code-review-bot发布;观察到的 review 作者不是 GitHub App 身份。旧 gate 仍会创建事件 run,但会让所有 job 跳过。在 PR #17841 上请求
qwen-code-review-bot触发了pull_request_targetrun 44522592919,所有 review job 都报告skipped,因为 workflow 拿有效请求和已失效的 login 比较。Reviewer Test Plan
如何验证
.github/workflows/qwen-code-pr-review.yml不再有qwen-code-ci-bot引用,并且precheck-pr、review-config、authorize和bot_login输出都使用qwen-code-review-bot。npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/qwen-pr-review-workflow.test.js。grep -R ".github/workflows/qwen-code-pr-review.yml" scripts/tests/,并检查下面列出的相关套件。qwen-code-review-bot作为 reviewer,并确认🧐 Qwen Pull Request Reviewrun 的 job 会启动,而不是全部报告skipped。合并前无法证明这条 live path,因为pull_request_target会读取 base branch 上的 workflow。Before / After 证据
N/A —— 这是 CI/workflow 改动,没有 CLI、TUI、Web UI 或 Web Shell 用户界面。可判别证据是上面的 GitHub API/workflow 行为以及 workflow meta-test。
已测试平台
环境(可选)
macOS arm64,Node 22.23.4,Vitest 3.2.7。Workflow 行为只在我自己的 PR #17841 上通过 GitHub REST API 复现;成功添加的 reviewer 随后已移除。
风险与范围
actionlint1.7.7,但它对这个既有 workflow 无法提供有效信号:完整调用在调用 ShellCheck 时超过 120 秒,-shellcheck=后又把既有的deployment: falseenvironment key 报成 schema 错误。变更后的 workflow 由 meta-test 完成解析和覆盖。qwen-code-ci-bot条目仍需要管理员在 PR 外清理。本 PR 不修改上面列出的辅助消费者,也不修改 release-sync actor fallback。在提交
de64fd1ac96cc6f72be73e0d29f5ba180ab64fb8(base933497af52d24d77aceea5c01c1eb4ad6fb400e1)上完成以下验证:npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/qwen-pr-review-workflow.test.js—— 通过:282 个测试,3 个跳过。grep -R ".github/workflows/qwen-code-pr-review.yml" scripts/tests/找到了相关套件;qwen-resolve-workflow.test.js在相关套件调用中通过。qwen-triage-workflow.test.js—— 通过:216 个测试,11 个跳过。review-artifact-upload.test.js—— 通过:19 个测试。review-worktree-cleanup-workflow.test.js—— 通过:24 个测试。qwen-autofix-workflow.test.js—— 候选分支套件有 354 个测试通过、3 个失败;其中两个由 sparse checkout 缺少 fixture 导致的失败,在补齐 fixture 后单独重跑通过。剩下的attributes deletions, empty files, renames and octopus merges correctly在本分支和干净 baseline checkout 都会触发显式 120 秒超时,因此这是本机既有的超时问题,不是本次 diff 的证据。npx prettier --check .github/workflows/qwen-code-pr-review.yml scripts/tests/qwen-pr-review-workflow.test.js—— 通过。git diff --check—— 通过。qwen review run --effort low --json --timeout-minutes 20—— review-gate 未验证:单次尝试没有返回 verdict,已被停止;按 issue queue 指示没有重试。Linked Issues
Fixes #16832