mengw15 opened a new issue, #6374:
URL: https://github.com/apache/texera/issues/6374
### Task Summary
`agent-service/src/agent/tools/workflow-execution-tools.ts` (codecov ~7.5% —
the service's single biggest gap, ~484 uncovered lines) has
`executeOperatorAndFormat(...)`: it validates a logical plan, runs it via
`executeWorkflowHttp`, and formats the target operator's result. Unit-testable
with `bun test` by mocking the HTTP call (`executeWorkflowHttp` / the
`execution-api` module) to return canned `SyncExecutionResult`s — no live
backend; `getBackendConfig` and the workflow mutex can be stubbed.
### Behavior to cover
- empty `logicalPlan.operators` -> `createErrorResult("Cannot execute:
workflow has no operators.")`
- pre-exec validation fails with target-operator errors -> error listing them
- `executeWorkflowHttp` returns `result.success === false` -> error with the
returned error text
- target operator info missing from the result -> error
- target `opInfo.error` present -> error via `formatExecutionError`
- `opInfo.result` missing / not an array -> `"(no result data)"`
- result string exceeds the char limit -> truncated output
- success path -> formatted operator result; `options.onResult` callback
invoked when provided
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]