fix(review): remove qwen-code-specific core-infra gate from bundled /review - #6412
Conversation
…review
The bundled /review skill is a general command that runs against arbitrary
repositories (and cross-repo PRs), but a previous change baked qwen-code's own
"core infrastructure is maintainer-only" governance into the shipped prompt:
hardcoded packages/core and packages/*/src/{auth,providers,models,config,tools,services}
paths, a 500+ line hard block, and an authorAssociation-based maintainer check.
Those path names are generic — src/auth, src/config, src/tools, src/services are
common across monorepos — so an external contributor's large PR to an unrelated
repo would be hard-blocked as "must be maintainer-initiated" under a policy that
repo never adopted.
Remove the gate and its escalate-flag plumbing (Steps 1, 6, and 7) from the
bundled skill, along with the matching DESIGN.md rationale and the user-doc
section. qwen-code's maintainer-only policy stays documented in AGENTS.md for
this repo. The Issue Fidelity / root-cause ownership agent (Agent 0) is a
universal review principle and is left unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
Thanks for the PR! Template looks good ✓ Problem: This is a real design issue, not theoretical hardening. The Direction: Clearly aligned. Per-repo governance belongs in per-repo config ( Size: Not applicable — this is a prompt/docs-only change (37 deletions, 2 additions across 3 files: Approach: Scope feels exactly right. Pure deletion — no new abstractions, no replacement logic, no scope creep. The Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题:这是一个真实的设计问题,而非理论性加固。 方向:明确对齐。按仓库定制的治理应当放在按仓库定制的配置里( 规模:不适用——这是纯提示词/文档改动(3 个文件共 37 行删除、2 行新增: 方案:范围恰到好处。纯删除——没有新抽象、没有替代逻辑、没有范围蔓延。 进入代码审查 🔍 — Qwen Code · qwen3.7-max |
|
Code review: Clean deletion, no issues found. The diff removes exactly what the PR describes — the "Core infrastructure scope gate" section from Step 1, the numbered rule #6, the Reuse check: Not applicable — the existing Step 2 Testing: Before (installed build, main branch)After (PR branch, static verification)All gate references removed. Agent 0 / Issue Fidelity references confirmed intact (10 matches for Note: 中文说明代码审查: 干净的删除,未发现问题。diff 精确移除了 PR 所描述的内容——Step 1 中的"Core infrastructure scope gate"小节、编号规则 #6、Step 6(判定)和 Step 7(评审提交)中的 复用检查: 不适用——Step 2 的 测试: Before(已安装版本,main 分支): After(PR 分支,静态验证): 注:当前 CI 环境缺少 — Qwen Code · qwen3.7-max |
|
This is a clean, well-scoped fix for a real bug. The core-infrastructure gate that #6395 added to the bundled My independent proposal before reading the diff was identical to what the PR does — there's nothing to add and nothing to cut. The existing Step 2 Static verification confirms the gate is gone (0 matches for all gate-related terms on the PR branch) and the kept behavior is intact (10 matches for Agent 0 / Issue Fidelity references). The dev build wasn't available for a live run, but for a prompt-only deletion this is conclusive. LGTM, approving. ✅ 中文说明这是一个干净、范围恰当的 bug 修复。#6395 在内置 我在阅读 diff 之前的独立方案与 PR 完全一致——没有需要添加的,也没有需要删减的。Step 2 的 静态验证确认门禁已消失(PR 分支上所有门禁相关词匹配数为 0),保留行为完好(Agent 0 / Issue Fidelity 引用 10 处匹配)。开发构建不可用于实时运行,但对于纯提示词删除这是结论性的。 LGTM,批准。✅ — Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Clean removal — no issues found in the diff. The gate text, escalate flag plumbing, DESIGN.md rationale, and user-facing docs are all removed consistently with no dangling references, numbering gaps, or orphaned cross-references.
Downgraded from Approve to Comment: CI still running.
— qwen3.7-max via Qwen Code /review
yiliang114
left a comment
There was a problem hiding this comment.
Review: Approve
This is the right call. /review is a bundled, general-purpose command — shipping qwen-code's repository-specific governance policy inside it leaks maintainer-only rules to every user's monorepo. The path patterns (packages/*/src/{auth,config,tools,services}/**) are common enough to cause false hard-blocks on unrelated projects.
The correct home for per-repo policy is AGENTS.md / .qwen/review-rules.md, which Step 2 load-rules already loads from the base branch. Nothing about qwen-code's own core-infra policy is lost.
Removal is thorough: all escalate flag plumbing (Step 1 gate, Step 6 verdict branch, Step 7 event-mapping condition) is cleanly removed. downgradeApprove/downgradeRequestChanges from presubmit JSON are unaffected. Agent 0 (Issue Fidelity / root-cause ownership) is fully preserved.
Two minor observations (non-blocking):
- The test plan describes a scenario but doesn't link a concrete reproducible PR or fixture. A real URL would be more convincing for prompt-only changes.
- After removing rule 6 from the top-level numbered list, rule 5 is now the last numbered instruction — fine, but worth noting if future rules get added.
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM.
— GPT-5 via Qwen Code /review
What this PR does
Removes the qwen-code-specific core infrastructure gate from the bundled
/reviewskill. That gate — added in #6395 — hardcoded this repository's own paths (packages/core/src/**andpackages/*/src/{auth,providers,models,config,tools,services}/**), a 500+ line hard block, and anauthorAssociation-based maintainer check that force-escalated external PRs to "must be maintainer-initiated". This PR strips the gate out of the shipped prompt, along with theescalateflag plumbing that carried its decision into the verdict (Step 6) and review-submission (Step 7) logic, plus the matchingDESIGN.mdrationale and the user-facing docs section. The Issue Fidelity / root-cause ownership agent (Agent 0) from the same PR is left completely intact.Why it's needed
/reviewis a general, bundled command — it runs against whatever repository the user points it at, including cross-repo PRs. Baking one repository's governance policy into it is wrong on principle, and in this case it isn't even a harmless no-op: the gate keyed off generic monorepo path names.src/auth,src/config,src/tools, andsrc/servicesunderpackages/*exist in countless projects, so an external contributor's 500+ line PR to some unrelated monorepo would be hard-blocked with "this PR must be maintainer-initiated" — enforcing QwenLM's maintainer-only rule on a project that never adopted it, and refusing to review the change at all.The correct home for per-repository policy is a project's own review rules.
/reviewalready loads and injects the## Code Reviewsection ofAGENTS.md/.qwen/review-rules.mdin Step 2, and only for the repo being reviewed. qwen-code's "core infrastructure is maintainer-only" rule remains documented in this repo'sAGENTS.md, so nothing about the policy itself is lost — it just stops leaking into every other user's tool.Reviewer Test Plan
How to verify
This is a prompt/docs-only change to the bundled skill (
SKILL.md) — no runtime TypeScript — so verification is behavioral./reviewon an external PR that changes 500+ lines under a genericpackages/*/src/config/**(orsrc/auth,src/tools,src/services) path in a non-qwen-code repo. Before: hard-blocked in Step 1 as "must be maintainer-initiated", never reviewed. After: proceeds straight into the normal multi-agent review./reviewon an ordinary PR still runs Agent 0 (Issue Fidelity) and the other agents; the verdict logic still honorsdowngradeApprove/downgradeRequestChangesfrom the presubmit JSON — only theescalatebranch is gone.core infrastructure scope gate,authorAssociation,500+ line,escalateflag), while the root-cause ownership gate (Agent 0) is still present.Evidence (Before & After)
N/A — no user-visible / TUI change; this removes review-agent behavior and documentation only.
Tested on
Environment (optional)
N/A — no build or unit tests; the change is to the bundled skill prompt and docs.
Risk & Scope
AGENTS.mdfor human reviewers, and can be re-added as a project review rule (Step 2 injection) if an automated form is wanted for this repo specifically.qwen reviewsubcommand changes; Agent 0 (Issue Fidelity & Root-Cause Ownership) is unchanged.Linked Issues
Follow-up to #6395 (which introduced the gate). No closing keyword.
中文说明
这个 PR 做了什么
从内置的
/reviewskill 中移除 qwen-code 专属的核心基础设施门禁(core infrastructure gate)。该门禁在 #6395 引入,硬编码了本仓库自己的路径(packages/core/src/**以及packages/*/src/{auth,providers,models,config,tools,services}/**)、一个 500+ 行硬拦截、以及基于authorAssociation的维护者判定——会把外部 PR 强制升级为"必须由维护者发起"。本 PR 把该门禁从发布的提示词中删除,同时移除把门禁结论传递到判定(Step 6)与评审提交(Step 7)逻辑里的escalate标志管线,以及对应的DESIGN.md设计说明和面向用户的文档小节。同 PR 引入的 Issue Fidelity / 根因归属 agent(Agent 0)完全保留。为什么需要它
/review是一个通用的内置命令——它会针对用户指向的任意仓库运行,包括跨仓库 PR。把某一个仓库的治理策略烤进这个命令,原则上就是错的;而且在本例中它甚至不是无害的空操作:门禁匹配的是通用的 monorepo 路径名。src/auth、src/config、src/tools、src/services在packages/*下是无数项目都有的目录,所以外部贡献者向某个无关 monorepo 提交的 500+ 行 PR 会被硬拦截并提示"必须由维护者发起"——把 QwenLM 的"仅维护者可改"规则强加到一个从未采纳该规则的项目上,并且干脆拒绝评审该改动。按仓库定制的策略应当放在各仓库自己的 review 规则里。
/review已经会在 Step 2 加载并注入AGENTS.md/.qwen/review-rules.md的## Code Review小节,且仅对被评审的那个仓库生效。qwen-code 的"核心基础设施仅维护者可改"规则仍然记录在本仓库的AGENTS.md中,所以策略本身没有丢失——只是不再泄漏到其他所有用户的工具里。评审者测试计划
如何验证
这是对内置 skill(
SKILL.md)的提示词/文档改动,没有运行时 TypeScript,因此验证是行为性的。packages/*/src/config/**(或src/auth、src/tools、src/services)下改动 500+ 行的外部 PR 运行/review。之前: 在 Step 1 被硬拦截为"必须由维护者发起",根本不评审。之后: 直接进入正常的多 agent 评审。/review仍会跑 Agent 0(Issue Fidelity)和其他 agent;判定逻辑仍然遵循 presubmit JSON 里的downgradeApprove/downgradeRequestChanges——只是去掉了escalate分支。core infrastructure scope gate、authorAssociation、500+ line、escalate标志),而根因归属门禁(Agent 0)仍在。证据(前后对比)
N/A——没有用户可见 / TUI 变化;本改动只移除评审 agent 行为与文档。
测试平台
环境(可选)
N/A——无构建或单元测试;改动仅涉及内置 skill 提示词与文档。
风险与范围
AGENTS.md供人工评审者参考,若本仓库确实需要自动化形式,可作为项目 review 规则(Step 2 注入)重新加入。qwen review子命令;Agent 0(Issue Fidelity & Root-Cause Ownership)保持不变。关联 Issue
对 #6395(引入该门禁)的后续修复,不使用关闭关键字。