You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Brand registry: ownership transfer flow for acquired/renamed orgs #3152
addieIssues related to Addie (via any channel)claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.enhancementNew feature or request
#3137 cemented "first writer wins forever" for brand domain ownership. The transaction in `brand-identity.ts` does:
```
SELECT id, workos_organization_id FROM brands WHERE domain = $1 FOR UPDATE
-- if existing.workos_organization_id !== caller_org → 403
```
That's safe for the current use case (members register their own brands) but adtech-product-expert flagged:
Real-world acquisitions, org renames, and "the original uploader left and nobody at the new org can edit our own brand" are inevitable. Until then, every ownership dispute is a database surgery ticket.
Proposal
Two new admin tools:
`transfer_brand_ownership` — admin-only. Takes `domain` + `new_org_id` + `reason`. Updates `brands.workos_organization_id` and writes a revision. Out-of-band verification (legal/correspondence) happens before invocation.
`claim_disputed_brand` — member-callable. When a member tries to write to a domain owned by another org, instead of 403, file an escalation ticket with both orgs surfaced for admin review.
Plus a soft-claim model: until a domain is verified via `brand.json`, ownership is provisional and can be transferred without admin intervention if the new org passes domain verification.
Files
`server/src/addie/mcp/admin-tools.ts` — new `transfer_brand_ownership` tool
`server/src/services/brand-identity.ts` — replace 403 with escalation create
`server/src/db/brand-db.ts` — `transferBrandOwnership` with revision audit
New service: `server/src/services/brand-ownership-disputes.ts`
internal-tools-strategist: transfer_brand_ownership admin tool is proportionate and clearly needed; the new brand-ownership-disputes.ts service is overbuild — existing escalation-db.ts handles this with a new dispute type; soft-claim race condition is a blocker (no mutual exclusion for concurrent verification).
adtech-product-expert: admin-mediated transfer matches real-world M&A workflows; soft-claim is a spoofing vector when brand_manifest is non-empty and generateVerificationToken is orphaned (no challenge/response wired); claim_disputed_brand is better modeled as a dispute_type: 'brand_ownership' escalation, not a standalone MCP tool.
My take: The three-part proposal splits cleanly: part 1 is ready, parts 2–3 need design work before they're safe to ship.
Shipped in #3159: transfer_brand_ownership admin tool + BrandDatabase.transferBrandOwnership with full-row revision audit.
Remaining in this issue:
claim_disputed_brand — redesign as a dispute_type: 'brand_ownership' escalation on the existing schema; no new service needed.
Soft-claim model — two blockers to resolve first: (1) deleteHostedBrand clears workos_organization_id but not brand_manifest, so a domain takeover silently inherits the prior org's logo/colors/agent declarations — needs a guard when manifest is non-empty; (2) generateVerificationToken has no caller — domain verification is currently pointer-only and cannot safely gate a provenance takeover. @bokelley: the verification token infra in brand-db.ts:generateVerificationToken looks like it was stubbed for a DNS-TXT or file-placement challenge that never shipped — is that right, or was it wired somewhere else?
addieIssues related to Addie (via any channel)claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.enhancementNew feature or request
Activity
bokelley commentedon Apr 25, 2026
Triage
Classification: Feature request
Bucket(s): admin / ops tools, addie
Status: drafting-pr (partial)
What the experts said:
transfer_brand_ownershipadmin tool is proportionate and clearly needed; the newbrand-ownership-disputes.tsservice is overbuild — existingescalation-db.tshandles this with a new dispute type; soft-claim race condition is a blocker (no mutual exclusion for concurrent verification).brand_manifestis non-empty andgenerateVerificationTokenis orphaned (no challenge/response wired);claim_disputed_brandis better modeled as adispute_type: 'brand_ownership'escalation, not a standalone MCP tool.My take: The three-part proposal splits cleanly: part 1 is ready, parts 2–3 need design work before they're safe to ship.
Shipped in #3159:
transfer_brand_ownershipadmin tool +BrandDatabase.transferBrandOwnershipwith full-row revision audit.Remaining in this issue:
claim_disputed_brand— redesign as adispute_type: 'brand_ownership'escalation on the existing schema; no new service needed.deleteHostedBrandclearsworkos_organization_idbut notbrand_manifest, so a domain takeover silently inherits the prior org's logo/colors/agent declarations — needs a guard when manifest is non-empty; (2)generateVerificationTokenhas no caller — domain verification is currently pointer-only and cannot safely gate a provenance takeover. @bokelley: the verification token infra inbrand-db.ts:generateVerificationTokenlooks like it was stubbed for a DNS-TXT or file-placement challenge that never shipped — is that right, or was it wired somewhere else?Triaged by Claude Code. Session: https://claude.ai/code/session_01XmWfbQQkuuX3DB8VpukZsu
Generated by Claude Code
feat(admin): transfer_brand_ownership tool for brand registry (#3159)
fix(brand-registry): cross-org dispute escalations + clear manifest o…
bokelley commentedon Apr 26, 2026
Done across three PRs:
transfer_brand_ownershipadmin tool (admin-side ownership move with revision audit)claim_disputed_brandflow / cross-org dispute escalations (replaces 403 with escalation ticket surfacing both orgs)Together these cover all three items from this issue. The #3176 follow-up captures the remaining "auto-resolve" tightening if more friction surfaces.