Skip to content

Add a parts collection: appliance models and recalls - #137

Merged
ralyodio merged 2 commits into
mainfrom
worktree-nichedb-parts
Sep 25, 2026
Merged

ralyodio merged 2 commits into
mainfrom
worktree-nichedb-parts

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Adds /c/parts to nichedb: the free, regularly-updated data underneath appliance parts.

What this is

There is no free catalogue of appliance parts. Part numbers, prices and what fits what is what PartSelect and RepairClinic sell, and nothing open replaces it. What is free is the layer underneath, and this adds both halves.

energystar-models walks the EPA's per-category certified product datasets on Socrata. Brand, model number, UPC and specification across 23 categories: refrigerators, freezers, washers, dryers, dishwashers, cooking, dehumidifiers, room AC, air cleaners, fans, water heaters, furnaces, boilers, heat pumps, thermostats, pool pumps and commercial equipment. Keyless, public domain, rewritten daily. A live run pulled 1,168 models across two categories in 0.7s.

cpsc-recalls walks the CPSC REST service. Every recall with the model numbers and barcodes affected, the hazard, and the remedy owed. Keyless, public domain, ~50/month, newest dated the previous day. A live run pulled 103.

They join on model number and UPC, which is the point: a model page can say the thing is recalled.

Two traps encoded rather than left to be rediscovered

The consolidated Model Index (8wj2-sec8) is the obvious dataset and the wrong one. 1,796,876 rows, every category in one table, and Socrata reports data_updated_at as today. Its newest record on 2026-09-25 was 2025-12-09 — nine months behind. The daily timestamp is a republish of unchanged content and nothing in the response says so. A test asserts no preset points at it.

The datasets disagree about the date column. The index uses date_certified; most categories use date_qualified or date_available_on_market. Socrata answers a $where on a column that does not exist with 200 and [], so a wrong column name is indistinguishable from a category nobody certified. Every preset names the column measured to carry data, and an empty first page on a first walk throws instead of quietly reporting zero. Each preset also records the row count and newest date it actually returned, the way the socratacrime presets do, so a dataset that stops can be told from a quiet month.

Also

.gitignore said node_modules/ with a trailing slash, which matches directories only. A git worktree's node_modules is a symlink, so it was not ignored and git add -A staged it. One character.

test/adapters.test.js keeps a hardcoded list of valid collection slugs; parts is added to it.

Checks

  • 26 new tests covering both adapters, the presets, and the collection wiring
  • bun run lint clean (0 errors)
  • Both adapters smoke-tested against the live upstreams, output inspected
  • Full suite green apart from the Redis and Postgres integration tests, which need services this dev box does not run. The first CI run confirmed this: with those services present, its only failure was the registry slug list, fixed in b319296.

Deliberately not included

EPREL, the EU registry, is the one free source with actual spare-parts data (Ecodesign law makes manufacturers register parts availability and costs). It needs a free API key via EU Login, and its endpoints 403 without one. I did not write an adapter against a response shape I have never seen. That is the natural next PR once the key exists.

🤖 Generated with Claude Code

There is no free catalogue of appliance parts. Part numbers, prices and
what fits what is what the parts retailers sell, and nothing open
replaces it. What is free is the layer underneath, and this adds both
halves of it.

energystar-models walks the EPA's per-category certified product
datasets on Socrata: brand, model number, UPC and specification for
refrigerators, washers, dryers, dishwashers, water heaters, furnaces,
heat pumps and fifteen more. Keyless, public domain, rewritten daily.
A live run pulled 1,168 models across two categories in 0.7s.

cpsc-recalls walks the Consumer Product Safety Commission's REST
service: every recall with the model numbers and barcodes affected, the
hazard, and the remedy owed. Keyless, public domain, about fifty a
month, newest dated the previous day. A live run pulled 103.

The two join on model number and UPC, which is what makes the pair
worth more than either: a model page can say the thing is recalled.

Two traps are encoded rather than left to be rediscovered.

The consolidated ENERGY STAR Model Index (8wj2-sec8) is the obvious
dataset to use and is the wrong one. It is 1,796,876 rows, every
category in one table, and Socrata reports data_updated_at as today;
its newest record on 2026-09-25 was 2025-12-09, nine months behind. The
daily timestamp is a republish of unchanged content and nothing in the
response says so. A test asserts no preset points at it.

The datasets also disagree about the date column: the index uses
date_certified, most categories use date_qualified or
date_available_on_market. Socrata answers a $where on a column that
does not exist with 200 and an empty array, so a wrong column name is
indistinguishable from a category nobody certified. Every preset names
the column measured to carry data, and an empty first page on a first
walk throws instead of reporting zero rows. Each preset also records
the row count and newest date it actually returned, the way the crime
presets do, so a dataset that stops can be told from a quiet month.

.gitignore said node_modules/ with a trailing slash, which matches
directories only. A git worktree's node_modules is a symlink, so it was
not ignored and git add -A staged it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio
ralyodio marked this pull request as ready for review September 25, 2026 07:11
test/adapters.test.js asserts every adapter's collection is one of a
hardcoded list of slugs, and parts was not on it, so both new adapters
failed the registry check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 4ce2e75 into main Sep 25, 2026
3 checks passed
@ralyodio ralyodio mentioned this pull request Sep 25, 2026
ralyodio added a commit that referenced this pull request Sep 25, 2026
Two releases' worth of collections since 0.29.0: parts (#137), MCP servers
and agent workflows (#139), and the split of the latter into skills,
subagents, commands, plugins and hooks (#140).

15 manifests plus the CLI's own VERSION const; bun.lock carries no version
lines to follow, and @profullstack/partners stays at 0.2.0.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant