T-212: merge dev

This commit is contained in:
Studio 2026-12-05 18:00:14 -05:00
commit 60ab228207
11 changed files with 5319 additions and 87 deletions

View file

@ -138,8 +138,6 @@ describe('design/m2-master-audit.md citations', () => {
['libs/research/src/feature-library.ts', 'export const FEATURE_INPUT_DATASETS'],
['libs/research/src/notebook-snapshot-node.ts', 'export function createNodeNotebookCommandRunner'],
['scripts/research-copilot-mcp.ts', 'export async function runResearchCopilotMcp'],
['python/stockbot/data.py', '"ceo_post"'],
['python/stockbot/data.py', 'NotImplementedError'],
['package.json', '"mcp:research-copilot"'],
['design/MILESTONES.md', 'eodIntraday1M'],
['docker-compose.quant.yml', '1048576'],

View file

@ -0,0 +1,44 @@
import { existsSync } from 'node:fs';
import { delimiter, dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { expect, test } from 'bun:test';
const repoRoot = fileURLToPath(new URL('../../', import.meta.url));
const pythonDir = join(repoRoot, 'python');
const venvPython = join(pythonDir, '.venv/bin/python');
function buildEnv(baseEnv: NodeJS.ProcessEnv = process.env): Record<string, string> {
const env: Record<string, string> = {};
for (const [key, value] of Object.entries(baseEnv)) {
if (value !== undefined) {
env[key] = value;
}
}
const bunDir = dirname(process.execPath);
env.PATH = env.PATH ? `${bunDir}${delimiter}${env.PATH}` : bunDir;
env.PYTHONPATH = pythonDir;
env.PYTHONDONTWRITEBYTECODE = '1';
return env;
}
test(
'python stockbot SDK offline pytest suite passes',
() => {
const cmd = existsSync(venvPython)
? [venvPython, '-m', 'pytest', '-q', '-rf', join(pythonDir, 'tests')]
: ['uv', 'run', '--directory', pythonDir, '--offline', '--extra', 'dev', 'pytest', '-q', '-rf'];
const spawned = Bun.spawnSync(cmd, {
cwd: pythonDir,
env: buildEnv(),
stdout: 'pipe',
stderr: 'pipe',
});
const stdout = new TextDecoder().decode(spawned.stdout);
const stderr = new TextDecoder().decode(spawned.stderr);
expect(spawned.exitCode, `${stdout}\n${stderr}`).toBe(0);
},
60_000
);