Skip to content

fix(discord): finalize stream tip before queue-drain Working epoch#100

Merged
patroza merged 1 commit into
fork/discordfrom
fix/discord-finalize-before-queue-drain
Jul 27, 2026
Merged

fix(discord): finalize stream tip before queue-drain Working epoch#100
patroza merged 1 commit into
fork/discordfrom
fix/discord-finalize-before-queue-drain

Conversation

@patroza

@patroza patroza commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Queue-drain race on t3vm thread 16feaadd-e89d-4101-bcd9-ac7e1d723de0:

  1. Prior turn finished a large final into the live Discord tip.
  2. Queued steering drained and opened a new Working epoch.
  3. Tip was cleared without posting a durable final → answer “disappeared”.

Fix

Before starting a new stream delivery (turn change / fresh Working ack), if the prior tip has substantial unfinalized body, finalize it first (post final + archive stream-history, delete tips).

Related

  • Server data integrity: fix/queue-drain-assistant-turnid-rebind (projector never rebinds assistant turnId after drain)
  • Same class as web/mobile Worked-for fold rehome after queue drain

Test plan

  • ResponseBridge unit tests for shouldFinalizeStreamBeforeNewDelivery
  • Discord: long answer mid-turn + queue a follow-up → prior answer remains as a normal message above the new Working tip

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
@patroza
patroza merged commit 1e49284 into fork/discord Jul 27, 2026
1 check passed
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
patroza added a commit that referenced this pull request Jul 27, 2026
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
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