T-215: M2.5 — Execute host/quant M2 preflight, observed split-boundary & latency checks, and desktop Claude Code EC-1 sign-off
This commit is contained in:
parent
c6c3a23b5f
commit
6ef9d3d123
1 changed files with 19 additions and 8 deletions
|
|
@ -23,11 +23,9 @@
|
|||
import { createHash } from 'node:crypto';
|
||||
import { mkdir, writeFile } from 'node:fs/promises';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
import {
|
||||
type ClosableDuckDbExecutor,
|
||||
type OpenResearchCopilotStoreOptions,
|
||||
createNodeDuckDbExecutor,
|
||||
openResearchCopilotStore,
|
||||
import type {
|
||||
ClosableDuckDbExecutor,
|
||||
OpenResearchCopilotStoreOptions,
|
||||
} from '@stock-bot/duckdb';
|
||||
import {
|
||||
type ApplyM2IntradayDDLResult,
|
||||
|
|
@ -1072,7 +1070,7 @@ async function runIntradayLatencyBenchmark(
|
|||
vaultCutoffTs: parsed.vaultCutoffTs,
|
||||
principalId: 'agent:00000000-0000-4000-8000-000000000000',
|
||||
libraryRoot: parsed.curatedRoot,
|
||||
referenceListingIds: { US: parsed.benchListingId },
|
||||
referenceListingIds: { XNYS: [parsed.benchListingId] },
|
||||
questdb: parsed.questdb,
|
||||
};
|
||||
|
||||
|
|
@ -1173,6 +1171,19 @@ async function defaultWriteReportFile(path: string, content: string): Promise<vo
|
|||
await writeFile(path, content, 'utf8');
|
||||
}
|
||||
|
||||
async function defaultCreateDuckDbExecutor(): Promise<ClosableDuckDbExecutor> {
|
||||
const { createNodeDuckDbExecutor } = await import('@stock-bot/duckdb');
|
||||
return createNodeDuckDbExecutor();
|
||||
}
|
||||
|
||||
async function defaultOpenResearchCopilotStore(
|
||||
config: ResearchCopilotHostConfig,
|
||||
options?: OpenResearchCopilotStoreOptions
|
||||
): Promise<ManagedMarketDataStore> {
|
||||
const { openResearchCopilotStore } = await import('@stock-bot/duckdb');
|
||||
return openResearchCopilotStore(config, options);
|
||||
}
|
||||
|
||||
function defaultSleepMs(ms: number): Promise<void> {
|
||||
return new Promise(resolveSleep => {
|
||||
setTimeout(resolveSleep, ms);
|
||||
|
|
@ -1212,8 +1223,8 @@ export async function runVerifyM2QuantCli(deps: VerifyM2QuantCliDeps = {}): Prom
|
|||
|
||||
const openPg = deps.openQuestDbPgExecutor ?? openQuestDbPgExecutor;
|
||||
const applyDdlFn = deps.applyM2IntradayDDL ?? applyM2IntradayDDL;
|
||||
const createDuck = deps.createDuckDbExecutor ?? (() => createNodeDuckDbExecutor());
|
||||
const openStore = deps.openResearchCopilotStore ?? openResearchCopilotStore;
|
||||
const createDuck = deps.createDuckDbExecutor ?? defaultCreateDuckDbExecutor;
|
||||
const openStore = deps.openResearchCopilotStore ?? defaultOpenResearchCopilotStore;
|
||||
const writeReportFile = deps.writeReportFile ?? defaultWriteReportFile;
|
||||
const nowMs = deps.nowMs ?? Date.now;
|
||||
const perfNowMs = deps.perfNowMs ?? (() => performance.now());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue