Reject files over 1 MB during PR review (#882)

This commit is contained in:
Glenn Jocher
2026-08-20 01:10:13 +01:00
committed by GitHub
parent 86f1a6806c
commit 97a4d205d9
3 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -28,4 +28,4 @@
# ├── test_summarize_pr.py
# └── ...
__version__ = "0.3.12"
__version__ = "0.3.13"
+1
View File
@@ -594,6 +594,7 @@ def generate_pr_review(
"- Security vulnerabilities, data loss, corruption, or irreversible behavior\n"
"- Bugs, broken contracts, race conditions, and compatibility regressions with a concrete failure path\n"
"- Performance regressions with a plausible workload and measurable impact\n"
"- Never approve any added file larger than 1 MB, regardless of type\n"
"- Maintainability only when the change creates demonstrated duplication, conflicting owners, or unreachable behavior\n\n"
"WHEN NOT TO COMMENT:\n"
"- Style/formatting (handled by ruff/prettier)\n"
+1
View File
@@ -183,6 +183,7 @@ def test_generate_pr_review_uses_synchronous_response(mock_get_agent_response, m
"Do not flag package or version availability based on web search"
in mock_get_agent_response.call_args.args[0][0]["content"]
)
assert "Never approve any added file larger than 1 MB" in mock_get_agent_response.call_args.args[0][0]["content"]
def test_review_agent_search_scans_local_checkout_only(tmp_path, monkeypatch):