Skip to content

[Improve] Measure initial Fast session response latency - #1855

Merged
roomote-roomote[bot] merged 2 commits into
developfrom
improve/initial-fast-latency
Aug 29, 2026
Merged

[Improve] Measure initial Fast session response latency#1855
roomote-roomote[bot] merged 2 commits into
developfrom
improve/initial-fast-latency

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

Add a privacy-safe initial_human_turn classification to the existing fast_turn_settled event. 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_settled to initial_human_turn = true for initial Fast session latency without collecting conversation IDs, message IDs, prompts, or content. Classification is null when 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.

@roomote-community

roomote-community Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • packages/cloud-agents/src/server/fast-agent/fast-agent-conversation-repository.ts:519 Preserve initial-turn classification for pre-existing platform events in rollback-compatible history.

Reviewed af41841

@roomote-roomote

roomote-roomote Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Resolved the failed review finding in af418419: pre-existing rollback history now distinguishes strict platform-event envelopes from genuine human messages, preserving the first-human marker after upgrade. Added focused legacy-history coverage; 119 Fast-agent tests, package typecheck, formatting, and the full pre-push suite pass. See task

@roomote-roomote
roomote-roomote Bot marked this pull request as ready for review August 29, 2026 20:33
@roomote-roomote
roomote-roomote Bot merged commit f93aef5 into develop Aug 29, 2026
18 checks passed
@roomote-roomote
roomote-roomote Bot deleted the improve/initial-fast-latency branch August 29, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant