[aw-compat] Restore GitHub toolset mapping parity with declared default tools#31479
Merged
Conversation
4 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix missing tools in github_tool_to_toolset.json
[aw-compat] Restore GitHub toolset mapping parity with declared default tools
May 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Restores parity between the default GitHub tool allowlist and the GitHub-tool-to-toolset mapping to prevent “Unknown GitHub tool(s)” validation failures, and adds a regression test to keep them from drifting again.
Changes:
- Added missing default-tool entries to
pkg/workflow/data/github_tool_to_toolset.json. - Added a unit test asserting every tool in
constants.DefaultReadOnlyGitHubToolsexists inGitHubToolToToolsetMap. - Minor comment-only tweak in the Issue Monster workflow lock file.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/github_tool_to_toolset_test.go | Adds a regression test ensuring all default GitHub tools resolve in the mapping. |
| pkg/workflow/data/github_tool_to_toolset.json | Adds mappings for previously-unmapped default GitHub tools (tool → toolset). |
| .github/workflows/issue-monster.lock.yml | Comment-only adjustment in an embedded example snippet. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (2)
pkg/workflow/data/github_tool_to_toolset.json:68
list_labelis mapped to theissuestoolset, but it is documented/defined as part of thelabelstoolset (see.github/aw/github-mcp-server.md### labels, andpkg/workflow/data/github_toolsets_permissions.jsonwherelabels.toolsincludeslist_label). This mapping should be"labels"to keep toolset selection consistent.
"get_label": "labels",
"list_label": "issues",
"list_labels": "labels",
"create_label": "labels",
pkg/workflow/data/github_tool_to_toolset.json:79
search_orgsis mapped to theorgstoolset, but it is documented/defined under thesearchtoolset (see.github/aw/github-mcp-server.md### search, andpkg/workflow/data/github_toolsets_permissions.jsonwheresearch.toolsincludessearch_orgs). Mapping it toorgsmakes toolset-based allowlisting misleading.
"get_organization": "orgs",
"list_organizations": "orgs",
"search_orgs": "orgs",
- Files reviewed: 3/3 changed files
- Comments generated: 1
| "list_commits": "repos", | ||
| "get_commit": "repos", | ||
| "get_latest_release": "repos", | ||
| "list_starred_repositories": "repos", |
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.
Bug Fix
What was the bug?
pkg/constants/tool_constants.goandpkg/workflow/data/github_tool_to_toolset.jsondrifted: 17 tools declared as valid defaults had no toolset mapping, causing compile-timeUnknown GitHub tool(s)failures when those tools were used intools.github.allowed.How did you fix it?
pkg/workflow/data/github_tool_to_toolset.jsonwith toolsets aligned to existing conventions/upstream categories:pull_requests:get_pull_request_comments,get_pull_request_diff,get_pull_request_files,get_pull_request_review_comments,get_pull_request_reviews,get_pull_request_statusdependabot:get_dependabot_alert,list_dependabot_alertsdiscussions:get_discussion,get_discussion_comments,list_discussion_categoriesnotifications:get_notification_detailsactions:get_workflow_run_logsissues:list_issue_types,list_labelrepos:list_starred_repositoriesorgs:search_orgsTestGitHubToolToToolsetMap_IncludesDefaultGitHubToolsinpkg/workflow/github_tool_to_toolset_test.goto assert every tool inconstants.DefaultReadOnlyGitHubToolsresolves inGitHubToolToToolsetMap.Testing
{ "get_pull_request_files": "pull_requests", "get_workflow_run_logs": "actions", "list_issue_types": "issues", "search_orgs": "orgs" }