test(tools): add deterministic subsystem test suites for wikipedia, arxiv, and calculator tools - #301
Open
Jaswanth-dev-69 wants to merge 2 commits into
Open
Conversation
…rxiv, and calculator tools
There was a problem hiding this comment.
Pull request overview
Adds deterministic subsystem coverage for three “utility/retrieval” tools (Wikipedia, arXiv, Calculator) and wires them into the source→test selection map so changes to the tool implementations automatically trigger these suites in the test matrix.
Changes:
- Added new deterministic subsystem test suites for
WikipediaTool,ArxivTool, andCalculatorTool, including formatting/error-boundary/security contracts. - Added a
tools_utility_and_retrievalSourceTestRuleto ensure tool-source edits select these tests in CI.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/subsystem/tools/test_wikipedia_tool_subsystem.py | New deterministic subsystem tests for Wikipedia tool identity, HTTPS enforcement, error recovery, and output formatting. |
| tests/subsystem/tools/test_arxiv_tool_subsystem.py | New deterministic subsystem tests for arXiv tool formatting, URL normalization, truncation, and error/empty handling. |
| tests/subsystem/tools/test_calculator_tool_subsystem.py | New deterministic subsystem tests for calculator operations, formatting, error boundaries, and blocked-dangerous expressions. |
| tests/helpers/source_test_map.py | Adds a new source→test mapping rule for the three tool implementations to select these suites when changed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds deterministic subsystem test suites for three core tools that previously lacked subsystem test coverage:
wikipedia_tool,arxiv_tool, andcalculator_tool.Changes Included
tests/subsystem/tools/test_wikipedia_tool_subsystem.py):wikipedia), default enablement, and zero API key requirement contracts.SOURCE_URL).tests/subsystem/tools/test_arxiv_tool_subsystem.py):https://arxiv.org/html/...).et al.formatting when > 5 authors).tests/subsystem/tools/test_calculator_tool_subsystem.py):sqrt,log,sin,factorial,gcd, etc.), and constants (pi,e,tau)..0).__import__,exec,eval,open, attribute access) are strictly blocked.tests/helpers/source_test_map.py):tools_utility_and_retrievalrule so modifying any of the three tool source files automatically triggers these tests during CI test matrix runs.Type of change
Risk area
Testing
uv run python scripts/run_test_matrix.py fastuv run python scripts/run_test_matrix.py prfor shared, release-sensitive, or cross-subsystem changestests/helpers/when changing coverage ownershipRelease notes
Checklist
main