fix(server): stamp Discord origin on worktree bootstrap messages - #488
Merged
Merged
Conversation
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, so Discord threads had empty origin until a later follow-up. Copy the stamped source onto the bootstrap message, and recover existing threads from the Discord overlay (req: snowflake@handle) on snapshot/refresh.
patroza
marked this pull request as ready for review
September 25, 2026 09:49
CI failed twice on this file: git:false saw a leftover .git, then git init between turns could not parse HEAD. Isolate it like the other worker-poisoned server tests.
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.
#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.
After deploy, reload: Enrico's working Discord threads should show his chip and leave Mine.