Skip to content

BOM-20 MPN on the board but not in the parts snapshot

Severity Status Implementation
warning runs in better_erc easy, depends on CFG-9

Data it needs: graph, parts snapshot.

Looks at. MPN fields, the parts snapshot.

What it catches. An MPN on a fitted part, in the variant checked, that the parts snapshot beside the project (parts.lock.toml) does not list.

Why it matters. The checks that compare an MPN with its instance's fields and the footprint review read part facts only from the snapshot, so CI runs offline and the same on every PC. An MPN added since the last refresh has no facts there: every check of it would say "not checked", and a new part would reach the BOM unreviewed.

Example. Mpn2 of C412 set to GRM155R60J105KE19D after the last berc parts refresh: the rated voltage of the new candidate is never compared with the rail.

How to check. Every MPN field (Mpn1, MPN_2, Manufacturer_Part_Number, ...) of each fitted part, against the snapshot's [[part]] entries by MPN as written. better_erc (erc_checks/src/bom/bom_20.rs) reports one finding per missing MPN on the parts carrying it. Without a snapshot the check does not run.

Fix. Run berc parts refresh and commit the new parts.lock.toml with the change.

References. Catalogue BOM-12, LIB-6; project file [parts].

Test schematics

Each schematic below is in test_schematics/sources. The block under it is what berc check --only BOM-20 reports on it.

bom-20_parts_lock

The test schematic bom-20_parts_lock The test schematic bom-20_parts_lock

  warning    BOM-20 #zdn    MPN ERJ-2RKF1002X on R2 is not in the parts snapshot: its facts and footprint reviews are not checked
                            part R2
                            fix: run `berc parts refresh` and commit parts.lock.toml
  warning    BOM-20 #1v8    MPN RC0402FR-071KL on R4 is not in the parts snapshot: its facts and footprint reviews are not checked
                            part R4
                            fix: run `berc parts refresh` and commit parts.lock.toml