Pull request review that reads the exact code you are about to merge.
An evidence-first reviewer—not a chatbot wearing a review costume.
The Webhook and Pipeline source in this repository is the source used by the official hosted service. There is no separate reviewer hidden behind it.
LlamaPReview is an Apache-2.0 GitHub pull-request reviewer. Its hosted GitHub App reviews public repositories only. It differs from a generic review bot in where it draws the line between model judgment and code-owned guarantees:
- It retrieves bounded evidence from the exact pull-request head, with provenance and honest coverage gaps.
- The model performs engineering judgment: causal risk, severity, uncertainty, and merge posture.
- Deterministic code owns projection, sanitation, inline placement, Mermaid safety, accounting, recovery, and publication identity.
- Verify the signed webhook. No event is admitted before its GitHub signature is valid.
- Apply the hosted public-only boundary. A private event is generically acknowledged after minimum visibility parsing, then stops before durable product state, provider work, or GitHub product API calls.
- Pin the exact head. Admission and every later reread use the pull request's immutable head commit.
- Retrieve bounded evidence. Route and PFR gather repository facts, provenance, coverage, and explicit gaps.
- Judge, then present. Deep finds material engineering issues; Final compresses them into owner actions, inline requests, and an optional diagram.
- Project deterministically. Code validates the public schema, caps content, sanitizes Mermaid, places comments, and degrades an invalid optional surface locally.
- Publish once to the same head. Durable candidates, intents, receipts, and reconciliation make retries reuse the same prepared GitHub request.
A successful review contains one substantive main body, zero or more safely placed inline comments, and—when it materially clarifies the change—one eligible, sanitized Mermaid diagram. An unplaceable inline request can degrade into a bounded section in the main body without changing the underlying finding. Empty, skipped, failed, stale-head, and otherwise nonpublishable outcomes never acquire a synthetic model judgment.
- Install the GitHub App on a public repository.
- Open a pull request, or move an existing draft pull request to ready for review.
- Read the resulting review as decision support; maintainers remain responsible for what they merge.
The hosted service is free for public repositories. Start at the official website for the current product entry point.
Self-hosting runs the same public-only Webhook and Pipeline path in your AWS account.
- Download one semantic release and verify its checksums and GitHub provenance.
- Follow the AWS deployment guide to deploy the two Lambda functions, dependency Layer, DynamoDB table, private S3 bucket, event-source mapping, alarms, and least-privilege IAM.
- Supply your own GitHub App and DeepSeek credentials, then pay your own AWS and provider costs.
The reference stack has no automatic production deployment, paid secret-management service, hidden private-repository mode, or official AWS identity.
For eligible public pull requests, selected public GitHub evidence, prompts, and generated output are sent to DeepSeek for engineering judgment. Official AWS product infrastructure runs in Singapore; model requests leave AWS for DeepSeek processing. DeepSeek documents default on-disk API context caching normally cleared within hours to days once unused, but its public Open Platform terms do not provide a categorical no-training assurance or one fixed overall API retention period.
Current official-service retention is explicit:
| Data | Retention |
|---|---|
| DynamoDB public-run records | 30-day TTL; deletion is asynchronous |
| S3 public-run artifacts | 30 days |
| Full provider trace objects | 7 days |
| Webhook logs | 30 days |
| Pipeline logs | 90 days |
New private-repository events are discarded at the early hosted boundary. Historical private records were left untouched. See privacy and retention and the security model for the full boundaries.
Runtime secret values stay in Lambda environment configuration, protected by AWS encryption at rest and strict IAM. Terraform state is secret-bearing and must remain encrypted, versioned, and private. Public CI has no official production credentials or deployment permission.
| Path | Responsibility |
|---|---|
lambdas/LlamaPReviewWebhookHandler |
Signed, public-only admission adapter |
lambdas/LlamaPReviewPipeline |
Retrieval, judgment, projection, persistence, accounting, and publication |
infra/terraform |
Generic AWS reference deployment |
scripts |
Deterministic builds, release verification, and safety checks |
tests |
Unit, replay, adversarial, recovery, and parity contracts |
docs |
Operator and contributor documentation |
Start with the documentation index or read the architecture in more depth.
Ordinary tests and replay fixtures make no paid provider calls.
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements-ci.txt
make verifyFocused commands are available when iterating:
make test
make replaySee development and testing for the exact local and release gates.
Contributors, subscribers, maintainers, and curious reviewers are all welcome. Use Issues for reproducible bugs and concrete work; use Discussions for questions, ideas, and public review examples. Read CONTRIBUTING.md before opening a pull request, and report vulnerabilities through SECURITY.md.
LlamaPReview is licensed under the Apache License 2.0. Dependency notices are recorded in THIRD_PARTY_NOTICES.md and in each release inventory.