Add anti-probing guidance to submit_pull_request_review tool description - #51469
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
PR Triage
|
There was a problem hiding this comment.
Pull request overview
Adds anti-probing guidance for pull request review submissions to reduce invalid empty-argument calls.
Changes:
- Adds WRITE-ONCE guidance and a minimal-call example.
- Keeps compiler and runtime tool definitions synchronized.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/js/safe_outputs_tools.json |
Updates the compiler tool description. |
actions/setup/js/safe_outputs_tools.json |
Mirrors the runtime tool description. |
Review details
Tip
Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Balanced
| { | ||
| "name": "submit_pull_request_review", | ||
| "description": "Submit a pull request review with a status decision. By default this tool targets the pull request that triggered the workflow. When the workflow is configured with `target: \"*\"`, you must specify `pull_request_number` to indicate which PR to target. REQUIRED: every call must include either a non-empty body or be preceded by at least one create_pull_request_review_comment call; calling with no body and no prior comments is rejected with ERR_VALIDATION. All preceding create_pull_request_review_comment outputs are automatically attached as inline comments. If this tool is not called, buffered review comments are submitted as a COMMENT review at workflow end. Use COMMENT for non-blocking feedback; use REQUEST_CHANGES only for merge-blocking. Example (inline-only review): call create_pull_request_review_comment one or more times, then call this tool with event: COMMENT and no body.", | ||
| "description": "WRITE-ONCE: do NOT call this tool with empty or placeholder arguments to probe or discover its schema \u2014 this call must include a non-empty `body`, or be preceded by at least one create_pull_request_review_comment call; if you are not ready to submit the real review, call `noop` instead. A minimal valid call looks like {\"body\": \"Looks good overall.\", \"event\": \"COMMENT\"}. Submit a pull request review with a status decision. By default this tool targets the pull request that triggered the workflow. When the workflow is configured with `target: \"*\"`, you must specify `pull_request_number` to indicate which PR to target. REQUIRED: every call must include either a non-empty body or be preceded by at least one create_pull_request_review_comment call; calling with no body and no prior comments is rejected with ERR_VALIDATION. All preceding create_pull_request_review_comment outputs are automatically attached as inline comments. If this tool is not called, buffered review comments are submitted as a COMMENT review at workflow end. Use COMMENT for non-blocking feedback; use REQUEST_CHANGES only for merge-blocking. Example (inline-only review): call create_pull_request_review_comment one or more times, then call this tool with event: COMMENT and no body. This tool records a real review-submission intent. Do not use it for placeholder reviews, auth checks, or probing. Call it only when the final review is ready; otherwise use noop or report_incomplete.", |
| { | ||
| "name": "submit_pull_request_review", | ||
| "description": "Submit a pull request review with a status decision. By default this tool targets the pull request that triggered the workflow. When the workflow is configured with `target: \"*\"`, you must specify `pull_request_number` to indicate which PR to target. REQUIRED: every call must include either a non-empty body or be preceded by at least one create_pull_request_review_comment call; calling with no body and no prior comments is rejected with ERR_VALIDATION. All preceding create_pull_request_review_comment outputs are automatically attached as inline comments. If this tool is not called, buffered review comments are submitted as a COMMENT review at workflow end. Use COMMENT for non-blocking feedback; use REQUEST_CHANGES only for merge-blocking. Example (inline-only review): call create_pull_request_review_comment one or more times, then call this tool with event: COMMENT and no body.", | ||
| "description": "WRITE-ONCE: do NOT call this tool with empty or placeholder arguments to probe or discover its schema \u2014 this call must include a non-empty `body`, or be preceded by at least one create_pull_request_review_comment call; if you are not ready to submit the real review, call `noop` instead. A minimal valid call looks like {\"body\": \"Looks good overall.\", \"event\": \"COMMENT\"}. Submit a pull request review with a status decision. By default this tool targets the pull request that triggered the workflow. When the workflow is configured with `target: \"*\"`, you must specify `pull_request_number` to indicate which PR to target. REQUIRED: every call must include either a non-empty body or be preceded by at least one create_pull_request_review_comment call; calling with no body and no prior comments is rejected with ERR_VALIDATION. All preceding create_pull_request_review_comment outputs are automatically attached as inline comments. If this tool is not called, buffered review comments are submitted as a COMMENT review at workflow end. Use COMMENT for non-blocking feedback; use REQUEST_CHANGES only for merge-blocking. Example (inline-only review): call create_pull_request_review_comment one or more times, then call this tool with event: COMMENT and no body. This tool records a real review-submission intent. Do not use it for placeholder reviews, auth checks, or probing. Call it only when the final review is ready; otherwise use noop or report_incomplete.", |
|
@copilot Please refresh this branch if needed, address any remaining review feedback, and run the pr-finisher skill.
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed the remaining review feedback and pushed commit
|
PR Triage
Tiny doc/tool-description tweak, low impact, no urgency.
|
|
🎉 This pull request is included in a new release. Release: |
Run analysis showed agents calling
submit_pull_request_reviewwith empty args ({}) as a schema-discovery probe, hittingERR_VALIDATION, then retrying with correct fields — 4 occurrences across 2 unrelated workflows. The tool's description documented its validation rule but lacked the imperative WRITE-ONCE anti-probing preamble that sibling tools (add_comment,create_issue) already carry.Changes
submit_pull_request_review's description, matching the wording pattern ofadd_comment/create_issue.push_to_pull_request_branchdoes).noop/report_incompleteas the escape hatch.safe_outputs_tools.json(pkg/workflow/js/compiler copy andactions/setup/js/runtime copy), whichTestSafeOutputsToolsJSONInSyncrequires to be identical.Notes
Descriptions are served by the safe-outputs MCP server at runtime rather than baked into
.lock.yml, somake recompileproduces no lock-file diffs; the change takes effect on the next workflow run without recompiling.Effectiveness should be evaluated against subsequent daily optimizer scans —
push_to_pull_request_branchshows this preamble reduces but does not eliminate probe calls.run: https://github.com/github/gh-aw/actions/runs/31293411688> Generated by 👨🍳 PR Sous Chef · gpt54 · 3.76 AIC · ⌖ 6.55 AIC · ⊞ 8.5K · ◷