3-way merge (base=pre-venue-plane upstream, ours=violet-main vendored hardening, theirs=upstream venue plane): RLock atomic-snapshot wrapping (account.py, real_control_plane, real_zinc_plane), lazy __getattr__ imports (__init__), account-core test coverage — merged with venue_region telemetry. Zero conflicts; all files AST-verified. Ends the two-way vendor drift found in DITAV2_SOA_SURVEY_20260702 §5 / UV_DITAV2_SOA_VERDICT_20260703. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
118 lines
3.1 KiB
Python
118 lines
3.1 KiB
Python
"""DITA v2 prototype kernel.
|
|
|
|
This package is intentionally separate from the legacy v1 DITA surface so the
|
|
new execution kernel can be validated in isolation before any migration.
|
|
"""
|
|
|
|
from .account import AccountProjection, AccountSnapshot
|
|
from .control import (
|
|
BackendMode,
|
|
ControlPlane,
|
|
ControlUpdate,
|
|
build_control_plane,
|
|
InMemoryControlPlane,
|
|
KernelControlSnapshot,
|
|
KernelMode,
|
|
KernelVerbosity,
|
|
MirroredControlPlane,
|
|
ZincControlPlane,
|
|
)
|
|
from .contracts import (
|
|
KernelCommandType,
|
|
KernelDiagnosticCode,
|
|
KernelEventKind,
|
|
KernelIntent,
|
|
KernelOutcome,
|
|
KernelSeverity,
|
|
KernelTransition,
|
|
TradeSide,
|
|
TradeSlot,
|
|
TradeStage,
|
|
VenueEvent,
|
|
VenueEventStatus,
|
|
VenueOrder,
|
|
VenueOrderStatus,
|
|
VenueTelemetrySnapshot,
|
|
)
|
|
from .journal import ClickHouseKernelJournal, KernelJournal, MemoryKernelJournal
|
|
from .rust_backend import ExecutionKernel
|
|
from .projection import HazelcastProjection, build_position_state_row, build_projection
|
|
from .venue import VenueAdapter
|
|
from .mock_venue import MockVenueAdapter, MockVenueScenario
|
|
from .zinc_plane import InMemoryZincPlane, ZincPlane
|
|
from .real_zinc_plane import RealZincPlane, RealZincUnavailable
|
|
from .real_control_plane import RealZincControlPlane, RealZincUnavailable as RealZincControlUnavailable
|
|
|
|
|
|
def __getattr__(name: str):
|
|
if name == "BingxVenueAdapter":
|
|
from .bingx_venue import BingxVenueAdapter
|
|
|
|
return BingxVenueAdapter
|
|
if name in {"DITAv2LauncherBundle", "LauncherVenueMode", "LauncherZincMode", "build_launcher_bundle"}:
|
|
from .launcher import (
|
|
DITAv2LauncherBundle,
|
|
LauncherVenueMode,
|
|
LauncherZincMode,
|
|
build_launcher_bundle,
|
|
)
|
|
|
|
return {
|
|
"DITAv2LauncherBundle": DITAv2LauncherBundle,
|
|
"LauncherVenueMode": LauncherVenueMode,
|
|
"LauncherZincMode": LauncherZincMode,
|
|
"build_launcher_bundle": build_launcher_bundle,
|
|
}[name]
|
|
raise AttributeError(name)
|
|
|
|
__all__ = [
|
|
"AccountProjection",
|
|
"AccountSnapshot",
|
|
"BackendMode",
|
|
"BingxVenueAdapter",
|
|
"ClickHouseKernelJournal",
|
|
"ControlPlane",
|
|
"ControlUpdate",
|
|
"DITAv2LauncherBundle",
|
|
"build_control_plane",
|
|
"build_launcher_bundle",
|
|
"ExecutionKernel",
|
|
"HazelcastProjection",
|
|
"build_projection",
|
|
"InMemoryControlPlane",
|
|
"InMemoryZincPlane",
|
|
"KernelCommandType",
|
|
"KernelDiagnosticCode",
|
|
"KernelControlSnapshot",
|
|
"KernelEventKind",
|
|
"KernelIntent",
|
|
"KernelJournal",
|
|
"KernelMode",
|
|
"KernelOutcome",
|
|
"KernelSeverity",
|
|
"KernelTransition",
|
|
"KernelVerbosity",
|
|
"MemoryKernelJournal",
|
|
"MirroredControlPlane",
|
|
"MockVenueAdapter",
|
|
"MockVenueScenario",
|
|
"LauncherVenueMode",
|
|
"LauncherZincMode",
|
|
"RealZincPlane",
|
|
"RealZincControlPlane",
|
|
"RealZincControlUnavailable",
|
|
"RealZincUnavailable",
|
|
"TradeSide",
|
|
"TradeSlot",
|
|
"TradeStage",
|
|
"VenueAdapter",
|
|
"VenueEvent",
|
|
"VenueEventStatus",
|
|
"VenueOrder",
|
|
"VenueOrderStatus",
|
|
"VenueTelemetrySnapshot",
|
|
"ZincPlane",
|
|
"ZincControlPlane",
|
|
"build_position_state_row",
|
|
]
|