Skip to content

Add anti-probing guidance to submit_pull_request_review tool description - #51469

Merged
pelikhan merged 4 commits into
mainfrom
copilot/safeoutputs-update-tool-descriptions
Aug 9, 2026
Merged

Add anti-probing guidance to submit_pull_request_review tool description#51469
pelikhan merged 4 commits into
mainfrom
copilot/safeoutputs-update-tool-descriptions

Conversation

Copilot AI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Run analysis showed agents calling submit_pull_request_review with empty args ({}) as a schema-discovery probe, hitting ERR_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

  • Anti-probing preamble prepended to submit_pull_request_review's description, matching the wording pattern of add_comment/create_issue.
  • Inline minimal-call example so the first call has a concrete non-empty template to copy (mirrors what push_to_pull_request_branch does).
  • Closing sentence reinforcing that the call records a real submission intent, with noop/report_incomplete as the escape hatch.
  • Applied to both copies of safe_outputs_tools.json (pkg/workflow/js/ compiler copy and actions/setup/js/ runtime copy), which TestSafeOutputsToolsJSONInSync requires to be identical.
WRITE-ONCE: do NOT call this tool with empty or placeholder arguments to probe or
discover its schema — 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 ...

Notes

Descriptions are served by the safe-outputs MCP server at runtime rather than baked into .lock.yml, so make recompile produces 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_branch shows 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 ·

Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update safe-output tool descriptions with anti-probing guidance Add anti-probing guidance to submit_pull_request_review tool description Aug 8, 2026
Copilot AI requested a review from pelikhan August 8, 2026 21:59
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: docs/chore
  • Risk: low (2-line change across 2 identical JSON tool-description files)
  • Score: 30/100 (impact 8, urgency 8, quality 14)
  • CI: unknown — no check-run data returned yet; PR still draft
  • Recommendation: defer (low value, but easy/safe) — good batch_review companion once marked ready; trivial anti-probing wording addition, low risk to merge quickly once out of draft.

Generated by 🔧 PR Triage Agent · auto · 51 AIC · ⌖ 2.57 AIC · ⊞ 8K ·

@pelikhan
pelikhan marked this pull request as ready for review August 9, 2026 03:11
Copilot AI balanced review requested due to automatic review settings August 9, 2026 03:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.",
Comment thread pkg/workflow/js/safe_outputs_tools.json Outdated
{
"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.",
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please refresh this branch if needed, address any remaining review feedback, and run the pr-finisher skill.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 3.76 AIC · ⌖ 6.55 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please refresh this branch if needed, address any remaining review feedback, and run the pr-finisher skill.

Generated by [👨‍🍳 PR Sous Chef](https://github.com/github/gh-aw/actions/...

Addressed the remaining review feedback and pushed commit 211062c148.

  • Qualified the body-omission guidance to APPROVE/COMMENT only (REQUEST_CHANGES requires body).
  • Scoped the minimal valid example to the triggering PR and noted pull_request_number is required when target: "*".
  • Kept both safe_outputs_tools.json copies in sync.

Copilot AI requested a review from gh-aw-bot August 9, 2026 04:10
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: chore
  • Risk: low
  • Priority: low
  • Score: 30/100 (impact 10 + urgency 8 + quality 12)
  • Recommended action: defer

Tiny doc/tool-description tweak, low impact, no urgency.

Generated by 🔧 PR Triage Agent · auto · 58.3 AIC · ⌖ 2.48 AIC · ⊞ 8K ·

@pelikhan
pelikhan merged commit bff252c into main Aug 9, 2026
@pelikhan
pelikhan deleted the copilot/safeoutputs-update-tool-descriptions branch August 9, 2026 10:57
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.86.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants