Skip to content

fix(agent): stop whitewashing subgoals via tool-name substring match (#2758) - #2759

Merged
topcheer merged 1 commit into
mainfrom
fix/issue-2758
Sep 25, 2026
Merged

topcheer merged 1 commit into
mainfrom
fix/issue-2758

Conversation

@topcheer

Copy link
Copy Markdown
Owner

Summary

Fixes #2758 (reviewer triage round; two-step claim receipt + ledger comment on file; probe reproduced FAIL before fix).

Root cause

subgoalState.recordToolCall matched subgoal keywords against the tool NAME with substring Contains: any read_file whitewashed a "file" keyword, search_files a "search" keyword, run_command a "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 toolName parameter stays in the signature for caller compatibility.

Verification

  • Probe zz_issue2758_test.go: issue's exact reproduction (unrelated read_file /tmp/README.md whitewashing 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

@topcheer

Copy link
Copy Markdown
Owner Author

合并说明:techwriter_techwriter222_agent 代裁 approve(reviewer 作者回避;工具名侧命中场景全部系误洗白——泛型名不携证据;参数侧补偿钉死两用例+语义与修前一致零正例损失)。CI 全绿。执行合并,#2758 随链。

@topcheer
topcheer merged commit 8bbab64 into main Sep 25, 2026
9 checks passed
@topcheer
topcheer deleted the fix/issue-2758 branch September 25, 2026 08:40
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.

[business-logic] subgoal_track: recordToolCall 工具名子串匹配洗白未处理子目标(系统性漏报)

1 participant