I built PR Sentinel, an AI‑code‑review bot for my GitHub repository. It watches pull requests, comments on the exact changed line, explains risks, suggests fixes, and assigns a PR score. The system combines a deterministic regex rule engine with an LLM (default local Ollama, configurable to OpenAI or Claude) and can be run as a FastAPI webhook, a reusable GitHub Action, or a React‑based dashboard + playground.
The repository language is Python.
The project started 2026-10, last updated 2026-10.
The test suite runs 27 tests with pytest -q and requires no network or model.
There are 12 regex security rules (secrets, SQL injection, eval, shell=True, disabled TLS, unsafe deserialization, XSS sinks…) run on every change.
Instant mode latency is milliseconds (rule engine only).
Webhooks are verified with HMAC‑SHA256 signature check with constant‑time compare; unset secret never validates.
Processing is idempotent per (repo, PR, head SHA); drafts and closed PRs are ignored.
The LLM output is handled by a tolerant parser (code fences, surrounding prose) plus one retry; failures are recorded, not swallowed.
Scoring uses the formula score = 100 − penalties.
Delivery formats include a webhook service (FastAPI), a reusable GitHub Action, and a web dashboard + playground (React).

