Skip to content

PR review agent: avoid approving eval-risk behavior changes#2246

Merged
enyst merged 2 commits intomainfrom
chore/pr-review-eval-risk-policy
Feb 28, 2026
Merged

PR review agent: avoid approving eval-risk behavior changes#2246
enyst merged 2 commits intomainfrom
chore/pr-review-eval-risk-policy

Conversation

@enyst
Copy link
Copy Markdown
Collaborator

@enyst enyst commented Feb 28, 2026

This updates the PR review agent prompt to avoid submitting APPROVE reviews for PRs that could plausibly impact benchmark/evaluation performance (tool execution, loop logic, I/O/terminal handling, etc.).

For those PRs, the reviewer should leave a COMMENT (or REQUEST_CHANGES when appropriate) and flag for a human maintainer to decide after lightweight evals.

Change is confined to: examples/03_github_workflows/02_pr_review/prompt.py


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:59cf06a-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-59cf06a-python \
  ghcr.io/openhands/agent-server:59cf06a-python

All tags pushed for this build

ghcr.io/openhands/agent-server:59cf06a-golang-amd64
ghcr.io/openhands/agent-server:59cf06a-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:59cf06a-golang-arm64
ghcr.io/openhands/agent-server:59cf06a-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:59cf06a-java-amd64
ghcr.io/openhands/agent-server:59cf06a-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:59cf06a-java-arm64
ghcr.io/openhands/agent-server:59cf06a-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:59cf06a-python-amd64
ghcr.io/openhands/agent-server:59cf06a-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:59cf06a-python-arm64
ghcr.io/openhands/agent-server:59cf06a-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:59cf06a-golang
ghcr.io/openhands/agent-server:59cf06a-java
ghcr.io/openhands/agent-server:59cf06a-python

About Multi-Architecture Support

  • Each variant tag (e.g., 59cf06a-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 59cf06a-python-amd64) are also available if needed

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 28, 2026

API breakage checks (Griffe)

Result: Failed

Log excerpt (first 1000 characters)

============================================================
Checking openhands-sdk (openhands.sdk)
============================================================
Comparing openhands-sdk 1.11.5 against 1.11.4
::notice title=openhands-sdk API::Ignoring Field metadata-only change (non-breaking): load_public_skills
No breaking changes detected

============================================================
Checking openhands-workspace (openhands.workspace)
============================================================
Comparing openhands-workspace 1.11.5 against 1.11.4
::warning file=openhands-workspace/openhands/workspace/docker/dev_workspace.py,line=33,title=DockerDevWorkspace.server_image::Attribute value was changed: `Field(default='ghcr.io/openhands/agent-server:latest-python', description='Pre-built agent server image to use.')` -> `Field(default=None, description='Pre-built agent server image. Mutually exclusive with base_image.')`
::error title=SemVer::Breaking changes detected (1); re

Action log

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 28, 2026

Agent server REST API breakage checks (OpenAPI)

Result: Passed

Action log

Copy link
Copy Markdown
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

Taste Rating: 🟢 Good taste

This is a straightforward, pragmatic safety improvement that solves a real problem: preventing the PR review agent from auto-approving changes that could affect eval/benchmark performance.

Why this is sound:

  • Clear real-world need: Prevents premature approval of risky changes (prompt templates, tool execution, loop logic, etc.)
  • Simple approach: Just adds policy text with concrete examples - no complex logic
  • Well-scoped: Lists specific categories that need human + eval verification
  • No breaking changes: Only adds constraints; existing behavior unchanged
  • Meta-level change: This is about PR review workflow, not task-solving agent behavior

Note on scope: This PR modifies a prompt template, but it's for the PR review agent (CI workflow), not the eval agents (SWE-bench, GAIA, etc.). It won't affect benchmark performance - it only makes the PR review process more conservative about approving changes that could affect benchmarks.

Verdict: ✅ Worth merging - improves PR review safety without unnecessary complexity.

Key insight: This is the kind of simple, defensive guardrail that prevents production issues. Good engineering taste.

@enyst enyst enabled auto-merge (squash) February 28, 2026 20:06
@enyst enyst merged commit bcdbd5c into main Feb 28, 2026
22 checks passed
@enyst enyst deleted the chore/pr-review-eval-risk-policy branch February 28, 2026 20:08
memory/condenser behavior, terminal/stdin/stdout handling, or evaluation harness code.

If a PR is in this category (or you are uncertain), leave a COMMENTED review and
explicitly flag it for a human maintainer to decide after running lightweight evals.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@enyst I think we should not put the prompt in this file, since it will affect all the repos using the codereview action, right? i think we should put it into a repository specific .agents/code-review.md

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@OpenHands Let's fix this

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm on it! enyst can track my progress at all-hands.dev

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Of course, oops

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary of work completed

  • Identified that the “eval / benchmark risk” review decision policy was added to examples/03_github_workflows/02_pr_review/prompt.py, which is used by the PR-review GitHub Action and therefore would affect all downstream repos that use the action.
  • Implemented the requested fix by moving that policy out of the shared example prompt and into this repository’s repo-specific review guidance at .agents/skills/custom-codereview-guide.md.

Changes made (concise)

  • examples/03_github_workflows/02_pr_review/prompt.py
    • Removed the eval/benchmark-risk “do not APPROVE…” section so the action’s base prompt remains generic for all repos.
  • .agents/skills/custom-codereview-guide.md
    • Added a new “Review decision policy (eval / benchmark risk)” section that instructs reviewers to COMMENT instead of APPROVE when changes could plausibly affect benchmark/eval performance.

Verification / compliance checklist

  • Addressed the reviewer concern about global impact by relocating policy to repo-specific rules.
  • Kept changes minimal (only 2 files, no unrelated edits).
  • Ran uv run pre-commit run --files ... on the modified files (passed).
  • Commit message included Co-authored-by: openhands <openhands@all-hands.dev>.

Delivery status

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants