← back to Wallco Ai

data/yolo-overnight/dedupe-cactus-20260525-0421.md

97 lines

# Dedupe Scan — Cactus

**Run:** 2026-05-25 04:21 PT
**Endpoint:** `POST http://127.0.0.1:9905/api/dedupe/scan`
**Task spec:** `{"status":"published","category":"cactus","threshold":6,"limit":500}`
**Result:** `cactus` exact-match → 0 scanned, 0 clusters (same shape as the 2026-05-25 chinoiserie run — the route's WHERE clause is exact-match on `category`, no `LIKE`).

To deliver an actionable answer I followed the same fallback used in the chinoiserie report and ran scans against the cactus-prefixed categories that actually exist:

| Category | Designs | Scan time | Clusters |
|---|---|---|---|
| `cactus-11ft-mural` | 75 | 2,743 ms | 3 |
| `cactus-pine-scenic` | 28 | 816 ms | 4 |
| **Combined** | **103** | — | **7** |

No deletes were issued. Read-only scans only.

---

## Top clusters (7 total — all 7 listed; spec asked for top 10)

Ranked by cluster size (keeper + dupes).

### 1. cactus-11ft-mural — base **p38890** recolor family (size 15)

- **Keeper:** `10123` (neutral recolor, 2026-05-21)
- **Dupes (14):** `10124` (teal), `10125` (indigo), `10126` (orange), `10127` (pink), `10128` (yellow), `10129` (cyan), `10130` (blue), `10131` (green), `10132` (magenta), `10133` (lime), `10134` (red), `10135` (violet), `10136` (charcoal), `38890` (parent base, hex `#505136`)
- **Diagnosis:** **NOT a dedupe target.** This is an intentional 14-colorway recolor family generated from parent `38890`. dHash collapses them because the structure is identical and only the palette shifts. Each colorway is a published SKU.
- **Recommendation:** Exclude `recolor_*_p38890_*` filenames from dedupe via filename-prefix allow-list, or scope dedupe to `kind != 'recolor'` upstream. Do **not** soft-delete.

### 2. cactus-pine-scenic — base **39055** recolor family (size 3)

- **Keeper:** `39055` (hex `#e4d2b6`, 2026-05-22)
- **Dupes (2):** `39103` (`#e3d2b6` — near-identical hex, almost certainly the same recolor regenerated), `39105` (`#e4d2b6` — exact hex match)
- **Diagnosis:** `39103` and `39105` look like **true duplicates of each other and of 39055** (palette is essentially the same). Worth quarantining the two newer rows pending review.
- **Recommendation:** Soft-delete `39103` and `39105` to quarantine + JSONL after a side-by-side visual check.

### 3. cactus-pine-scenic — base **39101** recolor family (size 3)

- **Keeper:** `39101` (hex `#b9b6a0`, 2026-05-22)
- **Dupes (2):** `39106` (`#a9a690`), `39107` (`#d78f6d`)
- **Diagnosis:** Two distinct palette shifts off `39101`. Structure collapses under dHash; colors are different enough that these are likely **intentional recolor variants**, not dupes.
- **Recommendation:** Keep all three. Same upstream fix as cluster 1.

### 4. cactus-11ft-mural — base **p38900** recolor family (size 3)

- **Keeper:** `10152` (neutral recolor, 2026-05-21)
- **Dupes (2):** `10153` (charcoal recolor), `38900` (parent base, hex `#171616`)
- **Diagnosis:** Parent + 2 recolors. **Intentional recolor family**, same pattern as cluster 1 but smaller.
- **Recommendation:** Keep. Filter-out recolors upstream.

### 5. cactus-pine-scenic — pair **10161 / 10166** (size 2)

- **Keeper:** `10161` (bottega-veneta recolor, 2026-05-25)
- **Dupe:** `10166` (hex `#984514`, 2026-05-25)
- **Diagnosis:** Both created today (2026-05-25). `10161` filename indicates it's a recolor of `p10159` toward a Bottega-Veneta palette; `10166` has a saddle-brown dominant. Likely **two adjacent recolors of the same parent** generated in the same batch.
- **Recommendation:** Visual check; if structurally identical, keep `10161` and quarantine `10166`.

### 6. cactus-pine-scenic — pair **39102 / 39104** (size 2)

- **Keeper:** `39102` (hex `#6a2219`, deep red-brown, 2026-05-22)
- **Dupe:** `39104` (hex `#313d52`, navy, 2026-05-22)
- **Diagnosis:** Same structure, very different palettes (red vs. navy). dHash collapses on structure. **Likely intentional 2-up recolor pair.**
- **Recommendation:** Keep both.

### 7. cactus-11ft-mural — pair **10151 / 38868** (size 2)

- **Keeper:** `10151` (charcoal recolor of p38868, 2026-05-21)
- **Dupe:** `38868` (parent base, hex `#5c4e32`, 2026-05-21)
- **Diagnosis:** Parent + single charcoal recolor. Keeper is the **recolor**, not the parent — worth noting because the keeper-selection heuristic prefers lower `id` when ties; here `10151 < 38868` because the recolor id-space (10xxx) is below the parent id-space (38xxx). The parent is the canonical asset; flipping which one is "keeper" could matter for cataloging.
- **Recommendation:** Keep both. Consider re-ranking keeper logic so parent (non-`recolor_` filename) wins ties.

---

## Observations on the data shape

- **`source_dw_sku` is NULL** for every clustered design — none of these are tied to a DW Shopify SKU yet. They are wallco.ai-generated assets sitting in `spoon_all_designs`.
- **Recolor families dominate clusters at threshold 6.** 5 of 7 clusters are obvious recolor groups (parent + N color shifts). At threshold 6 the dHash detector cannot distinguish a deliberate recolor from a duplicate.
- **Two recolor-id-space families:**
  - `10xxx` ids are the dated 2026-05-21 / 2026-05-22 / 2026-05-25 recolor outputs (filenames `recolor_<ts>_p<parent>_<color>_<rng>.png`).
  - `38xxx` / `39xxx` ids are the parent originals.

## Recommended next steps (no destructive actions taken)

1. **Add `kind` or filename filter to `/api/dedupe/scan`.** Either exclude `kind='recolor'` from the scan corpus, or skip filenames matching `^recolor_.*_p\d+_.*\.png$`. Without this, ~95% of cluster signal in cactus is noise.
2. **Tighten threshold or change hash.** Threshold 6 on dHash is too loose for recolor-heavy catalogs. Either drop threshold to 3–4 or switch to pHash (color-aware).
3. **Genuine candidates to triage manually:** clusters 2 and 5 — short list of 3 ids (`39103`, `39105`, `10166`) whose dominant hex matches the keeper closely enough to suggest a regeneration collision.
4. **Fix exact-match `category` filter** in `/api/dedupe/scan` to support a `LIKE 'cactus%'` mode so the task spec `category:cactus` returns these clusters without manual fan-out. (Same finding as the 2026-05-25 chinoiserie report.)

## Actions taken

- Ran requested scan (`category:cactus`) — returned 0 as expected from the route's exact-match WHERE.
- Ran two follow-up scans against existing cactus-* categories.
- Enriched cluster members via `spoon_all_designs` (id, category, dominant_hex, image_url, created_at).
- No deletes, no writes, no schema changes.
- Report written to this file per task spec.