feat(CORE-001D3B): surface alert history degraded state
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
id: CORE-001D3B
|
||||
title: Alert History Degraded State Handling
|
||||
status: done
|
||||
priority: P2
|
||||
effort: S
|
||||
depends_on:
|
||||
- CORE-001D3A
|
||||
tags:
|
||||
- core
|
||||
- alerts
|
||||
- persistence
|
||||
- ux
|
||||
summary: Corrupt or unreadable alert-history storage now surfaces as an explicit degraded state instead of silently appearing as empty history.
|
||||
completed_notes:
|
||||
- Added `AlertHistoryLoadError` in `app/models/alerts.py` so corrupt or unreadable alert-history storage is an explicit failure mode.
|
||||
- `AlertService.evaluate(...)` now logs history load failures and returns `history_unavailable` / `history_notice` metadata instead of silently treating corruption as an empty history list.
|
||||
- `/overview` and `/{workspace_id}/settings` now render a visible degraded-history notice when alert history storage is unavailable.
|
||||
- Added focused regression coverage in `tests/test_alerts.py` for corrupt-history load failures in both persisted and preview paths.
|
||||
- Validated with focused pytest coverage, local Docker, and browser-driven checks on overview and settings with an intentionally corrupted `/app/data/alert_history.json`.
|
||||
Reference in New Issue
Block a user