Skip to content

fix: make the contract runs deterministic - #69

Merged
roncodes merged 1 commit into
mainfrom
fix/contract-run-fixtures
Oct 14, 2026
Merged

roncodes merged 1 commit into
mainfrom
fix/contract-run-fixtures

Conversation

@roncodes

Copy link
Copy Markdown
Member

Fixes the Postman contract failures on fleetops#372 and storefront#119 that are the collection's to fix. Pairs with a fleetbase/fleetbase PR (run order, review-account env, socket auth) and a fleetops PR that unpins its caller.

Fleetbase API

  • Create an Order keeps the first stop for Set Order Destination instead of a random one. The activity cycle walks forward from the destination, so a later stop left every stop before it untouched and Complete an Order refused the order with Not all waypoints completed — or passed, by luck.
  • Get Order Next Activity records an empty answer as order_flow_exhausted; it and Update Order Activity then skip (pm.execution.skipRequest()) instead of posting to a completed order and collecting 400 Order is already completed. on every surplus pass of the cycle. The cycle count in order-collection-requests.py becomes an upper bound.

Fleetbase Storefront API

  • Retrieve a Customer and Query customers send the Customer-Token: both endpoints only return the signed-in customer (401 otherwise), which the descriptions now say.
  • The creation-code request uses creation_code_identity, a third identity with no account. The signed-in customer's identity answered 422 already exists, and the new-customer identity cannot be used because the newest live code for an identity is the one that counts and its seeded code must stay the newest for Create a Customer. Without the variable the request documents the 422 refusal.
  • Check Review Eligibility sets review_eligible from can_review, so Create a review creates one once the run has a completed order, and Retrieve a Store review / Delete a Review address a real id (the run order moves the Reviews requests after Complete Order Pickup).

Not changed here, fixed in fleetbase/fleetbase: Get Order Activity Flow / Get Order Stores run before any order exists (run order), Verify a SMS code's bypass identity (review-account env), Create Customer Socket Token's 404 (socket auth off in the contract stack), and the tracking deletes that Delete an Order cascades away (run order).

Fleetbase API
- Create an Order keeps the FIRST stop for Set Order Destination instead of a random
  one. The activity cycle walks forward from the destination, so a later stop left
  every stop before it untouched and Complete an Order refused the order with
  "Not all waypoints completed" (or not, by luck).
- Get Order Next Activity records an empty answer as order_flow_exhausted; it and
  Update Order Activity then skip (pm.execution.skipRequest) instead of posting to a
  completed order and collecting 400 "Order is already completed." on every
  surplus pass of the cycle.

Fleetbase Storefront API
- Retrieve a Customer and Query customers send the Customer-Token: both endpoints
  only return the signed-in customer (401 otherwise), which the descriptions now say.
- The creation-code request uses creation_code_identity, a third identity with no
  account; the signed-in customer's identity answered 422 "already exists", and the
  new-customer identity must keep its seeded code as the newest. Without one it
  documents the 422 refusal.
- Check Review Eligibility sets review_eligible from can_review, so Create a review
  creates one when the run has a completed order and Retrieve/Delete address it.
@roncodes
roncodes merged commit f80b678 into main Oct 14, 2026
1 check passed
@roncodes
roncodes deleted the fix/contract-run-fixtures branch October 14, 2026 08:04
roncodes added a commit to fleetbase/fleetbase that referenced this pull request Oct 14, 2026
…r the module contracts (#717)

Fixes the Postman contract failures on fleetops#372 and storefront#119 that belong
to the run harness; fleetbase/postman#69 carries the collection side.

- order-collection-requests.py: the Fleetbase API activity cycle is an upper bound
  now that the collection ends it itself (16 passes, was a fixed 12 that posted to a
  completed order); the tracking status and number deletes run ahead of Delete an
  Order, which cascades them away; Storefront's Get Order Activity Flow, Get Order
  Stores and the Reviews requests run after Complete Order Pickup, since they need
  the captured, completed order.
- api-contract.yml: STOREFRONT_REVIEW_ACCOUNTS lists the customer's email as well as
  the phone, because Verify a SMS code verifies under the email identity; socket
  auth is switched on in the project .env before the installer so the socket-token
  endpoints answer instead of their not-configured 404.
- postman-contract action: creation_code_identity, a third identity for Storefront's
  request-creation-code (no account, and not the one whose seeded code must stay
  the newest).
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