Skip to content

Add regression coverage for ToolInvoker with empty tool results #12455

Description

@Whxuan0701

Summary

Add focused regression coverage for a ToolInvoker/Agent tool that completes successfully while returning an empty or otherwise falsy result.

Current implementation facts

Haystack's Agent tool flow distinguishes tool execution from message conversion.

Problem

An empty string, list, or dictionary can be treated differently from a non-empty result by downstream message construction. A change can accidentally turn a successful empty result into a missing result or error.

Scope

  • Add parameterized tests for supported empty result shapes.
  • Assert emitted status and tool-call correlation.
  • Cover sync and async paths where available.

Non-goals

  • Do not define a new display format.
  • Do not change semantics without maintainer agreement.

Acceptance criteria

  • Empty results remain successful tool results.
  • Tool-call identifiers remain attached.
  • Existing result tests pass.

I searched Haystack issues and PRs for ToolInvoker, empty tool result, and falsy result handling before filing this proposal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions