Repository navigation
Suppress redundant thread-start lifecycle settlement logs - #3079
Closed
bb-slop-cop[bot] wants to merge 1 commit into
Closed
bb-slop-cop[bot] wants to merge 1 commit into
bb-slop-cop[bot] wants to merge 1 commit into
Conversation
Closed
2 of 3 tasks
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 root provider turn-start event and the successful host thread-start RPC are independent startup signals. The event path already suppresses its signal when the RPC settlement won the race, but the settlement path did not suppress the inverse ordering, so it tried to apply
run.startedafter the thread was already active and logged an illegal-transition no-op. The direct reproduction and root-cause report is https://get-bb.github.io/reports/issues/3077.html.What changed
The thread-start settlement now recognizes a clean active thread as already settled before applying
run.started, mirroring the event-side guard. A focused server regression test drives the provider-event-first ordering and verifies that the thread stays active without the redundant lifecycle log. This changes 68 text lines across two server thread-lifecycle files (62 additions, 6 deletions) and does not change the host-daemon protocol, public API, schema, storage, dependencies, or generated files.How you verified
pnpm exec turbo run test --filter=@bb/server -- --run test/threads/thread-live-start-handoff.test.tsfailed only the new regression test and captured therun.started/activeillegal-transition log.pnpm exec turbo run test --filter=@bb/server -- --run test/internal/internal-events-tool-calls.test.ts test/services/threads/lifecycle-outcome.test.tspassed all 29 tests.pnpm exec turbo run typecheck --filter=@bb/serverpassed.git diff --checkpassed; the outgoing EAP codename scan was clean.Fixes #3077