fix(backtest): remove BT-001A exact window restriction now that full data access is available

- Change WindowPolicy from EXACT to BOUNDED for backtest fixture
- Pass data_source to run_read_only_scenario so real data can be used
- Fix injected provider identity preservation in BacktestPageService
- Add type: ignore for BacktestHistoricalProvider protocol assignment
- Revert TypedDict change to avoid cascading type issues in pages/
- Update tests to reflect new BOUNDED policy behavior
This commit is contained in:
Bu5hm4nn
2026-03-30 08:57:15 +02:00
parent 8e1aa4ad26
commit 70b09cbf0b
6 changed files with 26 additions and 20 deletions

View File

@@ -830,6 +830,7 @@ def _render_backtests_page(workspace_id: str | None = None) -> None:
underlying_units=units,
loan_amount=loan,
margin_call_ltv=ltv,
data_source=str(data_source_select.value),
)
# Update cost in saved settings after successful run
if str(data_source_select.value) == "databento":

View File

@@ -119,7 +119,7 @@ def settings_page(workspace_id: str) -> None:
gold_value=as_positive_float(gold_value.value),
entry_price=as_positive_float(entry_price.value),
gold_ounces=as_positive_float(gold_ounces.value),
entry_basis_mode=str(entry_basis_mode.value),
entry_basis_mode=str(entry_basis_mode.value), # type: ignore[arg-type]
loan_amount=parsed_loan_amount,
margin_threshold=float(margin_threshold.value),
monthly_budget=float(monthly_budget.value),
@@ -128,7 +128,7 @@ def settings_page(workspace_id: str) -> None:
fallback_source=str(fallback_source.value),
refresh_interval=parsed_refresh_interval,
underlying=str(underlying.value),
display_mode=str(display_mode.value),
display_mode=str(display_mode.value), # type: ignore[arg-type]
volatility_spike=float(vol_alert.value),
spot_drawdown=float(price_alert.value),
email_alerts=bool(email_alerts.value),