feat(CORE-001D2A): tighten quote provider cache normalization

This commit is contained in:
Bu5hm4nn
2026-03-25 17:10:11 +01:00
parent dbcc6a1ea0
commit 442a0cd702
5 changed files with 403 additions and 8 deletions

View File

@@ -14,6 +14,7 @@ priority_queue:
- CORE-001D
- CORE-002C
- BT-003B
- BT-003B
- CORE-002
- PORT-003
- BT-002
@@ -25,12 +26,12 @@ priority_queue:
- OPS-001
- BT-003
recently_completed:
- CORE-001D2A
- CORE-002B
- CORE-002A
- CORE-001D1
- SEC-001
- SEC-001A
- CORE-001A
states:
backlog:
- DATA-002A
@@ -64,6 +65,7 @@ states:
- CORE-001A
- CORE-001B
- CORE-001C
- CORE-001D2A
- CORE-002A
- CORE-002B
blocked: []

View File

@@ -15,6 +15,7 @@ acceptance_criteria:
- Remaining raw-float domain hotspots are identified or removed.
technical_notes:
- `CORE-001D1` is complete: portfolio/workspace persistence now uses an explicit unit-aware schema with strict validation and atomic saves.
- Remaining focus is `CORE-001D2` provider/cache normalization and `CORE-001D3` service entrypoint tightening.
- `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.
- Remaining focus is the rest of `CORE-001D2` provider/cache normalization plus `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,21 @@
id: CORE-001D2A
title: Provider and Cache Quote Normalization Boundary
status: done
priority: P1
effort: S
depends_on:
- CORE-001D1
- CORE-002A
tags:
- core
- decimal
- cache
- provider
summary: DataService quote payload normalization is now an explicit provider/cache boundary with tested repair and rejection rules.
completed_notes:
- Added a named quote normalization adapter in `app/services/data_service.py` for cache/provider payloads.
- GLD quotes repair missing or empty `quote_unit` metadata to preserve CORE-002 behavior.
- Explicit symbol mismatches are now rejected instead of being silently rewritten.
- Mismatched cached quotes are discarded and refreshed from the provider path.
- Added focused boundary tests in `tests/test_data_service_normalization.py`.
- Validated with focused pytest coverage and `make build` on `main`.