chore: plan for review blockers follow-up

Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-09-13 06:21:10 +00:00
committed by GitHub
co-authored by genichin
53 changed files with 3461 additions and 310 deletions
+4 -3
View File
@@ -386,9 +386,7 @@ class KISBroker:
transport_failure: bool,
) -> float:
"""Return bounded state/age-based delay for the next authoritative poll."""
if status.state != "unknown":
delay = _FILL_POLL_MIN_INTERVAL_SECONDS
elif age_seconds < 60:
if status.state != "unknown" or age_seconds < 60:
delay = _FILL_POLL_MIN_INTERVAL_SECONDS
elif age_seconds < 5 * 60:
delay = 15.0
@@ -1290,6 +1288,9 @@ class KISBroker:
seen_continuations.add(next_continuation)
continuation = next_continuation
def exposes_full_balance_snapshot(self) -> bool:
return True
def get_available_cash(self, *, price_check_code: str = "005930") -> int:
"""Return KIS cash-only buy capacity (`nrcvb_buy_amt`).
+10 -3
View File
@@ -13,11 +13,11 @@ import os
from datetime import datetime
from pathlib import Path
from threading import Lock
from typing import Optional
from trex_core.application.broker_port import (
BalanceItem,
BrokerBalanceError,
BrokerPort,
CancelOutcome,
FillStatus,
OrderAck,
@@ -134,8 +134,8 @@ class OwnershipAwareBroker:
*,
side: str,
symbol: str,
order_date: Optional[str] = None,
submitted_at: Optional[datetime] = None,
order_date: str | None = None,
submitted_at: datetime | None = None,
) -> FillStatus:
result = self._delegate.poll_fill(
broker_order_id,
@@ -175,6 +175,13 @@ class OwnershipAwareBroker:
def get_balance(self) -> list[BalanceItem]:
return self._store.project(self._delegate.get_balance())
def authoritative_balance_reader(self) -> BrokerPort:
return self._delegate
def exposes_full_balance_snapshot(self) -> bool:
"""False: projected balances omit operator-owned/unmanaged broker positions."""
return False
def account_scope_hash(self) -> str:
return self._delegate.account_scope_hash()
+3
View File
@@ -166,6 +166,9 @@ class PaperBroker:
return [BalanceItem(symbol=sym, hldg_qty=qty)
for sym, qty in balances.items() if qty != 0]
def exposes_full_balance_snapshot(self) -> bool:
return True
# --- REQ-038: programmable current price (safety-sell scenario double) ---
def set_current_price(self, symbol: str, price: Decimal) -> None:
"""Program the current price returned by get_current_price(symbol)."""