A forum account matched by a second person takes the first, linked member out of every managed group #337

Open
opened 2026-11-20 04:58:55 +00:00 by cgalo5758 · 0 comments
Owner

What happens

When the bridge looks up a person and finds a forum account that is already linked to someone else, it marks the existing link, the first person's, as in conflict and leaves the second person unlinked (internal/integrations/discourse/linkage/linkage.go:152-162). A link in conflict is left out of the members the bridge keeps in its groups (internal/integrations/discourse/store/queries/desired_members.sql:28), and the sweep removes from a managed group every member who is not among them (internal/integrations/discourse/workflows/activities.go:167-206). So at the next sweep the first person, who may be paying and has done nothing, loses every forum group their plan gives.

What should happen

The first link stays, and the first person keeps their groups. The second person stays unlinked and shows on the operator's health page as a conflict. The spec already promises that a conflict leaves "the person's group memberships are not modified" (openspec/specs/discourse-identity-linkage/spec.md, "Link conflicts are surfaced, never silently reassigned").

Where

internal/integrations/discourse/linkage/linkage.go and the group sweep in internal/integrations/discourse/workflows/activities.go

Steps

  1. Link person A to forum account U, under a plan whose key maps to a managed group.
  2. Have the bridge look up a second person B whose identity resolves to U; under email linkage, a person whose email is U's.
  3. Run the sweep. A's link is marked in conflict, and A is removed from the group.

Why it matters

A member loses what they pay for because someone else's identity matched their forum account, and only the operator's health page shows why.

### What happens When the bridge looks up a person and finds a forum account that is already linked to someone else, it marks the existing link, the first person's, as in conflict and leaves the second person unlinked (`internal/integrations/discourse/linkage/linkage.go:152-162`). A link in conflict is left out of the members the bridge keeps in its groups (`internal/integrations/discourse/store/queries/desired_members.sql:28`), and the sweep removes from a managed group every member who is not among them (`internal/integrations/discourse/workflows/activities.go:167-206`). So at the next sweep the first person, who may be paying and has done nothing, loses every forum group their plan gives. ### What should happen The first link stays, and the first person keeps their groups. The second person stays unlinked and shows on the operator's health page as a conflict. The spec already promises that a conflict leaves "the person's group memberships are not modified" (`openspec/specs/discourse-identity-linkage/spec.md`, "Link conflicts are surfaced, never silently reassigned"). ### Where `internal/integrations/discourse/linkage/linkage.go` and the group sweep in `internal/integrations/discourse/workflows/activities.go` ### Steps 1. Link person A to forum account U, under a plan whose key maps to a managed group. 2. Have the bridge look up a second person B whose identity resolves to U; under email linkage, a person whose email is U's. 3. Run the sweep. A's link is marked in conflict, and A is removed from the group. ### Why it matters A member loses what they pay for because someone else's identity matched their forum account, and only the operator's health page shows why.
cgalo5758 added the
kind
bug
area/discourse
labels 2026-11-20 04:58:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#337