MCPcopy Index your code
hub / github.com/github/spec-kit / _run_outcome_exit_code

Function _run_outcome_exit_code

src/specify_cli/workflows/_commands.py:254–261  ·  view source on GitHub ↗

Exit code for a finished run/resume: non-zero on terminal failure. ``failed`` and ``aborted`` map to 1 so scripts and orchestrators can rely on the process exit code; ``completed`` and ``paused`` map to 0 (paused is a legitimate waiting state, not a failure).

(status_value: str)

Source from the content-addressed store, hash-verified

252
253
254def _run_outcome_exit_code(status_value: str) -> int:
255 """Exit code for a finished run/resume: non-zero on terminal failure.
256
257 ``failed`` and ``aborted`` map to 1 so scripts and orchestrators can
258 rely on the process exit code; ``completed`` and ``paused`` map to 0
259 (paused is a legitimate waiting state, not a failure).
260 """
261 return 1 if status_value in ("failed", "aborted") else 0
262
263
264def _emit_workflow_json(payload: dict[str, Any]) -> None:

Callers 2

workflow_runFunction · 0.85
workflow_resumeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected