feat(research): cut over canonical runtime and enforce agent budgets
This commit is contained in:
parent
ab08db82fd
commit
bbf0dd4453
103 changed files with 6138 additions and 3112 deletions
|
|
@ -27,7 +27,11 @@ import {
|
|||
canonicalStrategyJson,
|
||||
validateStrategyParameters,
|
||||
} from '@stock-bot/stock-config/strategy';
|
||||
import type { BacktestRunDatasetSelection, StrategyParameterValue } from '@stock-bot/types';
|
||||
import type {
|
||||
BacktestRunDatasetSelection,
|
||||
ResearchActor,
|
||||
StrategyParameterValue,
|
||||
} from '@stock-bot/types';
|
||||
import { HistoricalDataRequestError } from '@stock-bot/types';
|
||||
import { buildCanonicalBacktestReport } from '../../../orchestrator/src/backtest/canonical-result';
|
||||
import { getWebSocketHandler } from '../websocket/run-updates';
|
||||
|
|
@ -107,7 +111,7 @@ export interface RunRequest {
|
|||
}
|
||||
|
||||
export interface RunSubmission {
|
||||
principal: 'operator' | 'service';
|
||||
principal: ResearchActor;
|
||||
key: string;
|
||||
}
|
||||
|
||||
|
|
@ -443,6 +447,11 @@ export class BacktestServiceV2 {
|
|||
}
|
||||
const definition = this.mapBacktest(at(parent.rows, 0));
|
||||
const catalog = definition.strategyVersionId !== null || definition.strategy === 'catalog';
|
||||
if (!catalog) {
|
||||
throw new CatalogExecutionUnavailableError(
|
||||
'Legacy backtest execution is retired. Select an approved strategy version and retained canonical dataset.'
|
||||
);
|
||||
}
|
||||
if (catalog && multiplier !== null) {
|
||||
throw new CatalogExecutionUnavailableError('Canonical research runs at maximum speed');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue