Repository navigation
Fix update_issue schema compatibility with Anthropic - #66784
Conversation
Remove the unsupported top-level anyOf from both tool schema copies and enforce update-field requirements in the MCP handler. Add runtime and generated-schema regression coverage and document the requirement. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. No ADR enforcement needed for PR #66784: the PR does not carry the implementation label (has_implementation_label=false) and adds only 1 line in default business logic directories, well under the 100-line threshold (requires_adr_by_default_volume=false). No custom .design-gate.yml config is present.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
There was a problem hiding this comment.
🟡 Changes recommended
The existing blank-field Go conformance test still expects schema-level rejection and now fails.
1 open finding
What changed in this PR
Makes update_issue schemas Anthropic-compatible while retaining runtime update-field validation.
Changes:
- Removes the top-level
anyOfrequirement from both schema copies. - Adds handler validation and regression coverage for updates and explicit clears.
- Documents required update fields.
| File | Description |
|---|---|
pkg/workflow/js/safe_outputs_tools.json |
Updates the embedded schema. |
docs/src/content/docs/reference/safe-outputs.md |
Documents required update fields. |
actions/setup/js/safe_outputs_tools.json |
Updates the runtime schema. |
actions/setup/js/safe_outputs_handlers.test.cjs |
Tests handler validation. |
actions/setup/js/safe_outputs_handlers.cjs |
Enforces update-field presence. |
actions/setup/js/generate_safe_outputs_tools.test.cjs |
Tests generated schema compatibility. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Request changes
This removes the top-level anyOf, but it also cements a contradictory update_issue contract: the tool description still says milestone: null clears the milestone, while the new handler/tests reject that payload before it can be recorded.
Blocking theme
The change needs to make the milestone-clear path consistent end to end. Either preserve explicit milestone: null updates through validation/execution, or remove the Use null to clear contract from the schema and docs in the same PR. Shipping both behaviors at once guarantees that schema-driven clients will hit a handler-side -32602 for a documented operation.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 55.4 AIC · ⌖ 5.45 AIC · ⊞ 19.8K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs — requesting changes: the new update-field guard has a documented-clear regression for milestone.
📋 Key Themes & Highlights
Key Themes
- Milestone clear regression:
safe_outputs_tools.jsondocumentsmilestone: nullas "Use null to clear", but the newupdateFields.some(...)guard insafe_outputs_handlers.cjs(line 3016) treatsnullas "not supplied" for every field, includingmilestone. A caller intending to clear only the milestone now gets a-32602validation error instead of the clear being applied. The PR's own test suite (safe_outputs_handlers.test.cjsline 4223) bakes this in as expected —{ milestone: null }is asserted to be rejected rather than accepted and forwarded. - The
anyOf→ MCP-handler validation migration itself is sound and well-targeted: it fixes real Anthropic tool-registration incompatibility, keepsadditionalProperties: false, and reusesnormalizeBlankOptionalFieldsconsistently with other handlers. - Test coverage for the new guard is good and uses clear parametrized cases, which made the milestone regression straightforward to pinpoint — just needs one edge case corrected.
Positive Highlights
- ✅ Clean, minimal schema diff — only the unsupported
anyOfkeyword removed, nothing else disturbed. - ✅ Tool description updated in the same commit so the agent-facing guidance reflects the new validation requirement.
- ✅ Docs (
safe-outputs.md) updated alongside the code change.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 152 AIC · ⌖ 13.5 AIC · ⊞ 10.1K
Comment /matt to run again
There was a problem hiding this comment.
Impeccable Review Summary (mode: harden)
One blocking issue found in the new update_issue required-field guard.
milestone: nullincorrectly rejected — the schema documentsnullas the way to clear a milestone, and the downstreamrequiresOneOfvalidator treatsnullas present. The new MCP-layer pre-check excludesnulltoo, silently blocking the documented clear-milestone flow. See inline comment.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 145.5 AIC · ⌖ 13.1 AIC · ⊞ 8.1K
…MCP handler Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |

Summary
Anthropic rejects
update_issueduring tool registration because its input schema contains a top-levelanyOf. Remove that unsupported composition keyword from both the runtime and embedded schemas, and describe the update-field requirement in the tool guidance.Preserve immediate validation in the MCP handler: calls must include at least one update field before an output is recorded. Reuse blank-optional-field normalization while preserving empty-body and empty-list updates. Add generated-schema and handler regression coverage, and document the requirement.
Validation
make fmt-cjs,make lint-cjs, the Go build, andgo test ./pkg/workflow -run 'TestSafeOutputsTools' -count=1.make agent-report-progressremains blocked by two unrelated macOS failures insafe_outputs_handlers.test.cjs: the/etcsystem-directory assertion and eligible-JSON custom validation. Both reproduce on the unchanged baseline.