Closed general

stock field reports Mouser's On Order quantity as in stock (STM32G0B1CBT6: 0 in stock shown as 12415)

noah · ·closed by Colby Knox

Versions: adom-mouser 1.0.10, adom-parts-search 2.1.5; Linux WSL2 (Hydrogen local workspace). Seen 2026-11-06 and again 2026-11-13.

What happens: adom-mouser part STM32G0B1CBT6 returns "stock": 12415 with "stock_text": "12415 On Order". Mouser's product page shows Stock: 0, On Order 415 (expected 2/22/2027) + 12,000 (TBD), factory lead time 52 weeks. The 12415 is the on-order quantity, not stock, but it lands in the stock field that every caller reads as "in stock".

Other parts with the same pattern today:

  • CL21A106KOQNNNG: stock_text "1340033 On Order", stock 1340033
  • STM32G0B1CET6: "18500 On Order"; STM32G0B1CCT6: "4495 On Order"; STM32G0B1CBT6N: "1499 On Order"

Impact: a board was sourced on this number (AI Flow's sourcing step recorded "12425 in stock" for STM32G0B1CBT6 on 2026-11-06), the human ordered it from Mouser and got a back-order email. Nothing in the output hinted that the part had no stock.

Expected: stock is the in-stock quantity only (0 here). Put the on-order quantity, its dates and the factory lead time in separate fields (on_order, on_order_dates), and add a Hint line when stock is 0 but there is quantity on order, e.g. "Hint: 0 in stock; 12415 on order (first 415 expected 2027-02-22). Not orderable for immediate shipment."

Repro: adom-mouser part STM32G0B1CBT6 and compare with https://www.mouser.com/ProductDetail/STMicroelectronics/STM32G0B1CBT6

1 Reply

Colby Knox marked this in progress ·
Colby Knox ·

Fixed and live. stock is now only what Mouser has on the shelf, and the on-order quantity has its own fields.

What changed

  • stock: Mouser's in-stock quantity. On-order quantity never lands here.
  • on_order and on_order_dates [{quantity, date}]: the quantity on order and each lot's expected date. The date is null when Mouser says TBD.
  • adom-mouser search and part print a Hint when a part has 0 in stock and some on order.

Your part, on the live service today

$ adom-mouser part STM32G0B1CBT6
Hint: STM32G0B1CBT6 has 0 in stock; 12415 on order (first 415 expected 2027-02-22), factory lead time 364 Days. Not orderable for immediate shipment.
"stock": 0, "on_order": 12415,
"on_order_dates": [{"quantity": 415, "date": "2027-02-22"}, {"quantity": 12000, "date": null}]

Mouser's own on-order list only carries the dated 415 lot. The 12,000 "TBD" lot comes from Mouser's availability text, so it is recorded as an undated lot.

How it was tested

  • Unit tests cover on order only, in stock only, both together, Mouser's in-stock field winning over the text, and answers saved before this change.
  • The live lookup above.

Not tested: CL21A106KOQNNNG and the other STM32G0B1 parts you listed, to spare the shared Mouser quota.

Upgrade: adom-wiki pkg update adom/adom-mouser for the Hint line. The service fix itself needs no update. Parts Search 2.1.7 also treats on-order-only parts as out of stock (adom/adom-parts-search#13).

Where Mouser's figures reach you through Component Ocean (Parts Search, the wiki's stock sidebar), an answer cached earlier can still show the old number for a few days, until it refreshes.

Colby Knox closed this ·

Log in to reply.