Fix reply_to_pull_request_review_comment schema CI failures#15779
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request fixes CI failures in the safe_outputs_mcp_schema_validation.test.cjs test suite that were introduced in PR #15691. The issue stems from the reply_to_pull_request_review_comment tool's schema using oneOf patterns instead of the established MCP tool convention of type: ["number", "string"] for dual-type numeric fields, and having descriptions that were too short and lacked required examples.
Changes:
- Replaced
oneOfwithtype: ["number", "string"]forcomment_idandpull_request_numberfields in schema files - Enhanced
comment_iddescriptions in safe_outputs_tools.json files to meet 50+ character requirement with concrete examples - Removed explicit validation constraints (
minimum: 1,pattern) that are enforced in runtime code
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| schemas/agent-output.json | Updated comment_id and pull_request_number from oneOf to type array pattern, but description lacks example |
| pkg/workflow/js/safe_outputs_tools.json | Updated comment_id schema with type array and enhanced description including example |
| actions/setup/js/safe_outputs_tools.json | Updated comment_id schema with type array and enhanced description including example |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { "type": "string", "pattern": "^[1-9][0-9]*$" } | ||
| ], | ||
| "type": ["number", "string"], | ||
| "description": "The numeric ID of the review comment to reply to" |
There was a problem hiding this comment.
The description for comment_id in agent-output.json does not include an example or format guidance, which is required by the schema validation tests. The safe_outputs_tools.json files have been updated to include "(e.g., 42853901 from the comment URL or API response)" but this file still has the shorter description "The numeric ID of the review comment to reply to". This inconsistency may cause the schema validation tests to fail for agent-output.json.
| "description": "The numeric ID of the review comment to reply to" | |
| "description": "The numeric ID of the review comment to reply to (e.g., 42853901 from the comment URL or API response)" |
Summary
Fixes #15778
Follow-up to #15691 — resolves CI failures in
safe_outputs_mcp_schema_validation.test.cjscaused by thecomment_idfield usingoneOfinstead of the codebase-standard"type": ["number", "string"]pattern.