give session e2e start the CLI's own readiness budget#908
Merged
Conversation
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.
toubatbrian
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Windows session e2e flake where
TestSessionE2Efails with an emptysession start failed:/exit status 1at exactly 15s (e.g. this run).Root cause: the test capped
agent daemon startat 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 downloadedlk.exe, thenuv/pythonfor the version probe and the agent itself — so the whole startup (spawn daemon → SDK version probe → spawn agent → importlivekit.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.