← Back to selected work

Personal project · Case study

Secure Multi-Agent PR Review

GitHub App review orchestration that combines deterministic checks with specialized reviewer roles.

deployed demoPythonLangChainLangGraphFastAPIPostgreSQLRedisRQGitHub API

Problem

A developer reviewing a pull request needs actionable findings tied to the changed code. AI reviews can cite the wrong lines, repeat findings, or report success despite incomplete analysis. Webhook retries and new commits also make reliable publication a distributed-systems problem.

My contribution

I designed and implemented a GitHub App workflow that separates webhook intake from background review, coordinates four specialist reviewers with LangGraph, validates their evidence, and publishes advisory comments and Checks. I verified the deployed flow against a real pull request.

Engineering decisions

01

Keep orchestration deterministic

FastAPI verifies signed webhooks and persists events in a PostgreSQL inbox/outbox. Redis/RQ dispatches background jobs, keeping long-running model calls out of the HTTP request and durable review state outside the queue.

02

Validate findings against the exact commit

Correctness, security, maintainability, and regression reviewers return structured findings. The coordinator checks added-line evidence, combines overlapping findings, and detects newer PR heads before publication.

03

Make uncertainty and human control explicit

The worker analyzes the supplied diff without executing repository code. Reviewer failures remain visible; publication intent and reconciliation help prevent duplicate comments. The App publishes advisory reviews and never merges code.

Documented result

One documented real-PR run produced inline findings on metric formulas, citation validation, and retrieval behavior. The observed PR-to-review interval was 44 seconds, including queue and provider time. Incomplete analysis resulted in a neutral GitHub Check rather than a successful clearance.

Scope & limits. This is one observed end-to-end case, not an accuracy benchmark or a measured time-saving claim. The deployed worker posts advisory analysis automatically; the human checkpoint is not a pre-publication approval gate.

Architecture

  • GitHub webhook and repository eligibility checks
  • PostgreSQL inbox/outbox for job state tracking
  • Redis/RQ background queue for review dispatch
  • LangGraph reviewer branches for correctness, security, maintainability, and regression coverage
  • Evidence validation and advisory publication with exact-commit links

Evaluation and results

  • Uses deterministic workflow logic rather than unconstrained agent decisions.
  • Publishes advisory comments and a GitHub check with evidence-backed findings.
  • Retains human review and merge responsibility.

Important tradeoffs

  • The documentation explicitly describes proposed acceptance targets rather than measured aggregate accuracy.
  • No broad benchmark or production claim is documented beyond a single observed end-to-end example.
  • Demo video is still outstanding in the cited source material.

Verified links