Task Summary
The agent service (agent-service/) currently has low automated test coverage. A bun test --coverage run reports ~51.6% line / 54.2% function coverage overall, and the gaps are concentrated in the core logic rather than helpers:
| Module |
% Lines |
Role |
util/context-utils.ts |
1% |
builds per-step LLM context |
tools/workflow-execution-tools.ts |
5% |
operator execution tool |
api/workflow-api.ts |
8% |
workflow CRUD client |
api/compile-api.ts |
10% |
compile client |
util/workflow-utils.ts |
10% |
workflow helpers |
agent/prompts.ts |
15% |
system prompt builder |
tools/workflow-crud-tools.ts |
22% |
add/modify/delete tools |
agent/texera-agent.ts |
32% |
core ReAct loop (sendMessage) |
server.ts |
50% |
REST routes + websocket |
The well-covered files (result-formatting, tools-utility, auto-layout, workflow-result-state) are mostly leaf utilities, so the headline number overstates how much of the agent's behavior is actually exercised.
Add unit/integration tests for, at minimum:
- the
texera-agent.ts ReAct loop — step-tree construction, HEAD/checkout, stop/abort, error steps, settings effects;
- the CRUD and execution tools (positive + error/
[ERROR] paths);
- context assembly in
context-utils.ts;
- the API clients (
workflow-api, compile-api, backend-api) against mocked HTTP, including bad/malformed responses.
Tests should cover both positive and negative paths (invalid input, missing config, backend errors), per the project testing guidelines.
Task Type
Task Summary
The agent service (
agent-service/) currently has low automated test coverage. Abun test --coveragerun reports ~51.6% line / 54.2% function coverage overall, and the gaps are concentrated in the core logic rather than helpers:util/context-utils.tstools/workflow-execution-tools.tsapi/workflow-api.tsapi/compile-api.tsutil/workflow-utils.tsagent/prompts.tstools/workflow-crud-tools.tsagent/texera-agent.tssendMessage)server.tsThe well-covered files (
result-formatting,tools-utility,auto-layout,workflow-result-state) are mostly leaf utilities, so the headline number overstates how much of the agent's behavior is actually exercised.Add unit/integration tests for, at minimum:
texera-agent.tsReAct loop — step-tree construction, HEAD/checkout, stop/abort, error steps, settings effects;[ERROR]paths);context-utils.ts;workflow-api,compile-api,backend-api) against mocked HTTP, including bad/malformed responses.Tests should cover both positive and negative paths (invalid input, missing config, backend errors), per the project testing guidelines.
Task Type