fix(cli): print a run's output whole in the console bridge - #1922
Open
vlad-uipath wants to merge 1 commit into
Open
vlad-uipath wants to merge 1 commit into
vlad-uipath wants to merge 1 commit into
Conversation
The console bridge cut every output value at 250 characters and added "...", so `uipath run` could not show a long output field in full. The final output (and the output shown when a run suspends for API input) is the result itself, so it now prints untruncated and at any depth. Intermediate state updates are still shortened. Values and keys are also escaped before they go into rich markup, so text like "[bold]" prints as-is instead of being styled away, and a stray "[/x]" no longer breaks the tree and drops to the JSON fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation matches the stated behavior and includes comprehensive regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Ensures CLI run outputs are displayed completely and literally while retaining truncation for progress state.
Changes:
- Disables value, depth, and fallback truncation for final and suspended API outputs.
- Escapes Rich markup in payload keys and values.
- Adds regression tests and bumps the package version.
| File | Description |
|---|---|
packages/uipath/src/uipath/_cli/_debug/_bridge.py |
Implements selective truncation and markup escaping. |
packages/uipath/tests/cli/test_console_debug_bridge.py |
Tests complete output, nesting, markup, and state truncation. |
packages/uipath/pyproject.toml |
Bumps the package version to 2.14.28. |
packages/uipath/uv.lock |
Synchronizes the locked package version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
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.


uipath runcut every output value at 250 characters and added..., so a long output field could never be read in full. This came in from the uip CLI side (UV-16695, worked around for--output jsonin UiPath/cli#4647); a person reading the tree still saw the cut value.What changed
ConsoleDebugBridge._print_jsontakes a newtruncateflag, defaultTrue. The run's final output (emit_execution_completed) and the output shown when a run suspends for API input passFalse. WithFalsethere is no 250-char cut, no depth-10 cut, and no 10,000-char cut on the JSON fallback.see [bold]docs[/bold]printed assee docs, and a stray closing tag like[/x]raised insideconsole.print, which dropped the whole payload into the JSON fallback. Both are now escaped withrich.markup.escape. It's the same function and the same kind of problem (the output shown isn't the output returned), so I kept it in this PR.Blast radius: only changes what the console shows. Nothing machine-readable is affected;
--output-filealready wrote the full payload.Verification
Real
uipath runon a function whose Output has the ticket's 256-char field,mainvs this branch:tests/cli/test_console_debug_bridge.py(8 tests). With the source change reverted, 7 of them fail; the one that passes checks that state updates are still shortened.pytest tests/cli: 1506 tests, 0 failures.ruff check,ruff format --check,mypyon the touched files, anduv lock --checkare all clean.uipath debugconsole. It uses the sameemit_*methods, so it gets the same behavior.🤖 Generated with Claude Code