The brief
Track 1 asked for an always-on code reviewer. I narrowed it to one domain: payment code, where an escaped bug doesn’t break a button, it corrupts a ledger.
What I built
FinGuard reviews a diff in tiers, cheapest first:
- AST rules, locally, zero tokens. Python’s
astcatches the classics before anything leaves the machine: float arithmetic on currency, network calls made while holding a DB lock, and payment routes with no idempotency key. - A scrubber before the cloud. Card numbers (Luhn-checked), Indian PAN numbers and API keys are redacted from the diff, and comments that look like prompt-injection attempts are quarantined, failing closed.
- Only then, the model. Gemini on Vertex AI gets the cleaned diff plus similar past incidents from Cloud SQL + pgvector, and streams its reasoning back over SSE. This tier handles what rules can’t express: double-spend races and saga rollbacks.
- Proof, then patch. For a finding, it writes a pytest that reproduces the flaw and offers a one-click diff.
It ships as a CLI (finguard review --staged can block a commit), a web console, and a Cloud Run container.
The design call
Deterministic first. Whether payment code is safe should never rest on a model’s judgement alone. An AST rule either fires or it doesn’t, costs nothing, and gives the same answer twice. The LLM earns its tokens only on the problems that need reasoning.