Skip to content

fix(goal): keep goal_finish summary/reason fields visible to MCP adapters - #25

Merged
devnoname120 merged 2 commits into
devnoname120:mainfrom
AKzar1el:fix/goal-finish-flat-schema-20261114
Nov 15, 2026
Merged

devnoname120 merged 2 commits into
devnoname120:mainfrom
AKzar1el:fix/goal-finish-flat-schema-20261114

Conversation

@AKzar1el

Copy link
Copy Markdown
Contributor

Problem

Some MCP adapters normalize goal_finish's status-dependent JSON Schema anyOf into an untyped object and silently omit the summary or reason field before invocation. This makes it impossible to complete/mark blocked an otherwise valid goal from those clients.

Change

  • Remove the anyOf conditional branches from the tool's wire schema only while retaining expectedRevision, status, and nextSteps as required.
  • Preserve the existing runtime validation via finish_report: completed still requires a nonempty summary; blocked still requires a concrete reason.
  • Extend the schema test to verify flat summary/reason properties and reject a completed call missing summary.

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.
  • The source change was previously built into the author's installed Windows Codexify binary, whose service health and goal_finish reporting were checked live.
  • Full upstream Rust tests/CI have not yet been rerun for this isolated commit; leaving as a draft for CI and review.

Related but independent: #24 changes goal continuation/auditing in this file, not the goal_finish input-schema anyOf. Can rebase cleanly when those changes land.

@devnoname120 devnoname120 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@devnoname120
devnoname120 merged commit c9d963c into devnoname120:main Nov 15, 2026
4 checks passed
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.

2 participants