VIOLET OA: partial spec PASS 5 — mock-BingX execution stack (quirks seam-only, deferred)

VIOLET_PART_SPEC_OA_TODO_PASS5.md — the DARK mock-BingX execution stack so the full order
lifecycle is buildable/testable with zero keys/risk (V4-live later = swap mock for real client).
Five independent units extending contracts_v3 (Order/OrderAck/Fill/OrderStatus/PositionDelta):
  20. Execution contracts + QuirkProfile seam registry (no quirk logic).
  21. Mock BingX order FSM (legal lifecycle, partials, reject, reduce-only-increase rejection).
  22. Mock BingX venue adapter (port-conformant, injectable fill model, quirk hooks INERT by default).
  23. Fill→position/PnL reducer (PnL from fill_price ONLY; ×leverage-aware) → PositionDelta.
  24. DARK E2E gate: ExecIntent → router/driver → mock venue → fill reducer → PASS-4 ledger.

CRITICAL per operator: a prominent ⚠️ section makes explicit that BingX "quirks" (zero-wb WS
frames, ownership/foreign-fill collision, bound-price poison, ×leverage notional, settle desync,
reduce-only edge, setLeverage race, dead .pro TLS) are EXPLICITLY OUT OF SCOPE for PASS 5 — the
mock carries injection SEAMS (QuirkProfile, default OFF) to accommodate them LATER, and a real-key
boundary smoke remains MANDATORY before V4-live. Quirks sourced from PINK orphan/reconcile +
DITAv2 audit memory.

Standing ready to write PASS 6–9 (exec internals/reconcile, V5 selection+slots, V6 bible
consumers, economics/observability). Added PASS 5 to the review queue in VIOLET_TODO_CRITICAL.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-06-17 10:26:15 +02:00
parent 80ce1a1afe
commit 28a2b90b1d
2 changed files with 197 additions and 0 deletions

View File

@@ -59,6 +59,11 @@ exits / SL floor / event-restore / slippage / cadence; review when done.
**PASS 4**: `VIOLET_PART_SPEC_OA_TODO_PASS4.md` (issued 2026-06-17) — vol gate / V7 exit wrapper /
economics ledger / exec-intent / alpha data feed / time exits; review when done.
**PASS 5**: `VIOLET_PART_SPEC_OA_TODO_PASS5.md` (issued 2026-06-17) — MOCK-BINGX execution stack
(exec contracts + QuirkProfile seams / order FSM / mock venue / fill reducer / DARK E2E gate).
NOTE: BingX "quirks" are SEAM-ONLY here (default OFF) — a later quirk-injection pass + a mandatory
real-key boundary smoke are required before V4-live; review when done.
**Action:** review each pass for correctness, BLUE-algo compliance, V-TYPES, no-shared-edits,
real (non-vacuous) tests. **Owner: Claude (me), later.**