← back to Wallco Ai

data/yolo-overnight/dedupe-damask-20260525-1041.md

80 lines

# Dedupe Scan — damask — 2026-05-25 10:41 UTC

## Request
```http
POST http://127.0.0.1:9905/api/dedupe/scan
{"status":"published","category":"damask","threshold":6,"limit":500}
```

Note: Task originally said port 9877, but that port is now bound to
`paint-visualizer-agent` (per commit 4fcbef909). The wallco.ai
`/api/dedupe/scan` endpoint lives at port **9905**
(`/root/public-projects/wallco-ai/server.js:8251`).

## Response
```json
{"ok":true,"clusters":[],"scanned":0,"time_ms":0}
```

**Top 10 largest clusters: NONE.** The scan returned 0 clusters (0 designs
scanned).

## Why empty — verified against PostgreSQL

The dedupe endpoint scans `spoon_all_designs` filtered by
`brand='wallco.ai' AND local_path IS NOT NULL AND is_published=TRUE AND
user_removed IS NOT TRUE` and the requested category. **No `damask` row
satisfies the `is_published=TRUE` filter:**

| Query | Result |
|---|---|
| `SELECT COUNT(*) FROM spoon_all_designs WHERE brand='wallco.ai' AND category='damask'` | **31** |
| ↳ broken down by `is_published` / `user_removed` / `local_path IS NOT NULL` | 31 rows, all `is_published=FALSE`, none removed, all have a `local_path` |
| Eligible rows for the published scan | **0** |

I also ran the unpublished scan to be thorough:
```http
POST /api/dedupe/scan {"status":"unpublished","category":"damask","threshold":6,"limit":500}
→ {"ok":true,"clusters":[],"scanned":0,"time_ms":62,"threshold":6}
```
Still 0 clusters. The 31 unpublished damasks have local_paths but most
point to legacy macOS paths (`/Users/stevestudio2/...`) that no longer
exist on this Kamatera box, so the hasher skips them — only the newer
`/root/public-projects/wallco-ai/data/generated/...` paths would even
attempt a pHash, and none of those produced a near-duplicate pair at
threshold 6.

## What happened to damask

- All 31 surviving rows were created **2026-05-12**, before the v2/v3
  publish gates went live.
- `data/ghost-rescore-damask-1779605368234.jsonl` (100 rows) shows damask
  went through a 3-judge ghost-layer rescore on 2026-05-19. Many candidate
  ids in that file (e.g. 38205) are no longer present in
  `spoon_all_designs`, which matches the broader ghost-layer quarantine
  sweep noted in [`baseline-20260525-0201.md`](baseline-20260525-0201.md).
- Net effect: the damask category was hollowed out the same way
  drunk-animals was. Nothing is left for the published dedupe gate to chew
  on.

## Recommended next action

No dedupe targets exist for `damask` published. Options if Steve wants
forward motion on damask:
1. Re-run the salvage/ingest for damask so new generations land with
   `is_published=TRUE` and live Kamatera paths.
2. Or scan against the 31 unpublished rows with a lower threshold
   (e.g. `threshold:10`) **and** a relaxed status filter that includes
   unpublished — that would require either a server-side flag change or
   a one-off `status:"all"` parameter (not currently honored by the
   endpoint).

Same endpoint, same auth — just say the word.

## Run metadata
- Host: 127.0.0.1:9905 (wallco-ai server, health: `{"ok":true,"count":27222}`)
- Endpoint owner: `app.post('/api/dedupe/scan', ...)` server.js:8251
- Hash algorithm: PIL dHash 8×8 (64-bit), Hamming distance ≤ threshold
- Scanned: 0 / Time: 0 ms (published), 62 ms (unpublished)
- Auto-delete: **NOT INVOKED** (report-only per instructions)