Contents
mafia docs
Pull request review
Select Review pull request, enter a repository and pull request number or URL, and choose the adjudicator model.
Ground the review
mafia fetches the pull request’s exact base and head commits and creates a read-only analysis worktree at the head. It resolves the merge base and validates findings only against lines changed by the pull request.
Repository content, pull request text, and review output remain untrusted input.
Review independently
Both configured models inspect the source and unified diff independently. Findings include severity, category, path, old or new side, changed line range, evidence, and a suggested fix.
The selected adjudicator then:
- Inspects both independent reviews.
- Records a disposition for every proposed finding.
- Merges duplicate findings.
- Rejects claims that are unsupported or outside changed lines.
- Persists one consolidated review.
Decide whether to publish
The workflow pauses before any GitHub mutation.
- Post to pull request publishes the consolidated Markdown as an idempotent pull request comment.
- Finish without posting retains the local artifact only.
Model tools cannot post comments directly. Deterministic application code owns publication and prevents duplicate comments after retries.