Skip to content

test(tools): add a registry-path suite for every built-in - #369

Merged
github-actions[bot] merged 1 commit into
mainfrom
test/builtin-tool-suite
Aug 16, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
test/builtin-tool-suite

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

Adds crates/forge-tools/tests/all_tools.rs, a contract suite that hits every built-in through ToolRegistry::call — the same path the agent loop uses.

  • Pins the default_builtins() inventory so a renamed or dropped tool fails first
  • Checks descriptors (name, description, object schema)
  • Rejects missing required args as ToolError::Validation
  • Happy paths for read/ls/glob/grep (including rg → grep), write + apply_patch, view_image, bash + git, exec_command + write_stdin, update_plan, load_skill, and optional web_search
  • Asserts background_run refuses direct registry execution
  • Confirms workspace confinement for read/write/patch

Existing unit tests for parsers and edge cases are unchanged.

Test plan

  • cargo test --package forge-tools --test all_tools
  • cargo clippy --package forge-tools --all-targets -- -D warnings
  • CI green on this PR

Exercise each default tool through ToolRegistry::call so a missing
name, broken schema, or failed happy path fails the inventory first.
@github-actions
github-actions Bot enabled auto-merge (squash) August 16, 2026 19:33
@github-actions
github-actions Bot merged commit 9ebd981 into main Aug 16, 2026
7 checks passed
mohitranka added a commit that referenced this pull request Aug 21, 2026
Exercise each default tool through ToolRegistry::call so a missing
name, broken schema, or failed happy path fails the inventory first.
mohitranka added a commit that referenced this pull request Sep 11, 2026
Exercise each default tool through ToolRegistry::call so a missing
name, broken schema, or failed happy path fails the inventory first.
mohitranka added a commit that referenced this pull request Sep 11, 2026
Exercise each default tool through ToolRegistry::call so a missing
name, broken schema, or failed happy path fails the inventory first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant