feat(CORE-001D3A): normalize alerts and settings service boundaries

This commit is contained in:
Bu5hm4nn
2026-03-26 13:10:30 +01:00
parent 91f67cd414
commit bb557009c7
7 changed files with 231 additions and 27 deletions

View File

@@ -25,13 +25,13 @@ priority_queue:
- OPS-001
- BT-003
recently_completed:
- CORE-001D3A
- UX-001
- CORE-002
- CORE-002C
- CORE-001D2B
- CORE-001D2A
- CORE-002B
- CORE-002A
states:
backlog:
- DATA-002A
@@ -65,6 +65,7 @@ states:
- CORE-001C
- CORE-001D2A
- CORE-001D2B
- CORE-001D3A
- CORE-002
- CORE-002A
- CORE-002B

View File

@@ -17,6 +17,7 @@ technical_notes:
- `CORE-001D1` is complete: portfolio/workspace persistence now uses an explicit unit-aware schema with strict validation and atomic saves.
- `CORE-001D2A` is complete: DataService quote/provider cache normalization is now a named boundary adapter with explicit symbol mismatch rejection and GLD quote-unit repair.
- `CORE-001D2B` is complete: option expirations and options-chain payloads now use explicit normalization boundaries with malformed cached payload discard/retry behavior.
- Remaining focus is the rest of `CORE-001D2` provider/cache normalization plus `CORE-001D3` service entrypoint tightening.
- `CORE-001D3A` is complete: alert evaluation and settings save-status entrypoints now normalize float-heavy boundary values through explicit named adapters.
- Remaining focus is the rest of `CORE-001D2` provider/cache normalization plus follow-on `CORE-001D3` service entrypoint tightening.
- Pre-launch policy: unit-aware schema changes may be breaking until persistence is considered live; old flat payloads may fail loudly instead of being migrated.
- See `docs/CORE-001D_BOUNDARY_CLEANUP_PLAN.md` for the current hotspot inventory and proposed sub-slices.

View File

@@ -0,0 +1,20 @@
id: CORE-001D3A
title: Alerts and Settings Entrypoint Normalization
status: done
priority: P2
effort: S
depends_on:
- CORE-001B
- CORE-001D2B
tags:
- core
- decimal
- alerts
- settings
summary: Alert evaluation and settings save-status formatting now normalize float-heavy inputs through explicit named adapters.
completed_notes:
- Added explicit normalization adapters in `app/services/alerts.py` and `app/services/settings_status.py`.
- Alert evaluation now compares thresholds through normalized Decimal-backed boundary values instead of ad-hoc `float(...)` extraction.
- Settings save-status formatting now snapshots numeric boundary values through a named adapter before rendering.
- Added focused regression tests for numeric-string coercion and bool fail-closed behavior in `tests/test_alerts.py` and `tests/test_settings.py`.
- Validated with focused pytest coverage, browser-visible Playwright coverage, and `make build` on local Docker.