Skip to content

feature/Failed-run-report-python · L-260925-f16153 - #47

Open
lchoquel wants to merge 4 commits into
devfrom
feature/Failed-run-report-python
Open

lchoquel wants to merge 4 commits into
devfrom
feature/Failed-run-report-python

Conversation

@lchoquel

@lchoquel lchoquel commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

A failed run's reason now reaches a caller of pipelex-sdk. RunErrorReport (moved to pipelex_sdk.error_models) types every field of the runner's stored report, read leniently so a report written by another runner version never fails the read carrying it, and it is the one type on RunRead.error, PipelineRun.error, RunResultFailed.error and the new RunFailedError.error; the status of a failed run comes from the results read's run_status member instead of a regular expression over the detail sentence. ApiResponseError now carries the problem document's request id (body or X-Request-ID header), type_uri, title, error_domain, error_category, retryable, user_action, errors[] and the decoded document whole, and the README points consumers at type_uri and error_domain as the branch fields.

Closes L-260925-f16153

🤖 Generated with Claude Code


Summary by cubic

A failed run's reason now reaches a caller of pipelex-sdk. The runner's stored error report is carried whole and typed as RunErrorReport (moved to pipelex_sdk.error_models) on RunRead.error, PipelineRun.error, RunResultFailed.error and the new RunFailedError.error, read leniently so a report written by another runner version never fails the read carrying it. ApiResponseError now carries the problem document's request_id, type_uri, title, error_domain, error_category, retryable, user_action, errors[] and the decoded document whole, and is raised by the product routes only.

Breaking changes

  • Import RunErrorReport from pipelex_sdk.error_models; pipelex_sdk.product_models no longer exports it.
  • RunRead.error is the typed report, no longer the raw dict on model_extra.
  • A failed run's status comes from the results read's run_status member; a 409 without a known one reads as FAILED (was: parsed from the detail sentence).

Error branching

  • Branch on type_uri and, on runner-rendered problems, error_domain; code and error_type remain each surface's native, finer codes.

Written for commit ffcb5c6. Summary will update on new commits.

Review in cubic

lchoquel and others added 4 commits September 26, 2026 18:07
…s members

A failed run's reason now reaches a caller of pipelex-sdk. RunErrorReport,
moved to pipelex_sdk.error_models, types every field of the runner's
ErrorReport (all optional, open to what the runner adds) and is the one type
for RunPublic.error, PipelineRun.error, RunResultFailed.error and the new
RunFailedError.error, so wait_for_result, start_and_wait and
download_artifacts raise the report the results read's 409 carries. The
status is read from the problem's run_status member; the regular expression
over the detail sentence is gone.

ApiResponseError now carries the problem document's members: request_id
(body, or the X-Request-ID header), type_uri, title, error_domain,
error_category, retryable, user_action, the platform's errors[] and the
decoded document whole as problem. The README points consumers at
error_domain and type_uri as the branch fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FigDssaJrvNcmbnBedi7oq
…omain is carried

A run's stored report is written by whichever runner version ran it and never
migrated, so the status read and the run lists no longer fail on one that
drifted: every field of the report models reads leniently (a value that does
not fit its type reads as None and the rest stands), and LenientRunErrorReport
types RunPublic.error, PipelineRun.error and RunResultFailed.error, so a value
that is not a report reads as None too. The results read's 409 path now uses
the same field type instead of its own fallback.

The platform's own problem documents carry no error_domain, so the README
example, the architecture doc, the ApiResponseError docstring and the
changelog now branch on type_uri there and on error_domain only where a
runner-rendered problem carries it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FigDssaJrvNcmbnBedi7oq
The get_run_result bullet still said a drifted report reads as None; since
the lenient models, a drifted report keeps the fields that fit and only an
error that is not an object reads as None.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FigDssaJrvNcmbnBedi7oq
…r breaking

The README said every non-2xx answer raises ApiResponseError, while the
protocol routes and the run status and results reads still raise
httpx.HTTPStatusError; it now names the routes it covers. RunRead.error
used to be the raw dict on model_extra and is now the typed report, a
break the changelog now records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FigDssaJrvNcmbnBedi7oq

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant