Repository navigation
fix(tracing): preserve user query in suggested-question traces - #45386
Merged
41tair merged 1 commit intoNov 3, 2026
Merged
Conversation
Contributor
Pyrefly Type Coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #45386 +/- ##
=======================================
Coverage 89.79% 89.79%
=======================================
Files 6239 6239
Lines 390965 390965
Branches 79305 79305
=======================================
+ Hits 351077 351086 +9
+ Misses 33788 33783 -5
+ Partials 6100 6096 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
41tair
approved these changes
Nov 3, 2026
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.
Summary
Chatflow messages can have an empty model-prompt field even when their user query is persisted. Suggested-question trace assembly currently copies that empty field into the exported span input.
Keep a recorded prompt when present; otherwise fall back to the persisted query from the same tenant/app-scoped message. This read-only change preserves the generated questions, timings and correlation, without changing stored messages or provider adapters.
Fixes #45384
Validation
make test TARGET_TESTS=./api/tests/unit_tests/repositories/test_trace_record_repository.py).make lintpassed (82 import contracts kept).make type-checkpassed.Checklist
From Codex