diff options
| author | Oscar Wan <oscarwan@stanford.edu> | 2026-07-24 20:45:42 -0700 |
|---|---|---|
| committer | Oscar Wan <oscarwan@stanford.edu> | 2026-07-24 20:45:42 -0700 |
| commit | 15efc30e9e7179accd30375d3edb2e34a3b4dc5f (patch) | |
| tree | ba1c49eb128e7906ba451141723d763e1dcda53a /tests/test_models.py | |
| parent | 708f2af9c6985e9cb5cd53e434a7d3b8dfa2b4ac (diff) | |
updated generation process
Diffstat (limited to 'tests/test_models.py')
| -rw-r--r-- | tests/test_models.py | 20 |
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) |
