You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "bobbai00 (via GitHub)" <gi...@apache.org> on 2026/05/28 17:52:47 UTC
[I] Improve test coverage of the agent service [texera]
bobbai00 opened a new issue, #5266:
URL: https://github.com/apache/texera/issues/5266
### 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
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Improve test coverage of the agent service [texera]
Posted by "bobbai00 (via GitHub)" <gi...@apache.org>.
bobbai00 closed issue #5266: Improve test coverage of the agent service
URL: https://github.com/apache/texera/issues/5266
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Improve test coverage of the agent service [texera]
Posted by "bobbai00 (via GitHub)" <gi...@apache.org>.
bobbai00 commented on issue #5266:
URL: https://github.com/apache/texera/issues/5266#issuecomment-4793597583
Folded into the #5747 sub-tasks; agent-service test coverage is now part of each (e.g., #5749/#5751 brings server.ts to 100%). Closing as subsumed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org