Skip to content

test(cli): e2e test for the agent session lifecycle#882

Merged
u9g merged 2 commits into
feat/agent-session-daemonfrom
jason/agent-session-e2e-test
Jun 22, 2026
Merged

test(cli): e2e test for the agent session lifecycle#882
u9g merged 2 commits into
feat/agent-session-daemonfrom
jason/agent-session-e2e-test

Conversation

@u9g

@u9g u9g commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

adds an e2e test for lk agent session {start,say,end}

u9g added 2 commits June 22, 2026 12:33
Adds an opt-in end-to-end test that drives the real `lk agent session`
start/say/end flow against a minimal one-file echo agent (testdata/echo-agent),
asserting the model echoes a token back and that the detached daemon exits
afterward. The fixture is a uv project so the daemon's `uv run python`
auto-syncs deps; its __main__ dispatches console mode to the TCP console
directly since cli.run_app() doesn't expose --connect-addr on released agents.

Includes a GitHub Actions workflow that runs the test on Linux and Windows,
triggered by workflow_dispatch and pushes to any repo branch. Gated behind
LIVEKIT_API_KEY so it skips without credentials.
The session daemon spawn passed the readiness pipe to the detached child via
cmd.ExtraFiles (fd 3), but os/exec's ExtraFiles is unsupported on Windows, so
daemon.Start() failed with "fork/exec ...: not supported by windows" and the
session never started there.

Replace the inherited fd with a temp readiness file: the daemon writes its
status atomically (write + rename) and `start` polls it until it sees a status,
the daemon process exits, or a timeout slightly past the daemon's own
agent-connect deadline. Works identically on Linux and Windows.
@u9g u9g merged commit 1ebe5db into feat/agent-session-daemon Jun 22, 2026
3 checks passed
@u9g u9g deleted the jason/agent-session-e2e-test branch June 22, 2026 20:06
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