Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c50f173
refactor(review): build the incremental scope from the PR's diff, not…
wenshao Aug 16, 2026
a4339fe
docs(review): retire the oracle's refusal reasons from the skill
wenshao Aug 16, 2026
0806cbc
fix(review): keep narrowed rounds displayed-only across rename, mode,…
qwen-code-dev-bot Aug 16, 2026
bba8deb
fix(review): close the rename-key divergence in incremental narrowing
qwen-code-dev-bot Aug 16, 2026
1a55008
Merge branch 'main' into feat/review-scope-from-pr-diff
qwen-code-dev-bot Aug 17, 2026
1e592dc
fix(review): keep header-level changes in the narrowed incremental scope
qwen-code-dev-bot Aug 17, 2026
59207d8
Merge branch 'main' into feat/review-scope-from-pr-diff
qwen-code-dev-bot Aug 17, 2026
356aecf
test(review): close the narrowing battery's mutation holes (#9267)
qwen-code-dev-bot Aug 17, 2026
ceccd55
Merge branch 'main' into feat/review-scope-from-pr-diff
qwen-code-dev-bot Aug 17, 2026
62572c8
Merge remote-tracking branch 'origin/main' into feat/review-scope-fro…
qwen-code-dev-bot Aug 18, 2026
2dde9e6
Merge branch 'main' into feat/review-scope-from-pr-diff
wenshao Aug 18, 2026
cef5952
fix(review): carry position-divergent hunks through the narrowing joi…
qwen-code-dev-bot Aug 18, 2026
b66bded
fix(review): fail closed when a delta hunk lacks a corroborating full…
qwen-code-dev-bot Aug 18, 2026
8c5d94b
fix(review): key changed-line corroboration by new-side junction (#9267)
qwen-code-dev-bot Aug 18, 2026
c25efbe
fix(review): narrow between files, not within them
wenshao Aug 19, 2026
8ae07e3
fix(review): split a base-free round by why the base is missing
wenshao Aug 19, 2026
45bf8fc
fix(review): split merge-base surface failures from deterministic ref…
qwen-code-dev-bot Aug 20, 2026
9d53584
Merge branch 'main' into feat/review-scope-from-pr-diff
wenshao Aug 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/src/commands/review/agent-prompt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2454,7 +2454,7 @@ describe('buildRoleBrief — every agent, not just the territory ones', () => {
incremental: {
since: 'a'.repeat(40),
effective: false,
reason: 'hunks-outside-pr-diff',
reason: 'nothing-to-narrow',
diffBase: 'de17aba5e',
},
},
Expand Down
12 changes: 7 additions & 5 deletions packages/cli/src/commands/review/agent-prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1332,11 +1332,13 @@ export function buildRoleBrief(
`\`${wt}\`. Do not \`cd\` elsewhere and do not build the user's main checkout.`,
);
}
// On a delta-scoped incremental round the probe's range must match the
// round's scope: test-efficacy recomputes its own diff as base..HEAD, and
// handed the merge base it would reverse hunks and delete mutants from
// commits an earlier round already reviewed — spending the probe budget
// out of scope and reporting survivors this round's diff never contains.
// On a narrowed incremental round the probe's range must cover the
// published scope: test-efficacy recomputes its own diff as base..HEAD.
Comment on lines +1544 to +1545

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.

Deferred to the follow-up queue (verified real, fix out of this PR's footprint). The claim is confirmed at this commit by code inspection: fetch-pr.ts's publish arm sets anchor.incremental.diffBase = mergeBaseSha, so the incremental arm in agent-prompt.ts (shaOrNull(inc.diffBase) ?? shaOrNull(report.mergeBaseSha)) always resolves to the merge base, and on every effective incremental round the test-efficacy probe recomputes mergeBase..HEAD — spending mutant/hunk selection over the PR's entire range rather than the round's scope. Both fixes discussed in this thread (feeding test-efficacy the published diff/plan, or welding the probe base to the anchor range with hunk-level filtering against the published plan) require changing test-efficacy.ts's own range recomputation, a file this PR never touches, and they differ sharply in size — so the choice belongs to a follow-up rather than this PR's remaining rounds. The thread stays open and the finding is recorded in the deferred-findings queue so it survives merge.

中文说明

推迟到后续跟进队列(已核实属实,修复超出本 PR 的 footprint)。通过在本提交上读码确认该论断:fetch-pr.ts 的发布分支把 anchor.incremental.diffBase 设为 mergeBaseSha,因此 agent-prompt.ts 的增量分支(shaOrNull(inc.diffBase) ?? shaOrNull(report.mergeBaseSha))总是落到 merge base,每个有效增量轮中 test-efficacy 探针都重算 mergeBase..HEAD——把突变体/hunk 选择预算花在整个 PR 区间上,而不是本轮范围。线程中讨论的两种修复(把已发布的 diff/plan 交给 test-efficacy,或把探针 base 焊到锚点区间并按已发布 plan 做 hunk 级过滤)都需要修改 test-efficacy.ts 自身的区间重算——该文件不在本 PR 改动范围内——且两者规模差异很大,因此取舍应由后续 PR 决定,不属于本 PR 的剩余轮次。线程保持打开,发现已记入 deferred-findings 队列,合并后不会丢失。

// The published hunks are hunks of `diffBase..head` — the merge-base
// range the producer assembled them from — so that range covers every
// one of them and never a byte the PR's diff does not display; the
Comment on lines +1546 to +1548

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.

Deferred to the next round. The soundness half of this finding is already documented in code (the comment at the weld site states the superset argument), and the budget cost is real — but the two available fixes differ sharply in size. Restoring the trade-off warning is a comment; constraining the probe to the published scope needs a new seam (per-file scope ranges from the fetch report into test-efficacy's mutant/hunk selection) with its own tests. This round's batch budget went to the Critical (R4-1) and the battery-power scenarios first; the probe-scope fix is queued for the next round, where the seam can be tested on its own. Until then the spend is not silent: mutants.skippedForCap / hunks.skippedForCap disclose it in every efficacy report.

中文说明

推迟至下一轮。本发现中「可靠性」的一半已在代码中记录在案(焊接处的注释已陈述超集论证),预算代价也确实存在——但两种可行修复的体量相差悬殊。把权衡警告写回原处只是一条注释;而把探针约束到发布范围需要一条新的数据接缝(从 fetch 报告把逐文件范围传给 test-efficacy 的 mutant/hunk 选择),并需要配套的测试。本轮的批处理预算优先用于 Critical(R4-1)与各测试组威力场景;探针范围的修复排入下一轮,届时该接缝可以单独获得测试。在此之前,这部分消耗并非无声无息:每一份 efficacy 报告都会通过 mutants.skippedForCap / hunks.skippedForCap 披露它。

// anchor range, by contrast, can carry hunks an undo round netted out
// of the PR's diff, which no comment can anchor on.
const inc = report.incremental as
| { effective?: unknown; upToDate?: unknown; diffBase?: unknown }
| undefined;
Expand Down
130 changes: 0 additions & 130 deletions packages/cli/src/commands/review/fetch-pr.integration.test.ts

This file was deleted.

Loading
Loading