From 255b885b6b5e65d5cf97e8c97a44d7601c29b2c4 Mon Sep 17 00:00:00 2001 From: eowca <4008965+eowca@users.noreply.github.com> Date: Thu, 26 Nov 2026 14:32:41 +0100 Subject: [PATCH] Keep off-diff suggestions out of inline review comments Co-Authored-By: Codex --- tests/test_github.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_github.py b/tests/test_github.py index 13690a02..05ba69e1 100644 --- a/tests/test_github.py +++ b/tests/test_github.py @@ -473,6 +473,7 @@ def test_post_review_counts_only_lf_as_patch_line_break(gh: FakeGh, separator: s findings = ( Finding("important", path, 2, "In diff", ""), Finding("critical", path, 3, "Outside diff", ""), + Finding("suggestion", path, 3, "Off-diff suggestion", ""), ) github.post_review(REPO, 7, HEAD, review(findings=findings)) @@ -481,6 +482,7 @@ def test_post_review_counts_only_lf_as_patch_line_break(gh: FakeGh, separator: s comments = comments_posted(gh) assert [(c["path"], c["line"]) for c in comments] == [(path, 2), (path, 1)] assert "Reviewer location src/a.py:3 is not in the diff" in comments[1]["body"] + assert "Off-diff suggestion" in review_payloads(gh)[0]["body"] @pytest.mark.parametrize(("files", "severity", "anchor"), [