Over the last two months I've written about a dozen posts here about things that broke in a small SaaS I run: Stripe webhooks, a stray .env file, background work whose failures stopped being visible. Some of them got comments. A few of those comments were better code review than anything I'd have gotten by asking.
This week I went back through all of them and did something I should have done earlier: I made a list of every concrete suggestion, checked each one against the current code, and decided what to do with it. Eight suggestions came out of that. Three are fixed. Three I decided not to do. Two are parked with a written condition for when I'll come back to them. And one check I promised publicly turned up nothing at all, which I'll count as a result.
Here's the whole list, including the part where one of my own replies was wrong.
Fixed #1: the timeout that wasn't a timeout
The comment (Jared Chu, on the waitUntil() post): the Anthropic SDK retries twice by default, so setting timeout: 90_000 doesn't cap the whole call. It caps each attempt.
He was right, and I hadn't seen it. My client looked like this:
new Anthropic({ apiKey, timeout: 90_000 }) The function that runs the review has a hard limit of 120 seconds. I'd picked 90 seconds for the API call so that a hung request would fail as an error I could see, before the platform killed the function silently. But with two default retries, the worst case was three attempts of 90 seconds each: 270 seconds. The guard I'd written to make failures visible could itself run long enough to make them invisible again.
The fix is short. The reasoning is the part worth writing down, so it's in the code now:
export const ANTHROPIC_TIMEOUT_MS = 90_000; // timeout is per attempt. With the SDK default (maxRetries=2) the worst case is // 3 × 90s = 270s, past maxDuration. (maxRetries + 1) × 90s <= 120s only holds for 0. export const ANTHROPIC_MAX_RETRIES = 0; export function createAnthropicClient(apiKey: string, fetchImpl?: typeof fetch): Anthropic { return new Anthropic({ apiKey, timeout: ANTHROPIC_TIMEOUT_MS, maxRetries: ANTHROPIC_MAX_RETRIES, ...(fetchImpl ? { fetch: fetchImpl } : {}), }); } Jared also suggested a regression test with a fake fetch. The client factory now accepts a fetchImpl, so a test can inject one. One test checks the arithmetic (attempts × per-attempt timeout stays under the function limit). The other returns a 529 from the fake and asserts the client made exactly one request. Counting real requests matters more than checking the config value, because the config value is exactly what I was wrong about.
What it cost: with zero retries, a connection error or a 5xx now fails the review on the first try instead of quietly retrying. I accepted that. A failed review that shows up as failed is better than one that times out somewhere nobody looks.
The general lesson: when a library has both a timeout and retries, the number that matters is (retries + 1) × timeout, plus backoff. If you set one without the other, you haven't set a limit.
Fixed #2: an unpinned API version, and an audit that found nothing
The comment (Mihai Perdum, on the "Cancels" vs "Renews" post): the scary part wasn't the field I'd misread. It was that two API versions happened to agree by luck. Had I pinned apiVersion? Had I checked whether other fields were quietly being read wrong?
No, and no. I said so in my reply, and wrote that checking the other fields was the next step. Here's what I did with that.
Pinning. The Stripe client now sets its version explicitly:
// Pinned to the version the SDK was already using implicitly, so production // behaviour doesn't change. If the SDK is upgraded and its default moves, // tsc fails on this line — that's the signal to look again. export const STRIPE_API_VERSION = "2026-03-25.dahlia" as const; I deliberately pinned it to the version I was already using, not the newest one. The goal was to stop the version from moving on its own, not to change behaviour in the same commit. There's a test that asserts the value.
The audit. This is the part I'd promised. My webhook endpoint was registered at a newer version (2026-06-24.dahlia, the last time I looked in the dashboard, in October) than the client (2026-03-25.dahlia). That gap is real, so the question was whether it touches anything I read.
The useful realisation was that it only matters for one kind of read. Webhook payloads arrive in the endpoint's version. Anything I fetch with stripe.subscriptions.retrieve() comes back in the client's version. My handler already re-fetches the subscription instead of trusting the payload (an earlier bug taught me that), so the only fields the version gap can affect are the ones read straight off the event. I listed every one of them:
-
event.typeandevent.data.object -
subscriptionandcustomeron the checkout session -
idon subscription events - on invoices:
parent.subscription_details.subscription(and the oldersubscriptionas a fallback),billing_reason,created,attempt_count
Nine fields. Status, price, period end, cancellation, trial end and metadata all come from the re-fetched object, so they're on the pinned version no matter what the webhook sends.
Then I read Stripe's changelog for the Dahlia line between the two versions. There are three GA releases in that window, and none of them has a breaking entry. The breaking changes in that period are all on the preview channel. The only one near my code changes how billed_until on subscription items is returned, and I never read that field. None of my nine fields was renamed, moved or retyped, and none of the six event types I subscribe to changed.
Zero mismatches. It's tempting to call that a wasted afternoon. I think it's the opposite. Before, "the versions differ" was a vague worry. Now it's a list of nine fields with a source for each answer, and the next time I upgrade I only have to re-check nine things, not everything.
What I haven't done: the long-term fix is to bring the endpoint and the client onto the same version. That changes what retrieve() returns in a payment path, so it's its own decision with its own review, not something to slip into an audit.
Fixed #3 (mostly): telling two kinds of payment failure apart
The comment (Paul Hartness, on the "active before anyone has paid" post): handle a payment that fails right at the end of a free trial separately from other payment failures. The way I read it: the first is someone who has never paid you, the second is a customer who has, and lumping them together hides which one you're losing.
My invoice.payment_failed handler now classifies the failure before logging it. It doesn't change any state. The state still comes from re-fetching the subscription. It only labels what happened:
export function isTrialEndFirstCharge( invoice: { billing_reason?: string | null; created: number }, sub: { trial_end?: number | null } ): boolean { if (invoice.billing_reason !== "subscription_cycle") return false; if (sub.trial_end == null) return false; const delta = invoice.created - sub.trial_end; return delta >= -HOUR && delta <= 24 * HOUR; } The upper bound is there so that a renewal a month or a year after the trial doesn't get mistaken for the first charge.
I'm calling this "mostly" fixed for an honest reason: I've seen the first post-trial invoice come through with billing_reason: subscription_cycle on a test clock, but only in a run where the payment succeeded. I haven't run the failing version of that scenario, and the code comment still says it's unverified. If I'm wrong, the cost is a mislabelled log line, not a wrong subscription state. That's why I was comfortable shipping it before verifying, and why I'm not comfortable calling it done.
Parked: two good points with nothing to break yet
Some suggestions were right, but there's currently no path for the problem to happen. For those I wrote down the condition that brings them back, so "later" doesn't quietly become "never".
Put the ID in metadata, not the description (Muhammad Turner Gane, on the idempotency post). When I grant a referral credit, the second line of defence against granting it twice is a search through the customer's balance transactions for a marker string in the description. His point: a description reads like something safe to tidy up, and an ID shouldn't live anywhere a human might "clean". I agree, and I checked: that's exactly how it works today. But it can only go wrong after a referral actually converts to a paid plan and someone edits that text. Neither has happened yet. It comes back the first time a referral checkout happens, or the next time I touch that file for any reason. It's a payment path, so it gets a proper review either way.
Validate environment variables at startup (Mihai again, on the stray .env post). Two sharp details in that comment: the check only helps if it's imported before anything that uses the variables, and .string() happily accepts an empty string. The incident behind that post is already fixed, and adding a check properly means touching every entry point. It comes back if another env-related incident happens.
Refused: three ideas I said no to, and why
This is the part I find most useful to write down, because a refusal without a reason tends to get relitigated every few weeks.
"Let BUG findings bypass the cap"
My reviewer posts at most eight comments per review. The cap is enforced in code, sorted by severity, and whatever doesn't fit is counted and reported instead of posted. Jo Do suggested, on the first post, that findings labelled BUG should skip the cap, and that the metric should be accepted findings per review rather than total comments.
The metric part I agree with. The bypass I'm not doing, for two reasons. First, "BUG" is the model's label, so an uncapped lane is exactly as reliable as that label. A model that over-labels would bring all the noise straight back through the one door I left open. Second, "the cap is enforced in code, not requested in a prompt" is the core idea of the whole product. An exception for one category turns a hard rule back into a judgment call.
What would change my mind: a real case where the cap cut a finding that turned out to be a real bug.
"Show me what was cut"
Agentic Affairs pushed on the cap post: if you only report numbers for what was cut, how is anyone supposed to check the cut was right?
It's a fair question, and here I have to admit something embarrassing. In my first reply I said the cut findings are reported with a breakdown by severity. That was right: when the cap cuts anything, the review ends with a line like "🔇 3 remarks suppressed to keep this review focused: 1 BUG, 2 NIT." But my second reply opened by "correcting" myself, saying the breakdown didn't exist. The correction was the wrong part. My best guess at how it happened is that I checked a local copy of the code that was a few weeks behind, but I can't prove that. I found that out while fact-checking this post, and I owe that thread a correction to my correction.
So the accurate version is: you get the count and the per-severity numbers, and the text of the cut findings isn't stored anywhere. The lesson I took is narrower than "check the code": check the code that's actually running. If my guess is right, a local copy that's a few weeks behind is worse than memory, because it feels like evidence.
On the actual suggestion: storing the cut findings means storing fragments of customers' private code, with all the retention, privacy and storage decisions that come with that. It's a reasonable feature for a product with users who are asking for it. It's a poor trade for me today.
"Run it on one repo for a month and see if anyone looks"
The same commenter's follow-up was a cheaper version: persist the cut findings for a single repository for a month and see if anyone opens them. I like it as an experiment design. The problem is the subject. Right now the only person who'd be looking is me, and a month of me not opening something tells you nothing.
What would bring these back: for the experiment, at least one outside repository using the reviewer. For the full feature, an outside user asking for it.
What I'd tell anyone with a comment section
Treat comments as a review queue, not a notification feed. I answered most of them in one batch in late October, and then mostly forgot about them. The comments themselves surfaced a real bug (the retry budget). Going back and checking every suggestion against the current code turned up a promise I hadn't kept yet (the field audit).
Check the code before agreeing. The retry and API-version comments described my code correctly before I had looked. And the one time I "corrected" myself, the correction was the part that was wrong.
"Fixed", "parked" and "refused" are all answers. The parked items each have a written condition that brings them back. The refused ones each have a reason and a "what would change my mind". Without that, I'd have had the same internal debate again next month.
An audit that finds nothing still counts, if it leaves a list behind. The version check produced no code changes. It did turn a vague worry into nine named fields and a source for each answer.
If you've left a comment on one of my posts: thank you. Several of you did a better job reviewing this code than I did.
The reviewer I keep writing about is DevReview, an AI code reviewer for GitHub that caps its comments in code and reports what it cut. There's a free tier if you want to point it at a pull request.
I write these posts with an AI assistant, and every claim in them is checked against the real code and logs. The decisions, the mistakes and the corrections are mine.
I'm curious what other people do with this: do you go back through old comments, or do suggestions mostly die in the thread?
