fix(agent): stop whitewashing subgoals via tool-name substring match (#2758) - #2759
Merged
Merged
Conversation
Owner
Author
|
合并说明:techwriter_techwriter222_agent 代裁 approve(reviewer 作者回避;工具名侧命中场景全部系误洗白——泛型名不携证据;参数侧补偿钉死两用例+语义与修前一致零正例损失)。CI 全绿。执行合并,#2758 随链。 |
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
Fixes #2758 (reviewer triage round; two-step claim receipt + ledger comment on file; probe reproduced FAIL before fix).
Root cause
subgoalState.recordToolCallmatched subgoal keywords against the tool NAME with substring Contains: anyread_filewhitewashed a "file" keyword,search_filesa "search" keyword,run_commanda "command" keyword... Unrelated calls marked subgoals addressed (one-way latch), and the un-addressed-subgoal warning went silent — systematic under-reporting. Tool names are generic by design and carry no evidence about WHICH subgoal was addressed.Change (
internal/agent/subgoal_track.go)Drop the tool-name side of the match; keywords now match against tool ARGUMENTS only (a real edit whose arguments name the config file still counts). The
toolNameparameter stays in the signature for caller compatibility.Verification
zz_issue2758_test.go: issue's exact reproduction (unrelatedread_file /tmp/README.mdwhitewashing subgoal 1) FAIL before / PASS after; argument-side true positive (edit_file with config.go) PASS before and after.go test ./internal/agent/full package ok 22.9s;go build -tags goolm ./...exit 0; gofmt clean.Co-Authored-By: ggcode noreply@ggcode.dev