feat. Review foot note, docker fix, pass message to reviewer , update tests
This commit is contained in:
@@ -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._")
|
||||
|
||||
Reference in New Issue
Block a user