From e1d3dcbb3ab0f4882ce2417a1fe895210cd1ea32 Mon Sep 17 00:00:00 2001 From: 777genius Date: Tue, 19 May 2026 20:13:57 +0300 Subject: [PATCH] test: extend source-mode readiness timeouts --- AGENTS.md | 1 + docs/team-management/debugging-agent-teams.md | 3 ++- .../main/services/team/AnthropicLaunchSelection.live.test.ts | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 317b6cbd..8a01b989 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,6 +26,7 @@ Live team smoke runtime: - Use the orchestrator source launcher by default for live/dev smoke loops: `/Users/belief/dev/projects/claude/agent_teams_orchestrator/cli-source` - The source launcher runs `src/entrypoints/cli.tsx` through Bun, so it reflects local orchestrator source edits immediately and cannot accidentally test stale `dist` output. +- Source-mode teammate startup can be slower than bundled startup. Live smoke harnesses may raise `CLAUDE_TEAM_PROCESS_RUNTIME_READY_TIMEOUT_MS` and `CLAUDE_TEAM_PROCESS_INBOX_POLLER_READY_TIMEOUT_MS` when the test is validating source behavior instead of watchdog latency. - Use the built wrapper only for release or production-like smoke checks. Build first in `/Users/belief/dev/projects/claude/agent_teams_orchestrator` with `bun run build`, then set `CLAUDE_AGENT_TEAMS_ORCHESTRATOR_CLI_PATH=/Users/belief/dev/projects/claude/agent_teams_orchestrator/cli`. - Do not use `cli-dev` or `bun run build:dev` as proof for the production wrapper. `cli` reads `dist/local-cli/cli.js`; `cli-dev` reads `dist/local-cli-dev/cli.js`. diff --git a/docs/team-management/debugging-agent-teams.md b/docs/team-management/debugging-agent-teams.md index 2015feac..a080aa33 100644 --- a/docs/team-management/debugging-agent-teams.md +++ b/docs/team-management/debugging-agent-teams.md @@ -96,7 +96,8 @@ export CLAUDE_AGENT_TEAMS_ORCHESTRATOR_CLI_PATH=/Users/belief/dev/projects/claud The source launcher executes `src/entrypoints/cli.tsx` through Bun. It is the right default for local debug loops, live model/provider checks, and cross-repo runtime fixes. Source-mode teammate startup can be slower than bundled startup, so live smoke harnesses may set -`CLAUDE_TEAM_PROCESS_RUNTIME_READY_TIMEOUT_MS` to a larger value when they are validating source +`CLAUDE_TEAM_PROCESS_RUNTIME_READY_TIMEOUT_MS` and +`CLAUDE_TEAM_PROCESS_INBOX_POLLER_READY_TIMEOUT_MS` to larger values when they are validating source behavior instead of watchdog latency. Release or production-like smoke checks must validate the built wrapper: diff --git a/test/main/services/team/AnthropicLaunchSelection.live.test.ts b/test/main/services/team/AnthropicLaunchSelection.live.test.ts index 876b10ac..0d042b3a 100644 --- a/test/main/services/team/AnthropicLaunchSelection.live.test.ts +++ b/test/main/services/team/AnthropicLaunchSelection.live.test.ts @@ -56,6 +56,7 @@ liveDescribe('Anthropic launch selection live e2e', () => { let previousDisableAppBootstrap: string | undefined; let previousDisableRuntimeBootstrap: string | undefined; let previousRuntimeReadyTimeout: string | undefined; + let previousInboxPollerReadyTimeout: string | undefined; let previousClaudeJsonConfig: string | null | undefined; let svc: TeamProvisioningService | null; let teamName: string | null; @@ -100,12 +101,15 @@ liveDescribe('Anthropic launch selection live e2e', () => { previousDisableAppBootstrap = process.env.CLAUDE_APP_DISABLE_DETERMINISTIC_TEAM_BOOTSTRAP; previousDisableRuntimeBootstrap = process.env.CLAUDE_DISABLE_DETERMINISTIC_TEAM_BOOTSTRAP; previousRuntimeReadyTimeout = process.env.CLAUDE_TEAM_PROCESS_RUNTIME_READY_TIMEOUT_MS; + previousInboxPollerReadyTimeout = process.env.CLAUDE_TEAM_PROCESS_INBOX_POLLER_READY_TIMEOUT_MS; process.env.CLAUDE_AGENT_TEAMS_ORCHESTRATOR_CLI_PATH = process.env.CLAUDE_AGENT_TEAMS_ORCHESTRATOR_CLI_PATH?.trim() || DEFAULT_ORCHESTRATOR_CLI; process.env.CLAUDE_TEAM_CLI_FLAVOR = 'agent_teams_orchestrator'; process.env.CLAUDE_TEAM_PROCESS_RUNTIME_READY_TIMEOUT_MS = process.env.CLAUDE_TEAM_PROCESS_RUNTIME_READY_TIMEOUT_MS?.trim() || '90000'; + process.env.CLAUDE_TEAM_PROCESS_INBOX_POLLER_READY_TIMEOUT_MS = + process.env.CLAUDE_TEAM_PROCESS_INBOX_POLLER_READY_TIMEOUT_MS?.trim() || '30000'; process.env.HOME = subscriptionAuth ? os.userInfo().homedir : tempHome; process.env.USERPROFILE = subscriptionAuth ? os.userInfo().homedir : tempHome; process.env.NODE_ENV = 'production'; @@ -151,6 +155,7 @@ liveDescribe('Anthropic launch selection live e2e', () => { restoreEnv('CLAUDE_APP_DISABLE_DETERMINISTIC_TEAM_BOOTSTRAP', previousDisableAppBootstrap); restoreEnv('CLAUDE_DISABLE_DETERMINISTIC_TEAM_BOOTSTRAP', previousDisableRuntimeBootstrap); restoreEnv('CLAUDE_TEAM_PROCESS_RUNTIME_READY_TIMEOUT_MS', previousRuntimeReadyTimeout); + restoreEnv('CLAUDE_TEAM_PROCESS_INBOX_POLLER_READY_TIMEOUT_MS', previousInboxPollerReadyTimeout); if (preserveArtifacts) { process.stderr.write(`[AnthropicLaunchSelection.live] preserved temp dir: ${tempDir}\n`);