Skip to content

[Phase 0.2.4] Create e2e test framework#34

Open
richard-devbot wants to merge 4 commits intoCursorTouch:mainfrom
richard-devbot:richardson/phase0-e2e-framework
Open

[Phase 0.2.4] Create e2e test framework#34
richard-devbot wants to merge 4 commits intoCursorTouch:mainfrom
richard-devbot:richardson/phase0-e2e-framework

Conversation

@richard-devbot
Copy link
Copy Markdown

Summary

Closes #10

Creates tests/e2e/ end-to-end test framework:

  • __init__.py — package marker
  • conftest.py — five pytest fixtures: mock_llm_provider (deterministic MagicMock satisfying BaseChatLLM protocol), test_agent (Agent wired to mock LLM + temp workspace), test_gateway (Gateway + stub channel for integration tests), test_agent_with_echo_tool (agent pre-loaded with echo tool), mock_llm_with_tool_call (factory that exercises the tool-call → response path)
  • helpers.pysend_message(), assert_tool_called(), assert_response_contains()
  • test_smoke.py — 4 smoke tests: send message → response, response content assertion, tool call recording, session isolation

Why

Unit tests verify components in isolation. This framework verifies the full pipeline: message → agent → tools → response. CI runs without real LLM keys — the mock LLM returns "pong" deterministically.

Test run

pytest tests/e2e/ -v
tests/e2e/test_smoke.py::test_smoke_send_message_returns_response PASSED
tests/e2e/test_smoke.py::test_smoke_response_contains_expected_text PASSED
tests/e2e/test_smoke.py::test_smoke_tool_call_is_recorded PASSED
tests/e2e/test_smoke.py::test_smoke_unique_sessions_are_isolated PASSED

4 passed in 0.02s

Richardson Gunde and others added 3 commits April 13, 2026 11:14
…rsorTouch#10]

Creates tests/e2e/ with conftest.py (mock_llm_provider, test_agent,
test_gateway, test_agent_with_echo_tool, mock_llm_with_tool_call fixtures),
helpers.py (send_message, assert_tool_called, assert_response_contains),
and test_smoke.py with 4 passing smoke tests. No real LLM API keys required.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Wires mock LLM + Agent + Bus + Orchestrator into a single fixture so
tests can exercise the full pipeline coordinator layer via
process_direct() without requiring real API keys or a live bus loop.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…[ci]

- BrowserPlugin/ComputerPlugin: wire _state_hook (and _wait_for_ui_hook)
  into register_hooks/unregister_hooks/enable/disable so hooks are
  registered with the Hooks service when the plugin is enabled
- Both plugins: add <perception>, <tool_use>, <execution_principles>
  XML sections to SYSTEM_PROMPT as expected by the test suite
- BrowserPlugin.unregister_tools: also unset_extension("browser")
  so registry.get("browser") returns None after unregistration
- ToolRegistry.get: fall back to _extensions when no tool matches
  by name, enabling tests to discover the browser extension via get()
- control_center: pass graceful_fn=kwargs.get("_graceful_restart_fn")
  to _do_restart so graceful restart fn is correctly threaded through
- ruff --fix: remove unused imports across several files

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@richard-devbot richard-devbot force-pushed the richardson/phase0-e2e-framework branch from e60fa03 to 56635b2 Compare April 13, 2026 07:49
- Add TYPE_CHECKING guard in cli/start.py so MCPManager forward ref resolves (F821)
- Remove unused mock_session variable in test_mcp_manager.py (F841)
- Suppress unused tool_names via _ assignment in test_mcp_manager.py (F841)
- Apply ruff format across all 215 files (E702 semicolons and style)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.

[Phase 0.2.4] Create e2e test framework

1 participant