← back to Dw Catalog 3d

REFRESH.md

29 lines

# dw-catalog-3d — daily data refresh (D1)

**Path chosen: B — standalone LaunchAgent** (DTD verdict B, 3/3, 2026-06-26).

Why not A (hook the existing hourly `com.steve.dw-staged-active-snapshot` job):
that job belongs to a different project (dw-staged-active-viewer) and SSHes to
Kamatera; this task is strictly local/no-ssh. Hooking it would couple catalog-3d's
freshness to an unrelated job's lifecycle/failure-modes. The intended
`sync-shopify-products.js` has NO launchd job, so there was nothing cleanly hookable.

## What runs
- LaunchAgent: `~/Library/LaunchAgents/com.steve.catalog3d-refresh.plist`
- Schedule: daily 04:15 local
- Command: `bash ~/cncp-starter/refresh-catalog3d.sh`
  - runs `node gen.mjs` (READ-ONLY dw_unified → public/scene.json + public/v/*.json)
  - rsyncs public/ → `~/cncp-starter/catalog-3d/` (the LOCAL CNCP bundle; CNCP runs on
    Mac2, Kamatera only reverse-proxies — no ssh)
- Log: `~/cncp-starter/tmp/catalog3d-refresh.log`

## Verified
`launchctl kickstart gui/$(id -u)/com.steve.catalog3d-refresh` → exit 0,
"DONE / ✓ refreshed 176 vendor files". Local + reversible.

## Reverse it
```
launchctl bootout gui/$(id -u)/com.steve.catalog3d-refresh
rm ~/Library/LaunchAgents/com.steve.catalog3d-refresh.plist
```