From 140db8b788b687153a5f4ab2131b22619a96b136 Mon Sep 17 00:00:00 2001 From: Daniel Jun Suguimoto Date: Fri, 10 Apr 2026 10:11:47 -0300 Subject: [PATCH] fix: honor author decisions in pr review - treat explicit author declines or scope narrowing as review context - exclude already-decided concerns from eligible findings - keep the generated opencode review command in sync --- packages/core/commands/pr/review.md | 14 +++++++++----- packages/opencode/.opencode/commands/pr/review.md | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/packages/core/commands/pr/review.md b/packages/core/commands/pr/review.md index 01fbf7e..2996c42 100644 --- a/packages/core/commands/pr/review.md +++ b/packages/core/commands/pr/review.md @@ -50,17 +50,21 @@ Call `changes_load` with `base: `, `head: `, ``, and `` 2. Use `` whenever local repository files need to be inspected alongside the diff -3. Derive `` from ``: +3. Derive `` from `` and ``: + - Include direct author replies that explicitly decline, defer, or intentionally narrow a suggestion and explain why they do not plan to implement it + - Treat each matching author reply as higher priority than `` for that same concern, unless the current diff introduces a materially different defect with a concrete failure mode + - Do not re-raise the same concern solely because `` still implies a broader scope +4. Derive `` from ``: - Treat resolved threads as settled - Treat threads as settled when they already contain feedback from `` and a later reply makes it clear the concern was intentionally declined, deferred, or answered without a code change request - Treat threads as settled when the author's reply directly answers the concern and the current diff does not add a materially different failure mode -4. Derive `` from `` authored by `` -5. Use diff hunks in `` to map inline comments to the correct lines -6. Derive `` as findings that are: +5. Derive `` from `` authored by `` +6. Use diff hunks in `` to map inline comments to the correct lines +7. Derive `` as findings that are: - new in this diff - from a previously unreviewed changed area - clearly missed material defects with a concrete failure mode - Exclude anything already covered by `` or `` on the same effective diff. + Exclude anything already covered by ``, ``, or `` on the same effective diff. <%= it.config.shared.prApprove === true ? "Derive `` from existing approvals on ``.\n\n" : "" %>Before publishing, derive: ``, ``, ``, and whether each proposed finding is included in ``. diff --git a/packages/opencode/.opencode/commands/pr/review.md b/packages/opencode/.opencode/commands/pr/review.md index 8566573..ac48719 100644 --- a/packages/opencode/.opencode/commands/pr/review.md +++ b/packages/opencode/.opencode/commands/pr/review.md @@ -68,17 +68,21 @@ Call `kompass_changes_load` with `base: `, `head: `, ``, and `` 2. Use `` whenever local repository files need to be inspected alongside the diff -3. Derive `` from ``: +3. Derive `` from `` and ``: + - Include direct author replies that explicitly decline, defer, or intentionally narrow a suggestion and explain why they do not plan to implement it + - Treat each matching author reply as higher priority than `` for that same concern, unless the current diff introduces a materially different defect with a concrete failure mode + - Do not re-raise the same concern solely because `` still implies a broader scope +4. Derive `` from ``: - Treat resolved threads as settled - Treat threads as settled when they already contain feedback from `` and a later reply makes it clear the concern was intentionally declined, deferred, or answered without a code change request - Treat threads as settled when the author's reply directly answers the concern and the current diff does not add a materially different failure mode -4. Derive `` from `` authored by `` -5. Use diff hunks in `` to map inline comments to the correct lines -6. Derive `` as findings that are: +5. Derive `` from `` authored by `` +6. Use diff hunks in `` to map inline comments to the correct lines +7. Derive `` as findings that are: - new in this diff - from a previously unreviewed changed area - clearly missed material defects with a concrete failure mode - Exclude anything already covered by `` or `` on the same effective diff. + Exclude anything already covered by ``, ``, or `` on the same effective diff. Derive `` from existing approvals on ``.