Closed general

Recommends an out-of-stock part: Mouser On Order quantity counted as stock (STM32G0B1CBT6)

noah · ·closed by Colby Knox

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

What happens: adom-parts-search search STM32G0B1CBT6 reports the Mouser hit with "stock": 12415 and ends with "recommendation: Mouser STM32G0B1CBT6 (exact match)". Mouser has 0 in stock; 12415 is the quantity on order (Mouser's own availability text is "12415 On Order"; first 415 expected 2027-02-22, 52-week lead). DigiKey shows 0 for every listing. So the recommendation sends the user to a part nobody can ship.

The same happens for CL21A106KOQNNNG (Mouser "1340033 On Order" shown as stock 1340033, DigiKey 0).

Impact: a board BOM was sourced from this (recorded as "12425 in stock" on 2026-11-06); the human ordered from Mouser and got a back-order email.

Expected:

  • Mouser stock counts only quantity in stock; on-order quantity and dates go in their own fields (see the matching issue on adom/adom-mouser, where the number is parsed).
  • --in-stock-only and the recommendation never pick a hit whose stock is 0 with only quantity on order.
  • When every authorized hit is 0, say so in a Hint ("no authorized stock: Mouser 12415 on order, first 2027-02-22; DigiKey 0") instead of recommending one.

Repro: adom-parts-search search STM32G0B1CBT6 vs https://www.mouser.com/ProductDetail/STMicroelectronics/STM32G0B1CBT6

1 Reply

Colby Knox marked this in progress ·
Colby Knox ·

Fixed in Parts Search 2.1.7. Mouser's on-order quantity no longer counts as stock.

What changed

  • A Mouser hit with only quantity on order reads stock: 0, with on_order holding the quantity. Its note says so and names the first lot and date when Mouser gives them.
  • Such a hit is never recommended, under either policy, and never passes --in-stock-only.
  • When nothing is in stock, the message says what Mouser has on order instead of recommending anything.

This works even on answers cached before the Mouser service fix (adom/adom-mouser#1), because Parts Search also reads Mouser's own "On Order" wording.

How it was tested

  • Unit tests cover your STM32G0B1CBT6 case (cached and fixed answers), a part with real stock, a mixed "In Stock, … On Order" answer, and the empty-state wording.
  • Live adom-parts-search search STM32G0B1CBT6:
    • 2.1.6: recommends Mouser STM32G0B1CBT6 at 12415 in stock.
    • 2.1.7: no recommendation, and "No distributor has STM32G0B1CBT6 in stock right now … Mouser has 12415 on order and none in stock."

Not tested

  • CL21A106KOQNNNG and the other parts you listed, which I kept out to spare the shared vendor quota.
  • The first-lot date: that appears once the Mouser service fix is live.

Upgrade: adom-wiki pkg update adom/adom-parts-search

Colby Knox closed this ·

Log in to reply.