feat(cli): add --simulation flag to debug command - #1846
Merged
Conversation
Support the --simulation CLI option in the debug command, matching the existing run command. Includes tests for legacy and new component formats, a testcase for CI, and version bump to 2.13.22. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds parity between uipath run and uipath debug by introducing a --simulation flag to the debug command, enabling both legacy tool simulation and the newer per-component simulation format, plus CI validation via a new testcase.
Changes:
- Add
--simulationoption touipath debug, validating JSON and building a mocking context from either legacy (toolsToSimulate) or component (components) format. - Add unit tests covering invalid JSON, disabled configs, legacy simulation, and component-based simulation behavior.
- Add a new
debug-simulation-testcaseto exercise the CLI against thesimulate-component-agentsample in CI; bump package version to2.13.22.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/uipath/src/uipath/_cli/cli_debug.py | Adds --simulation parsing/validation and conditionally wraps the debug runtime with UiPathMockRuntime. |
| packages/uipath/tests/cli/test_debug_simulation.py | Adds unit tests for the new debug --simulation behavior (legacy + component formats, error cases). |
| packages/uipath/testcases/debug-simulation-testcase/src/assert.py | Validates that debug+simulation produced non-default (simulated) weather output. |
| packages/uipath/testcases/debug-simulation-testcase/run.sh | Runs auth + uipath debug ... --simulation ... and captures logs/output for CI assertions. |
| packages/uipath/testcases/debug-simulation-testcase/pyproject.toml | Defines an isolated uv project for the new testcase (editable local uipath). |
| packages/uipath/samples/simulate-component-agent/main.py | Documents how to run debug with per-component simulation. |
| packages/uipath/pyproject.toml | Bumps uipath version to 2.13.22. |
| packages/uipath/uv.lock | Updates lock metadata and uipath version to 2.13.22. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add union type annotation for delegate_runtime to fix mypy errors. Use --attach none for headless debug in CI and set -euo pipefail for proper error propagation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch debug-simulation-testcase to use runtime-simulations-agent sample (legacy toolsToSimulate format) instead of simulate-component-agent which requires remote API access. Matches the existing simulation-testcase pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
smflorentino
self-requested a review
August 5, 2026 22:40
smflorentino
approved these changes
Aug 5, 2026
smflorentino
approved these changes
Aug 5, 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
--simulationCLI option to thedebugcommand, matching the existingruncommand behavior (added in feat(eval): add runtime simulation via --simulation flag #1624)toolsToSimulate) and new per-component (components) simulation formats (added in feat(eval): add SimulateComponentMocker for per-component API-based simulation #1732)--simulationflag (invalid JSON, legacy format, disabled config, component format)debug-simulation-testcasefor CI validation against thesimulate-component-agentsampleuipathversion to 2.13.22Test plan
uv run pytest tests/cli/test_debug_simulation.py -v— all 20 tests passuipath debug main -f input.json --simulation "$(cat simulation.json)"insamples/simulate-component-agent/with valid authtestcases/debug-simulation-testcase/run.shin CI with credentials🤖 Generated with Claude Code