feat(review): add qwen-code repository context manifest - #8654
Conversation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Thanks for the PR! Template looks good ✓ Problem: real, not theoretical — the manifest provider merged in #8401 reads Direction: aligned — dogfooding the repository-context feature on the repository that owns it is squarely in scope, and it exercises the bounded provider against a real tree. Size: not applicable — no core paths touched. Production delta is 74 lines (gitignore negation +3, manifest +68, provider +3), tests +220. No escalation triggers. Approach: this matches what I'd propose independently — one manifest at the provider's exact identity path, a rule per high-churn area, related-path expansion only for small stable subtrees while big trees get domains and test labels, and a gitignore negation following the existing Risk: no elevated risk signals — none of the revert-correlated high-risk paths are touched. Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题:真实存在而非理论性——#8401 合入的 manifest provider 读取 方向:对齐——在拥有该功能的仓库中先行使用 repository-context 功能完全在范围内,并用真实仓库树验证了有界 provider。 规模:不适用——未触及核心路径。生产改动共 74 行(gitignore 例外 +3、manifest +68、provider +3),测试 +220。无升级条件。 方案:与我的独立设想一致——provider identity 路径上一个 manifest、每个高频变更区域一条规则、仅对小而稳定的子树做 related-path 展开、大树只给 domains 与测试标签,gitignore 例外沿用 风险:无升级风险信号——未命中任何与 revert 相关的高风险路径。 进入代码审查 🔍 — Qwen Code · qwen3.8-max Reviewed at |
|
Code review of the current head: no blockers. The delta since my last pass is the committed pinning test and three new provider skip entries — I verified both against the real tree, not by eye:
One hygiene nit, non-blocking: the PR body's "How to verify" step 3 still references Test evidence — this is an unattended CI run: no PR code is built or executed here. The evidence is (a) the static verification above and (b) the PR's own CI checks at the reviewed commit, fetched via the API. The
Sandboxed verification would settle the one remaining end-to-end claim: Real-scenario (tmux) testing: N/A for this run — unattended CI never drives the product, and the change is advisory review metadata plus a provider skip set, not a TUI surface. 中文说明代码审查(针对当前 head):无阻塞项。自上一轮以来的增量是提交固定测试与三个新的 provider 跳过目录,均对照真实树核验而非目测:manifest 逐条重新通过 parseManifest/validateGlob(顶层键恰为 {version, label, rules}、version 为数字 1、每条规则键都在 RULE_KEYS 内且含 paths、** 只作完整段、无花括号/转义、无模式扎根于跳过目录、relatedPaths 均有静态目录前缀),上限全部满足(9 条规则 ≤128,共 12 个路径模式 ≤128);八个 sentinel 文件与规则指向的全部目录在 main 上均存在;大树(core、cli、integration-tests、workflows、build/lint)只给 domains 与测试标签,小而稳定子树(core/config、core/skills、有界的 web-shell 子树)才展开 relatedPaths,设计正确。新跳过项安全且有依据:playwright.config.ts 把产物写到 client/e2e/test-results 与 client/e2e/playwright-report(均已 gitignore);git ls-files 确认任意名为 test-results/playwright-report/.playwright 的目录下被跟踪文件数为零,大小写不敏感的跳过不可能藏住被跟踪源码——满足源码注释要求的约定守卫;动机真实——展开会进入扫描根的所有子目录,本地 Playwright 痕迹可能耗尽 16384 候选上限导致 review 失败关闭,跳过保证本地扫描有界。提交固定测试以深等值固定整个 manifest、每个 paths 模式经真实 provider 探针验证、每个 relatedPaths glob 有唯一真实文件 sentinel(e2e/* 的 sentinel 是直接子项,更深的兄弟 glob 无法顶替)、全规则共同匹配结果 ≤128、gitignore 例外由 check-ignore + ls-files 双断言把关——正是防止 manifest/校验器/文件系统三者漂移的闸门,也关闭了早先"例外未设防"的发现。读者注意:PR 审查模式下 provider 从可信 merge base 读取 manifest,效果在合入后生效——#8401 信任边界的固有行为,非本 PR 缺陷。非阻塞小问题:PR 正文验证步骤 3 引用的 integration-tests/cli/cli.test.ts 并不存在(该目录有 44 个文件但无此文件)——规则匹配按路径字符串工作,实际无害,但建议修订正文以免误导评审者。测试证据:无人值守 CI 运行,不构建或执行 PR 代码;证据 = 上述静态核验 + 通过 API 获取的 PR 自身 CI:Qwen Code CI 工作流 success;Test(ubuntu)作业含 ESLint + Prettier + 全量 vitest,日志逐名显示 ✓ manifest-repository-context.test.ts (60 tests) 与 ✓ manifest-repository-context.committed.test.ts (5 tests);macOS/Windows/集成/build-cli 为 CI profile 分类器跳过,符合预期且与先前提交一致;仍在进行的 review-pr 为机器人编排作业,非 PR CI。沙箱验证通道: — Qwen Code · qwen3.8-max Reviewed at |
|
Confidence: 5/5 — clean at every stage, and this re-run verified more than the first pass did. Stepping back: my independent proposal for "make the merged repo-context provider useful for this repository" is still the same shape as this diff — one manifest at the provider's identity path, a rule per high-churn area, bounded expansion for small subtrees only, one gitignore negation. What changed since my last pass is exactly what I'd want from review feedback: three rounds of automated findings (the co-match bound, the Playwright-artifact scan, test pinning) each answered with a concrete fix and a reply citing the commit, ending in a committed test that runs the real provider against the real tree and fails on any drift between manifest, validator, and filesystem. I re-verified the final state independently rather than trusting the thread: the manifest survives the actual validator, every sentinel and target directory exists, the skip entries can't hide tracked source, and CI ran both touched test files green on this commit. A human maintainer approved the same commit; I agree with that read. The only nit left is cosmetic — the PR body's verify step cites a test file that doesn't exist — and that's a note, not a reason to hold. Approving now, pinned to the reviewed commit ( 中文说明总体判断:5/5——各阶段干净,且本轮复跑比首轮核验得更深。我的独立设想与本 diff 形态一致:provider identity 路径上一个 manifest、每个高频变更区域一条规则、仅小而有界子树展开、一条 gitignore 例外。自上一轮以来的变化正是评审反馈应有的样子:三批自动化发现(共同匹配上限、Playwright 产物扫描、测试固定)逐一以具体修复加引用提交的回复落实,最终落在一个运行真实 provider 对真实树、任何 manifest/校验器/文件系统漂移都会失败的提交固定测试上。我没有轻信讨论串,而是独立复验了最终状态:manifest 通过真实校验器、所有 sentinel 与目标目录存在、跳过项不可能藏住被跟踪源码、CI 在本提交上逐名跑绿了两个受影响的测试文件。人类维护者已在同一提交上批准,我认同该判断。唯一遗留的小问题是正文验证步骤引用了不存在的测试文件——记一笔即可,不构成搁置理由。现批准,并固定到所审提交(Qwen Code CI 已在该提交上落绿)。 — Qwen Code · qwen3.8-max Reviewed at |
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. |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship — CI landed green after the review. ✅
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Test Plan (not a blocker): integration-tests/cli/cli.test.ts — no such file or directory.
中文说明
Test Plan(非阻断):integration-tests/cli/cli.test.ts — no such file or directory。
— qwen3.8-max via Qwen Code /review (v0.21.7)
|
@qwen-code /takeover |
|
🤝 Takeover engaged: the autofix loop now manages this PR — it will address new review feedback and resolve base conflicts until the label is removed or the round cap is reached. Remove the 中文说明🤝 已接管:autofix 循环现在管理此 PR —— 将持续处理新的评审反馈与 base 冲突,直到移除标签或达到轮次上限。移除 |
Drop the review rule's relatedPaths glob, which resolved ~125 files and left the merged expansion four files of headroom under the 128 cap: any co-matching rule (core/skills, core/config, web-shell) pushed the sum past the cap and aborted `review repo-context` fail-closed before any agent launched. Changed files are already in the diff, and the rule's domains, tests, and configurations still attach. Add a collocated test that runs the real provider against the committed manifest — per-rule matching, web-shell expansion, and the widest co-matching combination — so a future hand-edit the strict parser rejects, or that outgrows the budget, fails in CI instead of mid-review.
|
🤖 Addressed the latest review feedback (round 1/100). What changed, and what I pushed back on: · 已处理最新评审反馈(第 1/100 轮)。改动内容与我反驳保留之处如下: Autofix address-review summary — PR #8654 (round 2)Commit: Feedback points and dispositions1. [Critical] R1-1 — review rule
|
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Test Plan (not a blocker): integration-tests/cli/cli.test.ts — no such file or directory.
中文说明
Test Plan(非阻断):integration-tests/cli/cli.test.ts — no such file or directory。
— qwen3.8-max via Qwen Code /review (v0.21.7)
The web-shell e2e relatedPaths glob expanded against the live filesystem, so developer-local Playwright artifact trees could cross the resolved-file bound and fail committed-manifest tests (and local repo-context runs) closed with no manifest change. Narrow that glob to source-only patterns and extend the provider's never-descend set with Playwright artifact directory names. Strengthen the committed-manifest tests to derive one probe per paths pattern, pin rendered payloads and paths patterns, assert each relatedPaths glob resolves, and gate the .gitignore un-ignore hunk on the manifest staying un-ignored and tracked. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
🤖 Addressed the latest review feedback (round 2/100). What changed, and what I pushed back on: · 已处理最新评审反馈(第 2/100 轮)。改动内容与我反驳保留之处如下: Round summaryAll five inline findings are resolved in code (commit Feedback points
Verification
中文说明本轮总结五条 inline findings 全部在代码中解决(commit 反馈逐条处理
验证
Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 Re-review when you have a moment. After round 100 this bot stops and leaves the PR for a human. · 有空请复审;第 100 轮后本 bot 停止并将 PR 交给人工。 🧠 Handled by Qwen Code · model/模型 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed — no blockers. Suggestions are inline. Test Plan (not a blocker): integration-tests/cli/cli.test.ts — no such file or directory.
中文说明
已审查——无阻断问题。 建议见行内评论。 Test Plan(非阻断):integration-tests/cli/cli.test.ts — no such file or directory。
— qwen3.8-max via Qwen Code /review (v0.21.7)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
yiliang114
left a comment
There was a problem hiding this comment.
LGTM, no blockers. This lands the qwen-code repo's own review-context manifest (the consumer of the #8401 provider). The manifest is benign and well-scoped: path->domains/recommendedTests/requiredConfigurations/relatedPaths mappings only, no secrets, no requiredAgents, no unverifiedDimensions/suppression, and every relatedPaths glob resolves inside the repo (no traversal). Because it's this repo's own maintainer-committed manifest the untrusted-manifest concerns from #8401 don't apply. The committed test is thorough: deep-equal pins the manifest, exercises every paths pattern through the real provider, resolves a distinct sentinel per relatedPaths pattern, asserts the combined relatedPaths stays within MAX_ARRAY_ITEMS, and (git-gated) confirms the file is tracked and not ignored. .gitignore un-ignores it correctly; the provider gains .playwright/playwright-report/test-results to the skipped-dir set. No P0/P1.
|
@qwen-code /triage |
1 similar comment
|
@qwen-code /triage |
|
Sandboxed verification: ✅ passed — merge-ready (agent verdict) - workflow run Ran the PR in an isolated, token-free container: A/B against the base build, mock-free harness assertions, targeted gates. Advisory evidence for human reviewers — not a review, an approval, or a CI check. Scripted assertions: 66 passed · 0 failed · 66 total 中文 — 判定:✅ 通过 · 可合入(agent 判定)沙箱验证在隔离、无凭证的容器中执行了该 PR 的代码(与 base 构建 A/B 对照、无 mock harness 断言、定向门禁)。仅作为评审证据,不构成评审、批准或 CI 检查。 脚本断言:66 通过 · 0 失败 · 66 总计 Verification reportPR 8654 verification — feat(review): add qwen-code repository context manifestVerdict: 中文摘要
Central claim and A/BCentral claim: committing Table 1 — vitest inversion (same committed-test file, real provider, each tree; witness
Table 2 — end-to-end CLI cells (real
Table 3 — SKIPPED_DIRECTORIES A/B (real provider code both arms — head from compiled dist, base esbuild-bundled from base-tree source; real filesystem fixture; witness
17,000 entries exceed Reviewer Test Plan walk
Corrections
Findings (non-blocking)
Vacuity / mutation matrix (witness
|
| # | mutation at head | suite | result | verdict |
|---|---|---|---|---|
| M1 | manifest deleted | committed | 4 red / 1 green — only the git-tracking test survives (it reads the index/ignore rules, not the file; correct scope) | tests 1–4 load-bearing |
| M2 | label hand-edited | committed | 1 red: exactly the pinned-policy deep-equal, expected-vs-actual quoted | content pinned byte-exact |
| M3 | manifest + test grow together past 128 (packages/cli/src/ui/** added to both) |
committed | 3 red via relatedPaths exceeds limit throw; pinned-policy test green |
budget guard live |
| M4 | .gitignore un-ignore hunk removed |
committed | 1 red: "manifest must not be ignored"; side observation: prettier --check becomes a vacuous pass (exit 0) once the path is ignored again — the ! line load-bears both gates |
negation load-bearing |
| M5 | revert the 3 new skip entries | both (65) | 3 red = exactly never descends into .playwright/playwright-report/test-results; committed suite green |
provider change pinned by provider suite |
| M6 | positive control: drop pre-existing node_modules entry |
provider (60) | 3 red (the skip set's parameterised consumers) | suite killable |
No survivors among PR-introduced guards. Sibling sweep of the skip set: the manifest's scan roots (core/src/config, core/src/skills, web-shell subtrees) have no other local artifact producer besides Playwright (vite caches live in root node_modules/.vite, outside the roots); the author deliberately excludes build/ because this repo tracks real scripts there (comment in source).
Not covered
- Per-commit attribution: shallow depth-2 checkout reaches only the PR head of the 4 metadata commits; the aggregate diff was verified instead.
- Trial merge into current
main(no network in this environment); the merge-ref checkout is the merge into the base tip at trigger time. - Repo-wide test/lint suites (targeted gates only: the two changed suites, adjacent
repo-context/repository-contextsuites 45/45,tsc --noEmitonpackages/cliwith a live control). - The rest of the
/reviewpipeline beyondrepo-context, and Windows/macOS behavior.
Methodology
Environment: node:22-bookworm container, isolated $HOME, no GitHub token. Harnesses in harness/ drive the compiled dist CLI (01-cli-ab.mjs, 31 assertions), the real provider imported from dist (head) / esbuild-bundled base source (base) against real filesystem fixtures (02-skipdirs-ab.mjs, 6), plan-step checks with live controls (03-plan-steps.sh, 7), and scripted assertions over every recorded log (05-assert-logs.mjs, 22). The base worktree reused the root node_modules — a clean control because the PR touches neither packages/core nor the dependency tree (0-line diff), and readlink -f node_modules/@qwen-code/qwen-code-core = head packages/core was asserted; the provider itself imports only its lib siblings, so no workspace boundary was crossed. Raw logs in logs/, captures in evidence/.
Evidence images
Harness scripts and raw logs are in the workflow run artifacts (7-day retention).
— Qwen Code · sandboxed verification
|
🤖 Reviewed the latest feedback — no changes needed. Why, point by point: · 已审阅最新反馈——无需改动。逐点说明原因如下: Autofix round summary — no code changes requiredAll three automated-reviewer suggestions from round 3 (R3-1, R3-7, R3-9) were already fixed at the current branch head ( Per-finding verificationThe committed suite (
The maintainer reply comments referencing earlier fixes ( Non-blocking observationThe review body's Test Plan note points at Verification
中文说明Autofix 轮次总结 — 无需修改代码第 3 轮自动审查的全部三条建议(R3-1、R3-7、R3-9)在本轮运行之前,已由当前分支 HEAD( 逐条验证已提交的测试套件(
维护者回复中引用的更早修复( 非阻断观察审查正文的 Test Plan 指向 验证
Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 🧠 Handled by Qwen Code · model/模型 |
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.
Reviewed — no blockers. Suggestions are inline. Test Plan (not a blocker): integration-tests/cli/cli.test.ts — no such file or directory.
中文说明
已审查——无阻断问题。 建议见行内评论。 Test Plan(非阻断):integration-tests/cli/cli.test.ts — no such file or directory。
— qwen3.8-max via Qwen Code /review (v0.21.7)
| { | ||
| "version": 1, | ||
| "label": "Qwen Code", |
There was a problem hiding this comment.
[Suggestion] After this PR merges, the linked design doc becomes stale: docs/design/review-repository-context.md's Status line still says "No .qwen/review-context.json ships with this change, so nothing beyond tests runs end to end until a repository adopts one" — but this PR ships exactly that manifest for this repository, and docs/users/features/code-review.md points readers to the design doc as the full contract. — Failure scenario: after merge, a reader following that pointer concludes the manifest pipeline has never run end to end outside tests and no repository has adopted it — the opposite of reality, where every medium/high-effort review of this repository exercises the manifest path — until a docs-audit pass catches up.
Suggested fix: amend the design doc's Status sentence to record that the repository has since adopted a manifest (e.g. "...until a repository adopts one; qwen-code's own manifest was committed as a follow-up"), or mark the line superseded. The fix targets docs/design/review-repository-context.md, which is outside this diff, so there is no one-click suggestion block here.
中文说明
此 PR 合入后,关联的设计文档将过期:docs/design/review-repository-context.md 的 Status 行仍写着 "No .qwen/review-context.json ships with this change, so nothing beyond tests runs end to end until a repository adopts one"——但本 PR 正是为本仓库提交该 manifest,且 docs/users/features/code-review.md 将该设计文档指认为完整契约所在。——失败场景:合入后,顺着该指引阅读设计文档的读者会得出 manifest 管道从未在测试之外端到端运行、也没有仓库采用它的结论——与事实相反(本仓库每次 medium/high effort review 都会走 manifest 路径)——直到某次 docs-audit 才纠正。
建议修复:修改设计文档的 Status 句,记录本仓库已采用 manifest(例如 "...until a repository adopts one; qwen-code's own manifest was committed as a follow-up"),或标注该行已被取代。修复目标 docs/design/review-repository-context.md 不在本 diff 内,因此此处不提供一键 suggestion 代码块。
— qwen3.8-max via Qwen Code /review (v0.21.7)
| function probeFor(pattern: string): string { | ||
| const wildcard = pattern.search(/[?*]/); | ||
| if (wildcard === -1) return pattern; | ||
| const slash = pattern.lastIndexOf('/', wildcard); | ||
| return `${pattern.slice(0, slash)}/probe.txt`; | ||
| } |
There was a problem hiding this comment.
[Suggestion] probeFor assumes all wildcards sit in the pattern's last segment — it truncates at the slash before the FIRST wildcard and appends /probe.txt, so any schema-legal pattern with a wildcard in a leading or middle segment gets a probe that cannot match it. — Failure scenario: a maintainer adds a legal rule like "paths": ["packages/*/src/foo/**"] (validateGlobArray applies requireDirectoryPrefix: false to paths, so this parses) and updates expectedManifest; probeFor returns packages/probe.txt, which cannot match, provide() returns null, and "matches every paths pattern through the real provider" fails with expected null not to be null — legal manifest shapes become effectively un-addable, and the failure points at the manifest/provider instead of this helper. Verified through the real provider: the segment-wise probe packages/probe/src/foo/probe.txt returns non-null, confirming the fix direction.
| function probeFor(pattern: string): string { | |
| const wildcard = pattern.search(/[?*]/); | |
| if (wildcard === -1) return pattern; | |
| const slash = pattern.lastIndexOf('/', wildcard); | |
| return `${pattern.slice(0, slash)}/probe.txt`; | |
| } | |
| function probeFor(pattern: string): string { | |
| if (!/[?*]/.test(pattern)) return pattern; | |
| const segments = pattern.split('/'); | |
| const probeSegments: string[] = []; | |
| for (const segment of segments) { | |
| if (segment === '**') continue; | |
| probeSegments.push(segment.replace(/[?*]/g, 'probe')); | |
| } | |
| const finalSegment = segments[segments.length - 1] ?? ''; | |
| if (finalSegment !== '**' && /[?*]/.test(finalSegment)) { | |
| return probeSegments.join('/'); | |
| } | |
| return [...probeSegments, 'probe.txt'].join('/'); | |
| } |
中文说明
probeFor 假设所有通配符都位于 pattern 的最后一段——它在第一个通配符前的斜杠处截断并追加 /probe.txt,因此任何通配符出现在前导或中间段的 schema 合法 pattern 都会得到一个无法匹配的探针。——失败场景:维护者新增一条合法规则如 "paths": ["packages/*/src/foo/**"](validateGlobArray 对 paths 使用 requireDirectoryPrefix: false,因此该写法可通过校验)并更新 expectedManifest;probeFor 返回 packages/probe.txt,无法匹配该 pattern,provide() 返回 null,"matches every paths pattern through the real provider" 以 expected null not to be null 失败——合法的 manifest 形态实际上变得无法新增,且失败信息把排查方向误导到 manifest/provider 而非这个辅助函数。已通过真实 provider 验证:按段构造的探针 packages/probe/src/foo/probe.txt 返回非 null,确认修复方向正确。
— qwen3.8-max via Qwen Code /review (v0.21.7)
|
Sandboxed verification: Skipped because the PR is not open for verification (state=MERGED, draft=false). 中文 — 判定:
|
|
Released in v0.21.8. |




What this PR does
This PR adds the first real repository-context manifest for this repository. The manifest declares bounded review domains, related-path scopes, recommended tests, and required configurations for the repository areas that
/reviewmost often reviews. It also allows.qwen/review-context.jsonto be tracked, because the file is shared review metadata, not session output.The rules are intentionally narrow enough for the merged bounded
repo-contextprovider: large trees receive domains and test recommendations without full related-path expansion, while smaller stable subtrees receive related paths.Why it's needed
The repository-context foundation merged in #8401 is only useful when repositories provide their own manifests. This PR dogfoods the feature on the repository that owns it, validates the merged provider against the real tree, and gives future
/reviewruns useful guidance for CLI review commands, core config/skills, web-shell client code, integration tests, workflows, and build/lint scripts.Reviewer Test Plan
How to verify
npx prettier --check .qwen/review-context.json. Expected: no formatting errors.packages/cli/src/commands/review/repo-context.tsand.github/workflows/ci.yml. Runqwen review repo-contextwith the plan, current worktree, and an output file. Expected: context domains includecli,review,ci, andworkflows; recommended tests includereviewandhelper-tests; related paths stay under the bounded limit.packages/web-shell/client/App.tsx,packages/core/src/index.ts, andintegration-tests/cli/cli.test.ts. Expected: context domains includeweb-shell,core, andintegration-tests; related paths expand only the bounded web-shell subtrees..qwen/review-context.jsonis no longer ignored by git, while other.qwen/*session artifacts remain ignored.Evidence (Before & After)
Before:
/reviewhad no repository-native context for this repository, because.qwen/*ignored the manifest path and no manifest existed.After:
qwen review repo-contextwrites a manifest provider context with bounded related paths for representative changed paths; local verification returned 124 related paths for the review/workflow plan and 74 related paths for the web-shell/core/integration plan.Tested on
Environment (optional)
macOS local development environment,
npm run devagainst the mergedmaincode. Real repository worktree used as therepo-contextinput.Risk & Scope
Linked Issues
#8401
中文说明
此 PR 做了什么
此 PR 为本仓库添加第一个真实 repository-context manifest。manifest 声明了有界的 review domains、related-path 范围、recommended tests 和 required configurations,覆盖
/review最常审查的仓库区域。同时允许.qwen/review-context.json被 git 跟踪,因为它是共享 review metadata,而不是 session 输出。这些规则有意保持足够窄,以适配已合入的有界
repo-contextprovider:大型树只获得 domains 和测试建议,不做全量 related-path 展开;较小且稳定的子树才获得 related paths。为什么需要
#8401 合入的 repository-context 基础设施只有在仓库提供自己的 manifest 后才会产生价值。此 PR 在拥有该功能的仓库中先行使用它,用真实仓库树验证 merged provider,并为后续
/review运行提供 CLI review commands、core config/skills、web-shell client、integration tests、workflows 和 build/lint scripts 的指导。Reviewer 测试计划
如何验证
npx prettier --check .qwen/review-context.json。预期:没有格式错误。packages/cli/src/commands/review/repo-context.ts和.github/workflows/ci.yml改动的临时 plan。用该 plan、当前 worktree 和输出文件运行qwen review repo-context。预期:context domains 包含cli、review、ci、workflows;recommended tests 包含review和helper-tests;related paths 保持在有界上限内。packages/web-shell/client/App.tsx、packages/core/src/index.ts和integration-tests/cli/cli.test.ts改动的临时 plan。预期:context domains 包含web-shell、core、integration-tests;related paths 只展开有界的 web-shell 子树。.qwen/review-context.json不再被 git 忽略,而其他.qwen/*session 产物仍被忽略。证据(Before & After)
Before:由于
.qwen/*忽略 manifest 路径且不存在 manifest,/review没有本仓库 repository-native context。After:对代表性 changed paths 运行
qwen review repo-context会写入 manifest provider context;本地验证中 review/workflow plan 返回 124 个 related paths,web-shell/core/integration plan 返回 74 个 related paths。测试平台
环境(可选)
macOS 本地开发环境,对已合入
main的代码运行npm run dev,并使用真实仓库 worktree 作为repo-context输入。风险与范围
关联 Issue
#8401