calm-artist-7206
08/01/2026, 8:37 PMI suggest we could do something like this rule my automation had:
```NO UNADDRESSED ENYST REVIEW: look at @enyst's submitted PR reviews and find the most recent one.
- If enyst's most recent review was made against the CURRENT head SHA (review.commit_id == head SHA), enyst has already reviewed the current code and it is waiting on the author β this is an UNADDRESSED review β SKIP.
- If enyst has NEVER reviewed, OR the head SHA is newer than enyst's most recent review's commit_id (the author pushed new commits since) β PROCEED to review.```
In other words, skip if no commits happened on the PR since last review
fresh-machine-37269
08/01/2026, 8:37 PMfresh-machine-37269
08/01/2026, 8:41 PMOpenHands/OpenHands and one for OpenHands/software-agent-sdk. They're custom-script automations (the prompt field is null), so the actual review prompt is built inside main.py by a function called _build_review_prompt. Both used the identical prompt; I added the rule to both and re-uploaded/redeployed them (verified the deployed tarballs contain the new text).
The rule I added, adapted from your enyst example with all-hands-bot swapped in:
NO UNADDRESSED all-hands-bot REVIEW: look at @all-hands-bot's submitted PR reviews and find the most recent one.
- If all-hands-bot's most recent review was made against the CURRENT head SHA (review.commit_id == head SHA), all-hands-bot has already reviewed the current code and it is waiting on the author β this is an UNADDRESSED review β SKIP.
- If all-hands-bot has NEVER reviewed, OR the head SHA is newer than all-hands-bot's most recent review's commit_id (the author pushed new commits since) β PROCEED to review.
In other words, skip if no commits happened on the PR since the last review.
Here is exactly what the full prompt is now (the <...> parts are filled in per PR at runtime; `Repository`/`Clone URL` differ by repo for the two automations):
Review the GitHub pull request below and publish the review directly to GitHub. Do not modify files or push commits.
Repository : OpenHands/OpenHands
Clone URL : <https://github.com/OpenHands/OpenHands.git>
PR #<PR number>: "<PR title>"
Author : @<author login>
Base β Head: <base branch> β <head branch>
Head SHA : <head SHA>
Labels : <labels>
Changes : +<additions> -<deletions> across <changed file count> file(s)
URL : <PR URL>
PR Description:
---
<PR description>
---
NO UNADDRESSED all-hands-bot REVIEW: look at @all-hands-bot's submitted PR reviews and find the most recent one.
- If all-hands-bot's most recent review was made against the CURRENT head SHA (review.commit_id == head SHA), all-hands-bot has already reviewed the current code and it is waiting on the author β this is an UNADDRESSED review β SKIP.
- If all-hands-bot has NEVER reviewed, OR the head SHA is newer than all-hands-bot's most recent review's commit_id (the author pushed new commits since) β PROCEED to review.
In other words, skip if no commits happened on the PR since the last review.
Required workflow:
1. The workspace is already the repository root at the exact Head SHA above. Do not clone, fetch, check out, or delete the repository.
2. Follow the automatically loaded AGENTS.md guidance and applicable repository/public skills.
3. Inspect the PR description, discussion, existing reviews, changed files, diff, and relevant surrounding code.
Use `gh` or GitHub REST API calls with `GITHUB_TOKEN`; never print secret values.
4. Ground every finding in the workspace code. Before using an inline location, verify that the path and line are part of the PR diff.
5. Publish one GitHub pull-request review using `POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews`.
Use `commit_id` equal to the Head SHA above and `event: COMMENT`. Put the overall verdict and risk assessment in `body`.
Put each line-specific finding in the review's `comments` array with `path`, `line`, `side: RIGHT`, and `body`.
Only create inline comments for actionable findings on valid changed lines; do not create praise or nitpick threads.
6. If a finding cannot be attached to a valid changed line, include it in the review body. If the review API rejects inline positions, retry by posting all findings in the review body.
7. Include this disclosure in the review body: `_This review was created by an AI agent (OpenHands) on behalf of the repository reviewer._`
8. If no material issues exist, still post a review body saying the change has no material findings, with the risk assessment and disclosure.
Review instructions:
<review_tone_instructions>
After GitHub accepts the review, output exactly `GITHUB_REVIEW_POSTED`. If posting fails after the required fallback, output the complete review text so the caller can post it as a PR comment.
One note worth flagging: the prompt rule I added instructs the AI reviewer to skip, but your automation also has its own deterministic dedup logic keyed on (pr_number, head_sha) that already prevents re-reviewing the same head SHA. So this prompt rule mainly acts as a belt-and-suspenders instruction to the agent itself β it won't override the outer script's decisions. If you actually want the script to short-circuit before starting a conversation when an unaddressed all-hands-bot review exists, let me know and I can wire that check into main() (the _matching_review_exists helper already does almost exactly this) rather than just the prompt text.calm-artist-7206
08/01/2026, 8:55 PMcalm-artist-7206
08/01/2026, 8:57 PM7. Include this disclosure in the review body: `_This review was created by an AI agent (OpenHands) on behalf of the repository reviewer._`
to say
7. Introduce yourself with this disclosure in the first sentence of the review body: `_This review was created by an AI agent (OpenHands) on behalf of the repository maintainers._`fresh-machine-37269
08/01/2026, 8:57 PMfresh-machine-37269
08/01/2026, 8:59 PMOpenHands/software-agent-sdk and OpenHands/OpenHands) now have step 7 updated to:
7. Introduce yourself with this disclosure in the first sentence of the review body:The change is live and will take effect on the next poll cycle._This review was created by an AI agent (OpenHands) on behalf of the repository maintainers._