chore: Fix tool validation test failures in github integration #2659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.