Avoid duplicate steers in expanded turn details - #2378
Merged
ymichael merged 1 commit intoAug 25, 2026
Conversation
ymichael
deleted the
bb/investigate-duplicate-steer-messages-thr_gbzmcetwsc
branch
August 25, 2026 04:21
ymichael
added a commit
that referenced
this pull request
Aug 25, 2026
## What was wrong The lazy expanded-details projection filtered only accepted human steers. Rejected human steers are also root-owned, so a rejected steer spanning a completed work item appeared once in the root timeline and again inside the expanded summary. ## What changed Renamed the shared predicate around the ownership invariant and removed its accepted-status restriction while retaining the human-initiator and steer-kind checks. The persisted-event regression now covers accepted and rejected outcomes and proves each appears once at the root and never in expanded details. No server/daemon wire contract changed; `HOST_DAEMON_PROTOCOL_VERSION` remains 166. ## How you verified - Red: `pnpm exec turbo run test --filter=@bb/server --force -- --run test/services/threads/timeline-in-turn-window.test.ts` failed only the new rejected case (25 passed, 1 failed) because details contained the rejected steer. - Green: the same focused command passed 26/26 tests. - `pnpm exec turbo run test --filter=@bb/thread-view --force` passed 368/368 tests. - `pnpm exec turbo run typecheck --filter=@bb/thread-view --filter=@bb/server` passed all 5 Turbo tasks. - Changed-file formatting and `git diff --check` passed. Fixes #2378 > AGENT GENERATED
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.
What was wrong
When a long-running work item began before a human steer and completed after it, the collapsed turn summary's source range necessarily overlapped the steer. Lazy summary hydration does not include the later
turn/completedevent, so it fell back to an ungrouped projection that returned the accepted steer even though the root timeline already rendered the same row.What changed
Filter accepted human steer rows from the lazy ungrouped turn-detail fallback, matching the existing eager-child behavior and leaving agent- and system-initiated in-turn input untouched. Added an integration regression that seeds a command spanning an accepted steer and verifies the steer appears once at the root and not in the expanded details. There are no wire, protocol, CLI, or documentation changes.
How you verified
pnpm exec turbo run test --filter=@bb/server -- --run test/services/threads/timeline-in-turn-window.test.ts(25 passed)pnpm exec turbo run test --filter=@bb/thread-view --force(368 passed)pnpm exec turbo run typecheck --filter=@bb/thread-view --filter=@bb/serverpnpm exec turbo run test --filter=@bb/server --force(2,017 passed)git diff --checkFixes # — no linked issue.