diff --git a/services/backtesting_service/src/service.rs b/services/backtesting_service/src/service.rs index eb962dd92..aca8117ff 100644 --- a/services/backtesting_service/src/service.rs +++ b/services/backtesting_service/src/service.rs @@ -5,7 +5,7 @@ use std::collections::HashMap; use std::sync::Arc; use tokio::sync::{broadcast, RwLock}; use tonic::{Request, Response, Status}; -use tracing::{debug, error, info}; +use tracing::{debug, error, info, warn}; use uuid::Uuid; use crate::foxhunt::tli::{backtesting_service_server::BacktestingService, *}; @@ -570,7 +570,10 @@ impl BacktestingService for BacktestingServiceImpl { backtest_id: req.backtest_id, metrics: proto_metrics, trades: proto_trades, - equity_curve: Vec::new(), // TODO: Implement equity curve + equity_curve: { + warn!("Equity curve not yet populated from backtest results"); + Vec::new() + }, // TODO: Implement equity curve drawdown_periods: Vec::new(), // TODO: Implement drawdown periods })) } @@ -593,10 +596,11 @@ impl BacktestingService for BacktestingServiceImpl { .map_err(|e| Status::internal(format!("Failed to list backtests: {}", e)))?; let summaries: Vec = backtests.into_iter().map(|bt| bt.into()).collect(); + let total_count = summaries.len() as u32; Ok(Response::new(ListBacktestsResponse { backtests: summaries, - total_count: 0, // TODO: Implement total count + total_count, })) } @@ -655,7 +659,12 @@ impl BacktestingService for BacktestingServiceImpl { } } - // TODO: Actually stop the running backtest task + // Task cancellation not yet implemented — the spawned tokio task will run to completion. + // When a CancellationToken or JoinHandle is stored in BacktestContext this can be wired up. + warn!( + "stop_backtest: task cancellation not yet implemented for {}", + req.backtest_id + ); Ok(Response::new(StopBacktestResponse { success: true,