Repository navigation
test: check ready_for_complete carries no Action instead of requiring it - #134
Open
div-cowboy wants to merge 1 commit into
Conversation
The spec defines ready_for_complete as a state with no outstanding Action, but it does not require a business to reach that status: a business may stay incomplete or escalate for risk, policy or other reasons. Assert the direction the spec states and skip when the business reports another status.
div-cowboy
marked this pull request as ready for review
November 17, 2026 19:45
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.
Description
#117 added
test_ready_for_complete_when_nothing_is_outstanding, which fails aserver that completes a checkout without first reporting
ready_for_complete.The spec doesn't require that. In the review of
Universal-Commerce-Protocol/ucp#1083, the maintainers pointed out that a
Business may stay
incompleteor raiserequires_escalationfor reasonsoutside the protocol, such as risk assessment or policy. The spec says when a
Business cannot report
ready_for_complete, but it never says when it must.I said in that review that I'd follow up here.
This change replaces that test with
test_ready_for_complete_has_no_outstanding_action, which checks the rule thespec does state. The status definition in the checkout spec says
ready_for_completemeans "No Action remains outstanding." The test builds thesame checkout as before (buyer, selected fulfillment option) and reads it with
Get Checkout:
ready_for_complete,actionsmust be empty.status the Business should have chosen.
test_complete_checkoutalready covers completing this checkout, so the oldtest's completion step is removed rather than duplicated.
Type of change
Checklist
ruff format,ruff check,codespellpass)Run against the Python sample server (samples
main, python-sdkv2026-04-08-6, flower_shop fixtures, as inconformance-tests.yml):shopping.checkout.lifecycle_test.CheckoutLifecycleTest--suite=allThe Python sample server reports
ready_for_completefor this checkout, sothe new assertion runs on it rather than skipping. I haven't run it against
the Node sample server. A server that stays
incompletewill now skip thistest instead of failing it.
🤖 Generated with Claude Code