summaryrefslogtreecommitdiff
path: root/plugins/security-guidance/tests
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-12-04 21:58:44 +0000
committerClaude <noreply@anthropic.com>2026-12-04 21:58:44 +0000
commit2c0cac490b2d0f50b1a640c1395768fc7ae285a4 (patch)
treebe6a963509b5cc55914c613879a3b2f68d465bca /plugins/security-guidance/tests
parent9b1b0188cc150f706d18ea1a9413dffeb844716f (diff)
Cut a diff far over the limit in build_refute_promptmhegazy/sg-second-look-diff
Co-authored-by: mhegazy <mhegazy@anthropic.com>
Diffstat (limited to 'plugins/security-guidance/tests')
-rw-r--r--plugins/security-guidance/tests/test_second_look_diff.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/security-guidance/tests/test_second_look_diff.py b/plugins/security-guidance/tests/test_second_look_diff.py
index ff2ccafd..e6eb2f58 100644
--- a/plugins/security-guidance/tests/test_second_look_diff.py
+++ b/plugins/security-guidance/tests/test_second_look_diff.py
@@ -60,3 +60,6 @@ def test_a_cut_file_is_marked_in_both_looks(prompts, tmp_path):
def test_importable_prompt_has_the_whole_diff():
diff = "+padding\n" * 2000 + SINK
assert diff in review_api.build_refute_prompt([{"filePath": "a.py"}], diff)
+ raw = "+padding\n" * review_api.DIFF_TOTAL_BYTES
+ prompt = review_api.build_refute_prompt([{"filePath": "a.py"}], raw)
+ assert len(prompt) < 2 * review_api.DIFF_TOTAL_BYTES and "diff truncated" in prompt