Remove dataset input caps and simplify preparation

This commit is contained in:
Boki 2026-10-21 23:34:10 -04:00
parent 6bd671d92a
commit 007e35c747
17 changed files with 175 additions and 620 deletions

View file

@ -7,7 +7,6 @@ import { PostgresBacktestRunRepository } from './backtest/PostgresBacktestRunRep
import { UnavailableBacktestRunRepository } from './backtest/run-repository';
import { RustBacktestAdapter } from './backtest/RustBacktestAdapter';
import { ModeManager } from './core/ModeManager';
import { datasetLimits, type DatasetLimits } from './data/dataset-limits';
import { BacktestHandler } from './handlers/backtest/backtest.handler';
import { PaperTradingManager } from './paper/PaperTradingManager';
import { AnalyticsService } from './services/AnalyticsService';
@ -30,10 +29,8 @@ export async function registerOrchestratorServices(
syntheticSeed?: number;
nativeExecutionTimeoutMs?: number;
strategyRegistry?: StrategyRegistry;
datasetLimits?: Partial<DatasetLimits>;
} = {}
): Promise<void> {
const limits = datasetLimits(options.datasetLimits);
// Create a service adapter that provides the expected interface
const services = container.resolve('serviceContainer') as IServiceContainer;
const custom = services.custom ?? {};
@ -59,9 +56,8 @@ export async function registerOrchestratorServices(
const backtestEngine = options.useRustEngine
? new RustBacktestAdapter(services, {
timeoutMs: options.nativeExecutionTimeoutMs,
datasetLimits: limits,
})
: new BacktestEngine(services, storageService, strategyManager, { datasetLimits: limits });
: new BacktestEngine(services, storageService, strategyManager);
const paperTradingManager = new PaperTradingManager(
services,
storageService,
@ -79,10 +75,9 @@ export async function registerOrchestratorServices(
engine: backtestEngine,
engineName: options.useRustEngine ? 'native' : 'typescript',
repository: services.postgres
? new PostgresBacktestRunRepository(services.postgres, undefined, limits)
? new PostgresBacktestRunRepository(services.postgres)
: new UnavailableBacktestRunRepository(),
logger: services.logger,
datasetLimits: limits,
prepare: options.useRustEngine ? undefined : config => modeManager.initializeMode(config),
});