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

@ -1,6 +1,5 @@
import { expect, test } from 'bun:test';
import { createExampleRuntime } from '../../apps/stock/orchestrator/examples/example-runtime';
import { backtestDatasetLimitsSchema } from '../../apps/stock/config/src/schemas/stock-app.schema';
test('offline examples use the shared DI graph without starting a real-time feed', async () => {
const runtime = await createExampleRuntime();
@ -11,12 +10,3 @@ test('offline examples use the shared DI graph without starting a real-time feed
expect(runtime.modeManager.getConfig()).toBeNull();
expect(() => runtime.modeManager.getTradingEngine()).toThrow('Trading engine not initialized');
});
test('dataset configuration accepts partial budgets and rejects invalid or misspelled ceilings', () => {
expect(backtestDatasetLimitsSchema.parse({ maxBars: 1000 })).toEqual({ maxBars: 1000 });
expect(backtestDatasetLimitsSchema.parse({})).toEqual({});
for (const maxBars of [0, -1, 1.5, Infinity, Number.MAX_SAFE_INTEGER]) {
expect(backtestDatasetLimitsSchema.safeParse({ maxBars }).success).toBe(false);
}
expect(backtestDatasetLimitsSchema.safeParse({ maxBar: 1000 }).success).toBe(false);
});