RelayVano

← All postcards

Friday Review Queue: Shipping a Billing Fix with AI

Field trips EN

1. Set the review target before opening the pull request

At 3 p.m. on Friday, a small team rarely has time for an open-ended review. Write down the exact change being shipped, the affected users, and the failure that would be most expensive. For a billing fix, that might be: “Prevent duplicate invoice creation when a payment webhook is retried.”

Ask an AI assistant to turn the pull request description into a short review brief. The brief should list intended behavior, changed components, data touched, and assumptions. Do not ask for a general quality score. A focused request produces findings your team can verify.

  • What behavior must remain unchanged?
  • Which inputs can be duplicated, delayed, malformed, or missing?
  • Which database records, external calls, or user-visible messages can change?
  • What evidence would prove the fix works?

2. Give the assistant the smallest useful context

Paste the diff first, then add only the files needed to understand its contracts. Include the relevant interface, schema, test fixture, and caller. Avoid sending an entire repository when the review concerns one handler and one service. Smaller context makes it easier to distinguish an actual defect from an unfamiliar but intentional pattern.

Tell the assistant what it must not assume. State the language version, framework conventions, transaction boundaries, and whether backward compatibility matters. Also ask it to label each finding as correctness, security, reliability, performance, maintainability, or test coverage.

3. Run the deterministic checks before asking for judgment

AI review supplements automated checks; it does not replace them. Run formatting, linting, type checks, unit tests, integration tests, and the narrowest end-to-end test available. Record failures separately from review comments. A failing test is a concrete signal, while an AI concern still needs confirmation.

For a small team, make the command list visible in the pull request. A reviewer should be able to reproduce the result without guessing which local environment or flags were used. If the project has no complete test suite, state the gap and test the highest-risk path manually.

4. Ask for a defect-focused first pass

Use a prompt that forces the assistant to inspect behavior rather than rewrite style. Ask: “Review this diff for defects that could reach production. Trace error paths, retries, authorization, concurrency, data consistency, and boundary values. Report only actionable findings, with file, location, impact, and a minimal reproduction.”

For a payment webhook, specifically request checks for replayed events, two workers processing the same event, partial database updates, timeout handling, and mismatched currency or amount values. These cases are easy to miss during a quick human read because the happy path looks straightforward.

5. Re-run the review with an adversarial scenario

After the first pass, provide one realistic failure scenario and ask the assistant to trace it through the new code. Try a duplicate request, expired credentials, a database connection loss after an external charge, an empty collection, or a request from an unauthorized account.

You can use Claude Sonnet 5.5 for a detailed reasoning pass or DeepSeek V4 Flash for a quick second opinion through your existing coding workflow. RelayVano provides pay-as-you-go access to these models and works with Claude Code, Codex, Gemini CLI, and OpenAI-compatible SDKs through https://api.relayvano.com. Sign up once your team has selected the model and workflow it can support.

6. Verify every finding against the repository

Do not merge an AI comment because it sounds precise. Open the referenced file, inspect the surrounding code, and reproduce the alleged problem. Mark each finding as confirmed, rejected, or uncertain. For confirmed defects, add a regression test before changing implementation where practical.

  • Confirmed: the code can produce the reported behavior.
  • Rejected: an existing guard, contract, or framework rule prevents it.
  • Uncertain: the team needs a product or infrastructure decision.

7. Finish with a human ownership check

The author should explain the final behavior in two or three sentences, including what happens during failure and retry. The reviewer should confirm monitoring, rollback, and ownership. For the billing fix, check that duplicate events are observable, the alert destination is known, and the previous version can be restored without corrupting records.

Close the review only when every high-impact finding has a decision, every required test has evidence, and one person owns post-release monitoring. This keeps AI-assisted review fast while preserving the judgment that small teams cannot delegate.

More postcards from this route