Avoid duplicate Tasks startup reconciliation - #3213
Open
bb-slop-cop[bot] wants to merge 1 commit into
Open
Conversation
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
Tasks lifecycle registration awaited the same tracked-thread reconciliation twice. Each pass performs one SDK lookup for every tracked row that remains non-terminal, so startup repeated the full lookup pass without any intervening work. The direct reproduction and root-cause report is at https://get-bb.github.io/reports/issues/3209.html.
What changed
Removed the duplicate startup reconciliation call and added a focused lifecycle regression test that requires one lookup for one non-terminal tracked thread. Updated existing lifecycle expectations and periodic-sweep setup to reflect the intended single startup pass. This changes 20 text lines across 2 files and does not change any wire contract, CLI surface, dependency, generated file, migration, or stored data.
How you verified
origin/main: one tracked thread recorded twothreads.getcalls instead of one.06aeaa994942ae7527dc49d2268c1f801e8542a0after a frozen install and full build.pnpm exec turbo run test --filter=bb-plugin-tasks— 35 files and 365 tests passed.pnpm exec turbo run typecheck --filter=bb-plugin-tasks— passed.pnpm exec turbo run build --filter=bb-plugin-tasks— passed.git diff --check— passed.Fixes #3209