Checkout 500s on FALL5 orders
Divyam Talwar built Coupons
3 checkouts failed · $108 at risk
In developmentWaitlist open
It catches the first error in production, wakes the engineer who wrote that code, fixes it and tests it like a customer. Built so nothing ships until a person says yes.
We’ve raised 446 pull requests across 70 open-source projects.
See every pull requestDawnmend is built to read your code and its history and map every feature: its code, who built it, what changed last. Every approved change redraws the map. Nobody maintains it.
Feature · code · who built it · what changed
Map updated 6:43 PM38 s after the merge
What it learned from #1287
So at 2 AM, it already knows what broke, and who to wake.
Every FALL5 checkout starts failing. It reads the tools the team already uses, finds the cause, counts the cost and calls it Critical.
8:14 AM in Lyon. Try the sale.
It’s 2:14 AM at Fernway.
Ethiopia Guji · 1 bag$18.00
FALL5 applied−$5.00
Total$13.00
Customers using the FALL5 coupon can’t pay. Everyone else still can.
Error 2:14:07Judged Critical 2:14:19 · 12 s
Estimated at risk: about 3 orders and $100 every minute.
coupon.rule is undefined for FALL5; coupon.ts:88 reads .percent#1287 (a3f9c2e) added them; line 88 and its tests were not updatedPOST /api/checkout → 500 in 38 ms · trace 4bf92fTypeError: Cannot read properties of undefined (reading 'percent')at applyCoupon (coupons/coupon.ts:88:51)at priceCart (checkout/total.ts:42:18)at createPayment (checkout/pay.ts:27:22)Sentry SHOP-4C7 · production · shop@c81d4a9POST /api/checkout → 500 in 38 ms · trace 4bf92fTypeError: Cannot read properties of undefined (reading 'percent')at applyCoupon (coupons/coupon.ts:88:51)at priceCart (checkout/total.ts:42:18)at createPayment (checkout/pay.ts:27:22)Sentry SHOP-4C7 · production · shop@c81d4a9Also in Datadog · POST /api/checkout 500s
Beside it, a Fernway checkout as a customer in Lyon sees it: Ethiopia Guji, FALL5 applied, $13.00 to pay. Paying fails with “Something went wrong. Your card was not charged.” Final frame: a live production log from the demo Fernway shop, read through Sentry. At 2:14:01 the email service warns that an old mail API is deprecated; no email failed, so it is marked Low: one quiet Slack message to Jonah, saved for Monday’s report. At 2:14:07 Sentry catches checkout requests failing with server error 500, issue SHOP-4C7, 7 times in 12 seconds, as 2 customers tapped Pay again and again. 12 seconds later it becomes incident PAY-412, Checkout 500s on FALL5 orders, judged Critical. Cause: pull request 1287, commit a3f9c2e, merged at 6:42 PM, added $5-off coupons, but line 88 of coupon.ts still expects every coupon to have a percentage, and no test tried one. The FALL5 sale email began reaching Europe at 2:10 AM, so checkout traffic is 5 times normal and every FALL5 checkout fails. No customer is charged for a failed order, and other orders still go through. It estimates about 3 orders and $100 every minute at risk. Datadog APM shows the checkout error rate going from 0 to 70% in those 12 seconds: 7 of the last 10 checkout requests failed. Rolling back 1287 would cancel the sale, so it fixes the code. Next, it wakes Divyam Talwar and starts seven agents on a fix.
Not whoever is on call: the person who wrote the code that broke. Tonight, that is Divyam.
Built to stay quiet at night. Only Critical calls.
Divyam Talwar wrote 41 of the 52 changes to Coupons, the code that broke. Newest: #1287 · Oct 12
Counted from git history.
Tuesday, October 13
2:16
Sleep Focus
Awake. Ping me when it’s ready. 2:16
Will do. Go back to sleep if you can. 2:16
Sample voice. Sound plays only when you tap.
#checkout
DawnmendAPP2:14 AM
@Divyam Talwar, PAY-412 is in Coupons, which you own. Every FALL5 checkout fails with a server error (500); no customer is charged. Cause #1287 (6:42 PM). 7 agents are working on the fix; updates in thread.
Transcript
Two make the bug happen again, three write the fix, two pay like a real customer. Reviewer agents send it back until it’s right.
Working from the code map: Coupons + Checkout, which uses it
Reproduce
Fix
Browser test
ReviewersRound 2
01 Reproduce 2:15 to 2:19 AM
02 Fix 2:19 to 2:26 AM
@@ -87,4 +87,6 @@ export function applyCoupon(totalCents: number, coupon: Coupon) { if (!coupon.active) return totalCents;Removed: - const off = Math.round(totalCents * coupon.rule.percent / 100);Removed: - return totalCents - off;Added: + const off = coupon.kind === "amount"Added: + ? coupon.amountOffCentsAdded: + : Math.round(totalCents * coupon.rule.percent / 100);Added: + return Math.max(totalCents - off, 0); }03 Test in a real browser 2:26 to 2:29 AM
On the preview · Stripe test card 4242
Screenshots 3 of 3
04 Review 2:30 to 2:38 AM
Round 1
FALL5−$5.00Round 2
FALL5−$5.00Round 2 · Write the fix
coupon.tsRemoved: - return totalCents - off;Added: + return Math.max(totalCents - off, 0);All green after 2 rounds
Sent to Divyam for a yes · 2:38 AM
Final frame: in the Dawnmend workspace, seven AI agents with code references made PAY-412 happen again in Chrome and Safari, confirmed the cause on line 88 of coupon.ts, fixed it so $5-off coupons work, checked it with a guard test and 1,284 passing tests, then paid like a customer on the preview site with a test card and took three screenshots. Three reviewer agents caught one mistake in round 1: a $5 coupon on a $4 sample pack made the total minus $1.00. The fix now stops totals at $0.00, a $0.00 order skips the card charge, and round 2 is all green. At 2:38 AM it goes to Divyam for a yes, with three screenshots.
It arrives as a pull request: the change, with screenshots of it working on the preview site. Nothing merges until the person who built Coupons says yes.
Dawnmend pings Divyam Talwar on WhatsApp and in #checkout at 2:38 AM. Pull request 1291, the fix with three screenshots from the browser test on the preview site, waits for Divyam. Divyam approves it at 2:41 AM; nothing ships before that.
Since 2:14 AM every FALL5 checkout has failed with a 500, 64 so far: #1287 added $5-off coupons, but coupon.ts:88 still expects a percentage. Both kinds now work, a total never drops below $0.00, and a $0.00 order skips the card charge.
Divyam Talwar built Coupons, so only Divyam can approve this.Updated · Approve the new versionYour turn. You’re Divyam tonight. Approve it or send it back.
Approved by Divyam Talwar · 2:41 AM
Tuesday, October 13
2:41
Once Divyam approves, it puts the fix live and watches the same logs for 30 minutes to confirm it holds.
Checkout errors per minute (HTTP 500)
Before the fix: about 9 a minute · 70% of requests
Watching30:00 / 30:00
FALL5 orders0 errors after the fix, 86 FALL5 orders paid by 3:13 AM
Watching30:00 / 30:00
DawnmendWhatsApp · 3:13 AM
Fix for PAY-412 held 30 min: 0 errors, 86 FALL5 orders paid. Closed.
Divyam · 3:14 AM
Thanks. Back to sleep.
78 checkouts failed before the fix. None after it.
Dawnmend is in development.
Final frame: approved by Divyam at 2:41, merged at 2:42 as commit 7d41b0c with the code map updating by itself, live at 2:43. Checkout server errors drop from about 9 a minute to zero and stay flat for 30 minutes while 86 FALL5 orders are paid. Between 2:14 and 2:43 there were 273 errors and 78 checkouts had failed, 41% of all checkouts in that time, about $2,800 in orders. Divyam spent about five minutes on a phone. At 3:13 the fix holds; Dawnmend tells Divyam on WhatsApp that PAY-412 is closed and Divyam replies “Thanks. Back to sleep.” Fixed in 29 minutes, not at 9 AM: five minutes of Divyam’s night, on a phone. Left unwatched until 9 AM, about $39,000 in orders would have failed (estimate). 78 checkouts failed before the fix and none after it.
For ten days it watches how Fernway is used. Features nobody uses, screens nobody reaches and endpoints nobody calls are dead code. The people who built them decide what goes, so less can break at 2 AM.
It proposes a removal only when nobody uses it and no job or code still needs it.
Theo, nothing has called the old PDF invoice endpoint since Oct 5. A month-end job could still need it, so I’m asking: remove its 640 lines?
Remove it. Month-end uses the new one.
Thanks. The removal is now in #1296 for your approval.
Watching production since Mon, Oct 5 · Last used: not once since Oct 5
Watched 10 days · Oct 5–14
Scanning daily · last scan today
Feature nobody uses
gift-wrap.ts · 420 lines
Offered at about 19,000 checkouts in 10 days. Nobody added it.
Proposed for removal
Screen nobody reaches
/ · 180 lines
Customers paused 212 times. No link or button leads here.
Proposed for removal
Endpoint nobody calls
GET / · 640 lines
About 960 uses of Invoices, all through the new code. Nothing called this one.
Theo said remove it
Rare isn’t dead
holiday-banner.tsx
0 views in 10 days, because it is scheduled to turn on Dec 1.
Checked again Dec 2
Day 10, Wednesday, October 14. After ten days watching how customers use Fernway, Dawnmend checks every piece of code four ways: use in production, links that reach it, scheduled jobs and other code that calls it. It finds three pieces of dead code: Gift wrap, a feature added in 0 of about 19,000 checkouts in 10 days; the Pause survey, a screen no link leads to; and the old PDF invoice endpoint, with 0 calls. No month-end has passed since Oct 5, so it asks Theo Park, who says to remove it. It keeps the Holiday banner, which turns on December 1. Pull request 1296 removes the three, 1,240 lines, waiting for Theo and Jonah to approve.
Tag it in Slack, or text it on WhatsApp or iMessage. It builds the feature, tests it in a real browser, and sends you the change with screenshots to approve.
@Dawnmend add CSV export to Invoices. Our accountant wants one file a month: date, invoice, customer, amount, tax and status. Totals must match the page to the cent.
On it. Theo built Invoices, so Theo reviews the code. The PR comes to you.
@Divyam Talwar PR #1302 is ready for you, with 3 screenshots.
fernway/shop · Pull request #1302
feat(invoices): export invoices as CSV
feat/invoice-csv-export → main4 files, +142 −3checks passed
Theo approved the code. Approved on my side too.
Shipped. #1302 is merged as e58a19d and live on the Invoices page.
Every Monday, one Slack message anyone can read in a minute. It covers the week’s incidents and fixes, new features, and anything still waiting for a yes.
Today
Checkout broke Tuesday at 2:14 AM. Fixed in 29 minutes.
Every issue, day by day
Tue 2:14 AM · Checkout failing on $5-off coupon orders
Fixed 2:43 AM · 29 min
PAY-412 · 78 failed checkouts (~$2,800) · 0 after
Back to the night ↑Built this week, and waiting for a yes
Seen in Sentry 7 · Datadog 4 · Grafana 2 · AWS CloudWatch 2 · New Relic 1
14 changes proposed: 12 shipped, 2 waiting
16 seen · 11 fixed · 1 person woken at 2:14 AM
Dawnmend is being built as one loop of nine steps: it knows the code and who owns it, sees the error, tells the right person, fixes it with seven agents, asks a person, ships and watches the fix, finds code nobody uses, builds what you ask for and reports every Monday. Between Asks and Ships, a person approves: every change waits there, the fix, the cleanup and the build alike, and nothing ships without that yes. Then the loop starts again.
Dawnmend is built to run every step on its own, day and night, except one: nothing ships until the right person says yes.
Then it starts again.
Then it starts again.
Hand it the night shift. Keep the final say.
Dawnmend is in development. Leave your work email and we’ll bring your team in as early access opens.
We’ve raised 446 pull requests across 70 open-source projects.
See every pull request, public GitHub data from 26 Oct 2026