Repository navigation
Match discontinued REV SKUs to their successors, and goBILDA parts by size - #57
Merged
Merged
Conversation
… size - A part numbered with a SKU REV no longer sells is ordered as what replaced it: REV-31-1152 (Control Hub) as REV-31-1595 exactly; REV-41-1097 (Smart Robot Servo) as a choice of the V2 Balanced or UltraSpeed. - Sizes written as one token (8x14x5mm) are spelled out for library names, and a named bore (Round, REX, hex) rules out the other bore. - A vendor-tagged part whose search leaves one product carrying every number in its name is an exact match, so it is priced without confirming.
[Medium impact] The PR appears safe to merge; no new actionable issue remains. SummaryThe PR matches discontinued REV SKUs to current products and improves goBILDA matching by size and bore. The latest change restores decimal dimensions during comparison.
Reviews (3) · Last reviewed commit: "Greptile: keep decimal sizes when checki..." · Reviewed by Greptile |
…a choice - An exact tagged match needs one-token sizes in the product name in the same order (bore, outside diameter, thickness): 5x14x8mm is not the 8x14x5 bearing. - A part whose part number and name are two different discontinued products gets every replacement as a choice instead of the first one priced.
Contributor
Author
|
@greptile review |
Normalizing splits 15.5mm into '15 5mm', so a bare number just before a size is joined back on both sides before the ordered comparison; 8x15.5x5mm now matches goBILDA's 8mm x 15.5mm x 5mm thrust bearing exactly.
Contributor
Author
|
@greptile review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner reports from the HORS panel (2026-10-28): "Control Hub REV-31-1152" asked to be confirmed, "Smart Robot Servo REV-41-1097" found nothing ("u should know that its a rev servo"), and "8x14x5mm Bearing - Round Bore (GB)" found nothing ("u should know that its gobilda").
Why
Changes
successorOf(known-products.ts): discontinued SKUs with what replaced them. One successor gives an exact, priced match ("REV-31-1152 is discontinued; REV Control Hub is sold as REV-31-1595"). Two give a possible match with both as choices. The old SKU is never listed or priced.spellSizes(matching.ts): "8x14x5mm" or "8 × 14 × 5 mm" becomes "8mm 14mm 5mm" for library names and the tagged search. A configuration's own size field is ignored when the name gives sizes.boreConflict: "Round Bore" excludes REX/hex-bore products, and "REX" or "hex" excludes round ones.Tests
New cases in
catalog.test.ts: the bearing exact as 1611-0514-0008 (round bore) and 1611-0514-4008 (REX bore), two sizes staying a choice, the hub exact as REV-31-1595, the servo as a V2 choice. Updated: the tagged-motor test now expects exact, and the REV-feed buy-line test now orders the old hub as REV-31-1595. Typecheck, eslint, and 287 unit tests pass.