Skip to content

feat(cloud): org home-endpoint directory hook#534

Merged
Neonforge98 merged 1 commit into
developfrom
codex/home-endpoint-and-bcdr
Jul 24, 2026
Merged

feat(cloud): org home-endpoint directory hook#534
Neonforge98 merged 1 commit into
developfrom
codex/home-endpoint-and-bcdr

Conversation

@Neonforge98

Copy link
Copy Markdown
Collaborator

Summary

Client side of ORGII-cloud-infra migration 0007_org_home_endpoint.sql — the forward-compat hook for the org-sharding / project-migration direction (consolidated reference §7), plus the BCDR groundwork landing server-side in the same batch.

Org home-endpoint directory hook. list_my_orgs rows now carry an additive homeEndpoint (null = the active project). The client parses and stores it, and a pure resolver (org2CloudEndpointDirectory) maps an org to its data-plane endpoint with strict https-origin validation (garbage degrades to the official endpoint). Deliberately NOT wired into any call site yet: the contract is that a future cutover flips the data via the service-role setter, and a later PR wires per-org routing. With per-endpoint capability memory already in place, moving an org (or the whole fleet) to a new Supabase project becomes a data change, not a client release.

Server counterparts in cloud-infra (validated offline, twice): 0007 migration (column + additive roster key + homeEndpoints capability + validated service-role setter that nudges policy on cutover), backfill route phase 2 (null-payloads — reclaims Postgres bytes for storage-migrated segments after object-existence verification), and docs/project-migration-and-bcdr.md (new-project replay runbook, data/auth/storage copy incl. the signup-trigger disable gotcha, per-org vs DNS cutover, PITR-first BCDR with a quarterly drill checklist).

Test plan

  • tsc clean; Org2Cloud 759/759 (14 new: wire parse/degrade, capability flag, resolver origin validation, endpoint grouping).
  • 0007 validated on disposable Postgres ×2 (author matrix incl. listing A/B additive-only diff, setter positive/negative/ACL, broadcast-on-cutover; independent re-run: sequence, idempotency, 4-flag capabilities).

Pre-commit hook ran. Total eslint: 2, total circular: 0
@Neonforge98
Neonforge98 merged commit 325275a into develop Jul 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant