Repository navigation
Open
Labels
admin-toolInternal tools for AAO staffInternal tools for AAO staffclaude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.Issue has been triaged by the Claude Code triage routine. Remove to re-triage.enhancementNew feature or requestNew feature or request
Milestone
Description
Split from #3590. Depends on the ownership/provenance contract in #6487 and privacy rules in #6491.
Current state
Admin credential operations already exist:
- create and bind an additional WorkOS credential (feat(identity): admin "bind sign-in email" tool (Phase 2b) — fixes Ahmed #3722)
- link or unlink an existing WorkOS credential (feat(identity): admin link-existing + unlink credential — fixes Ahmed + Pia (#291) #3744)
- promote a different credential to primary while moving canonical-user state (feat(identity): admin "promote credential to primary" #4059)
- promote a surviving credential when the primary is deleted (fix(security): handle WorkOS user.deleted for primary-bound users (#3718) #4617)
These repair real accounts, but they do not yet provide a genuinely reversible person merge/split. Some state is moved or deduplicated onto the canonical workos_user_id, so creating a fresh singleton identity for an unlinked credential does not automatically restore the state that originated there. The destructive consolidation path must remain disabled until a ledger-backed replacement preserves row-level provenance and dispositions; operator-only access is not an exception.
Scope
- Preview both identities before mutation: credentials, person-owned profile, reputation events/aggregates, organization memberships, certifications, conversations/consent scopes, billing references, and audit history.
- Record immutable link/merge/split events containing the actor, evidence, reason, prior identities, affected bindings, field-resolution choices, and before/after references.
- Require explicit resolution for conflicting non-empty person-profile values.
- Preserve event/source provenance needed to partition reputation and other derived state after a mistaken link.
- Keep organization memberships, seats, roles, billing records, certifications, and conversations with their original authorities/provenance; do not silently reassign them to make the person view convenient.
- Make mutation transactional and concurrency-safe, with a persisted authorization/session epoch bumped in the transaction; cache invalidation after commit is defense in depth.
- Support split/unlink into a new or selected identity with a complete preview of what moves, stays, is recomputed, or requires manual resolution.
- Provide an operator UI that exposes evidence and consequences before confirmation.
Invariants
- Candidate matching may suggest; it never executes a merge.
- Identity linkage never unions organization entitlements and cannot activate a binding without proof of control and subject confirmation.
- A merge cannot be called reversible after required partition provenance has been erased.
- Split does not blindly copy person-owned profile or cached reputation totals to both identities.
- Historic audit actors remain the credential that performed the event, plus the identity resolution that existed at that time.
- High-risk operations require a reason and explicit confirmation; self-mutation by the acting admin remains prohibited.
Acceptance criteria
- Preview accurately classifies every affected data family using Person identity: define ownership, provenance, and lifecycle of portable state #6487.
- Link/merge writes an immutable before/after event and is atomic under concurrent claims.
- Split can restore an incorrectly linked credential and all attributable state without duplicating points, badges, credentials, memberships, or subscriptions.
- Conflicting profile values require an explicit choice and remain auditable.
- Organization permissions and immutable membership provenance are unchanged by attachment/link/split except through their own membership authority and Identity linking: isolate organization authorization to the authenticated credential #6827 authorization rules.
- Session and prompt-context caches cannot retain the pre-mutation identity graph.
- Tests cover cross-org abuse, concurrent link/split, replay, partial failure, primary deletion, disputed identity, and split after new activity.
Out of scope
- Fuzzy or automatic identity merging
- Employment affiliations
- Personal subscription ownership
- Rewriting immutable certification, billing, or audit provenance
Metadata
Metadata
Assignees
Labels
admin-toolInternal tools for AAO staffInternal tools for AAO staffclaude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.Issue has been triaged by the Claude Code triage routine. Remove to re-triage.enhancementNew feature or requestNew feature or request
Activity
[-]Admin identity merge/split workflow with immutable audit[/-][+]Admin identity merge/split: make credential linking genuinely reversible[/+]bokelley commentedon Sep 21, 2026
Maintainer triage — 2026-09-21
Classification: Identity repair tooling
Status: Blocked on identity foundations
Decision: Keep merge/split work reversible; the existing destructive consolidation path should remain disabled.
Next gate: Resolve #6487 and #6491, then design preview, conflict detection, rollback, and immutable audit history.