fix(coordinator): respect planner 'no changes needed' conclusion#4868
Closed
eghrhegpe wants to merge 2 commits into
Closed
fix(coordinator): respect planner 'no changes needed' conclusion#4868eghrhegpe wants to merge 2 commits into
eghrhegpe wants to merge 2 commits into
Conversation
Contributor
Author
运行指标
|
Collaborator
|
Thanks @eghrhegpe. I consolidated the no-op planner conclusion behavior into #4938. What was kept:
Your contribution is credited in #4938 under Repository Contributor Credits. Closing this PR in favor of the integration PR. |
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.
问题
两模型模式下(配置了 planner_model),planner 输出「无需修改」后,Coordinator 仍然把计划交给 executor 执行,导致 executor 无视 planner 结论继续改代码。
改动
代码层
在 Coordinator.Run() 加入 isNoOpPlan() 检查——planner 输出包含以下任一短语时跳过 executor:
无需变更:no changes needed / no changes are needed / no changes required / no changes are required
无需操作:no action needed / no action required
无需改动:nothing to change / nothing to do
已完成:already handled / already implemented / already resolved
提示层
formatHandoff 的 executor 指令明确要求:planner 结论可靠,如果它说不用改就别改;只忽略 planner 自身的能力限制(只读、不能写等),不忽略结论。
文件
internal/agent/coordinator.go — +36 / -2
测试
go test ./internal/agent/ -run TestCoordinatorPlannerMaxSteps — 通过。
Cache-impact: none