This issue is AI generated.
Problem
test/e2e/ covers only register_login_logout.test.js and qr_login.test.js. No end-to-end test simulates a full agent run: submitting a task via WebSocket, the engine selecting and executing tools, and completing with a final response. This means regressions in the engine loop, tool runner, or result streaming are only caught by unit tests that mock at a much lower level — or by manual testing.
Evidence
test/e2e/ — two test files, neither covers agent runs.
- No test in any suite submits a real task via
agent:run and waits for a run:complete event.
Required change
Add an e2e test that:
- Registers/logs in a test user.
- Connects a Socket.IO client.
- Emits
agent:run with a simple deterministic task (e.g. "what is 2+2" with a mock or real model).
- Waits for
run:complete and asserts the result structure.
- Verifies tool events appeared in the correct order.
Add a second test that exercises the tool approval gate: a task that requires an approval, where the test client automatically approves via the REST API, and asserts the run completes.
Acceptance criteria
- At least one e2e test covers a full agent run from WebSocket submission to completion.
- At least one e2e test covers the tool approval handshake.
- Tests are deterministic (use a fixed simple task or a stubbed model response).
- Tests are included in
npm run test:e2e.
This issue is AI generated.
Problem
test/e2e/covers onlyregister_login_logout.test.jsandqr_login.test.js. No end-to-end test simulates a full agent run: submitting a task via WebSocket, the engine selecting and executing tools, and completing with a final response. This means regressions in the engine loop, tool runner, or result streaming are only caught by unit tests that mock at a much lower level — or by manual testing.Evidence
test/e2e/— two test files, neither covers agent runs.agent:runand waits for arun:completeevent.Required change
Add an e2e test that:
agent:runwith a simple deterministic task (e.g. "what is 2+2" with a mock or real model).run:completeand asserts the result structure.Add a second test that exercises the tool approval gate: a task that requires an approval, where the test client automatically approves via the REST API, and asserts the run completes.
Acceptance criteria
npm run test:e2e.