Repository navigation
Closed
Description
When a person posts from the dashboard into a Slack-located Conversation, Junior can link the root Actor's Slack Identity to the poster's User. It happens when Slack returned no email for the Slack user who started the thread. After that, the poster gets that person's Conversations in their feed, and that person's Slack photo and handle on their profile. That person's Turns also count for the poster.
Root cause (high confidence, from code and telemetry; DB rows not inspected)
- The dashboard post calls
recordActivitywith the web Actor (web-input.ts#L257). mergeActorkeeps the stored Slack subject and adds the web Actor's email, because the stored Actor has none. It refuses only when both sides have different Slack ids.- Each Conversation write saves the root Actor's Identity again (store.ts#L814), even though
actor_identity_idis set once (#L872). For an existing row only the side effects remain. - The Slack Identity key marks any Actor email as verified (actor.ts#L50). So the upsert links the Slack Identity to the poster's User (sql.ts#L100-L124).
- Since ref(conversations): Replace the Conversation Owner with Participants #3021, linking adds the User as a Participant of every root that the Identity started (
recordStartedConversationParticipants).
#3045 made this path common: any signed-in person can now post in a public Slack thread from the dashboard.
Symptoms
- Feed: the poster sees unrelated public Conversations.
- Photo: the dashboard picks the most recently updated Slack photo of the User (avatar.ts#L118-L124), so it changes between the two people.
- Profile handle:
MAXof the Slack handles (shared.ts#L164). - Review items from the other person's Turns default to the poster (
defaultAssignees).
Reproduction
- A Slack user for whom Slack returns no profile email starts a public Slack thread with Junior.
- A different person, signed in to the dashboard, posts in that Conversation.
- The Slack Identity of the thread starter now has the poster's
user_idand verified email.
Unknowns
- How many Users are affected in production. Signal: a User with more than one Slack Identity in the same
provider_tenant_id. Slack emails are unique within a workspace, so this happens only through this bug. - Whether
recordExecution(store.ts#L558) can reach the same merge with a web Actor.
The data repair falls under the dry-run and migration steps of #2439. Related: #2439, #3021, #3045.
via @szokeasaurusrex.
--
Metadata
Metadata
Assignees
Labels
No labels
Activity
fix(identities): Repair Slack Identities linked by dashboard posts
fix(identities): Repair Slack Identities linked by dashboard posts (#…
fix(conversations): Save the root Actor Identity only on the first wr…