VIOLET OA: add venue OB provider seam

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Codex
2026-06-16 23:01:17 +02:00
parent 53bdd908f4
commit 12b768bc4f
3 changed files with 357 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
# VIOLET Multi-Exchange OB Seam
Date: 2026-06-16
## Scope
This note describes the new read-only OB provider seam added on the VIOLET side:
- `prod/clean_arch/violet/venue_ob_provider.py`
- `prod/clean_arch/violet/test_violet_venue_ob_provider.py`
The seam exists so VIOLET can later consume a venue-specific OB feed without
changing BLUE or wiring any live exchange connection into the current shadow
path.
## What the seam does
- normalizes venue ticks into BLUE-shaped `OBSnapshot` records
- keeps the provider read-only and in-memory
- validates poison values at ingress with V-TYPES
- supports either an injected callable tick source or a preloaded buffer
- exposes the exact `OBProvider` interface that `OBFeatureEngine` expects
## What it does not do
- no live BingX connection
- no Hazelcast writes
- no BLUE code changes
- no live wiring into `live_blue_source.py` or `shadow_live_factors.py`
## Future adapter shape
A venue-specific live adapter can later be layered on top of this seam by
feeding `VenueOBTick` records into `VioletVenueOBProvider.refresh()` from any
normalized feed source. The only contract is the canonical `OBSnapshot` shape
that `OBFeatureEngine` already consumes.
## Validation
The companion test file checks:
- `VioletVenueOBProvider` implements the `OBProvider` surface
- malformed values are rejected at construction
- `OBFeatureEngine(provider)` can run `step_live()` and read back finite OB
features
- the callable-source path loads as expected