summaryrefslogtreecommitdiff
path: root/tests/test_models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_models.py')
-rw-r--r--tests/test_models.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_models.py b/tests/test_models.py
index d19b536..b329ecd 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -111,6 +111,26 @@ def test_judge_verdict_requires_every_dag_node(plan_dict: dict) -> None:
).validate_coverage(dag)
+def test_judge_verdict_normalizes_structured_text_fields(plan_dict: dict) -> None:
+ dag = ProofPlanDAG.from_plan(KernelPlan.model_validate(plan_dict))
+ verdict = JudgeVerdict.model_validate(
+ {
+ "verdict": "accept",
+ "step_by_step_check": {
+ "n1": "correctly instantiated",
+ "n2": "correctly instantiated",
+ },
+ "blocking_issues": None,
+ "patch_suggestion": None,
+ }
+ )
+
+ assert '"n1"' in verdict.step_by_step_check
+ assert verdict.blocking_issues == ""
+ assert verdict.patch_suggestion == ""
+ assert verdict.validate_coverage(dag) is verdict
+
+
def test_dag_labels_must_match_prompt_a_plan(plan_dict: dict) -> None:
plan = KernelPlan.model_validate(plan_dict)
dag = ProofPlanDAG.from_plan(plan)