frostyard/ mafia
Source
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 an analysis worktree at the head. Configured validation may write temporary output before mafia restores the exact head; model review tools remain read-only. 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.

When deterministic validation is configured for the project, mafia resolves repository commands from the immutable base commit, runs them against the exact head before model review, records the results, and restores the analysis worktree to the head commit. A pull request cannot introduce commands that mafia then executes. Without configuration, the review continues with an explicit not_configured result.

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:

  1. Inspects both independent reviews.
  2. Records a disposition for every proposed finding.
  3. Merges duplicate findings.
  4. Rejects claims that are unsupported or outside changed lines.
  5. Persists one consolidated review.
Pull request review run awaiting publication with independent review steps, source metrics, and consolidated findings
The review workspace exposes both model passes, adjudication progress, consolidated findings, and the final publication gate.

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.