Monorepo for Aesthetic.Computer aesthetic.computer
core silo datomic MIGRATION.md
4.4 kB

kidlisp → Datomic migration punchlist #

Generated from a grep across the repo for .collection('kidlisp'). Each entry is one place that reads or writes the Mongo kidlisp collection and needs a decision: migrate to sidecar, keep on Mongo read-only, or retire.

✅ Migrated in v1 #

🟡 Production hot path — migrate before flipping KIDLISP_DATOMIC=on everywhere #

These functions read/write the kidlisp collection directly. Each needs to be rewritten to call the sidecar client in system/backend/kidlisp-sidecar.mjs.

🟠 Other services (non-Netlify, need own sidecar client) #

🟢 Tezos tooling (operator-run CLIs; low urgency) #

🟢 Feed worker (Cloudflare; runs off its own schedule) #

🔵 Scripts / utilities / one-offs — likely retire after cutover #

  • scripts/kidlisp-db-stats.mjs — ad-hoc stats. Can be replaced by GET /admin/stats + /api/datomic/stats.
  • scripts/atproto/backfill-kidlisp-rkeys.mjs — one-shot backfill, already ran. Keep for reference, no migration needed.
  • scripts/atproto/check-fifi-kidlisp.mjs — ad-hoc debug.
  • scripts/atproto/check-kidlisp-atproto.mjs — ad-hoc debug.
  • scripts/atproto/sync-fifi-kidlisp.mjs — ad-hoc sync.
  • scripts/atproto/sync-jeffrey-kidlisp.mjs — ad-hoc sync.
  • at/scripts/atproto/backfill-kidlisp-to-atproto.mjs — one-shot.
  • utilities/keep-cleanup.mjs — cleanup utility; rewrite against sidecar if still needed.

Cutover sequence (when ready) #

  1. Bring Datomic + sidecar up on silo (see README.md).
  2. Populate vault entries (already done in aesthetic-computer-vault/kidlisp-datomic/).
  3. Run backfill from silo: node system/backend/backfill-kidlisp-to-datomic.mjs.
  4. Verify counts match: /api/datomic/stats vs Mongo kidlisp.countDocuments().
  5. Set KIDLISP_DATOMIC=on in lith's .env and redeploy. store-kidlisp.mjs is now Datomic-authoritative for create/read/update-hit/mint/etc.
  6. Work through the 🟡 hot-path list above. Each file becomes a small PR.
  7. When 🟡 list is empty, Mongo kidlisp collection is frozen (read-only for the migrated paths; unused by new code).
  8. After stable operation, work the 🟠 + 🟢 lists.
  9. 🔵 list can be retired anytime — confirm no scheduled jobs invoke them.