exec(unified): UnifiedExecutor — initial-submit pipeline + S2 pain-fence
executor.py composes the built parts into one execute(request, snapshot): S-grade fence → router.decide → placer.pre_submit → submit → register working. The initial-submit half that complements DriveLoop's expiry half (analogue of pink_direct.py:1645-1700). Composition rulings encoded + tested: - S2/S3 pain-fence (§15.2): refused WHOLE, loudly, below T14 — never silently sliced. - placer declines (spread gate) → cross ONLY if urgency crosses on expiry; ACQUIRE ABANDONS (a missed entry is free, §4-1). Both mutation-verified RED. - TTL from urgency discipline: PROTECT 2s / ROTATE deadline_ms / ACQUIRE quote-lifetime. contract.py: SGrade enum (S0-S3) + s_grade/parent_request_id fields. _constants: MAKER_QUOTE_TTL_S. FIX (real bug, not just test): drive_loop._is_resolved EXIT was trade_id-based (a PINK artifact — PINK reused the position's trade_id for exits). The agnostic layer never gets the position id, so exit-done is now SIZE-based. Kept ENTER on clientOrderId match. Full exec_unified suite: 94 green, mutation-litmus verified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,12 @@ ACQUIRE_MAX_CHASES: int = 0
|
||||
# question: 2× vs ATR-scaled). PROVISIONAL default.
|
||||
PROTECTIVE_STOP_MULT_DEFAULT: Decimal = Decimal("2.0")
|
||||
|
||||
# Maker-quote lifetime for UNBOUNDED-TTL urgencies (HARVEST/ACQUIRE): how long a resting
|
||||
# quote lives before the drive loop sweeps + re-evaluates it. Bounded quote lifetime +
|
||||
# cancel/replace is the certified GTX discipline (spec §4-16). PROVISIONAL — calibrate vs
|
||||
# L8 GTX fill latencies; measured in injected-clock seconds, never a hardcoded loop literal.
|
||||
MAKER_QUOTE_TTL_S: float = 6.0
|
||||
|
||||
# Requote hot-window: after an OWN fill, refuse to re-quote for this long because the
|
||||
# REST venue reconcile lags the WS fill by seconds — re-quoting inside it double-enters.
|
||||
# Provenance: live double-entry, pink_direct.py:1055 / :1323 (2026-06-10). Measured in
|
||||
|
||||
Reference in New Issue
Block a user