Skip to content

fix(platform): let a Shopify order's fulfillment_status be null - #5445

Merged
yannickmonney merged 1 commit into
trainfrom
fix/shopify-fulfillment-status-null
Nov 14, 2026
Merged

yannickmonney merged 1 commit into
trainfrom
fix/shopify-fulfillment-status-null

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

Shopify answers fulfillment_status: null for an order no line item has shipped for. The list_orders and get_order actions declared the field as string, and the list_orders mock answered 'unfulfilled', a value Shopify never sends. A live call therefore returned a null where the action promised a string.

This PR:

  • declares fulfillment_status: string | null on list_orders (order items) and get_order;
  • makes the list_orders mock answer null for its unfulfilled order;
  • marks the Order.fulfillment_status field of the OpenAPI mock spec (services/platform/lib/mocks/specs/connectors/shopify.openapi.yaml) as [string, 'null'], matching its existing null response.

Scenario additions for an unfulfilled order wait for #5320 and are not part of this PR.

Why

The catalog test shipped-connectors.test.ts is the place the connector's declared output and its mock are held to each other, so the fix and its guard land together.

How it was tested

  • New tests in services/platform/lib/shared/schemas/shipped-connectors.test.ts: the declared output of list_orders and get_order admits null for fulfillment_status (checked with parseSignature / nullability), and the list_orders mock answers null and its output fits the declared shape (assignable(shapeOfValue(...))).
  • The two declared-output tests fail on the original connector.yml and pass with this change (verified by swapping the original file back in).
  • bun run configs:validate in services/platform: OK (24 connectors).
  • tsc --noEmit in services/platform: exit 0 (needed NODE_OPTIONS=--max-old-space-size=12288).
  • oxlint --type-aware in services/platform: exit 0.
  • oxfmt --check on the changed files: clean. commitlint on the commit message: clean.
  • Vitest itself cannot load zod/v4's named z in this sandbox's runtime (fails on an unrelated existing test too), so the suite was not run end to end here; CI runs it.

Fixes #5343

@yannickmonney
yannickmonney force-pushed the fix/shopify-fulfillment-status-null branch from 831553e to 8c1843a Compare November 14, 2026 21:27
@yannickmonney
yannickmonney changed the base branch from main to train November 14, 2026 21:27
Shopify answers fulfillment_status null for an order no line item has
shipped for, and list_orders' mock answered 'unfulfilled', a value
Shopify never sends. The declared outputs of list_orders and get_order
said string, so a live call returned a null where the action promised
a string.

Declare the field string | null on both actions, make the list_orders
mock answer null for its unfulfilled order, and mark the OpenAPI mock
spec's Order field nullable. Tests hold that each order's field admits
null in the declared output and that the mock's null fits it.
@yannickmonney
yannickmonney force-pushed the fix/shopify-fulfillment-status-null branch from 8c1843a to c583007 Compare November 14, 2026 21:37
@yannickmonney
yannickmonney merged commit 6170ea6 into train Nov 14, 2026
@yannickmonney
yannickmonney deleted the fix/shopify-fulfillment-status-null branch November 14, 2026 21:37
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.

fix(platform): let a Shopify order's fulfillment_status be null

1 participant