oliarmak-web commented on code in PR #9259:
URL: https://github.com/apache/texera/pull/9259#discussion_r4458496866
##########
agent-service/src/agent/texera-agent.ts:
##########
@@ -587,7 +587,9 @@ export class TexeraAgent {
const formattedToolResults = toolResults?.map(tr => ({
Review Comment:
Addressed in 8a34611f0. I now build the stored results from the step
content, including `tool-error` parts as failures, index them by `toolCallId`,
and reuse that normalized map for the delegate post-step execution decision.
The rejected-modification regression now verifies that the call is recorded as
failed and that no execution request is made. Results are also matched to calls
by ID when task history is serialized.
##########
agent-service/src/agent/texera-agent.ts:
##########
@@ -587,7 +587,9 @@ export class TexeraAgent {
const formattedToolResults = toolResults?.map(tr => ({
toolCallId: tr.toolCallId,
output: tr.output,
- isError: !!(tr.output as any)?.error,
+ isError:
+ (typeof tr.output === "string" &&
tr.output.startsWith("[ERROR]")) ||
+ (typeof tr.output === "object" && tr.output !== null && "error"
in tr.output && !!tr.output.error),
Review Comment:
Addressed in 8a34611f0. I added a shared `isErrorResult` predicate beside
`createErrorResult`, removed the producer-less object branch, and use the
normalized result's `isError` value for the post-step decision. I also added
focused unit coverage for the shared predicate.
--
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]