feature/Refused-start-raises-bare · L-260927-424b11 - #50
Conversation
`pipelex-sdk-python` takes `mthds` from `mthds-python`'s dev, written at [tool.uv.sources] of pyproject.toml with the lock regenerated in the same commit (P1). The collapse before this branch merges is `wt unpin _pipelex-sdk-python--refused-start-raises-bare mthds-python --to <version>` (P2, P7).
…ays why pipelex-sdk's protocol routes kept the base client's httpx.HTTPStatusError regime, so a refused start_and_wait() said only "Client error '422 Unprocessable Entity'". mthds now raises a typed ApiResponseError through a protected seam, _raise_api_response_error, which this client already defined with the same signature. The SDK's ApiResponseError becomes mthds's own narrowed to ValidationErrorItem, adding only code, error_category and errors; the override reads the shared members through ProblemDocument and every route raises it: the inherited protocol routes, the run status and results reads, and the selector validate. The two translations that caught httpx.HTTPStatusError, and would have gone dead under the override, now read the typed error: execute's gateway-timeout check reads exc.status, and start's bare-runner 404 check reads exc.status, exc.response_body and exc.request_url. The version handshake catches the typed error too, so a failed handshake still assumes hosted. Tests replay the dev plane's three real refusal bodies, byte for byte from mthds-python. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 404 carrying the runner's error_type and no platform code, such as a method_ref with no package behind it relayed unchanged by the hosted API, was read as an unmatched route: start raised RunLifecycleUnavailableError and start_and_wait demoted the client to blocking execute for good. A missing route is now a 404 whose body carries neither code nor error_type, the same test the platform's own relay applies. Also corrects error_models' docstring, which still said ApiResponseError types its user_action with the lenient model declared there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review round 1 — profile 3, bar Fixed in 9d397e3:
Deferred with a trace: the message's reason order is a copy of a private helper in Rejected: the Verdict: round 2 — bar defects — profile 3. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review round 2 — profile 3, bar Nothing fixed: no finding the bar admits. Deferred with a trace: a The Verdict: converged. Round 2 at profile 3 was clean with full coverage, so nothing further is warranted. |
`pipelex-sdk-python` takes `mthds` from the registry again, with the lock regenerated in the same commit. The pin stood at a32f07a8 of `mthds-python` (P7).
Every route of
PipelexAPIClientnow raises a typedApiResponseErrorthat ismthds's own error narrowed toValidationErrorItem, sostart_and_wait()orexecute()on a method the plane refuses raises an error whose message and fields carry the reason, the failing pipe and the next step, instead of httpx's bare status line. The client overrides the new_raise_api_response_errorseam ofmthds, reads the shared members throughProblemDocument, and moves the gateway-timeout translation ofexecuteand the bare-runner 404 translation ofstartonto the typed error, both of which the override would otherwise have silently disabled. The branch builds onmthdspinned at its dev commit and collapses onto the published 0.17.0 before it merges.Closes L-260927-424b11
🤖 Generated with Claude Code
Summary by cubic
Every route of
PipelexAPIClientnow raises a typedApiResponseError—mthds's own error narrowed toValidationErrorItem— so a refused run reports the reason, the failing pipe, and the advised next step instead ofhttpx's bare status line.Migration
httpx.HTTPStatusErrormust catchApiResponseErrorand readexc.status,exc.headers, andexc.request_urlwhere they previously readexc.response.status_code,exc.response.headers, andexc.request.url.execute's gateway-timeout translation andstart's bare-runner 404 translation now read the typed error; onstart, a runner 404 that carrieserror_typebut nocodeis read as a refusal, and only a 404 with neither is treated as a missing run store.Dependencies
mthdsis upgraded to the published 0.17.0.mthds-python, and the deferred version-handshake finding is recorded inwip/pr-50-review-notes.md.Written for commit af35911. Summary will update on new commits.