docs: split CORE-002 into rollout slices

This commit is contained in:
Bu5hm4nn
2026-03-25 15:02:44 +01:00
parent f0d7ab5748
commit f00b58bba0
4 changed files with 56 additions and 4 deletions

View File

@@ -9,15 +9,19 @@ depends_on:
- CORE-001C
tags: [core, units, pricing, domain]
summary: >
Model quoted instruments with explicit asset/share units and conversion multipliers
so prices like GLD are never misinterpreted as physical-gold ounce prices.
Complete the instrument-aware quote-unit rollout so quoted instruments like GLD are
handled explicitly as USD/share and only converted to ounce-equivalent values through
named metadata-backed seams.
acceptance_criteria:
- GLD quotes are modeled explicitly as prices per share, not as ambiguous gold-ounce prices.
- Instrument metadata encodes that 1 GLD share represents 0.1 troy ounces of gold exposure.
- Storage/domain value classes know the unit relationship and convert correctly when calculations combine instrument prices with ounce-based quantities.
- Cross-unit operations fail closed when no explicit instrument conversion path exists.
- Visible ounce-based pages beyond overview use the explicit conversion seam instead of heuristic fallbacks.
- Tests cover GLD share <-> troy-ounce conversion and reject unsupported mixed-unit operations.
technical_notes:
- `CORE-002A` is complete: overview now uses explicit GLD share -> USD/ozt conversion with quote-unit metadata and cache normalization.
- Next suggested slice is `CORE-002B`: apply the same explicit quote-unit model to the next visible ounce-based path, especially hedge/runtime portfolio displays that still assume ounce-native spots.
- Prefer explicit instrument/unit types over ad hoc scale factors in page/service code.
- This should integrate with the Decimal/unit-safe domain model rather than bypass it with raw floats.
- Consider extending historical/unit types so both live overview paths and backtesting/event paths can share the same conversion rules.

View File

@@ -0,0 +1,23 @@
id: CORE-002B
title: Hedge and Strategy Runtime Quote Unit Rollout
status: backlog
priority: P0
effort: M
depends_on:
- CORE-002A
- CORE-001B
tags:
- core
- units
- hedge
- pricing
summary: Apply explicit instrument-aware quote-unit conversions to the next visible ounce-based hedge/runtime paths so they no longer assume ounce-native spot prices.
acceptance_criteria:
- Hedge/runtime displays that consume live or configured GLD spots use explicit share->ozt conversions where needed.
- Visible strategy/hedge labels distinguish converted collateral spot from raw share quotes when relevant.
- Unsupported or missing quote-unit metadata fails closed rather than silently applying raw share prices as ounce prices.
- Tests cover the changed hedge/runtime math and browser-visible route behavior.
technical_notes:
- Likely file targets include `app/pages/hedge.py`, `app/pages/common.py`, and any service/helpers feeding hedge summary/runtime spot values.
- Reuse the new instrument metadata seam rather than introducing new ad hoc scale factors.
- Keep backtesting/event share-based paths compatible while tightening visible ounce-based paths.