Pull request reviews
New in v0.16.0. Off by default.
Every open pull request of the listed repositories is reviewed by Claude, independently of whoever wrote it - a person, a coding agent, a bot - and the review is posted on GitHub from Hephaisto's account. The author answers it there: fixes and pushes, or replies. A new push is reviewed again, with the earlier reviews in hand, until a limit; after that a person takes over.
Bigger rounds, not more of them. A pull request is reviewed once it has been quiet for settleFor (five minutes): an author answering a review pushes a fix, merges its base and replies on the threads in a burst, and one round reviews all of it. A head that moved without changing the pull request's own diff - its base merged in, as in a stack of pull requests where a fix lands in the one below - is no new round: each review carries a hash of the change it reviewed, and an equal hash means it was reviewed already.
How a review happens
- Every
pollInterval(two minutes) Hephaisto lists the open pull requests of each repository ingithub.pullRequestReview.repositories, and reads the reviews of each whose head it has not seen reviewed. An entryowner/*stands for every repository of the owner that is not archived: its open pull requests are ONE GraphQL search (a page per hundred), not a list per repository - with a hundred repositories, a list each on every poll would be more than the token's 5,000 requests an hour. A pull request nothing happened on forquietForis skipped - no review, no read, its labels left alone - until it moves again. - A head without a review of Hephaisto's gets a read-only coder Job (phase
pr-review): thepreparecontainer clones the repository, fetches the pull request's head and base by commit, checks the head out and writes the diff against the merge base; thecodercontainer runs Claude in that checkout with dev-context beside it. It holds the model's credential and no GitHub token, and nothing it does is written anywhere. - Claude answers a verdict - approve, comment or request changes - a summary, and comments on lines of the diff. The runner keeps a comment only on a line GitHub accepts one on (an added or context line of a hunk); every other one moves into the summary with its path and line.
- Hephaisto posts ONE review on the head that was reviewed. If GitHub refuses a comment's line anyway, the review is posted again with every comment in its text.
Nothing about a pull request is stored. Each review ends in a marker (<!-- hephaisto:pr-review sha=… verdict=… round=… -->), and a review counts as Hephaisto's when its account wrote it and it carries one. A restart reads the reviews again.
What is yours to review
A pull request is ready for you when Hephaisto's newest review is on its current head and found nothing blocking - or when the reviewer's rounds are used up. Hephaisto keeps the label ready-for-review (readyLabel) on exactly those and takes it off when a new head arrives, so is:open label:ready-for-review on GitHub, or a gh-dash section with that filter, is the list.
The agents & PRs page (/agents; /pullrequests shows the same page) lists every pull request with its state in one word and whose turn it is, in the order a person works: you (ready for review, or out of rounds), Hephaisto (review queued, in review - round n of 5 - or failed), the author (review remarks to answer, skipped drafts and authors), and last what was merged or closed in the past seven days, with its deployment. The navigation's badge counts the first. Pull requests that need the owner are on the today page too.
What the verdict does
| Verdict | Posted as |
|---|---|
| request changes | changes requested |
| comment | a comment |
| approve | a comment, unless approve: true - then an approval |
GitHub refuses changes requested and approval on a pull request the account opened itself; there every review is a comment. Leave approve off unless the account may count toward a branch protection's required approvals.
Configuration
github:
pullRequestReview:
enabled: true
repositories:
- TrueRelevance/* # every repository that is not archived; or owner/repo, one by one
pollInterval: "00:02:00"
maxCostUsd: 3 # one review
maxTurns: 60
deadline: "00:20:00"
maxConcurrentJobs: 2
maxReviewsPerPullRequest: 5
settleFor: "00:05:00" # quiet this long before a head is reviewed
quietFor: "14.00:00:00" # skipped when nothing happened for this long; "00:00:00" (default): off
readyLabel: ready-for-review
includeDrafts: false
skipAuthors: [renovate[bot]]
approve: falseIt needs the code-fix stage's Job machinery (codeFix: the coder image, dev-context and the hephaisto-codefix Secret with the model credential and a GITHUB_TOKEN that can read each repository) and the agent's own token (secrets.github) with Pull requests: read and write on each repository (classic: repo).
The agents & PRs page in the console lists every open pull request with where it stands - waiting, reviewing, reviewed, a person's turn, skipped or failed - and links to its newest review. GET /api/reviews answers the same; POST /api/reviews/pass (approver) looks at once.
A Job that fails is not asked again for the same head for an hour, so a pull request that cannot be cloned costs one attempt an hour, not one a pass.