feat(research): compare saved experiments against explicit trials

This commit is contained in:
Boki 2026-10-24 14:06:21 -04:00
parent 397cd0e160
commit 46a4f13acd
22 changed files with 3045 additions and 35 deletions

View file

@ -0,0 +1,11 @@
import type { ExperimentTrial } from '@stock-bot/stock-config/experiments';
export function metricText(
trial: ExperimentTrial,
key: keyof NonNullable<ExperimentTrial['metrics']>
) {
const value = trial.metrics?.[key];
return value === null || value === undefined
? `Unavailable${trial.unavailable?.[key] ? `: ${trial.unavailable[key]}` : ''}`
: String(value);
}