fix(skill-scan): recover missing tool-call args during discovery - #648
Open
li872 wants to merge 1 commit into
Open
fix(skill-scan): recover missing tool-call args during discovery#648li872 wants to merge 1 commit into
li872 wants to merge 1 commit into
Conversation
Malformed LLM tool calls (missing thought/command/path, legacy execute_shell, Qwen/GLM wrappers) no longer abort skill-scan info collection with an empty report. Fixes Tencent#629
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
Skill-scan info collection (AIG three-stage mode) often finished with an empty report after models such as qwen3-7 / glm5-2 / qwen3.7-plus emitted tool calls that the parser only partially understood. The dispatcher then called tool_func(**{}), which raised TypeError: missing 1 required positional argument: 'thought' / 'command' / 'path'. The agent treated the tools as broken, skipped the real project tree, and finished with 0 findings.
Root cause (parser + dispatcher, not the filesystem):
Fix (minimal, recoverable):
No shell execution was added. Arbitrary execute_shell commands are rejected with a clear “use dir_tree/ls/read_file/grep” error.
Type of change
How was this tested?
Run:
Result: 47 passed.
Regression tests feed the #629 shapes (missing thought, missing command, dir_tree with no path / child-tag path / Qwen tool_call JSON) and assert the scanner recovers a real SKILL.md tree or returns a retryable error — never a TypeError / empty discovery.
Tests
Demo
Passing regression run:
https://raw.githubusercontent.com/li872/AI-Infra-Guard/cursor/fix-skill-scan-tool-args-a83f/docs/pr-629-demo/pytest-issue-629.log
Related issue
Fixes #629
Checklist