refactor(core): ♻️ Flatten update_plan input and require core fields#228
Merged
Conversation
Remove the nested `plan` object from update_plan tool parameters. All planning fields are now top-level required arguments. This simplifies the tool interface and prevents ambiguous calls. Updated validation error messages to clearly indicate missing required fields. Adjusted plan_checkpoint to read directly from the root object. Updated tests to verify the new structure. BREAKING CHANGE: update_plan no longer accepts a nested `plan` object. Clients must pass all fields as top-level arguments.
AI Code Review SummaryPR: #228 (refactor(core): ♻️ Flatten update_plan input and require core fields) Overall AssessmentNo blocking issue was detected in the reviewed diff; keep focused regression testing before merge. Major Findings by SeverityNo major issues identified from the reviewed diff. Actionable Suggestions
Potential Risks
Test Suggestions
File-Level Coverage Notes
Inline Downgraded Items (processed but not inline)
Coverage Status
Uncovered list:
No-patch covered list:
Runtime/Budget
|
| @@ -1021,17 +1021,17 @@ impl AgentSession { | |||
| // meets the quality contract enforced by the system prompt. | |||
There was a problem hiding this comment.
Automated review completed for this PR diff. No concrete inline issue was selected after aggregation.
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
update_plantool schema by removing the redundant nestedplanobject so the model only sees top-level fields.requiredarray (title,summary,context,design,keyImplementation,steps,verification,risks) so empty-argument calls are rejected at generation time instead of after execution..get("plan")fallback inbuild_plan_artifact_from_tool_input.Motivation
Models (e.g. Claude) repeatedly called
update_planwith empty{}arguments and looped on the errorupdate_plan requires a non-empty title .... The schema had norequiredconstraint and exposed an ambiguous nestedplanobject mirroring the top-level fields, so the machine-readable contract said everything was optional and the model could not self-correct from the opaque error.Test Plan
cargo fmt --check --manifest-path src-tauri/Cargo.tomlcargo test --locked --manifest-path src-tauri/Cargo.toml --lib plan(37 passed)cargo testin CI🤖 Generated with TiyCode