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:
root
2026-05-03 20:37:37 +00:00
parent b9c58a376f
commit 12002642e5
2 changed files with 28 additions and 3 deletions
+3 -3
View File
@@ -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",
)