feat. Enforce repo review config

This commit is contained in:
Space-Banane
2026-05-22 22:37:53 +02:00
parent 71b4341cd4
commit 91401adbed
15 changed files with 254 additions and 28 deletions

View File

@@ -55,3 +55,28 @@ def test_format_result_comment_appends_usage_note_for_fallback_layout() -> None:
},
)
assert body.endswith("_Note: model `gpt-5.3-codex`, total `88` tokens used._")
def test_format_result_comment_appends_missing_config_note_for_system_layout() -> None:
body = format_result_comment(
"ff0011",
{
"verdict": "correct",
"confidence": 0.8,
"summary": "No issues.",
"findings": [],
},
repo_configured=False,
)
assert body.endswith(".codex-review.yml is not configured")
def test_format_result_comment_does_not_append_missing_config_note_to_agent_markdown() -> None:
body = format_result_comment(
"ff0011",
{
"markdown_comment": "## Codex Review\n\nLooks fine.",
},
repo_configured=False,
)
assert ".codex-review.yml is not configured" not in body