refactor(V2): IBKR client — remove dead whitelist + max_cycles test
Code review polish (commit b9c58a3):
- Remove unused _AUTO_CONFIRM_WHITELIST (was scaffolding, never wired)
- Replace with policy comment documenting auto-confirm behavior
- New test: test_place_order_too_many_confirmations
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -278,9 +278,9 @@ class IBKRClient:
|
||||
|
||||
# ── Order writes ────────────────────────────────────────────
|
||||
|
||||
_AUTO_CONFIRM_WHITELIST = (
|
||||
"outside RTH", "no market data", "you are submitting", "the contract",
|
||||
)
|
||||
# Auto-confirm policy: any IBKR warning that is NOT in _CRITICAL_WARNINGS
|
||||
# is auto-confirmed up to _AUTO_CONFIRM_MAX_CYCLES times. Hardening to a
|
||||
# strict whitelist (allow-list) is deferred — V1 trades safety for UX.
|
||||
_CRITICAL_WARNINGS = (
|
||||
"margin", "suitability", "credit", "rejected", "insufficient",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user