Skip to content

Bug Report - Epic News Project

This file documents bugs found during test quality assurance that require source code fixes.

Bug #1: Menu Designer Pydantic Validation Error

Date Found: 2025-01-27 Severity: High Component: Menu Designer Crew / WeeklyMenuPlan Model

Description: The menu designer functionality fails with multiple Pydantic validation errors when trying to generate a weekly menu plan. The AI agent output doesn't match the expected WeeklyMenuPlan model structure.

Error Details:

13 validation errors for WeeklyMenuPlan
daily_menus.0.lunch.dessert.dish_type
  Input should be 'entrée', 'plat principal' or 'dessert' [type=enum, input_value='', input_type=str]
daily_menus.0.lunch.dessert.seasonal_ingredients
  Input should be a valid array [type=list_type, input_value=None, input_type=NoneType]
daily_menus.0.lunch.dessert.nutritional_highlights
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
daily_menus.0.dinner
  Field required [type=missing, input_value={'day': 'Lundi', 'date': ...nal_highlights': None}}}, input_type=dict]
daily_menus.1
  Input should be an object [type=model_type, input_value="dinner...and so on for e...esult. Let's do it.  { ", input_type=str]
daily_menus.2
  Input should be an object [type=model_type, input_value='nutritional_balance', input_type=str]
daily_menus.3
  Input should be an object [type=model_type, input_value='gustative_coherence', input_type=str]
daily_menus.4
  Input should be an object [type=model_type, input_value='constraints_adaptation', input_type=str]
daily_menus.5
  Input should be an object [type=model_type, input_value='preferences_integration', input_type=str]
nutritional_balance
  Field required [type=missing, input_value={'week_start_date': '2025...eferences_integration']}, input_type=dict]
gustative_coherence
  Field required [type=missing, input_value={'week_start_date': '2025...eferences_integration']}, input_type=dict]
constraints_adaptation
  Field required [type=missing, input_value={'week_start_date': '2025...eferences_integration']}, input_type=dict]
preferences_integration
  Field required [type=missing, input_value={'week_start_date': '2025...eferences_integration']}, input_type=dict]

Root Cause: The AI agent is not generating output that conforms to the WeeklyMenuPlan Pydantic model structure. Issues include:

  1. Missing required fields (dinner, nutritional_balance, etc.)
  2. Invalid enum values for dish_type
  3. None values where arrays/strings are expected
  4. Malformed JSON structure in daily_menus array

Impact:

  • Menu designer functionality is completely broken
  • Users cannot generate weekly menu plans
  • CrewAI flow fails with ConverterError

Recommended Fix:

  1. Review and update the WeeklyMenuPlan Pydantic model to be more flexible
  2. Improve agent prompts to ensure proper JSON structure output
  3. Add validation and error handling in the menu designer crew
  4. Consider using more lenient Pydantic field definitions with defaults

Status: Open - Requires source code fix Test Action: Any tests for menu designer functionality should be disabled until this is resolved.


Summary

  • Total Bugs: 1
  • High Severity: 1
  • Medium Severity: 0
  • Low Severity: 0