Code review that shows its work.
Marginalia is a GitHub agent that reads your pull requests the way a senior engineer does — it investigates the codebase, checks your conventions, and leaves precise notes in the margins. Every finding arrives with the reasoning that produced it.
Reviews land in about two minutes. Re-run any time with @marginalia review.
8 files · +342 −87 · core logic in services/payments/retry.pyclients/gateway.py:167 # returns cached response on key match
→ colliding keys are silently swallowed+ key = f"{order_id}-{int(time.time())}"Two retries in the same second produce identical keys — the gateway drops the second as a replay. Derive from order + attempt, not the clock.
Not a linter. Not a summary. A reader.
Most AI reviewers skim the patch and pattern-match. Marginalia runs an investigation: it opens files beyond the diff, greps for the conventions your codebase already follows, and only then forms an opinion.
A pull request opens
The GitHub webhook lands in seconds and the review is queued. Drafts wait until they’re marked ready.
The agent investigates
It reads the diff, opens the files around it, and searches the repo — read_file, search_code — until the change makes sense in context.
Notes land in your margins
Inline comments mapped to exact diff positions, plus one summary verdict. Critical findings block; nits never nag.
Push fixes, ask again
Comment @marginalia review and it re-reads only what changed. A clean second pass approves the PR.
The bugs that pass tests and fail in production.
Real notes from real reviews. Each one names the evidence — the file, the line, and the convention or failure mode it’s protecting.
Idempotency key derived from a timestamp — concurrent retries collide and the gateway silently drops the second charge attempt.
Found by tracing key consumption into gateway.py, not by reading the diff alone.
Twelve of thirteen mutating routes carry @rate_limit. This new endpoint triggers real charges and has none.
Convention drift — the agent counted how the rest of the codebase does it first.
Exponential backoff without jitter — every failed client retries in lockstep. A thundering herd against your gateway.
Concurrency failure modes are invisible to tests and obvious in the margins.
House rule: money is integer cents. This handler does float math on a refund amount.
Enforced from your own custom instructions — quoted back so reviewers know why.
Trust is earned by showing receipts.
Every review keeps its full reasoning trace — each thought, every tool call, every file it opened. When a finding surprises you, you can see exactly how the agent got there.
- ✓Auditable. Nine steps, seven tool calls, three files read — all on the record.
- ✓Debuggable. A wrong finding shows you the wrong assumption, so your house rules can correct it.
- ✓Teachable. Junior engineers read traces like a senior's commentary on the codebase.
Teach it your house style in plain language.
Write your team’s conventions the way you’d tell a new hire. Marginalia treats them with the same weight as its built-in checks — and quotes the rule back whenever a finding relies on it, so nobody wonders where an opinion came from.
Put a careful reader in your margins.
Install the GitHub App, pick your repos, and the next pull request gets a review that shows its work.