Files
bakery-ia/services
Claude f2cb2448b7 fix: Add missing reasoning and consequence fields to PO approval actions
Error: 500 Internal Server Error on /dashboard/action-queue
Pydantic validation error: ActionItem requires 'reasoning' and 'consequence' fields

Root Cause:
-----------
Purchase order approval actions were missing required fields:
- Had: reasoning_data (dict) - not a valid field
- Needed: reasoning (string) and consequence (string)

The Fix:
--------
services/orchestrator/app/services/dashboard_service.py line 380-396

Changed from:
  'reasoning_data': {...}  # Invalid field

To:
  'reasoning': 'Pending approval for {supplier} - {type}'
  'consequence': 'Delayed delivery may impact production schedule'

Now action items have all required fields for Pydantic validation to pass.

Fixes the 500 error on action-queue endpoint.
2025-11-08 07:07:26 +00:00
..
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 11:04:50 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 11:04:50 +01:00