Repository navigation
Conversation
ymichael
deleted the
bb/c008-investigate-queued-message-visibility-1706-thr_b7t5akuicx
branch
October 19, 2026 21:50
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.
Human comments
What was wrong
A server process could die after claiming a queued message but before dispatch completed. The persisted claim hid the message from queue listings and prevented normal dispatch until the existing five-minute stale-claim timeout elapsed. This reproduces one visibility failure related to #1706; it does not establish the cause of every incident reported there.
What changed
Release claims left by the previous process during startup recovery, before the HTTP listener starts. Preserve claims actively owned by the current process, notify affected threads through the existing queue-change path, and log the number released. Ordinary stale-claim recovery retains its five-minute timeout.
How you verified
pnpm exec turbo run test --filter=@bb/server -- test/threads/requested-queue-drain.test.ts: all 21 tests passed.pnpm exec turbo run typecheck --filter=@bb/server: passed (Turbo cache).pnpm start:worktree: built and launched successfully. In the development instance, simulated an abandoned claim and killed only its server process. On restart the API immediately listed the message and logs reported one released claim. Confirmed the recovered message was visible and editable in the browser.git diff --check: passed.