IonRift

Code Review Agent

A careful review on every pull request.

The Code Review Agent comments on the lines that matter, on the cheapest model that meets our bar.

Lens, the Code Review Agent ship

acme/api · PR #224

1 bug, no nits

api/orders.ts:88

- if (cents < refundable) throw

+ if (cents > refundable) throw

Code Review22s · $0.033

Bug: the check is reversed, so every partial refund throws.

Apply fix

reviewapproved

Sample data

01How it works

Three steps, start to finish.

  1. 1It reads the whole changeThe diff, the files around it, and their callers.
  2. 2It comments where it mattersBugs and risky changes with the fix. No nits.
  3. 3It picks the modelThe cheapest that holds our bar, at cost.

02Proof

A comment worth reading

IonRift Code Reviewon api/orders.ts:88

Bug: refundPartial throws when the amount is less than the refundable balance, so every partial refund fails. The check is reversed.

-  if (amountCents < refundable) throw new Error("too small")
+  if (amountCents > refundable) throw new Error("exceeds balance")

Sample output