Skip to content

Epic: Migrate NEMAR infrastructure from personal to SCCN Cloudflare account #314

Closed
12 of 12 issues completed
Closed

Description

@neuromechanist

Epic: NEMAR Infrastructure Migration

Migrate all NEMAR backend infrastructure from personal Cloudflare account (shirazi-10f / yooz-labs) to the SCCN institutional Cloudflare account for long-term sustainability and institutional ownership.

Current State

  • Backend: Cloudflare Worker nemar-api on personal account
  • API URL: api.osc.earth/nemar (personal domain zone)
  • D1 Database: nemar-db on personal account
  • Docs: MkDocs configured for nemar-cli.pages.dev (not deployed to nemar.org)
  • Citation Dashboard: Static site on neuromechanist.github.io (personal GitHub Pages)
  • Email: Resend API sending from [email protected] (personal domain)
  • SCCN account: Available via npx cfman wrangler --account sccn

Target State

  • All infrastructure on SCCN Cloudflare account
  • api.nemar.org as canonical API URL
  • docs.nemar.org for CLI documentation
  • Citation dashboard on nemar.org subdomain
  • Emails from [email protected]
  • CI/CD deploying to SCCN account
  • Backward-compatible redirect from old URLs

Sub-issues

Tracked as sub-issues below. Phases 1-2 are independent quick wins. Phases 3-9 are sequential.

Tools

SCCN Cloudflare account managed via npx cfman (Cloudflare account management CLI).

Breaking Change

This is a minor version bump. Users with stored config (~/.config/nemar/config.json) pointing to old URL need a migration path.

Related

Sub-issues

Sub-issues

12 of 12 Issues completed
Loading 12 sub-issues

Activity

  1. added
    infrastructure
    on Mar 20, 2026
  2. changed the title [-]Migrate backend from personal to SCCN Cloudflare account[/-] [+]Epic: Migrate NEMAR infrastructure from personal to SCCN Cloudflare account[/+] on Mar 21, 2026
  3. neuromechanist commented on Apr 18, 2026

    @neuromechanist
    ContributorAuthor

    Progress update — 2026-04-18

    Closed phases:

    Safety audit (2026-04-18):

    • User-managed data (nm* / on*): zero drift between personal and SCCN
    • Schema: aligned (0019_user_description tracking fixed)
    • Catalog drift: 1 ds* row (ds006963), self-heals via catalog-sync

    Remaining phases:

    Pre-Phase-8 checklist:

    • Confirm ENCRYPTION_KEY value on SCCN matches personal (out-of-band — secret unreadable)
    • Run one more catalog-sync on SCCN to pull ds006963 + any newer catalog entries
    • Decide rollback retention window (suggest 30-90 days of personal worker alive in read-only)
    • DNS plan for api.nemar.org subdomain on nemar.org zone
  4. neuromechanist commented on Apr 26, 2026

    @neuromechanist
    ContributorAuthor

    Status update — 2026-04-25

    Phases 8 and 9 are done; backend version-tracking fix shipped on top.

    Completed since last update

    Decisions recorded

    • Dev D1 strategy: clean sandbox, NOT a recurring prod mirror. Catalog table sync is fine (public data, idempotent). Repro real bugs against prod with one-shot date-stamped copies, never recurring.
    • Version source of truth: root package.json for both CLI and backend runtime. backend/package.json is private tooling-only.

    Remaining

  5. added
    P2
    on Jun 18, 2026
  6. neuromechanist commented on Jul 1, 2026

    @neuromechanist
    ContributorAuthor

    Personal-account NEMAR teardown completed (2026-07-01)

    The SCCN migration moved prod, but the personal Cloudflare account ([email protected], 10f166f3…) was never torn down — its old NEMAR Workers kept running on cron. This was the root cause of the repo-deletion incident (#883).

    Deleted from the personal account (nemar-only; osa-worker, hed-bot/hedit, wg-mesh, printlab and the 3 non-nemar R2 buckets left intact):

    • Workers: nemar-api, nemar-api-dev, nemar-cli, nemar-cli-dev (crons 0 3 * * * removed first, then deleted)
    • D1: nemar-db, nemar-db-dev
    • Vectorize: nemar-dataset-index, nemar-dataset-index-dev
    • Per-worker secrets (incl. GITHUB_ADMIN_PAT, AWS_*, ENCRYPTION_KEY, EZID_*, ZENODO_*, NEMAR_*, GITHUB_WEBHOOK_SECRET, TEST_BYPASS_TOKEN) went with the workers.

    Verified: api.osc.earth/nemar/* → 404; api.osc.earth/osa/ → 200 (OSA unaffected).

    Follow-up: any secret value above that is shared with prod was sitting on an unmanaged account — consider rotating those in SCCN (the GitHub admin PAT is already rotated). Tracked toward #885 (Infisical).

  7. neuromechanist commented on Jul 1, 2026

    @neuromechanist
    ContributorAuthor

    Migration complete. Prod runs on SCCN; the personal-account leftover (last blocking piece) is fully torn down via Phase 11 (#332): all nemar-* workers + D1s + Vectorize indexes + secrets removed, api.osc.earth/nemar → 404. Any residual README/CLAUDE.md URL polish can be handled ad hoc; no need to keep the epic open. 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

    P2infrastructure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions