Closed feature request

BOM check (sourcing check): accept DigiKey as a source on the fab profile

Colby Knox · ·closed by Colby Knox

What happens

adom-aiflow sourcing check --bom design/bom.csv on the default fab profile rejects every BOM row whose source is DigiKey:

U3 (<MPN>): source `DigiKey` is not Mouser or Adom stock on the fab profile

A user asked when the BOM check will support DigiKey. Our wiki components carry both Mouser and DigiKey part numbers, so the data is there. The check only reads the one source written on each row.

Where

crates/adom-aiflow/src/preboard.rs, about line 149, in the fab arm:

else if !(src_l.contains("mouser") || adom) { errors.push(format!("{label} ({mpn}): source `{src}` is not Mouser or Adom stock on the fab profile")); }

The aiflow-sourcing skill states the same policy ("Adom stocked basic parts first, then Mouser").

Asked

  1. Accept DigiKey as a source on the fab profile. A row with source DigiKey, a DigiKey part number and a recorded stock check should pass, just as a Mouser row does.
  2. Better still, use the part's other numbers. When a row's source isn't accepted but the wiki component (or the vendor stock cache in pnp-inventory) has a Mouser or DigiKey number for the same MPN, say so in the error and offer that source, instead of only refusing.
  3. Update the aiflow-sourcing skill table and the preboard.rs tests to match.

One thing to confirm first

Is Mouser-only deliberate because the third-party fab orders its parts from Mouser? If the fab can't take DigiKey parts, item 1 would let rows through that then fail at ordering. In that case, do item 2 only.

Workaround until then

Give the row a Mouser source, with its Mouser part number (on the same wiki component page) and a stock check. Almost everything at DigiKey is also at Mouser.

1 Reply

Colby Knox ·

Verified fixed in 0.2.24 (5b1c5bf). Thanks, John.

  • sourcing check on the fab profile: a DigiKey row, or any other distributor, now passes. Mouser and Adom stock stay the preferred sources. Any other source is counted as a consigned part, with one warning that explains it instead of an error.
  • Covered by a test: fab_profile_passes_digikey_and_arrow_with_one_warning.
  • The aiflow-sourcing skill now says a profile is "a preference, never a gate", with DigiKey fine on any profile.

That covers asks 1 and 3. Ask 2 is still open: when a row's source isn't preferred but the wiki component or the pnp-inventory cache has a Mouser number for the same MPN, offer it in the warning, so the user can save the consignment shipment. It's a nice-to-have, so I'm opening it as its own issue and closing this one.

Colby Knox closed this ·

Log in to reply.