Skip to content

feat(pipeline-run): add task-status and task-wait commands - #40

Open
arseniy-pplx wants to merge 2 commits into
TangleML:masterfrom
arseniy-pplx:transfer/task-status-wait
Open

feat(pipeline-run): add task-status and task-wait commands#40
arseniy-pplx wants to merge 2 commits into
TangleML:masterfrom
arseniy-pplx:transfer/task-status-wait

Conversation

@arseniy-pplx

Copy link
Copy Markdown

Summary

  • add task-status to print the {task_name: status} map for a root execution
  • add task-wait to poll until every child task is terminal
  • resolve leaf state through container state and nested pipelines through graph-state reduction
  • treat SUCCEEDED and SKIPPED as non-failure terminals; task failures print their summary to stderr and exit 2
  • validate wait bounds and apply the deadline while resolving children so retrying state requests cannot cause an unbounded overrun
  • change the shared status reducer used by the existing run-level status/wait: WAITING_FOR_UPSTREAM and UNINITIALIZED now count as active (a run is no longer reported terminal while a task waits upstream), mixed terminal aggregates reduce to the failure terminal ahead of SKIPPED/SUCCEEDED, and wait bounds now reject NaN/inf
  • retry transient HTTP 5xx on the per-poll root details fetch during task-wait within the wait deadline, matching the child-state tolerance; unbounded waits give up after a few consecutive failures so a persistent outage still surfaces

Context

Run-level status and wait do not expose which task is still active or failed. These commands provide task-level observability for CI and automation without requiring callers to reconstruct the execution tree from raw API calls.

Testing

  • uv run pytest tests/test_pipeline_runs_cli.py
  • uvx ruff check on the touched source files
  • uv lock --check
  • git diff --check

task-status prints the task-name to status map for a root execution by walking its child executions; container state falls back to graph-state reduction for nested pipelines. task-wait polls until every task is terminal. SUCCEEDED and SKIPPED are non-failure terminals; failures exit 2 with a stderr summary and the full status map on stdout. Wait bounds are validated up front and the deadline applies while resolving children. Transient 5xx on the per-poll root details fetch are retried within the wait deadline instead of aborting the wait; unbounded waits give up after a few consecutive failures.
Also adjusts the shared status reducer used by the existing run-level status/wait: WAITING_FOR_UPSTREAM and UNINITIALIZED now count as active so a run is not reported terminal while a task still waits upstream, mixed terminal aggregates reduce to the failure terminal ahead of SKIPPED/SUCCEEDED, and wait bounds reject NaN/inf.
@arseniy-pplx
arseniy-pplx marked this pull request as ready for review July 20, 2026 18:10
@Volv-GVolv-G added the test Exact-head review and test validation complete label Aug 5, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testExact-head review and test validation complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@arseniy-pplx@Volv-G