fix(cli): word review gap disclosures so they cannot read as contradictions - #8857
Conversation
…ctions A posted review body on QwenLM#8811 opened "Reviewed. Not reviewed: This PR narrows the daemon-marker check from a truthy tes..." and readers could not tell whether the PR had been reviewed at all. The opener certified a part of the diff while the disclosure named an agent that never opened it — both true, but the pair read as a self-contradiction, and the disclosure subject (a launch-prompt fragment truncated mid-word) looked like a claim about the whole PR. - When "Not reviewed:" clauses follow, the opener now says "Reviewed, with gaps disclosed below." The certifying and zero-certified openers keep their exact wording. - Agent-derived subjects (the truncated prompt line used when an agent is tied to no chunk) render quoted — they are names, not sentences. - That truncation stops at a word boundary instead of mid-word. Verdicts, caps, dedup and the certification check are untouched: the internal subject stays the unquoted label and every structural check keys on it.
|
Thanks for the PR! Re-running triage on the current head — five commits and four Template looks good ✓ Problem: observed, not theoretical. The body posted on #8811 opened Direction: aligned. This is the compose path for Size: not applicable — no core paths touched ( Approach: minimal and reuse-first — word-boundary truncation reuses Risk: no high-risk path matches. No elevated risk signals. Moving on to code review. 🔍 中文说明感谢贡献!本次在最新 head 上重跑 triage——距上次审查已有 5 个 commit、4 轮 模板完整 ✓ 问题:已观测到,不是理论问题。#8811 上发布的正文以 方向:对齐。这是 规模:不适用——未触及核心路径(仅 方案:最小化且优先复用——按词边界截断复用 风险:未命中高风险路径。无升级风险信号。 进入代码审查 🔍 — Qwen Code · qwen3.8-max Reviewed at |
Code reviewReviewed against Independent baseline. Before opening the diff, my proposal for the #8811 shape was: branch the opener on coverage state (zero-certified keeps the What I verified in the diff:
Non-blocking nits (for the record — R5-1 in the
Testing (CI evidence — unattended run)Per the gate rules this run does not execute PR code; the evidence below is the PR's own CI on the reviewed head, fetched via the API. All checks completed — nothing pending, nothing failing.
The central claim — composed body wording — is pinned by exact-string assertions (every opener in both languages, the quoted/truncated labels, the 中文说明代码审查基于 独立基线:我的方案是——按覆盖状态分支选择 opener(零认证保留 diff 中核实的内容:opener 决策树穷尽且单向; 非阻断建议(记录在此,第 1 条即 测试(CI 证据——无人值守运行)按门禁规则,本次运行不执行 PR 代码;以下证据为被审 head 上 PR 自身 CI(经 API 获取)。所有检查已完成——无 pending、无失败。核心结论(正文措辞)由绿色 ubuntu 套件中的精确字符串断言(双语每个 opener、加引号截断的 label、 — Qwen Code · qwen3.8-max Reviewed at |
|
Confidence: 4/5 — every stage landed clean and the fix is pinned by exact-string tests in a green suite; the fifth point is the two non-blocking nits (vacuous ordering assertions, unbounded operator-stderr labels), neither of which touches the posted-body guarantee. Reflection, honestly: this one earned its merge. The problem is not hypothetical — it reproduced on #8811, and it reproduced again on this PR's own round-5 review body while I was triaging it (pre-fix The process worked as designed too: four Approving, pinned to the reviewed commit. The two nits are worth a follow-up if the author wants, but neither blocks. 中文说明反思(如实说):这个 PR 配得上合入。问题不是假设——它在 #8811 复现过,在我 triage 期间又在本 PR 第 5 轮 review 正文上复现了一次(修复前的 流程也按设计运转:4 轮 已按被审 commit 钉住批准。两个建议值得后续跟进,但均不阻断。 — Qwen Code · qwen3.8-max Reviewed at |
|
For anyone wondering what a posted review body actually looks like after this change, here is the exact #8811 case. Before (what #8811 received):
After (same verdict inputs):
The opener does not start with "Reviewed" at all in this shape — an earlier cut tried "Reviewed, with gaps disclosed below." and still read as contradicting the "Not reviewed:" clauses below it. On a PR whose description carries Han characters, the Chinese fold opens with Two things stay exactly as they are: the verdict (same caps, same COMMENT event — wording only), and every gap-free body — |
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. ✅
…e one reason
Feedback on the first wording: "Reviewed, with gaps disclosed below."
still starts with the word the "Not reviewed:" clauses take back, and
readers had to reconcile the pair anyway. The opener now says the review
is PARTIAL instead — "Partially reviewed — gaps disclosed below." — so
opener and disclosures read in one direction (Chinese half:
仅完成部分审查,未覆盖部分见下方披露。).
Also replaces the translationese Chinese rendering of the unopened-agent
reason ("它被指向 diff 的行却从未打开") with natural phrasing.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline. Not explored to full depth (tool budget reached): Context: PR #8857 fixes the wording of the body a /review...: tests were not executed — the shared worktree was concurrently dirty, so a run would have tested the wrong bytes; all conclusions rest on committed-blob tracing…. Test Plan (not a blocker): 261 tests pass — this review observed 18774 passed.
中文说明
已审查。 建议见行内评论。 未探索到全部深度(达到工具调用预算):Context: PR #8857 fixes the wording of the body a /review...:tests were not executed — the shared worktree was concurrently dirty, so a run would have tested the wrong bytes; all conclusions rest on committed-blob tracing…。 Test Plan(非阻断):261 tests pass — this review observed 18774 passed。
— qwen3.8-max via Qwen Code /review (v0.21.8)
|
Handled the current feedback and CI follow-up at Changed:
Verified:
Intentionally not changed:
Pending:
中文摘要已修正 partial opener、两条 agent 标签展示路径和未验证 finding 的开头,同步 PR 正文,并因无关 runner 不稳定普通合入 latest |
|
@qwen-code-review-bot pls review this pr and approve it if no blockers |
| : findingsUnverifiedAtCompose | ||
| ? { | ||
| en: 'Review incomplete — unverified findings disclosed.', |
There was a problem hiding this comment.
[Suggestion] This opener overclaims on the findings-file-unreadable shape. findingsUnverifiedAtCompose is set on TWO shapes: surviving — [unverified] tags (~line 791) and the unreadable-file catch (~line 802, which also sets findingsFileUnreadable). On the second shape the body discloses an unreadable file — not unverified findings. — Failure scenario: an unreadable findings file with otherwise clean coverage (reachable — the findings file and the plan/transcripts are independent files, and the remediation line itself anticipates an operator passing the wrong path) posts Review incomplete — unverified findings disclosed. directly above ⚠️ The reverse-audit findings file could not be read at compose time… — verified by probe at the reviewed commit. The opener names entities the body never presents; the zh half (审查未完成——未验证的发现已披露。) carries the same overclaim. This is a milder instance of the opener/body self-contradiction pattern this PR exists to remove. Suggested fix: widen the opener to cover both shapes (e.g. Review incomplete — verification not shown. with a matching zh), or branch the wording on findingsFileUnreadable.
中文说明
该开头在"findings 文件不可读"这一形态下言过其实。findingsUnverifiedAtCompose 有两种置位形态:残留的 — [unverified] 标记(约 791 行)与文件不可读的 catch(约 802 行,同时置 findingsFileUnreadable)。第二种形态下正文披露的是"文件读不了",而不是"未验证的发现"。— 失败场景:findings 文件不可读但其余覆盖干净(可达——findings 文件与 plan/transcripts 是相互独立的文件,补救文案本身就预设了操作者传错路径)时,发布正文会在 ⚠️ The reverse-audit findings file could not be read at compose time… 上方直接以 Review incomplete — unverified findings disclosed. 开头——已在被审提交上用探针验证。开头提及的对象正文根本没有给出;中文一半(审查未完成——未验证的发现已披露。)同样言过其实。这是本 PR 要消除的"开头/正文自相矛盾"模式的较轻实例。建议修复:把开头放宽到覆盖两种形态(如 Review incomplete — verification not shown. 及对应中文),或按 findingsFileUnreadable 分支措辞。
— qwen3.8-max via Qwen Code /review (v0.21.8)
| : findingsUnverifiedAtCompose | ||
| ? { | ||
| en: 'Review incomplete — unverified findings disclosed.', |
There was a problem hiding this comment.
[Suggestion] The precedence between the two new opener branches (hasCoverageGaps vs findingsUnverifiedAtCompose) and the zh half of this incomplete opener are pinned by no test: every tagged-findings test runs on the fully covered base() plan, and none uses a han-stamped plan. — Failure scenario: mutation probes at the reviewed commit — (1) swapping these two branches passes 184/184: on a messy run with both an unreviewed chunk and a surviving [unverified] tag, the opener would silently flip between Partially reviewed — gaps disclosed. and Review incomplete — unverified findings disclosed.; (2) corrupting the zh 审查未完成——未验证的发现已披露。 also passes — no han-stamped plan ever passes findingsPath, while the sibling partial opener has both halves pinned by the bilingual test. This branch is tested at half the depth of its sibling. Suggested fix: add one test combining a coverage gap (e.g. unreviewedDimensions: ['security']) with a tagged findings file on a han: true plan, pinning which opener wins and both zh halves.
中文说明
两个新开头分支(hasCoverageGaps 与 findingsUnverifiedAtCompose)的优先级,以及该"审查未完成"开头的中文一半,都没有任何测试钉住:所有带标记 findings 的测试都跑在完全覆盖的 base() 计划上,且没有一个使用带 han 标记的计划。— 失败场景:在被审提交上做变异探针——(1) 交换这两个分支,184/184 全过:在一次既有未审 chunk 又残留 [unverified] 标记的混乱运行里,开头会在 Partially reviewed — gaps disclosed. 与 Review incomplete — unverified findings disclosed. 之间静默翻转;(2) 破坏中文 审查未完成——未验证的发现已披露。 同样全过——没有任何 han 计划会传 findingsPath,而相邻的 partial 开头中英文两半都被双语测试钉住。该分支的测试深度只有相邻分支的一半。建议修复:新增一个测试,在 han: true 计划上同时制造覆盖缺口(如 unreviewedDimensions: ['security'])与带标记的 findings 文件,钉住哪个开头胜出以及中文两半。
— qwen3.8-max via Qwen Code /review (v0.21.8)
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
LGTM. 263 tests pass, CI green.
The core fix is sound — replacing Reviewed. followed by Not reviewed: with Partially reviewed — gaps disclosed. eliminates the self-contradiction pattern from #8811. The hasCoverageGaps variable correctly distinguishes coverage gaps (which justify the partial opener) from budget-gap disclosures (which don't), and the findingsUnverifiedAtCompose branch handles the unverified-findings shape with its own distinct opener.
The remaining suggestions from both rounds of review are legitimate edge cases worth following up on (quoted-label escaping, compressSummary dedup surface, test gaps for new branches), but none regress vs. the pre-PR state and none should block this fix.
|
Closeout: kept full normalized labels as internal dedup keys, safely rendered compressed public labels with embedded quotes, and made unreadable findings report unavailable instead of unverified. Verified 184 focused tests. Intentionally skipped redundant per-surface coverage and chunk-label presentation changes in this late review round. All active threads are closed; exact-head CI/review is pending. 中文摘要已修复内部标签碰撞、引号转义和 findings 不可读提示;184 个测试通过,未增加重复覆盖或改动 chunk 展示,线程已清零,等待 CI/评审。 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
Not explored to full depth (tool budget reached): Context: PR #8857 (QwenLM/qwen-code) rewords the /review ...: full repo npm run typecheck /build not run (requires building all workspace packages first); I relied on the passing vitest suite + eslint + the diff's simple …; Context: PR #8857 (QwenLM/qwen-code) rewords the /review ...: none — I completed every check I planned. Tool calls used: about 30. Within budget..
Not reviewed: reverse audit — stopped before round 4 by the review time budget.
中文说明
已审查。 建议见行内评论。
未探索到全部深度(达到工具调用预算):Context: PR #8857 (QwenLM/qwen-code) rewords the /review ...:full repo npm run typecheck /build not run (requires building all workspace packages first); I relied on the passing vitest suite + eslint + the diff's simple …;Context: PR #8857 (QwenLM/qwen-code) rewords the /review ...:none — I completed every check I planned. Tool calls used: about 30. Within budget.。
未审查:反向审计——评审时间预算不足,未能开始第 4 轮。
— qwen3.8-max via Qwen Code /review (v0.21.9)
| function publicAgentSubject(label: string): string | undefined { | ||
| return /^chunk \d+$/.test(label) | ||
| ? undefined | ||
| : mdField(JSON.stringify(compressSummary(label))); |
There was a problem hiding this comment.
[Suggestion] R3-3: the internal dedup key and the public display form have diverged — seenSubjects dedups on the full internal label, while this line truncates the display form independently via compressSummary. — Failure scenario: probe-reproduced — two idle whole-diff agents whose launch-prompt first lines share a ~59-char prefix and differ only past it both survive the dedup, then both get cut at the same word boundary, so one Not reviewed: sentence renders the byte-identical quoted label twice (presenting one apparent agent twice). Pre-diff, the internal label WAS the 60-char display form, so subject-dedup doubled as display-dedup. Cosmetic only — both entries are still posted, nothing is dropped — but it defeats the 1-subject-per-agent correspondence this sentence relies on. Suggested fix: also dedup on the printed subject — skip in the byReason render loop when the resolved publicSubject ?? subject was already emitted for that reason group.
中文说明
内部去重键与公开展示形式已经分离——seenSubjects 用完整的内部标签去重,而这一行通过 compressSummary 独立截断展示形式。— 失败场景(已用探针复现):两个 whole-diff agent 的启动 prompt 首行共享约 59 字符前缀、仅在其后不同,两者都会通过 seenSubjects 去重,又在同一词边界被截断,于是同一条 Not reviewed: 句子里出现两次字节完全相同的带引号标签(看起来像同一个 agent 出现了两次)。PR 前内部标签就是 60 字符的展示形式,subject 去重同时起到了展示去重的作用。仅影响展示——两条记录仍会全部发布、不会丢数据——但破坏了这句话依赖的“一个 agent 一个主语”的对应关系。建议修复:在 byReason 渲染循环中对打印主语也做去重(同一 reason 分组内,若解析出的 publicSubject ?? subject 已输出过则跳过)。
— qwen3.8-max via Qwen Code /review (v0.21.9)
| function publicAgentSubject(label: string): string | undefined { | ||
| return /^chunk \d+$/.test(label) | ||
| ? undefined | ||
| : mdField(JSON.stringify(compressSummary(label))); |
There was a problem hiding this comment.
[Suggestion] R3-5: mdField strips backticks AFTER compressSummary's whitespace collapse has run, so backtick-bearing labels render with doubled spaces inside the quoted code span — and every CLI-built role-agent identity line contains backticks around the role (the "You are review agent <role> — …" line, agent-prompt.ts:1395/:642). — Failure scenario: probe-reproduced through the real composeReview — an idle role agent renders with doubled spaces around the role name where GitHub preserves whitespace, on both render sites this diff rewrites (chunk agents escape via the chunk N arm; role agents don't). This is the most common production case for the exact sentence this PR rewrites to render agent names cleanly, and no test exercises a backtick-bearing label through this path. The fix sanitizes before the collapse so the existing collapse absorbs the replacement space; do not move space-collapsing into mdField itself — its other callers render diff file paths, where spacing is meaningful.
| : mdField(JSON.stringify(compressSummary(label))); | |
| : mdField(JSON.stringify(compressSummary(label.replace(/[`\r\n]+/g, ' ')))); |
中文说明
mdField 在 compressSummary 的空白折叠之后才去除反引号,因此带反引号的标签渲染成带引号的代码片段时会出现双空格——而每个 CLI 构建的 role agent 身份行都在角色名两侧带反引号("You are review agent <role> — …" 行,agent-prompt.ts:1395/:642)。— 失败场景(已通过真实 composeReview 探针复现):一个 idle 的 role agent 渲染后角色名两侧出现双空格(GitHub 在代码片段内保留空白),本 diff 重写的两处展示面都会出现(chunk agent 走 chunk N 分支幸免,role agent 不会)。这正是本 PR 要“把 agent 名字渲染干净”的那句话在生産中最常见的情况,且没有测试让带反引号的标签走过这条路径。修复方式:在折叠之前先清理反引号,让既有的折叠吸收替换产生的空格(见上方 suggestion);不要把空白折叠移进 mdField 本身——它的其他调用方渲染 diff 文件路径,那里空格是有意义的。
— qwen3.8-max via Qwen Code /review (v0.21.9)
|
Changed: normalize removed backticks before summary whitespace compression so public agent labels no longer contain doubled spaces. Verified: 185 focused tests, ESLint, and Prettier passed. CLI package typecheck was blocked by unrelated unbuilt workspace artifacts. Intentionally not changed: additional abstraction, documentation, and mutation-only coverage requests. Pending: exact-head CI and automatic review. 中文摘要已修复公开 agent label 去反引号后的双空格;聚焦测试与 lint 通过,等待 CI。 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Not explored to full depth (tool budget reached): You are review agent reverse-audit — Reverse audit agen...: I could not trace which attribution path feeds the quoted label in the prose-label test — label() 's first line is 58 chars (≤60, so compressSummary would no….
Test Plan (not a blocker): 261 tests pass — this review observed 18872 passed.
中文说明
未探索到全部深度(达到工具调用预算):You are review agent reverse-audit — Reverse audit agen...:I could not trace which attribution path feeds the quoted label in the prose-label test — label() 's first line is 58 chars (≤60, so compressSummary would no…。
Test Plan(非阻断):261 tests pass — this review observed 18872 passed。
— qwen3.8-max via Qwen Code /review (v0.21.9)
|
Refreshed this branch onto latest |
|
Resolved the current review round on |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
Not explored to full depth (tool budget reached): You are review agent verify — Verification agent.: claim holds. Reverting the list back to bare it.agent still leaves all 211 tests passing (probe); a whole-diff agent that passed the credit guard can reach bu….
Not reviewed: reverse audit — stopped before round 5 by the review time budget.
中文说明
已审查。 建议见行内评论。
未探索到全部深度(达到工具调用预算):You are review agent verify — Verification agent.:claim holds. Reverting the list back to bare it.agent still leaves all 211 tests passing (probe); a whole-diff agent that passed the credit guard can reach bu…。
未审查:反向审计——评审时间预算不足,未能开始第 5 轮。
— qwen3.8-max via Qwen Code /review (v0.21.9)
| it('discloses coverage gaps before the diff-only warning', () => { | ||
| const r = composeReview( | ||
| base({ contextUnavailable: true, unreviewedDimensions: ['security'] }), | ||
| ); | ||
| expect(r.body.indexOf('Partially reviewed')).toBeLessThan( |
There was a problem hiding this comment.
[Suggestion] The order-only assertion passes vacuously when the partial opener is absent — indexOf returns -1, which is less than any present index. Mutation-proven at this commit: deleting either coverageOpener push (the context-unavailable COMMENT branch at ~line 1597, or the REQUEST_CHANGES parts prepend at ~line 1527) keeps all 211 tests green. The same shape exists in the RC variant below (lines 1191-1201). — Failure scenario: a future edit drops if (coverageOpener) clauses.push(coverageOpener); → posted bodies open Reviewed diff-only — … directly above Not reviewed: security — the exact #8811 self-contradiction this PR fixes — yet both guard tests stay green (-1 < indexOf('Reviewed diff-only')). The code is correct today; only the guard is ineffective. Fix — add a presence assertion before each ordering check:
expect(r.body).toContain('Partially reviewed — gaps disclosed.');中文说明
[Suggestion] 仅断言顺序的断言在 partial opener 缺失时会空通过——indexOf 返回 -1,比任何存在的下标都小。已在被审提交上用变异验证:删除任意一处 coverageOpener 推送(约 1597 行的 context-unavailable COMMENT 分支,或约 1527 行的 REQUEST_CHANGES parts 前置)后,全部 211 个测试仍然全绿。同样的形态也存在于下方 1191-1201 行的 RC 变体测试中。— 失败场景:未来某次修改删掉 if (coverageOpener) clauses.push(coverageOpener); → 发布正文将以 Reviewed diff-only — … 开头、直接位于 Not reviewed: security 之上——正是本 PR 要修复的 #8811 自相矛盾——而两个守卫测试仍为绿色(-1 < indexOf('Reviewed diff-only'))。代码目前是正确的,只是守卫无效。修复——在每个顺序断言前加一条存在性断言(见上方英文代码)。
— qwen3.8-max via Qwen Code /review (v0.21.9)
| ...[...named].map(([subject, { count }]) => | ||
| count > 1 ? `${subject} (×${count})` : subject, | ||
| ), |
There was a problem hiding this comment.
[Suggestion] The new (×N) counting collapses only entries that survive the pre-existing seenSubjects dedup (~line 1352, keyed on the INTERNAL subject) — byte-identical duplicate labels merge into a single uncounted entry, and the new counting idiom makes "no ×N" read as "exactly one". Probe-proven at this commit: two byte-identical idle twins render as one uncounted Not reviewed: "…" line, while check-coverage's stderr prints both. — Failure scenario: a whole-diff agent fails idle; the body's own prescribed remediation ("relaunch each with the same printed prompt") produces a byte-identical record that also fails idle (keySatisfied can never converge on zero-tool-call records). TWO agents read nothing, but the posted body discloses one uncounted name — the operator register and the author register disagree about the count. The dedup predates this PR; what is new is that (×N) establishes an explicit counting register for one collision class while identical internals get no count at all. Fix — count the dropped twins instead of dropping them (move the dedup to after grouping, or feed the seenSubjects-dropped twins into the same-reason group's count).
中文说明
[Suggestion] 新的 (×N) 计数只合并通过了既有 seenSubjects 去重(约 1352 行,以内部 subject 为键)的条目——字节级相同的重复 label 会被合并成一条无计数的条目,而新的计数习惯让"没有 ×N"被读作"恰好一个"。已在被审提交上用探针验证:两个字节级相同的 idle 孪生 agent 只渲染出一条无计数的 Not reviewed: "…",而 check-coverage 的 stderr 两条都打印。— 失败场景:一个 whole-diff agent 以 idle 失败;正文自身给出的补救指引("用相同启动 prompt 重新启动")产生一条字节级相同的记录且同样 idle(keySatisfied 在零工具调用记录上永远无法收敛)。两个 agent 什么都没读,发布正文却只披露一个无计数的名字——操作者记录与作者记录在数量上不一致。去重本身早于本 PR;新之处在于 (×N) 为其中一类碰撞建立了显式计数语义,而完全相同的内部 label 却没有任何计数。修复——把被丢弃的孪生条目计入数量而不是丢弃(把去重移到分组之后,或把被 seenSubjects 丢弃的孪生条目计入同原因分组的计数)。
— qwen3.8-max via Qwen Code /review (v0.21.9)
| const parts = [ | ||
| ...(coverageOpener ? [coverageOpener] : []), | ||
| ...(contextUnavailable ? [contextUnavailableClause] : []), |
There was a problem hiding this comment.
[Suggestion] The REQUEST_CHANGES parts list reproduces the coverage subject) plus a failed PR-discussion fetch posts ⚠️ This run could not certify that any of this diff was reviewed. immediately followed by Reviewed diff-only — the PR's existing discussion could not be fetched… — a sentence beginning with "Reviewed" directly under the sentence certifying nothing was reviewed; in one probe scenario it sat between the Not reviewed: coverage — …. This diff introduces the pairing — pre-PR the RC path had no coverage opener. — Failure scenario: the exact #8811 self-contradiction shape this PR removes elsewhere, reached on the RC path (wording only — disclosures stay complete). Fix — reword the shared contextUnavailableClause (~line 1437) so one edit covers both this RC parts list and the COMMENT clause builder, e.g. drop the certifying prefix:
en: 'Diff-only — the PR’s existing discussion could not be fetched, so this is not an approval and not a no-blockers claim.',中文说明
[Suggestion] REQUEST_CHANGES 的 parts 列表在第二个位置重现了 coverage subject)且 PR 讨论抓取失败的 REQUEST_CHANGES 运行,发布正文先出现 ⚠️ This run could not certify that any of this diff was reviewed.,紧随其后是 Reviewed diff-only — the PR's existing discussion could not be fetched…——一句以 "Reviewed" 开头的话直接位于"无法证明任何部分经过审查"的句子之下;其中一个探针场景中它夹在 Not reviewed: coverage — … 之间。这个组合由本 diff 引入——PR 之前 RC 路径没有 coverage opener。— 失败场景:本 PR 在别处消除的 #8811 自相矛盾形态在 RC 路径上再次出现(仅措辞问题——披露信息仍完整)。修复——改写共享的 contextUnavailableClause(约 1437 行),一处修改同时覆盖 RC parts 列表与 COMMENT 子句构造器,例如去掉认证式前缀(见上方英文代码)。
— qwen3.8-max via Qwen Code /review (v0.21.9)
|
@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: 586 passed · 0 failed · 586 total 中文 — 判定:✅ 通过 · 可合入(agent 判定)沙箱验证在隔离、无凭证的容器中执行了该 PR 的代码(与 base 构建 A/B 对照、无 mock harness 断言、定向门禁)。仅作为评审证据,不构成评审、批准或 CI 检查。 脚本断言:586 通过 · 0 失败 · 586 总计 Verification reportVerification report — PR 8857Verdict: 中文摘要
Central claim and A/B proofCentral claim: a review body that carries coverage-gap disclosures opens with the non-directional Secondary claims: (S1) agent-derived disclosure subjects render quoted, word-boundary-truncated, inert-Markdown, with Method: one self-contained vitest harness (
Flip count: 5/5 flip scenarios change base→head exactly as the PR claims; 4/4 control cells byte-identical. Witnesses: Reviewer Test Plan walk
Vacuity and mutation matrixVacuity: the HEAD test file executed against base code fails 11/211 — exactly the tests this PR added or updated (partial opener ×4 contexts, quoted label, word-boundary, Mutation matrix at head (
No surviving mutations; every guard the PR introduces is load-bearing. (Two early malformed variants of M1/M2 were discarded after inspection — the matrix above uses the corrected single-point mutations.) Corrections
Findings (non-blocking)
Not covered
MethodologyEnvironment: CI verify container ( Evidence imagesHarness scripts and raw logs are in the workflow run artifacts (7-day retention). — Qwen Code · sandboxed verification |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
doudouOUC
left a comment
There was a problem hiding this comment.
Reviewed current head 664d10c. One user-visible wording defect still prevents approval: the REQUEST_CHANGES path can emit the zero-certified warning immediately followed by “Reviewed diff-only” when PR discussion fetch also fails, recreating the exact opener/body contradiction this PR is meant to remove. I independently confirmed the current inline report: #8857 (comment). The focused exact-head suites otherwise pass (290 tests), and I found no additional blocking defect in the changed call paths.
|
Released in v0.21.11. |



What this PR does
Review-body wording fixes for runs that cannot certify the whole diff. Coverage gaps use the non-directional opener "Partially reviewed — gaps disclosed."; surviving unverified findings use an explicit incomplete-review opener. Agent-derived disclosure subjects are quoted on both the "Not reviewed" and tool-budget surfaces because they are names, not sentences, and their truncation now reuses the existing word-boundary summary helper. The Chinese unopened-agent reason remains natural.
Why it's needed
On #8811 the posted body opened
Reviewed. Not reviewed: This PR narrows the daemon-marker check from a truthy tes... — pointed at diff lines it never opened: it made tool calls, but none of them read the diff.— and a reader could not tell whether the PR had been reviewed at all. The opener was accurate (part of the diff was certified; the disclosure named what was not) and the disclosure was accurate (one agent never opened the diff), but the pair read as a self-contradiction, and the subject — a prompt fragment cut mid-word — looked like a claim about the whole PR rather than the name of the one agent that failed. A first cut announced the gaps ("Reviewed, with gaps disclosed below.") and still confused readers: any opener starting with "Reviewed" reads against the "Not reviewed:" clauses below it. This is a presentation defect, not a verdict defect: every cap and certification check worked exactly as designed, and none of them is touched here.Reviewer Test Plan
How to verify
cd packages/cli && npx vitest run src/commands/review/compose-review.test.ts src/commands/review/check-coverage.test.tsand confirm all 261 tests pass, including the new regressions pinning the partial opener (English and Chinese halves), the quoted word-boundary-truncated agent label, and the natural-Chinese reason.Reviewed — no blockers.(certifying),Reviewed.(caps without gap disclosures) and the zero-certifiedEvidence (Before & After)
Before (posted body on #8811):
Reviewed. Not reviewed: This PR narrows the daemon-marker check from a truthy tes... — pointed at diff lines it never opened: it made tool calls, but none of them read the diff.After (same verdict inputs):
Partially reviewed — gaps disclosed. Not reviewed: "This PR narrows the daemon-marker check from a truthy test…" — pointed at diff lines it never opened: it made tool calls, but none of them read the diff.— and the Chinese fold carries仅完成部分审查,审查缺口已披露。in place of已审查。, with the reason now reading启动 prompt 为它指定了 diff 中的行,但它从未打开:有工具调用,却没有一次读取 diff.Tested on
Environment (optional)
Node.js 22; focused compose-review unit tests. The full exact-head repository build was not rerun.
Risk & Scope
/reviewrun against a live PR; the pre-existingstale-bundletest failure onmain(verified against the clean base) is unrelated and left as is.Reviewed.over a body that carries disclosures sees the new sentence; inside this repo the only such consumers are the tests, updated here.Linked Issues
Follow-up to the reader confusion on #8811.
中文说明
这个 PR 做了什么
修正
/review在无法证明整个 diff 都被审查时发布的正文措辞。覆盖缺口使用无方向性的开头 "Partially reviewed — gaps disclosed.";仍未验证的 finding 使用明确的“审查未完成”开头。agent 推导出的披露主语在 "Not reviewed" 和工具预算两条展示路径上都会加引号,因为它们是名称而不是句子;截断复用现有的词边界摘要 helper。未打开 diff 的 agent 中文原因保持自然表达。为什么需要
在 #8811 上,发布的正文以
Reviewed. Not reviewed: This PR narrows the daemon-marker check from a truthy tes... — pointed at diff lines it never opened: it made tool calls, but none of them read the diff.开头——读者无法判断这个 PR 到底有没有被审查。开头本身是准确的(diff 的一部分已被认证,披露指出了未覆盖的部分),披露也是准确的(有一个 agent 从未打开 diff),但两者并排读起来像自相矛盾;而那个主语——一段在单词中间被截断的 prompt 片段——看起来像是对整个 PR 的论断,而不是某一个失败 agent 的名字。第一版修复尝试宣告缺口的存在("Reviewed, with gaps disclosed below."),读者仍然困惑:任何以 "Reviewed" 开头的 opener 和下方的 "Not reviewed:" 并排都会形成对撞。这是呈现缺陷,不是结论缺陷:所有上限(cap)和认证检查都按设计工作,本 PR 也不改动它们。Reviewer Test Plan
如何验证
cd packages/cli && npx vitest run src/commands/review/compose-review.test.ts src/commands/review/check-coverage.test.ts,确认全部 261 个测试通过,包括钉住 partial 开头(中英文两半)、加引号且按词边界截断的 agent 标签、自然中文原因的新回归测试。Reviewed — no blockers.(认证)、Reviewed.(有 cap 但无缺口披露)和零认证前后对比证据
修复前(#8811 上发布的正文):
Reviewed. Not reviewed: This PR narrows the daemon-marker check from a truthy tes... — pointed at diff lines it never opened: it made tool calls, but none of them read the diff.修复后(同样的结论输入):
Partially reviewed — gaps disclosed. Not reviewed: "This PR narrows the daemon-marker check from a truthy test…" — pointed at diff lines it never opened: it made tool calls, but none of them read the diff.——中文折叠区相应位置由已审查。变为仅完成部分审查,审查缺口已披露。,原因措辞变为启动 prompt 为它指定了 diff 中的行,但它从未打开:有工具调用,却没有一次读取 diff。测试环境
环境(可选)
Node.js 22;已运行 compose-review 聚焦单测,未重跑 exact-head 全仓 build。
风险与范围
/review;main上预存的stale-bundle测试失败(已在干净基线上确认)与本 PR 无关,保持原样。Reviewed.开头"做字面匹配的地方会看到新句子;本仓库内这类消费者只有测试,已同步更新。关联 Issue
跟进 #8811 上出现的读者困惑。