Protocol
Review the file list before reading the agent's explanation
The diff knows what changed even when the summary forgets.
When it fits
- The PR summary sounds plausible and pulls the reviewer toward the intended story.
When to avoid it
- Large generated changes may need specialized diff tooling, but they should not become invisible because review is inconvenient.
Why it matters
Start review with the complete changed-file list and diff statistics. Flag sensitive paths, deletions, lockfiles, test changes and generated files before reading the agent's narrative. Then evaluate whether the summary accounts for the actual change set.
Steps
- All changed files listed.
- Sensitive files highlighted.
- Deletions inspected.
- Tests and lockfiles inspected.
- PR summary checked against diff.
- Unexplained changes resolved.
An example
A PR description mentions an API fix, but the file list reveals a modified deployment script; review pivots before approval.
Check your result
The reviewer can account for every changed file independent of the agent's prose.
Keep this limit in mind
- Large generated changes may need specialized diff tooling, but they should not become invisible because review is inconvenient.
Evidence and sources
OWASP recommends reviewing every file in an agent-generated change and flagging out-of-scope edits, especially lockfiles, CI configuration, tests and other sensitive files.
Automation can flag suspicious diffs but does not determine intent or correctness.
Secure Coding with AI Cheat Sheet · Out-of-Scope Edits and Review Anchoring
GitHub documentation says Copilot agent pull requests should receive the same thorough review as other contributions and warns reviewers to inspect workflow changes before allowing privileged Actions runs.
This is GitHub-specific implementation guidance; the general pattern is independent review before privileged execution.
Review output from Copilot · Review Copilot's changes; Manage GitHub Actions workflow runs