Repository navigation
fix(identities): Repair Slack Identities linked by dashboard posts - #3072
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
14 screenshot changes — 14 changed · 0 added · 0 removed Review screenshots in Frameshift Show 8 more changed screenshots |
Before #3066, a dashboard post into a Slack thread could link the thread starter's Slack Identity to the poster's User. Migration 0095 finds those Identities, removes the Participant rows that the link added, and clears the copied email and User link. An Identity is repaired only when the poster's web Identity, with the same email, wrote in one of its roots, and none of its own Slack instructions carry that email from the Slack profile. Refs #3065 Co-Authored-By: BYK <[email protected]>
The same Conversation write that copied the poster's email also copied their name when Slack gave the starter none. The repair now clears a name that matches the poster's web Identity. The next Slack Turn of the Identity saves its own name again. Co-Authored-By: BYK <[email protected]>
No one can run a production dry run for 0095, so the migration now checks its own rule. It repairs a candidate only when exactly one other Slack Identity of its User stays linked in that team. Slack emails are unique in a workspace, so that one is the correct link. Other candidates stay as they are. The repair also clears a User name that came from the starter's Identity, when no kept Identity of the User has that name. Co-Authored-By: BYK <[email protected]>
…roves An adversarial review found that a kept Identity with no events counted as proof. Retention removes events, and a poster who linked their own Slack Identity through a dashboard post has no Slack email evidence. In that case the old guard unlinked the poster's real Identity. The guard now counts only Slack Identities that a Slack instruction proves. The repair also removes Participant rows that the link added through the damaged Identity's Turns in roots that other people started. Co-Authored-By: BYK <[email protected]>
sentry-junior
Bot
force-pushed
the
fix/repair-web-linked-slack-identities
branch
from
November 10, 2026 13:13
f6c8e84 to
fdcdde8
Compare
Contributor
|
Found 2 test failures on Blacksmith runners: Failures
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fdcdde8. Configure here.
Dashboard posts copy the User name to the poster's web Identity, and the next save of that Identity copies it back to the User. So the web Identity name is not evidence that the name is the poster's. The repair now proves the starter's name from Slack evidence and clears it on the User and on the User's web Identities. It also keeps a starter's own Slack name when Slack evidence proves it.
BYK
approved these changes
Nov 10, 2026
No one can query the production database, so a data migration cannot show what it changed. junior upgrade now prints Postgres INFO messages that its migrations raise. The messages appear in the Vercel build log. Migration 0095 reports its counts this way: candidates, repairs, skipped candidates by reason, and removed rows. The report has no identifiers. Co-Authored-By: BYK <[email protected]>
BYK
approved these changes
Nov 10, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)

Follow-up to #3066, as asked in the review. Refs #3065.
Migration
0095repairs Slack Identities that a dashboard post linked to the poster's User before #3066.Evidence. A Slack instruction stores the Actor from the Slack profile (
createSlackActor) inprovenance.actor. Slack is the only source that may give a Slack Identity its email. So an instruction with the Identity's Slack user and email proves that email, and nothing else does.Candidates. A Slack Identity is a candidate when:
junior/<email>, same email) wrote an event in a root that the Slack Identity started. This is the Dashboard post links a Slack root Actor to the poster's User #3065 path.Self-check instead of a dry run. Slack emails are unique in a workspace, so a User has at most one correct Slack Identity per team. The migration repairs a candidate only when evidence proves exactly one other Slack Identity of the same User in that team. It leaves every other candidate as it is:
The migration is idempotent.
Repair (one statement, so every part reads the same rows):
user_id,email,email_normalized, andemail_verifiedon the Identity. That is its state before the link. Its own Slack Turns have no email, so they cannot link it again.display_namewhen it matches the poster's web Identity and no Slack evidence proves it. The same write copied the poster's name when Slack gave the starter none.display_namewhen the starter's own Slack instructions prove it is the starter's name and no proven Slack Identity of the User has it. Clear it on the User's web Identities too: dashboard posts copy the User name there, and the next save copies it back. Conversations read the User name before the Identity name, so without this all of the poster's work showed the starter's name.detail_versionon the affected roots.Not repaired:
Report. The migration reports its counts with
RAISE INFO, andjunior upgradenow prints PostgresINFOmessages, so the counts appear in the junior-prod Vercel build log. The report has no identifiers:The skipped counts show how many victims a later fix must reach.
Merge only when junior-prod production serves a release that contains #3066. Every junior-prod build runs
junior upgradebefore the build, while the current deployment still serves traffic. If an older release serves traffic when the migration runs, its workers can link an Identity again, and the migration does not run again. #3066 shipped in0.291.0, and junior-prod production serves0.291.0.I checked it locally against Postgres 17 with the pre-#3066 code. Cases checked:
migration-info-messages.test.tscovers the report path. There is no committed test for 0095 itself, per repo policy.via @BYK.
--
View Session in Sentry