PR Lens
A teammate's terminal PR reviewer. I prototyped findings that must prove themselves before they are posted.
- Context
- Built at a crypto derivatives exchange
- Year
- 2026
- Role
- Prototype on a teammate's tool (unmerged branch)
- Stack
- Rust, ratatui, Claude CLI
The problem
AI review comments are cheap to produce and expensive to trust. A teammate built PR Lens to explain pull requests in the terminal. I prototyped the step that decides which findings are worth a human's time.
- Never approves or rejects.
- Post only findings a test has proven.
Architecture
What I built
- 01Findings with proof: the model drafts a test for each finding, the tool runs it on the PR head and on the base, and marks it proven or refuted. Only proven findings are posted, as one GitHub review.
- 02Safer model calls: cancellable with timeouts and process-group kill, atomic cache writes, and PR text passed to the model as untrusted data.
- 03Headless end-to-end tests with fake gh and claude binaries.
By the numbers
- tests added on the prototype branch
- 46