Add comprehensive integration tests and fix WebSocket cancellation hang#8
Merged
vijit-lark merged 3 commits intomainfrom Mar 16, 2026
Merged
Add comprehensive integration tests and fix WebSocket cancellation hang#8vijit-lark merged 3 commits intomainfrom
vijit-lark merged 3 commits intomainfrom
Conversation
- E2B sandbox smoke test and shared factory (with reuse support) - OpenAI and Claude LLM tests: text, structured output, error propagation - Exclude sandbox/llm markers from CI; load .env in test conftest Made-with: Cursor
Add 7 E2E tests verifying pre_agent_invocation_commands and post_agent_invocation_commands are executed by the server, including cwd support and failure handling. Change ws_url fixture to per-test scope so each test gets a fresh server. Fix send_queue.task_done() not being called when ws.send() raises ConnectionClosedOK, which caused send_queue.join() to hang forever during cancellation. Made-with: Cursor
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.
Summary
runtimeuseTypeScript package covering--help,--port,--handler, and--agentflags, with a deterministic echo handler fixture for reproducible test runscwdsupport, and proper error propagation on command failuresandboxandllmpytest markers to keep CI fastWebSocketTransportwheretask_done()was skipped ifws.send()raised, blockingsend_queue.join()indefinitelyChanges
packages/runtimeuse/test/integration/— new CLI integration test suite + echo handler fixturepackages/runtimeuse-client-python/test/e2e/test_e2e.py— 7 new tests for pre/post invocation commandspackages/runtimeuse-client-python/test/llm/— Claude and OpenAI integration tests against E2B sandboxespackages/runtimeuse-client-python/test/sandbox/— E2B sandbox provider testspackages/runtimeuse-client-python/test/sandbox_factories/— reusable E2B sandbox factorywebsocket_transport.py— wrapws.send()in try/finally to guaranteetask_done()callsandboxandllmmarked testsTest plan
npm run test:integrationpasses inpackages/runtimeusepytest test/ -m "not sandbox and not llm"passes inpackages/runtimeuse-client-pythonpytest test/ -m sandboxpasses locally withE2B_API_KEYsetpytest test/ -m llmpasses locally withE2B_API_KEY+ LLM API keys set