dita_v2: VenueTelemetrySnapshot + Zinc venue plane (4th shm partition) + local Rust target dir
Upstream-canonical commit of the ~366 lines that sat uncommitted in the working tree (surveyed in DITAV2_SOA_SURVEY_20260702). Venue telemetry published at every venue boundary (submit/cancel/reconcile) over the zinc venue_region; SOA per UV DITAv2 adjudication 2026-07-03. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -144,6 +144,54 @@ class VenueOrder:
|
||||
return max(0.0, float(self.intended_size) - float(self.filled_size))
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class VenueTelemetrySnapshot:
|
||||
"""Shared-memory surface for venue-side call boundaries and state."""
|
||||
|
||||
phase: str = "idle"
|
||||
status: str = "IDLE"
|
||||
venue: str = "bingx"
|
||||
endpoint: str = ""
|
||||
method: str = ""
|
||||
intent_id: str = ""
|
||||
trade_id: str = ""
|
||||
slot_id: int = 0
|
||||
asset: str = ""
|
||||
side: TradeSide = TradeSide.FLAT
|
||||
action: str = ""
|
||||
order_id: str = ""
|
||||
client_order_id: str = ""
|
||||
venue_order_status: str = ""
|
||||
venue_event_kind: str = ""
|
||||
message: str = ""
|
||||
retry_after_ms: int = 0
|
||||
timestamp: Optional[datetime] = None
|
||||
details: Dict[str, Any] = field(default_factory=dict)
|
||||
|
||||
def as_dict(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"phase": self.phase,
|
||||
"status": self.status,
|
||||
"venue": self.venue,
|
||||
"endpoint": self.endpoint,
|
||||
"method": self.method,
|
||||
"intent_id": self.intent_id,
|
||||
"trade_id": self.trade_id,
|
||||
"slot_id": int(self.slot_id or 0),
|
||||
"asset": self.asset,
|
||||
"side": self.side.value if hasattr(self.side, "value") else str(self.side),
|
||||
"action": self.action,
|
||||
"order_id": self.order_id,
|
||||
"client_order_id": self.client_order_id,
|
||||
"venue_order_status": self.venue_order_status,
|
||||
"venue_event_kind": self.venue_event_kind,
|
||||
"message": self.message,
|
||||
"retry_after_ms": int(self.retry_after_ms or 0),
|
||||
"timestamp": self.timestamp.isoformat() if hasattr(self.timestamp, "isoformat") else None,
|
||||
"details": dict(self.details),
|
||||
}
|
||||
|
||||
|
||||
@dataclass
|
||||
class TradeSlot:
|
||||
"""A single execution slot managed by the v2 kernel."""
|
||||
|
||||
Reference in New Issue
Block a user