automotive: index the collection by the part that failed - #142
Merged
Merged
Conversation
Ten feeds over the data already flowing, no new source and no new credential. The honest framing first, because it shaped the result: there is no free car-parts catalogue with year/make/model fitment. ACES/VCdb (Auto Care Association) and TecDoc are both subscription, and eBay's Browse API -- whose compatibility_filter is the only free source of real fitment anywhere, and only for motor-vehicle categories -- is not usable here. Most retailer catalogues are also displaying licensed ACES data, so scraping fitment off them redistributes someone else's licensed database, which is a worse exposure than a robots.txt violation. RockAuto's robots.txt names ClaudeBot explicitly; Autodoc, PartSouq and parts.cat.com sit behind Cloudflare or Akamai. What IS free, keyless and already ingested is NHTSA's component taxonomy, which goes down to the individual fastener -- one campaign reads SUSPENSION:FRONT:SPRINGS:LEAF SPRING ASSEMBLY:U-BOLT, LEAF SPRING TO AXLE. The nhtsa-recalls adapter has always slugified Component into tags; nothing was reading them as a part index. Live right now: 4,914 recalls and 13,044 complaints. So these are feeds rather than an adapter: brakes, airbags and restraints, tires and wheels, electrical, fuel system, engine and powertrain, steering and suspension, structure and body, glass and wipers, equipment. Each carries recalls AND complaints, because a recall is the manufacturer admitting it and a complaint is an owner noticing first, and either alone is half the story. Every tag was checked against the live API before being written down, which turned up a wart worth knowing. `slugify` DROPS "/" instead of hyphenating it, so a component containing one collapses into a single run-on word: LATCHES/LOCKS/LINKAGES is `latcheslockslinkages` and VISIBILITY/WIPER is `visibilitywiper`. The hyphenated spellings match nothing -- I wrote `visibility-wiper` first and it returned zero. The feeds use what is actually in the data, and a test pins both so nobody corrects the spelling and silently empties two feeds. Fixing slugify would be the real repair, but it would re-tag every adapter in the deployment and orphan the tags already written, so it is documented rather than changed. 9 new tests; 44 passing across the automotive files; lint clean. Full suite 2008 tests with the usual 5 Redis/Postgres integration failures this box cannot run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Ten feeds over data already flowing. No new source, no new credential, no new ingest.
The honest framing, because it shaped the result
There is no free car-parts catalogue with year/make/model fitment. ACES/VCdb (Auto Care Association) and TecDoc are both subscription. eBay's Browse API
compatibility_filteris the only free source of real fitment anywhere — and only for motor-vehicle categories — and this deployment can't use it.Scraping isn't the gap-filler it looks like either:
ClaudeBotexplicitly. Autodoc, PartSouq and parts.cat.com sit behind Cloudflare or Akamai.What is free, and was already here
NHTSA's component taxonomy, keyless and already ingested — and it goes down to the individual fastener:
nhtsa-recallshas always slugifiedComponentinto tags. Nothing was reading them as a part index. Live right now: 4,914 recalls and 13,044 complaints.So this is feeds, not an adapter: brakes · airbags and restraints · tires and wheels · electrical · fuel system · engine and powertrain · steering and suspension · structure and body · glass and wipers · equipment.
Each carries recalls and complaints together — a recall is the manufacturer admitting it, a complaint is an owner noticing first, and either alone is half the story.
A wart worth knowing
Every tag was checked against the live API before being written down, which turned this up:
slugifydrops/instead of hyphenating it. A component containing one collapses into a single run-on word:LATCHES/LOCKS/LINKAGESlatcheslockslinkageslatches-locks-linkagesVISIBILITY/WIPERvisibilitywipervisibility-wiperThe hyphenated spellings match nothing — I wrote
visibility-wiperfirst and it returned zero items. The feeds use what's actually in the data, and a test pins both so nobody corrects the spelling and silently empties two feeds.Fixing
slugifywould be the real repair, but it would re-tag every adapter in the deployment and orphan the tags already written. Documented rather than changed.Checks
bun run lintclean🤖 Generated with Claude Code