Model-assisted pull request review
The reusable PR review workflow reads the PR's changed files and immutable Git blobs through GitHub's API. It loads config and matched area rules at the trusted base. It does not check out or execute the PR head. The jobs.pr_review route in the default-branch settings picks the model. The legacy inference document overrides file routes while supplied. Start with the PR review caller.
What is reviewed
Section titled “What is reviewed”- Added lines are the only review targets. Surrounding source and matching base rules give those lines context. This review is not a repository-wide audit.
- Lockfiles, binary and generated files, very large patches, and paths excluded by configuration are skipped. For a file with a generated top region, configure
hand_written_belowto review only added lines below a marker. - The job splits eligible changes into chunks. It asks for concrete bugs and security faults, and validates each proposed location before creating a comment. Up to 50 findings can be posted per run.
- The bot posts a
COMMENTreview. It neither approves nor requests changes. Its single summary reports what was reviewed, what was skipped, and the model spend.
Eligibility and budget
Section titled “Eligibility and budget”Only same-repository PRs matching the configured base branches are eligible. Drafts are skipped unless review_drafts is enabled in the caller. Other bot authors, including Dependabot, are skipped. A fix PR opened by Code Hawk can be reviewed when the draft policy permits it. Missing token access causes a skip with a log message. Missing provider settings or keys produce a setup comment and a failed job.
There is no default spend cap. Set caps.pr_review on the default branch to limit the run. A capped or otherwise incomplete run can post what it found without marking the new head fully reviewed. See models and costs and replies and re-reviews.