diff --git a/routers/exam/templates.py b/routers/exam/templates.py index 72746e6..66d0fb8 100644 --- a/routers/exam/templates.py +++ b/routers/exam/templates.py @@ -745,6 +745,9 @@ def _map_service_contract_to_rows(template_id: str, contract: Dict[str, Any], "bounds": _frac_box_to_canvas(q.get("bounds"), q.get("page") or 1, pages), "page": q.get("page"), "source": "ai", "confirmed": False, "confidence": _safe_confidence(q.get("confidence")), "derivation": "extract-service", + # analyse contract v2 (migration 78): command verb + stem prose per part + "command_word": (q.get("command_word") or None) if not q.get("is_container") else None, + "preamble": q.get("preamble") or None, }) for q in questions: # FK safety: de-parent a dangling parent_id if q["parent_id"] and q["parent_id"] not in q_ids: