A demo purchase calls notifyFavoritersOfSale (backend/src/routes/cartCheckout.ts:251), which sends the favoriteSold template to everyone who favorited the item, through production's configured SMTP.
The copy (backend/src/emailTemplates.ts:72-82) reads: "An item you favorited has been sold to another customer, so it is no longer available… this one will not be restocked."
For a demo order that is a false statement mailed to real third parties. It is also the only outbound consequence of a demo purchase — everything else #195 and #203 addressed is on-screen, where the customer at least has the cart in front of them. These recipients never visited the cart and have no context at all; they just get told something they cared about is gone.
Production is in demo mode right now (#191), so this is live.
Notes for whoever picks it up
The item genuinely is marked sold in the database, so the email is not wrong about the inventory state — it is wrong about a sale having happened. Decide which of those the email is really reporting.
sendMail is fire-and-forget at backend/src/favoriteAlerts.ts:68, so the caller cannot currently suppress it. Suppressing demo sends means changing that signature or gating inside notifyFavoritersOfSale.
Options, roughly in order of preference: skip the notification entirely for processor === 'demo'; or send it with a demo qualifier; or leave it and accept that demo purchases have real-world reach, which seems hard to defend while the interim is live.
Found by
Code review of #195 (456e1aa), raised as Minor 4 — the reviewer noted it is the more serious of the two follow-ups in principle, because it reaches people who never visited the cart.
A demo purchase calls `notifyFavoritersOfSale` (`backend/src/routes/cartCheckout.ts:251`), which sends the `favoriteSold` template to everyone who favorited the item, through production's configured SMTP.
The copy (`backend/src/emailTemplates.ts:72-82`) reads: *"An item you favorited has been sold to another customer, so it is no longer available… this one will not be restocked."*
For a demo order that is a false statement mailed to real third parties. It is also the **only outbound consequence** of a demo purchase — everything else #195 and #203 addressed is on-screen, where the customer at least has the cart in front of them. These recipients never visited the cart and have no context at all; they just get told something they cared about is gone.
Production is in demo mode right now (#191), so this is live.
## Notes for whoever picks it up
- The item genuinely is marked `sold` in the database, so the email is not wrong about the inventory state — it is wrong about a sale having happened. Decide which of those the email is really reporting.
- `sendMail` is fire-and-forget at `backend/src/favoriteAlerts.ts:68`, so the caller cannot currently suppress it. Suppressing demo sends means changing that signature or gating inside `notifyFavoritersOfSale`.
- Options, roughly in order of preference: skip the notification entirely for `processor === 'demo'`; or send it with a demo qualifier; or leave it and accept that demo purchases have real-world reach, which seems hard to defend while the interim is live.
## Found by
Code review of #195 (`456e1aa`), raised as Minor 4 — the reviewer noted it is the more serious of the two follow-ups in principle, because it reaches people who never visited the cart.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
A demo purchase calls
notifyFavoritersOfSale(backend/src/routes/cartCheckout.ts:251), which sends thefavoriteSoldtemplate to everyone who favorited the item, through production's configured SMTP.The copy (
backend/src/emailTemplates.ts:72-82) reads: "An item you favorited has been sold to another customer, so it is no longer available… this one will not be restocked."For a demo order that is a false statement mailed to real third parties. It is also the only outbound consequence of a demo purchase — everything else #195 and #203 addressed is on-screen, where the customer at least has the cart in front of them. These recipients never visited the cart and have no context at all; they just get told something they cared about is gone.
Production is in demo mode right now (#191), so this is live.
Notes for whoever picks it up
soldin the database, so the email is not wrong about the inventory state — it is wrong about a sale having happened. Decide which of those the email is really reporting.sendMailis fire-and-forget atbackend/src/favoriteAlerts.ts:68, so the caller cannot currently suppress it. Suppressing demo sends means changing that signature or gating insidenotifyFavoritersOfSale.processor === 'demo'; or send it with a demo qualifier; or leave it and accept that demo purchases have real-world reach, which seems hard to defend while the interim is live.Found by
Code review of #195 (
456e1aa), raised as Minor 4 — the reviewer noted it is the more serious of the two follow-ups in principle, because it reaches people who never visited the cart.