ai-coding-minesIndexGitHub

A success response with "zero of the core output" is not success

Python and databases

Symptom

47 of 47 registrations: registered: true, reason: null. All successful. And every one had zero images. Nobody knew until a human looked at the result.

Cause

Assumed the shape of external data. Entries were {name, sources:[{url, priority}...]} but the code flattened with v.get("url"), so every URL was None. Empty URL, so collection never ran. Registration still succeeded.

Fix

Rule

Collection = images, registration = images, translation = translated text. "Zero of the thing that must exist" is never allowed to pass quietly.

An empty record with only a price passed registration and went on sale

The residue of a failed scrape — no body, no attributes — got a price attached, passed registration validation, and was found on sale. When an order comes in there is nothing to purchase. An unlinked source means "I don't know where to buy it"; this means the product does not exist.

Four indicators of an empty record (compared against a healthy one):

  1. A single image with a hash filename — a healthy record has a vendor-code filename plus two or more model shots
  2. Every attribute blank, empty body
  3. An option that is a placeholder string ("see description")
  4. Disclosure form does not match the category — a phone accessory carrying the auto-parts form

★ If registration validation checks "has a price" but not "has the core output", failed residue walks through the same door as a healthy record.