Repository navigation
PC-5145: include DeepRag failure_reason in the resume fault message - #1966
Draft
al3xanndru wants to merge 1 commit into
Draft
al3xanndru wants to merge 1 commit into
al3xanndru wants to merge 1 commit into
Conversation
|
This branch has not been deployed
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
PC-5145: when a DeepRag task fails, the resumed agent job faults with only
DeepRag '<name>' did not finish successfully.The agent and the tool span get no reason. In SRE-674993 (prd Japan East) the tenant's AI Trust Layer policy blocked ECS'sgemini-2.5-flash. Six DeepRag tasks failed, and the customer could not see that their own governance policy was the cause. SRE-669204, SRE-671555 and SRE-673408 hit the same opaque message.Root cause
UiPathResumeTriggerReader.read_trigger, DEEP_RAG branch (packages/uipath-platform/src/uipath/platform/resume_triggers/_protocol.py), raises a fixed message for any non-Successfulstatus. It never readsDeepRagResponse.failure_reason(aliasfailureReason), which the model already parses from the ECS GET response.uipath-runtimebuilds the job error fromexc.message(UiPathRuntimeError.from_resume_trigger_error), so the reason has to be in the message, not indetail.Change
failure_reasonis non-empty, the message becomesDeepRag '<name>' did not finish successfully. Reason: <failure_reason>. When it is empty, the message is unchanged.ErrorCategory.USER. See the open questions.uipath-platformgoes from 0.2.41 to 0.2.42, and both lockfiles are updated, as this repo does for fixes.Tests
test_read_deep_rag_trigger_failednow also asserts the full message, including the reason.test_read_deep_rag_trigger_failed_without_reason: with nofailure_reason, the message stays as before and has no trailingReason:.packages/uipath-platform:pytest tests/services/test_hitl.py: 144 passed.ruff check .: clean.ruff format --check .: clean.mypyon the changed files: clean.Risks / open questions
failureReason; ECS's internalUserErrorflag is not exposed. Parsing free text for a category would be brittle. Moving everything to SYSTEM would page Agents for customer-side failures (governance policy, oversized documents). So USER is kept. A real fix needs ECS (Context Grounding) to return a structured user/system flag or error code on the DeepRag GET. Once it does, map that flag here.failureReasonfor the governance-403 case. This change only surfaces what ECS returns. For that failure to become visible, ECS also has to write the LLM Gateway message tofailureReason; that is tracked as the external action in the triage.failureReasonis passed through verbatim into a user-visible error. It is ECS's customer-facing field, so this is expected.uipath-platformrelease has to be picked up by uipath-agents-python / uipath-langchain.🤖 Generated with Claude Code
Drafted by the wabbit-dri draft-fixes loop for PC-5145 (draft #2), for a human to review: not ready to merge as is.
🤖 Generated with Claude Code