diff --git a/automation/summary.py b/automation/summary.py index e7d8323..f4ba66d 100644 --- a/automation/summary.py +++ b/automation/summary.py @@ -85,7 +85,8 @@ def format_questions_section(questions: list[dict[str, Any]]) -> str: # Split questions by status so OPEN items stay at the top and partial answers # can be rendered with their follow-up context. - open_questions = [q for q in questions if q.get("status") == "OPEN"] + # Default to "OPEN" if status field is missing (for AI-extracted questions) + open_questions = [q for q in questions if q.get("status", "OPEN") == "OPEN"] partial_questions = [q for q in questions if q.get("status") == "PARTIAL"] if open_questions: