r/Python • u/AutoModerator • Oct 04 '26
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
23
Upvotes
r/Python • u/AutoModerator • Oct 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
View all comments
1
u/Wide_Psychology_8378 Oct 27 '26
prbot: an LLM agent that patches security/perf bugs in PRs and verifies fixes with sandboxed pytest
What My Project Does
prbot reviews a GitHub pull request, finds security and performance bugs (SQL injection, N+1 queries, accidental O(n²) loops and so on), writes a patch, and runs your pytest suite on it in a locked-down Docker container with no network, a read-only filesystem, and all capabilities dropped. If the tests fail, the failure log goes back to the patching agent so it can try a different approach, up to 3 attempts. Only a verified fix gets posted.
It's built with LangGraph, Pydantic structured outputs, PyGithub, and pytest, and runs as a CLI or a GitHub Action.
In a live run against my demo PR, gpt-4.1-mini caught all 3 seeded bugs. Its first fix for a quadratic duplicate check changed the output order and broke an existing test, and it corrected itself on attempt 2. The whole run took 24.7 seconds and cost under $0.01.
Target Audience
Python developers and small teams who want a second reviewer on PRs, and anyone curious about building agent loops that verify their own output. It's early-stage, so it's best tried on side projects and demo repos for now rather than production-critical code.
Comparison
Most AI review tools leave comments. prbot closes the loop: it writes the fix and proves it against your existing tests in an isolated sandbox before anything reaches GitHub. It also runs the base branch's tests first, so it won't try to patch a PR whose suite is already failing.
Repo: https://github.com/ayanag5076-commits/prbot
Demo PR you can reproduce: https://github.com/ayanag5076-commits/prbot-demo-shop/pull/1
Feedback and contributors welcome, especially on support for other languages and test runners.