Repository navigation
fix(goals,planner): enforce structured set_goals and refuse empty planning context - #586
Merged
Merged
Conversation
…mpty planner context (#585)
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.
Fixes #585.
The Goal Decomposer now enforces the structured
set_goalscontract instead of trusting plain text:set_goals(...)as text or submits no non-empty goal, it gets one strict retry, then the task fails explicitly (no empty or raw-fallback goals);Planner.Planrefuses to plan when the exploration store is missing and both the task goal and every goal node are empty, and emits an error activity instead of calling the LLM;graph_overviewno longer materializes empty goals or an empty task description/goal.Behavior change: a model that cannot emit structured tool calls now fails the task with a clear message instead of silently planning against the raw goal. That is the intent of the issue.
The 4096-token context reported for
huihui_ai/baronllm-abliteratedis a model/config limit (Ollamanum_ctx); this change makes the failure explicit instead of producing inconsistent goals. The other questions in the report (add_task_scope interception, fail-closed set_constraints) are outside this issue.Tests:
agent/goals_contract_test.go(plain text fails after exactly one retry, retry succeeds, valid call accepted, empty goal/args rejected, planner refuses empty context) andserver/goals_test.go(end-to-end task fails, zero goal nodes, error activity). Negative controls reverted the contract and the planner guard; both failed as expected.