Repository navigation
fix(goal): keep goal_finish summary/reason fields visible to MCP adapters - #25
Conversation
devnoname120
left a comment
There was a problem hiding this comment.
Reviewed d0910fa. This is the first review on this PR. The schema change is limited to removing status-dependent anyOf from the wire representation; summary/reason remain explicit string properties and finish_report still validates the correct nonempty field, rejects the incompatible field, and requires nextSteps before finishing the goal. The shared retry-predicate simplification is logically equivalent.
Validation on macOS with an isolated build target: all 24 goal-related library tests pass, including the flat-schema/completion validation test; cargo clippy --all-targets -- -D warnings passes. All four hosted checks are also successful. I found no blocking issue; this is ready to merge independently of #24.
Problem
Some MCP adapters normalize
goal_finish's status-dependent JSON SchemaanyOfinto an untyped object and silently omit thesummaryorreasonfield before invocation. This makes it impossible to complete/mark blocked an otherwise valid goal from those clients.Change
anyOfconditional branches from the tool's wire schema only while retainingexpectedRevision,status, andnextStepsas required.finish_report:completedstill requires a nonemptysummary;blockedstill requires a concretereason.summary/reasonproperties and reject acompletedcall missingsummary.This is one independent, 1-file commit (26 insertions, 4 deletions) on current upstream
main(e90f4e9), cherry-picked from an independently compiled Windows working tree where the fix was used successfully. It does not modify retry scheduling, goal eligibility, authentication, or browser automation.Verification
cargo fmt --all -- --check: pass.git diff --check origin/main..HEAD: pass.goal_finishreporting were checked live.Related but independent: #24 changes goal continuation/auditing in this file, not the
goal_finishinput-schemaanyOf. Can rebase cleanly when those changes land.