Skip to content

Prevent cross-domain organisation address collisions - #132

Merged
rafiki270 merged 9 commits into
mainfrom
codex/product-address-admission-20261024
Oct 24, 2026
Merged

rafiki270 merged 9 commits into
mainfrom
codex/product-address-admission-20261024

Conversation

@rafiki270

@rafiki270 rafiki270 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

A new organisation could reuse an existing organisation label in another founding domain, making that organisation's product hostname ambiguous and unavailable. UOA now admits new and changed labels atomically in one global namespace.

The migration preserves all existing organisations. Unique labels keep their owner; existing duplicate labels remain blocked without choosing an owner or changing an address. Tenant callers can query occupancy without reading another tenant's identity. Automatic personal-organisation creation retries a concurrent claim through its existing suffix allocator.

Disabled and retained deleted organisations keep their claims. Explicit renames and physical deletion preserve the existing release rules. No UI, native app, customer-specific rename, or membership change is included.

Validation on Maxis:

  • API typecheck, build and lint passed.
  • 76 focused unit tests passed across nine suites.
  • 21 PostgreSQL tests passed across four suites, including concurrent create/rename, actual Prisma error mapping, automatic retry, production RLS roles, protected claim writes, retained deletion and populated migration with legacy duplicate labels.
  • Security, contract and journey reviews completed; their regression tests are included.

CI passed: workspace build, 2,718 API unit tests, 940 PostgreSQL integration tests, and the high/critical dependency audit. Four existing tests remain skipped (three unit, one integration). Merged and deployed by Deploy. Revision uoa-auth-00347-98b is healthy and serving 100% of production traffic. A read-only production check confirmed the migration and trigger are installed, all 17 organisations have the expected occupancy (15 owned labels and one blocked legacy duplicate label), no current claims are missing or wrong, and both excluded legacy addresses are unchanged.

Known pre-existing limit outside this change: the retained-deletion workflow can still collide with a same-domain preclaim of its deterministic deletion placeholder through the old domain/slug constraint. This change prevents the new global guard from adding a cross-domain version of that blocker.

Copilot AI balanced review requested due to automatic review settings October 24, 2026 13:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Copilot AI balanced review requested due to automatic review settings October 24, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@rafiki270
rafiki270 merged commit ee2bf65 into main Oct 24, 2026
2 checks passed
@rafiki270
rafiki270 deleted the codex/product-address-admission-20261024 branch October 24, 2026 13:56
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.

3 participants