bobbai00 opened a new pull request, #5927:
URL: https://github.com/apache/texera/pull/5927
### What changes were proposed in this PR?
**Stacked on #5751 (foundation).** This is the second of the split: it
carries the sync-execution **result/error model redesign** (no overlap with the
foundation PR — `types/execution.ts` is untouched there).
- Replace the flat `OperatorInfo` with `OperatorExecutionSummary`
(orthogonal sub-summaries: `state`, `errorMessages`, `resultSummary?`,
`consoleLogsSummary?`); rename `SyncExecutionResult` →
`WorkflowExecutionSummary`.
- `resultSummary.sampleTuples` is now `SampleRow[]` (`{ rowIndex, tuple }`)
instead of JSON rows with an embedded `__row_index__`; drop the table-shape
types (the agent derives input-port shapes from the DAG).
- Reuse the engine's `WorkflowFatalError` for per-operator errors (the same
type the compiling service returns), replacing the bespoke `OperatorError` so
compile and execution errors share one wire shape.
- `errorMessages` / `errors` are non-optional (empty = none); drop
`compilationErrors`; collapse the console-message types and derive warnings
from `WARNING:`-titled messages.
- The WS `operatorResults` payload carries the canonical
`OperatorExecutionSummary`; the frontend maps it to its flat display type.
Touches the Scala producer (`SyncExecutionResource`), the agent-service
consumers (`result-formatting`, `workflow-execution-tools`,
`workflow-result-state`, `server`), and the frontend WS mapping.
Representation/type-level; behavior preserved (input-port shape lines are now
derived rather than explicitly rendered).
### Any related issues, documentation, discussions?
Part of #5747. **Depends on #5751** (foundation) — please review/merge that
first. This PR targets `main`, so until #5751 lands the diff below also
includes the foundation changes; the execution-specific delta is the single
`refactor(agent-service): redesign sync-execution result and error model`
commit, and the diff narrows to just those 12 files once #5751 merges.
### How was this PR tested?
- `bunx tsc --noEmit`, `bun test` (121 pass / 0 fail), `prettier --check` in
`agent-service`; `sbt WorkflowExecutionService/compile` for amber.
- **End-to-end on the full local stack** with a Claude Haiku 4.5 agent: it
built and executed a CSV workflow; `/operator-results` returned the new shape —
`resultSummary.sampleTuples: [{ rowIndex, tuple }]`, `errorMessages: []` — and
the agent rendered the rows correctly.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.8 (1M context)
--
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]