safeoutputs: improve submit_pull_request_review description to prevent empty-invocation ERR_VALIDATION#35060
Merged
pelikhan merged 2 commits intoMay 26, 2026
Conversation
7 tasks
…ation errors Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve submit_pull_request_review description to prevent empty-invocation errors
safeoutputs: improve submit_pull_request_review description to prevent empty-invocation ERR_VALIDATION
May 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the submit_pull_request_review tool description in both the compiler and runtime copies of safe_outputs_tools.json to clarify that a non-empty body or at least one preceding create_pull_request_review_comment call is required, preventing agents from triggering ERR_VALIDATION with empty invocations.
Changes:
- Expanded top-level tool description with explicit REQUIRED constraint, ERR_VALIDATION reference, and an inline-only example.
- Updated
bodyfield description to reflect actual invariant (optional only when prior inline comments exist).
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/js/safe_outputs_tools.json | Compiler-side tool description updated for clearer invocation contract. |
| actions/setup/js/safe_outputs_tools.json | Runtime-side identical update to keep both copies in sync. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
pelikhan
approved these changes
May 26, 2026
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.
Agents were calling
submit_pull_request_reviewwith empty arguments{}, triggeringERR_VALIDATIONbecause GitHub rejects contentless reviews with 422. The tool description didn't communicate the body-OR-prior-comments requirement, leaving agents unaware that an empty call is invalid.Changes
Top-level description (
submit_pull_request_review): Added explicitREQUIRED:constraint stating every call needs either a non-emptybodyor at least one precedingcreate_pull_request_review_commentcall. MentionsERR_VALIDATIONby name. Adds an inline-only review example to close the ambiguity gap.bodyfield description: Replaced the misleading "optional for APPROVE and COMMENT" with the actual invariant — body is only optional when at least onecreate_pull_request_review_commentwas called earlier in the same run; otherwise it is required.Both the compiler copy (
pkg/workflow/js/safe_outputs_tools.json) and the runtime copy (actions/setup/js/safe_outputs_tools.json) are updated identically.