Skip to content

Phase 11: Old account cleanup and deprecation #332

Closed

Description

@neuromechanist

Parent Epic

#314

Goal

Clean up the personal Cloudflare account after migration is complete. Keep redirects in place for backward compatibility.

Tasks

  • Verify all traffic has shifted to SCCN account (check Workers analytics on both accounts)
  • Keep redirect worker api.osc.earth/nemar -> api.nemar.org NOT done as designed -> root cause of Data integrity: 53 published datasets (with DOIs) have missing GitHub repos #883. The old nemar-api/nemar-api-dev were never reduced to a redirect; they were left as the FULL live backend with cron 0 3 * * * + GITHUB_ADMIN_PAT, which deleted 53 prod repos. Now deleted outright (2026-07-01); api.osc.earth/nemar/* -> 404. Re-add a tiny redirect-only worker if old-CLI backward-compat is still wanted.
  • Remove old D1 database on personal account -> deleted nemar-db, nemar-db-dev
  • Remove old Vectorize index on personal account -> deleted nemar-dataset-index, nemar-dataset-index-dev
  • Remove old Workers secrets on personal account -> removed with the deleted workers (nemar-api,nemar-api-dev,nemar-cli,nemar-cli-dev); rotate any shared with prod (Epic: Centralize secret management in self-hosted Infisical (single source of truth for Cloudflare, GitHub, AWS, local) #885)
  • Document the migration in project docs (what changed, new URLs)
  • Update CLAUDE.md with new infrastructure details
  • Update README and any references to old URLs

Depends On

  • All previous phases complete
  • Confidence that SCCN deployment is stable

Notes

  • Left intact on the personal account: osa-worker(+dev) serving api.osc.earth/osa/, hed-bot/hedit workers, wg-mesh(+db), printlab-db, and 3 non-nemar R2 buckets.
  • Update memory/MEMORY.md with new deploy notes

Activity

  1. neuromechanist commented on Apr 26, 2026

    @neuromechanist
    ContributorAuthor

    Pickup notes

    Prerequisites before starting

    • Phase 10 (Phase 10: Update CI/CD, webhooks, and org secrets #331) merged and stable for a buffer window.
    • nemar-cli@latest (0.8.0+) on npm so users have a real upgrade path.
    • Old-URL traffic measured: monitor api.osc.earth/nemar request count over 30-90 days. Decommission once it falls below an acceptable threshold (e.g., <1% of total or a hard cap on absolute count).

    Cleanup checklist (when ready)

    • Personal Cloudflare worker: switch from MAINTENANCE_MODE=read-only to a 301 redirect to api.nemar.org (or full removal). Decision point at start of phase.
    • Personal D1 (nemar-db, 0a168b1a-...) — archive, then delete. Keep a backup at backups/<date>/personal-prod.sql.
    • Personal Vectorize index — delete.
    • Personal Workers secrets — delete (security cleanup).
    • Update CLAUDE.md to remove the "Legacy URL" line.
    • Update infra_sccn_migration.md memory file with retirement date.

    Decision needed at start of phase

    Permanent 301 vs hard removal of the personal worker? 301 protects very-old CLIs forever but costs continued worker invocations. Suggest 301 for ~6 months post-removal of the personal D1 (read-only logic disappears anyway), then hard-remove.

  2. added
    P3Low priority - nice-to-have features, minor improvements
    on Jun 18, 2026
  3. neuromechanist commented on Jul 1, 2026

    @neuromechanist
    ContributorAuthor

    Executed the personal-account teardown (crons removed, then all 4 nemar-* workers + both nemar D1s + both Vectorize indexes deleted). Verified api.osc.earth/nemar/* -> 404, /osa/ -> 200. This phase's incomplete teardown (full backend left live instead of a redirect) was the root cause of the #883 repo-deletion incident - see #883 and #314 for the full write-up. Remaining Phase 11 items: docs/README/CLAUDE.md URL updates, and an optional redirect-only worker for old CLIs.

  4. neuromechanist commented on Jul 1, 2026

    @neuromechanist
    ContributorAuthor

    Decision (2026-07-01): leave api.osc.earth/nemar/* at 404 — no redirect worker. Sunset is complete; old CLIs already cut over to api.nemar.org. The redirect-worker task is intentionally a won't-do. Remaining Phase 11 items are docs-only (docs/README/CLAUDE.md URL cleanup) plus optional prod secret rotation (#885).

  5. neuromechanist commented on Jul 1, 2026

    @neuromechanist
    ContributorAuthor

    Personal-account NEMAR teardown complete: all 4 nemar-* workers + both nemar D1s + both Vectorize indexes + per-worker secrets removed; api.osc.earth/nemar/* → 404 by decision (no redirect). osa-worker/hed/hedit/wg-mesh/printlab left intact. Residual doc-only cleanup (README/CLAUDE.md URLs) is non-blocking. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority - nice-to-have features, minor improvementsinfrastructureInfrastructure and deployment

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions