Repository navigation
fix(tracing): default a blank span attachment MIME type [AL-729] - #2009
Merged
Merged
Conversation
The traces API rejects a span upsert when an attachment has an empty MimeType (400 OPS0006), and the span is dropped. A file with an unknown extension uploaded from Studio Web has no MIME type, so the Agent run, Tool call and LLM call spans that carry it disappeared from the trace. SpanAttachment now replaces a blank MIME type with the type guessed from the file name, else application/octet-stream. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the attachment MIME-type normalization change.
No open issues 🎉
What changed in this PR
Prevents trace spans from being rejected when file attachments have blank MIME types, addressing the tracing defect in AL-729. The separate runtime file-processing error remains out of scope.
Changes:
- Defaults blank or whitespace-only attachment MIME types using the filename, falling back to
application/octet-stream. - Adds model and span-serialization regression tests.
- Bumps
uipath-platformto 0.3.13 and updates both lockfiles.
| File | Description |
|---|---|
packages/uipath/uv.lock |
Updates the platform dependency version to 0.3.13. |
packages/uipath-platform/uv.lock |
Synchronizes the platform package version. |
packages/uipath-platform/tests/services/test_span_utils.py |
Tests MIME defaults, preservation, and serialized attachments. |
packages/uipath-platform/src/uipath/platform/common/_span_utils.py |
Adds blank MIME-type normalization to SpanAttachment. |
packages/uipath-platform/pyproject.toml |
Bumps the platform release version to 0.3.13. |
Review effort: Balanced
|
daniel-joica
approved these changes
Nov 20, 2026
valentinabojan
approved these changes
Nov 20, 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.



Problem
AL-729: when an agent gets an input file with an unknown extension (for example
.ovpn), the trace has noAgent runroot span. Its children show as top-level nodes and the innerLLM callstays in progress.Studio Web uploads such a file with an empty
MimeType. The runtime copies it into the span's attachments, and the traces API rejects the whole upsert:400 is not retried, so every span that carries the attachment is lost:
Agent run,Tool call - Analyze_Files, and the final update of the tool'sLLM call.Change
SpanAttachmentreplaces a blank MIME type with the type guessed from the file name, elseapplication/octet-stream. All attachment producers build this model, so one validator covers them.uipath-platform0.3.12 → 0.3.13.Validation
Unit tests: blank and whitespace MIME types on the model, and a span with an untyped attachment serialised through
otel_span_to_uipath_span(...).to_dict().Local robot on alpha (Studio Web Debug, runtime Development), same agent and the same three files (
3R1A.pdfand two.ovpnwith an empty type), only this change toggled:AGENT_RUNTIME.FILE_ERRORAGENT_RUNTIME.FILE_ERROROPS0006Agent runroot spanTool call - Analyze_FilesLLM callNot in this PR
application/octet-stream. That is the second defect in AL-729 and belongs inuipath-langchain-python.llm-observability.Release
The agent runtime picks this up after
uipath-platform0.3.13 is published anduipath-agents-pythonis bumped to it.🤖 Generated with Claude Code