Skip to the review
Patch

Review the change.
Keep the reason.

Bring the diff, the discussion, and the decision into the same view.

Open the review
Make checkout safe to retry#128
Sample pull request
checkout/idempotencymain3 files changed
src/payments/checkout.tsSuggested change
42export async function checkout(cart: Cart) {
43 const order = await orders.create(cart);
44 await payments.charge(order.total);
45 return order;
46}
Proposed replacement
43 const key = `cart:${cart.id}:${cart.version}`;
44 const order = await orders.create(cart, { key });
45 await payments.charge(order.total, { key });
46 return order;

Inspect the suggested change, then apply it to this local example.

Same click. Same order.

Replay the edge case behind the review: one checkout request arrives twice.

Before the suggestionorders.create(cart)
First requestOrder 1042
RetryOrder 1043

Two orders for one cart.

After the suggestionorders.create(cart, { key })
First requestOrder 1042
RetryOrder 1042

The retry returns the original order.

Illustrative replay. No project code or payment is executed.Both outcomes are visible. Replay to follow the two requests.

A suggestion becomes a visible change.

The same key follows the order and the charge. Inspect the exact lines before accepting the suggestion.

const key = `cart:${cart.id}:${cart.version}`;

Both operations share one idempotency key.

An illustrative review sequence. Sample checks do not execute project code.

Give the review
the right guardrails.

A checkout fix and a release change need different questions. Start with a working agreement, then inspect what it asks of the reviewer.

Sample team policies
Choose a review context
Product change agreement
Reviewers
One teammate who knows the customer flow.
Evidence
The changed state, its empty state, and keyboard behavior.
Before merge
Every unresolved question has an owner or a recorded answer.

This agreement is a local review preview.

The reasoning stays with the change.

Three decisions in this sample review.

src/payments/checkout.ts:43

Keep a retry from becoming a second order.

A slow connection can replay this request. Use the same idempotency key for the order and the charge, so a retry returns the original result.

  const key = `cart:${cart.id}:${cart.version}`;

Decision recorded by Nora Chen

Select a decision to inspect its source line and rationale.

Review the way your team works.

What stays attached to a decision?

The changed file, the exact source line, the reviewer’s reason, and its resolution. Applying the sample checkout suggestion updates the review sequence and its decision record below.

Can I undo a suggestion?

Yes. Revert restores the original lines for that file. Changes stay associated with their file when you switch between checkout, session, and search examples.

How do review agreements change the workflow?

Choose a product, infrastructure, or release context. Each agreement asks for different evidence and a different reviewer. The local preview records your choice alongside the final review stage.

Does the example run my code or connect a repository?

No. This is an editable frontend template. The diff, retry replay, and checks use illustrative local state. Connect your own repository and check runner before offering those services.

Leave a clearer
review behind.

Try the edge case. Inspect the suggestion. Make the decision.

Back to the review