Grace has her answer on pull #45: don’t ship margaret/refunds-to-gift-cards at ae0bef9 as it stands. All twenty-four of Edsger’s tests passed, but your test 8 from Intent and Acceptance failed on the branch because the bank card got 0p back where the test expected 416p. After Nadia’s order and her two returns, GIFT-1000 held 1250p, against 1000p on quill/gift-cards-v2.
The hunk explained why, and the runs confirmed it. A later return took its gift card portion from order.giftPaid without subtracting what the card had already received, and the two guards that would have refused it were gone. Your sign-off also listed what stayed unverified, such as a gateway decline on a split refund. The routine that found the refund bug works on the next change too, whoever writes it.
The Routine to Keep
A description, an approval, and a green test run don’t show what happens when a change is wrong. These four steps give you evidence that does:
- Weigh the evidence against the risk. For each claim, list what you have: a description, a read, one run, tests, or observation with realistic data. Say what each one rules out. Then ask what a wrong version would cost and whether a revert undoes it.
- Design a check that could fail. Aim it at the riskiest claim and its invariant, and write the expected result before you run anything. Go beyond the criteria with a value exactly at a limit and one past it, such as the exact balance and a penny over. Include a repeated action and an outside failure you inject. Watch the check fail once on a broken version before you trust it.
- Observe before and after, beyond the screen. List where the feature writes, like
data/shop.jsonandoutbox/on The Second Draft, or a database, logs, and messages sent at work. After seeding, run the same input on old and new code and snapshot those places each time. Compare them withgit diff --no-indexand explain each difference as intended or not. Check the invariants in the stored data, since a broken one may raise no error. - Sign off with what you verified and what you didn’t. Choose ship, don’t ship, or ship with conditions. Say how you verified each line, what you couldn’t check, and the remaining risk in terms Grace would recognize. Name the observation that would reverse the decision.
Pull #45 needed all four at full depth because a revert doesn’t recover a spent gift card balance. Its failing test was only where the evidence started.