[Improve] Measure initial Fast session response latency - #1855
Merged
Conversation
Contributor
Contributor
Author
|
Resolved the failed review finding in |
daniel-lxs
approved these changes
Aug 29, 2026
roomote-roomote
Bot
requested review from
brunobergher and
mrubens
as code owners
August 29, 2026 20:33
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 changed
Add a privacy-safe
initial_human_turnclassification to the existingfast_turn_settledevent. The first canonical human prompt claims the marker atomically under the conversation lock; platform events, later prompts, concurrent turns, retries, and rollback-compatible history are handled without adding session or message identifiers.First-response timing continues to start when the Fast turn enters the service and stops only after the first assistant reply is successfully delivered. Assistant-message persistence remains outside that latency boundary, and existing all-turn diagnostics remain intact.
Why this change was made
All-turn latency cannot answer how long a new Fast session takes to respond. Session paths and prompt kinds describe runtime state and retries, not whether a turn is the conversation's first human message, so a bounded explicit classification is required.
Impact
Operators can filter
fast_turn_settledtoinitial_human_turn = truefor initial Fast session latency without collecting conversation IDs, message IDs, prompts, or content. Classification isnullwhen best-effort prompt persistence cannot establish it instead of guessing. Focused Fast-agent tests, package type checking, documentation validation, formatting, and the full pre-push suite pass.