Release v0.8.0 - #20
Conversation
…method_id on the tooling routes, the crate routes added
The addressing-methods Phase 4 leg for pipelex-sdk (design: workspace wip/addressing-methods/design.md), mirroring @pipelex/sdk v0.16.0:
- method_ref is a typed keyword run source on execute/start/start_and_wait (layer 2 — the runner resolves it), pairing with nothing: client-side guards mirror the server's 422s against inline mthds_contents and method_id, while inline+method_id keeps its documented linkage exception and pipe_code beside method_ref stays legal. Provenance comes back typed: PipelexRunResultStart / PipelexExecuteResult carry method_provenance {address, tag, commit_sha}.
- validate takes method_ref= / method_id= keyword selectors under the strict tooling XOR (a selector body carries no mthds_contents key at all; mthds_sources is inline-only); resolve/codegen are added (pipelex_sdk/crate_models.py) with the typed method_id pass-through and the three-way XOR at construction; build_inputs gains the shared files-XOR-method_ref closure and refuses method_id with a teaching error.
- The reserved-extra guard spans both layers now (method_ref joins method_id), and a method_ref-carrying build_inputs/resolve/codegen gets a fetch-sized 3-minute budget so a cold-cache server clone is not misreported as an unreachable server. The run routes and validate already ride the 20-min blocking ceiling, so they need no budget change.
- Version cut in the same PR: v0.8.0, changelog heading dated 2026-08-29.
Hosted availability of the new selectors on api.pipelex.com follows the platform deploy (Phase 3); tests pin the wire bodies and guards against mocks.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WoLcQhnFiPgVmDzHqPkRmQ
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Confidence Score: 4/5The empty crate selectors should be rejected at construction before merging because the current models forward invalid request bodies to all three crate-family routes. The new XOR validators use non-None presence checks, so empty files and method references pass model construction and are serialized unchanged despite not identifying a usable closure. Files Needing Attention: pipelex_sdk/build_models.py, pipelex_sdk/crate_models.py Prompt To Fix All With AI### Issue 1
pipelex_sdk/build_models.py:86
**Empty selectors pass validation**
When a caller supplies `files=[]` or `method_ref=""`, the non-`None` XOR checks accept it as a selected closure and `model_dump(exclude_none=True)` sends the empty value unchanged, causing a server request-shape error instead of rejecting the invalid closure at the SDK boundary. The same issue applies to the selector validator in `CrateToolingRequest`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "Both method selectors in one pass: metho..." | Re-trigger Greptile |
| def _exactly_one_closure_selector(self) -> Self: | ||
| # Mirrors the server's own XOR so an illegal shape fails at construction, before | ||
| # anything hits the wire. | ||
| if (self.files is None) == (self.method_ref is None): |
There was a problem hiding this comment.
Empty selectors pass validation
When a caller supplies files=[] or method_ref="", the non-None XOR checks accept it as a selected closure and model_dump(exclude_none=True) sends the empty value unchanged, causing a server request-shape error instead of rejecting the invalid closure at the SDK boundary. The same issue applies to the selector validator in CrateToolingRequest.
Knowledge Base Used: Buildinputmodels
Prompt To Fix With AI
This is a comment left during a code review.
Path: pipelex_sdk/build_models.py
Line: 86
Comment:
**Empty selectors pass validation**
When a caller supplies `files=[]` or `method_ref=""`, the non-`None` XOR checks accept it as a selected closure and `model_dump(exclude_none=True)` sends the empty value unchanged, causing a server request-shape error instead of rejecting the invalid closure at the SDK boundary. The same issue applies to the selector validator in `CrateToolingRequest`.
**Knowledge Base Used:** [Buildinputmodels](https://app.greptile.com/pipelex/-/custom-context/knowledge-base/pipelex/pipelex-sdk-python/-/docs/build-input-models.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Greptile round-1 fix on PR #19: files=[], method_ref="" (or whitespace-only), and method_id="" counted as the sole selector under the non-None XOR in the crate/build request models and reached the wire as unusable values. Field-level validators now apply the same empty-as-absent rule the run routes' _normalized_selector boundary gives: an empty selector alone is zero selectors (the teaching XOR error at construction), and beside a real selector it is simply absent — never sent. Tests cover all three empty forms, alone and beside a real selector. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WoLcQhnFiPgVmDzHqPkRmQ
Publishes
pipelex-sdkv0.8.0 to PyPI on merge (the push tomaintriggerspublish.yml): the method-selectors release —method_refas a typed run source with typed provenance,method_ref/method_idselectors onvalidate, the newresolve/codegencrate routes with themethod_idpass-through, the sharedfilesXORmethod_refclosure onbuild_inputs, and the fetch-sized budget formethod_refclosures. See the## [v0.8.0]changelog section.Merge order: land #19 (
feature/Method-selectors→dev) first, then this one — the two branches carry the same commit today; if review rounds add commits to #19, update this branch before merging.Advances L-260828-12fa7b
🤖 Generated with Claude Code
https://claude.ai/code/session_01WoLcQhnFiPgVmDzHqPkRmQ
Summary by cubic
Publishes
pipelex-sdkv0.8.0 to PyPI on merge: the method-selectors release. Addsmethod_refas a typed, self-contained run source onexecute,start, andstart_and_wait— the runner resolves the address, and provenance (address, tag, fetched commit SHA) comes back typed on both run paths — plusmethod_ref/method_idselectors onvalidate, the new/v1/resolveand/v1/codegenroutes, and thefilesXORmethod_refclosure onbuild_inputs. On the tooling routes, empty selectors (files=[ ], emptymethod_ref/method_id) normalize to absent before the XOR, so an empty value alone fails the closure and an empty value beside a real selector is never sent. The new selectors requirepipelex-api>= 0.21.0; onapi.pipelex.comavailability follows the platform deploy.Merge order
Advances L-260828-12fa7b.
Written for commit a2f7b03. Summary will update on new commits.