test(team): harden live launch smoke matrix

This commit is contained in:
777genius 2026-05-09 05:52:26 +03:00
parent 7b4c6cc380
commit 81700a1a14
3 changed files with 11 additions and 0 deletions

View file

@ -7,13 +7,18 @@ import { fileURLToPath } from 'node:url';
const scriptDir = path.dirname(fileURLToPath(import.meta.url)); const scriptDir = path.dirname(fileURLToPath(import.meta.url));
const repoRoot = path.resolve(scriptDir, '..'); const repoRoot = path.resolve(scriptDir, '..');
const siblingOrchestrator = path.resolve(repoRoot, '..', 'agent_teams_orchestrator');
const env = { const env = {
...process.env, ...process.env,
AGENT_CLI_LAUNCH_LIVE_E2E: '1', AGENT_CLI_LAUNCH_LIVE_E2E: '1',
CLAUDE_TEAM_CLI_FLAVOR: process.env.CLAUDE_TEAM_CLI_FLAVOR || 'agent_teams_orchestrator',
CLAUDE_AGENT_TEAMS_ORCHESTRATOR_CLI_PATH:
process.env.CLAUDE_AGENT_TEAMS_ORCHESTRATOR_CLI_PATH || path.join(siblingOrchestrator, 'cli'),
}; };
console.log('Running agent CLI launch live smoke'); console.log('Running agent CLI launch live smoke');
console.log(`Claude runtime: ${env.CLAUDE_AGENT_TEAMS_ORCHESTRATOR_CLI_PATH}`);
const result = spawnSync( const result = spawnSync(
'pnpm', 'pnpm',

View file

@ -872,6 +872,10 @@ const HANDLED_STREAM_JSON_TYPES = new Set([
'user', 'user',
'assistant', 'assistant',
'control_request', 'control_request',
// Claude Code can emit informational rate-limit allowance snapshots as
// top-level stream-json events. They are not errors; actionable retry/error
// diagnostics still arrive through system/api_retry and remain handled below.
'rate_limit_event',
'result', 'result',
'system', 'system',
]); ]);

View file

@ -7,6 +7,7 @@ import { promisify } from 'util';
import { describe, expect, it } from 'vitest'; import { describe, expect, it } from 'vitest';
import { CodexBinaryResolver } from '@main/services/infrastructure/codexAppServer/CodexBinaryResolver'; import { CodexBinaryResolver } from '@main/services/infrastructure/codexAppServer/CodexBinaryResolver';
import { ClaudeBinaryResolver } from '@main/services/team/ClaudeBinaryResolver';
import { execCli, killProcessTree, spawnCli } from '@main/utils/childProcess'; import { execCli, killProcessTree, spawnCli } from '@main/utils/childProcess';
const execFileAsync = promisify(execFile); const execFileAsync = promisify(execFile);
@ -42,6 +43,7 @@ const AGENT_CLI_SPECS: AgentCliSpec[] = [
command: 'claude', command: 'claude',
overrideEnv: 'CLAUDE_CLI_PATH', overrideEnv: 'CLAUDE_CLI_PATH',
versionPattern: /\b\d+\.\d+\.\d+\b.*Claude Code/i, versionPattern: /\b\d+\.\d+\.\d+\b.*Claude Code/i,
resolver: () => ClaudeBinaryResolver.resolve(),
}, },
]; ];