feat. Review foot note, docker fix, pass message to reviewer , update tests
Some checks failed
ci / test (push) Failing after 16s
ci / publish (push) Has been skipped

This commit is contained in:
Space-Banane
2026-05-22 22:16:09 +02:00
parent b32bf9eb82
commit e7c7d82f84
18 changed files with 322 additions and 14 deletions

View File

@@ -28,3 +28,30 @@ def test_format_result_comment_replaces_existing_marker() -> None:
assert body.startswith("<!-- codex-review:head_sha=def5678 -->")
assert "old" not in body.splitlines()[0]
def test_format_result_comment_appends_usage_note_for_markdown_comment() -> None:
body = format_result_comment(
"ff0011",
{
"markdown_comment": "## Codex Review\n\nLooks fine.",
"_meta": {
"model": "gpt-5.3-codex",
"usage": {"input_tokens": 120, "output_tokens": 45, "total_tokens": 165},
},
},
)
assert "_Note: model `gpt-5.3-codex`, input `120`, output `45`, total `165` tokens used._" in body
def test_format_result_comment_appends_usage_note_for_fallback_layout() -> None:
body = format_result_comment(
"ff0011",
{
"verdict": "correct",
"confidence": 0.8,
"summary": "No issues.",
"findings": [],
"_meta": {"model": "gpt-5.3-codex", "usage": {"total_tokens": 88}},
},
)
assert body.endswith("_Note: model `gpt-5.3-codex`, total `88` tokens used._")