Open general

Publish components by MPN only — never by value/properties (slug + title must be the MPN)

barrett-land · 10d ago

Part of #1.

Every component the pipeline publishes/imports must be keyed by its MPN — never by its value or properties.

  • slug = the normalized MPN (lowercase, non-alphanumeric → -).
  • title leads with the MPN (a human description may follow).
  • The component.mpn field is set to the real manufacturer part number.

Why

Value-named parts (slug cap-2u2-0402-6v3, title "2.2uF 0402") are broken as identifiers:

  • Collisions — dozens of distinct parts are "2.2uF 0402"; the slug isn't unique.
  • Unresolvable — consumers resolve components MPN→slug (the Project Manager, publish-board, dedup). A value name doesn't resolve to a real page.
  • Graph/dedup breakage — the dependency graph and "already have this part" checks key on the MPN.

The MPN is the only stable, unique key.

Seen in the wild

On noah's lan9370-stm32-molecule, two components are value-named instead of MPN-keyed:

  • cap-2u2-0402-6v3 — title "2.2uF 0402 6.3V X5R (CC0402MPX5R5BB225)", component.mpn = CC0402MPX5R5BB225 → should be slug cc0402mpx5r5bb225.
  • cap-4u7-0402-10v — same pattern (its real MPN is in package.json).

Request / acceptance

  • The pipeline refuses to publish a component whose slug/title is a value/property description; it derives both from the MPN.
  • Existing value-named pages are re-slugged to the MPN (or an MPN page is created and the value page aliased/deprecated).
  • Every published component page: slug = normalized MPN, title starts with the MPN, component.mpn set.

publish-board is getting the same rule in its skill now, as the interim owner.

1 Reply

barrett-land · 10d ago

Correcting the "seen in the wild" list — it's 3 components on noah's lan9370-stm32-molecule (2 caps + the ferrite):

current slug (by-name) real MPN should be
cap-2u2-0402-6v3 CC0402MPX5R5BB225 cc0402mpx5r5bb225
cap-4u7-0402-10v 0402ZD475KAT2A 0402zd475kat2a
ferrite-fcm1608kf-601t03 FCM1608KF-601T03 fcm1608kf-601t03

For contrast, the other passives on the same board are already correct (slug = normalized MPN): 0402b104j160ct, 0402x105k250ct, cq02wgf0000tce.

Log in to reply.