Skip to content
Founding beta: 7 of 50 free spots leftClaim yours

Shelf counts and the site disagree after Monday's deliveries

Bug huntHardTypeScript · FastifyDatabaseConcurrencyData integrity75 min

SUP-2341: Shelf counts and the site disagree since Monday's deliveries

Ticket #32417 · ops escalation · High

Component: Stock / warehouse sync (support's guess)

From: Ibrahim Yusuf, support operations, Cartwheel · Received: Tue 27 Oct, 8:05 am (UTC)

Hi, Wanjiru's team did the Tuesday cycle count this morning (attachments/cycle-count-2026-10-27.csv) and the shop and the shelves no longer agree. Of the 14 products she checked, 6 show more stock on the site than we really have. For three of them we already sold units that don't exist: 4 orders from last night (6 units) can't be packed and Dana is writing to those customers. It also goes the other way: the Nordic Wall Clock shows sold out on the site since yesterday evening, but there are 30 on the shelf from Monday's delivery.

Two more things that may or may not be related. Rosa archived a few discontinued products on Monday, and two of them (Canyon Neck Pillow, Meadow Resistance Bands) are back on sale; two customers bought them since. Their history in the staff screen still says Rosa archived them and nobody restored them. And one of Rosa's Monday sale prices did not stick: the Canyon Garden Gloves are back at $49.99 although the history shows her change to $39.99.

Monday afternoon was our busiest in weeks: two large deliveries came in from the warehouse (WR-30117 just before 14:00 and WR-30118 just after 14:06), Rosa ran her autumn sale sheet (about 110 price changes and archived lines between 13:55 and 14:20), and sales were well above normal. Everything looked fine on Friday's count.

I attached what we could pull for Monday 13:55-14:10: the API access log (Tom filtered it to deliveries, Rosa's sheet and orders that contain one of the 14 products), the orders export for the same window, the WMS connector log and the product history of the 14 products.

Ibrahim

Wanjiru Kamau (warehouse lead): Counts are solid, we counted every one of these twice. Both deliveries arrived complete and were booked in by the connector as usual. Nobody adjusted stock by hand on these products since Friday, in the warehouse or in the shop.

Tom Becker (backend): Look at the connector log: both deliveries were sent twice because the connector gave up after 2 seconds and retried. My guess is some retries got booked a second time, that would explain the site showing too much. I'd raise the connector timeout to 10 seconds and add a dedupe table for receipt numbers. And no, it's not the flash-sale oversell again; checkout has taken stock with a single conditional update since that fix.

Lee Brandt (QA): I can't reproduce it. On staging I booked a 160-line receipt while placing orders and editing a few of the same products from a second browser, about twenty times. All numbers added up every time. (Staging runs a single API instance on a small database.)

Rosa Alvarez (merchandising): My sheet only sends prices and archive flags, one product per request; it sends the rows in batches as I save them. It never touches stock.

Ask (Ibrahim): find out why stock, prices and archive flags on the site drifted from what actually happened on Monday, and make sure a busy day can't do this again, whichever API instance serves each request. Wanjiru will correct the existing numbers by hand: don't change existing data. Everything else in the shop must keep working as it does today.

© AICodingRound. Ticket text for practice on this site; see Terms.

How it works

  1. 1Fix the problemin a real codebase.
  2. 2Use your ownAI, or none.
  3. 3Submit, then answera few short questions.
  4. 4Get your gradeand feedback.

More on the Cartwheel shop

View all

Related problems

View all