Skip to content

feat(cli): add --simulation flag to debug command - #1846

Merged
AAgnihotry merged 3 commits into
mainfrom
feat/debug-simulation-cli-flag
Aug 6, 2026
Merged

feat(cli): add --simulation flag to debug command#1846
AAgnihotry merged 3 commits into
mainfrom
feat/debug-simulation-cli-flag

Conversation

@AAgnihotry

@AAgnihotry AAgnihotry commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • uv run pytest tests/cli/test_debug_simulation.py -v — all 20 tests pass
  • Run uipath debug main -f input.json --simulation "$(cat simulation.json)" in samples/simulate-component-agent/ with valid auth
  • Run testcases/debug-simulation-testcase/run.sh in CI with credentials

🤖 Generated with Claude Code

image

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>
Copilot AI review requested due to automatic review settings August 5, 2026 21:43
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime test:uipath-integrations labels Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --simulation option to uipath 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-testcase to exercise the CLI against the simulate-component-agent sample in CI; bump package version to 2.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.

Comment thread packages/uipath/testcases/debug-simulation-testcase/run.sh Outdated
AAgnihotry and others added 2 commits August 5, 2026 14:47
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>
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@UiPath UiPath deleted a comment from github-actions Bot Aug 5, 2026
@smflorentino
smflorentino self-requested a review August 5, 2026 22:40
@AAgnihotry
AAgnihotry merged commit c9b2428 into main Aug 6, 2026
218 of 226 checks passed
@AAgnihotry
AAgnihotry deleted the feat/debug-simulation-cli-flag branch August 6, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants