fix(cli): report a job's real exit code and stop claiming stops [PC-4873] - #1835
Draft
robert-ursu wants to merge 1 commit into
Draft
robert-ursu wants to merge 1 commit into
robert-ursu wants to merge 1 commit into
Conversation
robert-ursu
force-pushed
the
feat/async-job-dispatch-and-result-push
branch
from
August 4, 2026 10:54
3de1eda to
114a204
Compare
robert-ursu
force-pushed
the
feat/async-job-dispatch-and-result-push
branch
from
August 4, 2026 11:13
114a204 to
71c81e9
Compare
robert-ursu
force-pushed
the
feat/async-job-dispatch-and-result-push
branch
from
August 19, 2026 19:13
6c8af15 to
e509941
Compare
|
…873] Under standalone_mode=False click returns ctx.exit(N)'s code instead of raising, so every ConsoleLogger.error path came back as a result and the job core reported ExitCode 0. Map a returned int to the exit code. The HTTP start reply now carries exitCode, the field the .NET HTTP client already reads (it defaulted a missing one to 0, so every 200 was a success). StopJob returns False: this server cannot stop a running job, and the handler must not be told it did. A result status the IPC sink does not know is reported as Faulted instead of Successful, and "stopped" maps to the wire's Stopped. Entrypoint discovery failures in `uipath run` and `uipath eval` exit 1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CFMKm7zHGcptS49z4cnnad
robert-ursu
force-pushed
the
feat/async-job-dispatch-and-result-push
branch
from
September 24, 2026 15:12
e509941 to
db4653c
Compare
|
🚨 Heads up:
|
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.







Why
A failed job running inside
uipath serverwas reported as a success, on both transports:ConsoleLogger.errorends inclick.get_current_context().exit(1). Understandalone_mode=Falseclick returns that code instead of raising (click/core.py,except Exit)._run_command_isolatedtook the return value as the job's result and hard-codedExitCode: 0. Everyconsole.errorpath (runtime errors, unexpected exceptions, bad--simulation) came back as exit code 0./jobs/{key}/startreply had noexitCode. The .NETPythonRuntimeClientreadsexitCodeinto anintand treats a missing one as 0, so every HTTP 200 counted as a success, even when the body saidsuccess: false.The handler usually overrides the exit code with the status in
output.jsonor the IPC result. The exit code decides the outcome when neither exists: failures before or outsideUiPathRuntimeContext, and crashes.What
_server_core: anintreturned bycmd.mainis the exit code.run,debugandevalnever return an int of their own.exitCodeis added to every response. An unchanged handler becomes correct against this runtime with no .NET change.StopJobreturnsFalseand logs a warning. It used to log "(no-op)" and returnTrue, which claimed a stop that never happened. feat(cli): really stop a job that uipath server is running [PC-4873] #1842 replaces this with a real stop._job_api: a result status the sink does not know is reported as Faulted, not Successful."stopped"maps to the wire'sStopped(4), which the handler already accepts.uipath run/uipath eval: entrypoint or eval-set discovery failure exits 1 instead of 0.Compatibility
StopJob's wire shape is unchanged. Only the value changes, and today's handler ignores it.Testing
uv run pytest tests/cli: 1502 passed, 1 skipped, 1 xfailed.ruff check,ruff format --checkandmypyare clean.ConsoleLogger.errorreports exit code 1 through the job core;success: false, exitCode: 1;"stopped"to Stopped.StopJobnow returnsFalse, and the discovery tests expect exit code 1.Jira
PC-4873
🤖 Generated with Claude Code
https://claude.ai/code/session_01CFMKm7zHGcptS49z4cnnad