Skip to content

fix(fleetbase-api): assert the completed-order refusal instead of skipping cycle passes - #70

Merged
roncodes merged 1 commit into
mainfrom
fix/activity-cycle-expected-status
Oct 14, 2026
Merged

roncodes merged 1 commit into
mainfrom
fix/activity-cycle-expected-status

Conversation

@roncodes

Copy link
Copy Markdown
Member

Follow-up to #69. The first fleetops contract run after it (38532677231) completed the order, passed Complete an Order and both tracking deletes, and had 0 of 377 assertions failing. It still exited 1: Postman CLI 1.53 counts a request ended with pm.execution.skipRequest() as Error: Request could not be completed, once for each of the 11 surplus passes of the activity cycle.

So the surplus passes are now sent and asserted instead of skipped:

  • The Fleetbase API baseline honours expected_status the way the Storefront baseline already does (set in a request's own beforeRequest, consumed per request).
  • Get Order Next Activity records an empty answer as order_flow_exhausted and keeps the last activity so Update Order Activity's body stays valid JSON.
  • Update Order Activity then expects the documented 400 Order is already completed. refusal.

No change to the run order in fleetbase/fleetbase is needed; its comment is corrected in a separate PR.

…pping cycle passes

Postman CLI 1.53 counts a request ended with pm.execution.skipRequest() as
"Request could not be completed" and exits 1: the first run after #69 completed the
order, passed every assertion, and still failed on the 11 skipped passes.

The Fleetbase API baseline now honours expected_status the way the Storefront
baseline does; Update Order Activity sets it to 400 once Get Order Next Activity has
recorded the flow as exhausted, and the last activity is kept so the body stays JSON.
@roncodes
roncodes merged commit 71f3098 into main Oct 14, 2026
1 check passed
@roncodes
roncodes deleted the fix/activity-cycle-expected-status branch October 14, 2026 08:25
roncodes added a commit to fleetbase/fleetbase that referenced this pull request Oct 14, 2026
…e 400 (#718)

* ci(contract): the activity cycle asserts the 400, it does not skip

Postman CLI 1.53 counts pm.execution.skipRequest() as a failed request, so
fleetbase/postman#70 asserts the documented "Order is already completed." on the
surplus passes instead. Comment only; the run order is unchanged.

* ci(contract): switch socket auth on in the API's own .env

main's compose and installer predate #710, so the project .env
switch from #717 reached nothing: storefront's run still answered 404 on Create
Customer Socket Token (its only remaining failure). SocketToken::enabled() needs the
switch and a 32+ character key in config; both now go into api/.env, which the
container mounts and Laravel parses at boot, with a per-run random key. The project
.env switch stays for when #710's installer lands on main.
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