feat(research): add canonical session reporting and analytics

This commit is contained in:
Boki 2026-10-23 12:05:14 -04:00
parent 1e164450c3
commit 3838295eec
28 changed files with 2402 additions and 47 deletions

View file

@ -2,6 +2,7 @@ import { fork, type ChildProcess } from 'node:child_process';
import { fileURLToPath } from 'node:url';
import {
parseReplayProjectionResult,
parseReplayReportResult,
parseReplayResult,
replayConfigSchema,
replayIdentitySchema,
@ -85,9 +86,11 @@ export class NativeBacktestWorker {
if (expectedReplay) {
try {
const parse =
expectedReplay.format === 'projection'
? parseReplayProjectionResult
: parseReplayResult;
expectedReplay.format === 'report'
? parseReplayReportResult
: expectedReplay.format === 'projection'
? parseReplayProjectionResult
: parseReplayResult;
parse(message.result, expectedReplay.identity, expectedReplay.policy);
} catch (error) {
terminate(error instanceof Error ? error : new Error(String(error)));