Skip to content

Conversation

@vblagoje
Copy link
Member

@vblagoje vblagoje commented Jan 7, 2026

Why

Upstream Haystack added tool validation hooks (_get_valid_inputs() and _get_valid_outputs()) to catch typos in inputs_from_state and outputs_to_state at tool construction time. This exposed invalid state mappings in GitHub integration tests.

What

Fixed 12 test cases with invalid outputs_to_state mappings that referenced non-existent output keys:

  • test_file_editor_tool.py: "content" → "result"
  • test_issue_commenter_tool.py: "docs" → "success"
  • test_issue_viewer_tool.py: "docs" → "documents"
  • test_pr_creator_tool.py: "docs" → "result"
  • test_repo_forker_tool.py: "docs" → "repo"
  • test_repo_viewer_tool.py: "content" → "documents"

Each fix maps state to actual component output keys (e.g., GitHubFileEditor returns {"result": ...}, GitHubIssueCommenter returns {"success": ...}).

How can it be used

Same as before - no API changes, just test fixes.

How did you test it

Ran the test suite

Notes for the reviewer

This is identical to the fix in integrations/mcp (#2654). The validation now catches what were previously silent bugs - tests used invalid output names that would have failed at runtime when state mapping was actually attempted.

@vblagoje vblagoje marked this pull request as ready for review January 7, 2026 09:15
@vblagoje vblagoje requested a review from a team as a code owner January 7, 2026 09:15
@vblagoje vblagoje requested review from anakin87 and removed request for a team January 7, 2026 09:15
@vblagoje vblagoje changed the title chore: Fix tool validation test failures chore: Fix tool validation test failures in github integration Jan 7, 2026
Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@vblagoje vblagoje merged commit 54b166f into main Jan 7, 2026
10 checks passed
@vblagoje vblagoje deleted the fix-github-validation branch January 7, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants