OG T
c0ad8f8686
fix(api): 方案 C - Incident 解析相容舊格式 Enum
問題: Redis 存有舊 Enum 值 (status='open', severity='critical')
導致 Pydantic 驗證失敗
解法:
- normalize_status(): 'open' → 'investigating'
- normalize_severity(): 'critical' → 'P0' 等
- 應用於 get_from_working_memory, get_active_incidents, _record_to_incident
優點:
- 零資料風險 (不動 Redis)
- 回滾 = git revert (秒級)
- 新舊格式都能讀
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 14:14:58 +08:00
..
2026-03-25 09:26:58 +08:00
2026-03-23 23:51:37 +08:00
2026-03-23 23:51:37 +08:00
2026-03-24 09:20:56 +08:00
2026-03-24 09:20:56 +08:00
2026-03-23 23:51:37 +08:00
2026-03-24 09:50:03 +08:00
2026-03-22 18:57:44 +08:00
2026-03-25 09:26:58 +08:00
2026-03-24 12:57:36 +08:00
2026-03-24 12:57:36 +08:00
2026-03-23 23:51:37 +08:00
2026-03-23 23:51:37 +08:00
2026-03-25 14:14:58 +08:00
2026-03-23 23:51:37 +08:00
2026-03-25 09:26:58 +08:00
2026-03-24 10:48:15 +08:00
2026-03-23 18:40:36 +08:00
2026-03-23 23:51:37 +08:00
2026-03-24 09:20:56 +08:00
2026-03-24 09:20:56 +08:00
2026-03-22 18:57:44 +08:00