Skip to content

give session e2e start the CLI's own readiness budget#908

Merged
u9g merged 1 commit into
mainfrom
session-e2e/start-timeout
Jul 13, 2026
Merged

give session e2e start the CLI's own readiness budget#908
u9g merged 1 commit into
mainfrom
session-e2e/start-timeout

Conversation

@u9g

@u9g u9g commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Fixes the Windows session e2e flake where TestSessionE2E fails with an empty session start failed: / exit status 1 at exactly 15s (e.g. this run).

Root cause: the test capped agent daemon start at 15s, but the CLI itself budgets 65s for daemon readiness (awaitDaemonReady, matching the daemon's 60s agent-connect timeout). On a cold Windows runner, the first exec of each binary in the chain is Defender-scanned — the freshly downloaded lk.exe, then uv/python for the version probe and the agent itself — so the whole startup (spawn daemon → SDK version probe → spawn agent → import livekit.agents → connect to LiveKit) can exceed 15s with every step succeeding. The test's context deadline then kills the command mid-wait, which is why the failure carries no output.

Fix: give the start step 70s, just over the CLI's own budget, so the test only fails when the CLI itself would report a startup error instead of racing it with a stricter deadline. The earlier node pre-warm (a9030dc) couldn't help here: it lives in TestAgentProcessFailSignal, which the session e2e job filters out with -test.run TestSessionE2E, and the flaking arm is Python anyway.

The test capped `agent daemon start` at 15s while the CLI itself waits
up to 65s for daemon readiness. On a cold Windows runner the first
execs of lk.exe, uv, and python are each Defender-scanned, and the
chain (start daemon -> version probe -> spawn agent -> import
livekit.agents -> connect) can exceed 15s with every step succeeding —
the wrapper then kills the command mid-wait with no output. Wait 70s so
the test only fails when the CLI itself reports a startup failure.
@u9g u9g merged commit ece95b9 into main Jul 13, 2026
22 checks passed
@u9g u9g deleted the session-e2e/start-timeout branch July 13, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants