Skip to content

Make the PR reviewer API-policy aware before approving #2437

@enyst

Description

@enyst

Problem

The PR reviewer can approve API-breaking changes without seeing the most relevant package-level policy or the existing CI breakage signals.

Today the reviewer appears to load the repo-root AGENTS.md, but not necessarily the closest package-level AGENTS.md for changed files. It also should be much more cautious about approving when API-related checks or sticky bot comments already indicate breakage.

What we may want

When reviewing a PR, the reviewer should:

  1. Load the closest AGENTS.md for the package(s) containing the changed files.
  2. If a PR spans multiple packages, consult each relevant package-level AGENTS.md.
  3. Ingest API-related CI/check state before approving, including:
    • failed API checks
    • sticky bot comments from API breakage workflows
    • unresolved review threads relevant to API compatibility

Why

Package-local policy is often where the real compatibility rules live. Without that context, the reviewer can miss exactly the policy that should have caused it to object. Likewise, an AI reviewer should not confidently approve a PR while CI is already signaling an API compatibility problem.

Notes

There is already related work tracked in OpenHands/extensions#106 for the reviewer plugin behavior. This issue can track the software-agent-sdk side of that dependency / expectation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invariantsthe design invariants of the codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions