Repository navigation
fix: preserve provider stream error details in daemon traces - #1838
Conversation
Keep the provider failure reason in daemon span status descriptions. Signed-off-by: mnajafian-nv <[email protected]>
|
No actionable comments were generated in the recent review. WalkthroughThe daemon worker now propagates stream-processing errors and records them in observation status. Tests and documentation cover provider errors, malformed SSE, collection failures, payload-safe descriptions, and response-byte forwarding. ChangesDaemon stream observation handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1838 +/- ##
=======================================
Coverage 93.83% 93.83%
=======================================
Files 556 556
Lines 175087 175098 +11
Branches 236 236
=======================================
+ Hits 164292 164303 +11
Misses 10794 10794
Partials 1 1
... and 10 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Overview
When a provider sends an error during a streamed call through the daemon, Relay
marks the call as failed but records
provider response observation was truncated.The provider's error code and message are lost.
This PR preserves the provider's error details in the trace when response delivery
completes. For example,
server_error: Generation failedstays visible instead ofbeing replaced by the truncation message.
Details
Pass errors from the existing stream validators into the final trace status.
Parser and collector failures use generic messages to keep raw response data out
of diagnostics. Existing transport, cancellation, and capture-limit handling is
preserved, and invalid response aggregates remain omitted.
Tests cover provider errors, delivery of trailing bytes, and parser and collector
messages that omit raw response data.
Validation: Rust tests, Clippy, formatting, and documentation checks passed.
Where should the reviewer start?
ObservationReceiver::finish_streamandfinish_innerincrates/cli/src/daemon/worker/managed.rs, followed by the stream observationtests in
crates/cli/tests/coverage/daemon/worker_managed_tests.rs.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
Bug Fixes
Documentation