PRSense — a grounded pull request reviewer
v0.3  ·  Open source  ·  Self-hosted  ·  Apache-2.0

A pull request reviewer that can't make things up.

Most AI reviewers guess. They invent file paths, hallucinate symbols, comment on code that didn't change. PRSense is the opposite: a small, deterministic engine that grounds every finding against the diff before it ever reaches you. If a model can't tie a claim to changed lines, the claim is dropped — not softened, not hedged. Dropped.

npm i -g @prsense/cli && prsense review . click·to·copy
Read the source
⌖   Signal · captured · unedited django/django · PR #18651
High django/db/migrations/autodetector.py:151–170 confidence 0.92

Unmanaged models (managed=False) are now included in old_model_keys / new_model_keys instead of being tracked separately. This means unmanaged models will now generate field-level operations (AddField for FKs, M2Ms) and other DB-modifying operations that were previously skipped via the if not model_state.options.get('managed', True): continue guard. Django will attempt to create or alter database tables for models with managed=False, which is incorrect.

Rationale The continue at line ~758 explicitly skipped FK/M2M operations for unmanaged models. With its removal, unmanaged models flow through the same code path as managed ones — emitting DDL the ORM has no business emitting.
Suggested fix Restore the separate tracking of unmanaged models and the guard that prevents DB-modifying operations for them, or add a check in generate_created_models (and generate_deleted_models) to skip FK/M2M/index/constraint operations when managed=False.
grounded · lines 151–170 of the diff claude-opus-4-6 · 22,715 tokens · 42.2s
0
Hallucinated signals across the entire benchmark
· 8
Real-world PRs · models tested, 3 runs each
100%
Of returned signals tied to lines in the diff
i.
Benchmark · 2026·03·19

Six real PRs. Eight models. Zero invented findings.

Picked from active open-source codebases — Django, libuv, Next.js, ripgrep, RocksDB, Spring Framework — each PR was reviewed three times per model and every emitted signal was checked against the diff file list. Not a single signal across the run referenced a file that wasn't in the PR. Frontier models found real bugs: missing super() calls, ref-count regressions in Jetty buffers, embedded-NUL truncation in C string conversion. Smaller models often returned nothing — which, by design, is correct. Silence beats fabrication.

Model Avg signals Hallucinated Avg tokens Avg latency
claude-opus-4-6 2.3 / PR 0 26,408 52.8s
claude-sonnet-4-6 2.5 / PR 0 22,514 48.0s
gpt-5.4 2.4 / PR 0 22,720 32.4s
gpt-5.3 empty 0 12.1s
gemini-2.5-pro empty 0 10.8s
gemini-flash-latest empty 0 13.2s
qwen2.5-coder · local timeout 0 120s+
deepseek-coder-v2 · local timeout 0 120s+

Bench·meta · raw results · JSON  ·  reproducible locally with pnpm bench. Numbers averaged across successful runs only; PR scope and provider rate limits affect timeouts. Lab benchmarks are not field truth, and we'll keep saying so.

ii.
CLI · stdout

What it looks like when you ask it about your diff.

iii.
Posture

A short, public list of the things it won't do for you.

It will

  • Read your diff and only your diff
  • Tie every signal back to a changed line
  • Stay quiet when it has nothing to say
  • Run fully on your machine, with Ollama if you want it air-gapped
  • Let you swap models without touching the engine
  • Tell you when it's unsure, with a confidence number

It will not

  • Write or modify your code
  • Open or merge pull requests
  • Enforce style or opinions
  • Act autonomously
  • Hallucinate files, symbols, or call sites
  • Send your code anywhere you didn't ask it to
iv.
Pipeline

Four deterministic stages, in order. Then the model speaks.

01 · Ingest

Read the diff

Parses changed files, hunks, line ranges and rename metadata. No repository-wide scan, no speculation.

Source: git · GitHub · GitLab
02 · Retrieve

Pull context

Embedding-based retrieval over the local index returns only chunks near the changed regions.

Pluggable · Ollama · OpenAI
03 · Review

Call the model

Per-file review with bounded concurrency. Confidence threshold filters anything the model itself is unsure about.

Per-file isolation · v0.3
04 · Ground

Drop the lies

Every signal is validated against the diff's file set. Anything that doesn't match a changed file is discarded before you see it.

The reason the bench reads zero
v.
Get started

Install once. Run against any PR. Stay in control.

Two commands · ~30 seconds first-run · no account required
i.
npm i -g @prsense/cli click·to·copy
ii.
prsense review . click·to·copy

First run opens an interactive setup — pick a cloud provider and drop an API key, or point it at a local Ollama and keep everything on your machine. Re-runs are zero-config.