feat(research): cut over canonical runtime and enforce agent budgets

This commit is contained in:
Boki 2026-10-24 16:47:19 -04:00
parent ab08db82fd
commit bbf0dd4453
103 changed files with 6138 additions and 3112 deletions

View file

@ -13,6 +13,7 @@ import type {
import type { WorkbenchExperimentPreview } from '@stock-bot/stock-config/cost-sensitivity';
import type { ExperimentCandidate } from '@stock-bot/stock-config/experiments';
import type { WalkForwardSegment } from '@stock-bot/stock-config/walk-forward';
import { isResearchActor } from '@stock-bot/types';
import type { ResearchEvidenceReference, ResearchFindingSource } from '@stock-bot/types';
import type { BacktestResultQuery } from './backtest-v2.service';
import { retainedWorkbenchPreview, workbenchTrialRequest } from './cost-sensitivity-input';
@ -44,7 +45,7 @@ function documentMetadata(value: Record<string, unknown>, report: boolean): void
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(value.id) &&
typeof value.createdAt === 'string' &&
Number.isFinite(Date.parse(value.createdAt)) &&
(value.principal === 'operator' || value.principal === 'service') &&
isResearchActor(value.principal) &&
typeof receipt?.key === 'string' &&
/^[!-~]{1,200}$/.test(receipt.key) &&
typeof receipt.hash === 'string' &&