Skip to content

fix(server): attribute Discord threads from identity-map snowflakes - #487

Merged
patroza merged 1 commit into
fork/devfrom
fix/discord-thread-attribution
Sep 24, 2026
Merged

patroza merged 1 commit into
fork/devfrom
fix/discord-thread-attribution

Conversation

@patroza

@patroza patroza commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Discord threads often stored `actor.platformId` without `personId` (map empty at create, or a later map edit). Mine treats unattributed threads as yours, and the identity chip requires personId — so Enrico's Discord starters showed up in Mine with no face.

Re-resolve origin from the identity map on snapshot and projection refresh, and seed the origin participant. Enrico is already in the live map (`147977704522645504`).

After this lands, reload the environment: existing Discord-origin rows pick up the person without rewriting events.

Mine treats unattributed threads as yours, and the participant chip
requires personId. Discord turns often stored actor.platformId without
resolving the map (empty at create, or a later map edit). Re-resolve
origin and seed the origin participant on snapshot and projection
refresh so Enrico-style Discord starters show as theirs.
@patroza
patroza marked this pull request as ready for review September 24, 2026 08:09
@patroza
patroza merged commit a54c71c into fork/dev Sep 24, 2026
9 of 11 checks passed
patroza added a commit that referenced this pull request Sep 25, 2026
#487 re-resolved identity-map snowflakes, but **new Discord threads
still had empty origin**.

Worktree create persists the first user message via
\`thread.message.user.append\` and then **skips** \`message-sent\` on
turn.start. The append path dropped \`SourceRef\`. Live evidence:
\`t3-discord/efea60fb\` (Announce Shared Ladehilfe Once) has
\`origin_source_json = null\` and one user message with empty
\`source_json\`, while a later follow-up on another Discord thread did
get Enrico.

- Copy the stamped turn.start source onto the bootstrap append.
- Recover existing rows from the Discord overlay (\`req:
snowflake@handle\`) on snapshot/refresh.

After deploy, reload: Enrico's working Discord threads should show his
chip and leave Mine.

---------

Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant