Skip to content

feat(platform): ship scenarios for the Shopify connector #5320

Open

Description

@tale-code-bot

Part of #5272, split off while working on it (task TALE-365): one connector per change.

Status quo. Shopify (configs/platform/system/connectors/shopify/connector.yml) ships no scenarios, so shopify is not on SCENARIO_CONNECTORS in services/platform/lib/shared/schemas/shipped-connectors.test.ts. Its actions:

  • yaml-js live bodies: reads list_products, get_product, list_customers, get_customer, list_orders, get_order, count_products, count_customers, count_orders.

Asked. Give every action its scenarios, and add shopify to SCENARIO_CONNECTORS:

  • Each read ships at least success, empty and error, and each write success, refusal and duplicate.
  • Each error scenario raises what the action really raises: the same message, and the HTTP status only where that error carries one.
  • Prove each scenario of an action against its live body: give SCENARIO_PROOFS in the catalog test the vendor's answer that the scenario stands for, as the Slack and Jev entries do. Given that answer, the body returns the scenario's output or throws its error.
  • Use synthetic data only: the repository is public.
  • The proofs pin the scenario names, so a renamed or removed scenario fails the catalog test.

Builds on #5272's first part, the Jev connector (task TALE-365, branch feat/jev-connector-scenarios). It turns the Slack-only proof table into SCENARIO_PROOFS for every listed connector: a proof answers each request by <METHOD> <url> with the response the live host builds (toConnectorResponse), and hands the body the credential's secrets as a live call does. Start from feature-train once that change is on it.

Notes.

  • Its bodies build their URLs from ctx.endpoint (the credential's https://<store>.myshopify.com), which the proof host does not hand a body yet, and read ctx.secrets, which it does.

Done means: shopify is on SCENARIO_CONNECTORS, the catalog test proves each of its scenarios, and docs/{en,de,fr}/develop/connectors.md#scenarios stays true.

Activity

  1. added
    feat
    service: platform
    agent-ready
    on Nov 2, 2026
  2. added a commit that references this issue on Nov 3, 2026
    45f168f
  3. yannickmonney commented on Nov 14, 2026

    @yannickmonney
    Contributor

    Decision

    Shopify's scenarios land on the feature line (release/0.6, through feature-train), after the two order fixes and one shared proof-host change.

    Rule

    1. The two order fixes go to main through train, because they fix what 0.5.x ships today. They reach feature-train when release/0.6 next rebases onto main.

    2. The catalog test's proof host derives ctx.endpoint for every per-credential connector through createLiveHost, from the endpoint a SCENARIO_PROOFS entry declares. That is the same allowedHosts check and origin cut a live call goes through, and it is the only way an endpoint reaches a body in the test. Confluence's branch (feat(platform): ship scenarios for the Confluence connector #5305) hands its endpoint in raw today. Whichever of the two lands second moves onto this one path. A direct test of the proof host pins the derivation.

    3. Shopify's scenarios on all nine reads:

      • success, empty and error on each read;
      • more_pages on the three lists, *_not_found on the three gets;
      • invalid_token (401) and rate_limited (429) on every action.

      Each error has the body's exact message, and a status only where the body attaches one. shopify joins SCENARIO_CONNECTORS. The count_orders proofs answer the ?status=any request. list_orders and get_order each get a scenario with an unfulfilled order (fulfillment_status: null). All data is synthetic.

    Answers

    • Branch: the scenarios go to release/0.6 through feature-train. The fixes go to main through train.
    • ctx.endpoint in the proof host: it comes from createLiveHost, never a hand-built or raw origin. A fixed-endpoint connector gets none.
    • Kinds: all nine actions are reads, so success, empty and error. There are no writes, so no refusal or duplicate. For a get, "empty" is a record with no optional content. A missing record is an error.
    • Order scenarios: they wait for fix(platform): let a Shopify order's fulfillment_status be null #5343 and fix(platform): count every Shopify order in count_orders #5344, so the proofs show what ships.
    • A status input on count_orders: not now. status=any matches the description.
    • Name pinning: through the SCENARIO_PROOFS keys.

    Rationale. Proofs against today's count_orders URL, or ones that leave out the most common order, would prove behaviour already known to be wrong, and they would break on the next rebase. Taking the endpoint from the live host keeps one source of truth, but only if every per-credential proof uses it, so Confluence's in-flight copy moves onto it too. The existing Shopify scenario set already meets the kind minimums with synthetic data, so it is rebased and kept, not rewritten.

    Implementation units

    1. fix(platform): count every Shopify order in count_orders (main, S)
    2. fix(platform): let a Shopify order's fulfillment_status be null (main, S)
    3. test(platform): hand a per-credential body ctx.endpoint in the scenario proof host: moves any per-credential proof already on feature-train onto it, adds a direct proof-host test, and updates the docs scenarios section in en, de and fr (release/0.6, S)
    4. feat(platform): ship scenarios for the Shopify connector, which closes this issue (release/0.6, M; depends on 1-3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyfeatservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions