fix(lots): add workflow_id update support - #656
Open
prasad-albert wants to merge 3 commits into
Open
Conversation
Expose workflowId as a patchable Lot field, populate it from the Workflows array on GET, and clarify storage_location EntityLink usage in docs. Co-authored-by: Cursor <cursoragent@cursor.com>
prakashchandrahv
approved these changes
Aug 4, 2026
Code ReviewIssues Found
Summary2 issue(s) found. The xdist_group mismatch is the substantive one: it breaks the repo's parallel-test fixture-grouping contract and duplicates heavy seeding on the inventory worker. The ADD->UPDATE patch transform, model_validator population logic, and set-once handling are correct; workflow_id is properly gated by model_fields_set in the base diff. |
Use the built-in WFL1 workflow in test_update_workflow_id so the inventory worker no longer pulls in the full tasks fixture chain. Remove backend-specific language from LotWorkflowLink, workflow_id, and workflows field docstrings.
|
Looks good - no bugs or correctness issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Callers can set and read
workflow_idon lots viaclient.lots.update()andget_by_id(). The field is populated from the API'sWorkflowsarray on GET.Why
The lots API supports PATCH on
workflowId, but the SDK omitted it fromLotand_updatable_attributes, so callers could not assign a workflow to a lot through the SDK.How
Initial assigns emit
UPDATE(notADD) because the API only allowsworkflowIdunder the UPDATE allow-list.storage_locationcreate/update examples now useEntityLinkinstead of a partialStorageLocation.Testing
uv run ruff format .uv run ruff check . --fixuv run pytest tests/collections/test_lots.py::test_update_workflow_id -n 4 -vSDK Changes
Lot.workflow_idis now readable after GET (fromWorkflows) and writable viaLotCollection.update().