First commit of the previously-untracked PINK-on-DITAv2 migration system (execution moves to the Rust kernel; policy stays on legacy DITA, so Alpha Engine algorithmic integrity is preserved). BLUE is untouched. Sprint 0 (safety snapshot + flaw-fix verification, MARKET single-leg scope): - Verified Rust FSM fixes (flaws 2,4,10,11,13) by source read of lib.rs. - Hardened 5 vacuous/guarded assertions in test_flaws.py so each flaw test genuinely exercises its fix. Most important: Flaw 5 now asserts capital moves by EXACTLY realized PnL (was entering/exiting at the same price). - Offline suites: 533 passed, 0 failed (35 flaws + 402 kernel/accounting/ bridge + 96 runtime/persistence/multi-exit/restart/seams). - GATE PASS: MARKET-path-critical flaws 1,2,5 confirmed fixed + green. - Added SPRINT0_FLAW_VERIFICATION.md report and _rust_kernel/.gitignore (excludes Rust target/ build artifacts). LIMIT/partial-fill remain explicitly out of scope (MARKET-only bring-up). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
96 lines
2.5 KiB
Python
96 lines
2.5 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,
|
|
)
|
|
from .journal import ClickHouseKernelJournal, KernelJournal, MemoryKernelJournal
|
|
from .rust_backend import ExecutionKernel
|
|
from .bingx_venue import BingxVenueAdapter
|
|
from .launcher import DITAv2LauncherBundle, LauncherVenueMode, LauncherZincMode, build_launcher_bundle
|
|
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
|
|
|
|
__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",
|
|
"ZincPlane",
|
|
"ZincControlPlane",
|
|
"build_position_state_row",
|
|
]
|