ADR-022: the organization anchor carries organizations.uuid, not the numeric id
Why
ADR-022 says the Organizations v1 anchor is ('gitlab', 'organization', '<rails_org_id>'). That was written before organizations.uuid existed (gitlab!241122, "Add uuid to organizations"), and it is now the wrong value for the one thing the anchor has to support: IAM's Relationships API rejects a non-UUIDv7 object id for the entire request it appears in, so an anchor holding the numeric id cannot name the organization ancestor.
Reading it literally led to a second, separately typed organization_id column on namespaces in artifact-registry!1391, "feat(authz): source the organization ancestor from the resolved namespace", which gives a namespace two links to the same external entity that then have to move together on an organization merge.
What changed
- The Organizations v1 anchor value is
organizations.uuid, with the reasons stated. - The
entity_idopacity bullet no longer implies the value is normally numeric, and says explicitly thatentity_typeis what tells a consumer which entity the value identifies. - A new bullet forbids any unique constraint on the organization value, because Organization Merges requires a surviving organization to hold more than one namespace.
No caller sends either value yet (gitlab#603023, "Persist the Organization to AR namespace mapping on the Rails side" is open, and S33: GitLab API records that every caller omits organization_id today), so this changes a contract that has not been exercised.