Repository navigation
Description
Summary
Requested on 2026-10-13, as three goals:
- Mock data ships with every integration (in Tale's words, every connector) in a way that lets a workflow (an automation) be tested end to end before it goes into production, and that covers all cases.
- A test run changes nothing outside Tale, and still earns trust. The mocks the integrations ship are what make it "bullet proof".
- Improve more generally how integrations work in Tale. This part is deliberately open. Whoever takes this ticket, a person or an agent, may propose and make changes beyond the mocks. The evidence below shows where to look. It is not a scope.
This issue records what exists today, how a test run uses it, what a faithful mock would have to cover, and the design space, with no preferred answer. A follow-up, #4944, ranks the 1,000 integrations that matter most to businesses and opens one issue for each. It builds on whatever standard this ticket settles for shipped mocks.
Snapshot: main 0cf2c45fda (2026-10-13).
What exists today
The catalog
- 22 connectors under
configs/platform/system/connectors/, with 127 actions: 89 reads and 38 writes. 87 actions run a JavaScript body and 40 a native platform module. - A connector is one
connector.yml(plus an icon for 16 of them). No mock or fixture file lives beside any of them. - Two actions are declared
idempotent:notify.memberandtask.create, both the platform's own. No vendor write is. (.agents/repo.md:800still says no shipped action is.) - Adding a connector is a source contribution. The runtime reads the platform catalog and has no organization-level upload (
docs/en/develop/connectors.md:43).
The mock an integration ships
- Every action must carry a
mock: "Deterministic mock body (JS):inputin scope, returns the mock output. Required — the authoring/test loop runs on it." (packages/shared/src/schemas/connectors.ts:239-241). The docs say the same: "Required deterministic JavaScript implementation; same input, same output, no network I/O" (docs/en/develop/connectors.md:56). - Measured over all 127 mocks with a script over the
connector.ymlfiles (the patterns are heuristic): the median mock is 2 lines long; 26 (about a fifth) branch on their input at all; 2 can raise an error (both intask); none readsctx, so none can remember anything between two calls; 17 mention paging fields. For example,slack.list_channelsreturns one fixed public channel andnext_cursor: null, whatever it is asked. outputis "documentation, not a runtime output validator" (docs/en/develop/connectors.md:54). The one catalog-wide check of the mocks runs each of them with itsexampleInput, twice, and compares the two answers (services/platform/lib/shared/schemas/shipped-connectors.test.ts:122-134). Nothing compares a mock's answer with its action's declared output, or with what the vendor returns. 124 of the 127 actions have anexampleInput.
What a test run does with it
- A run is
mockorlive(services/platform/backend/core/automations/stepper.ts:432). In mock mode a connector node resolves its input and checks it against the action's input schema. It then takes a stand-in output if the test gave one, and otherwise runs the action'smock; it records a write as an effect without performing it. In live mode it calls the action's live body (services/platform/lib/engine/core/execute/index.ts:849-897). - The promise to the user: "Test run uses the selected saved version with deterministic mocks. It does not send mail or change external records." (
docs/en/platform/automations/editor.md:207). Over MCP,run_automationruns a draft "on the deterministic mocks: nothing leaves Tale and nothing is stored" (docs/en/develop/mcp-endpoint.md:136). - A workflow's acceptance tests can replace any node's call with a stand-in output (
mocks: node id → output) or a simulated failure (failures: node id → message, worded "(simulated by the test)"), and then assert on the output, the effects and the node states (services/platform/lib/engine/api/docs.ts:300-345,lib/engine/api/tests.ts). So every case beyond the one canned answer is invented by the workflow's author, test by test, and nothing says it resembles what the vendor does. - In mock mode a model node returns a deterministic default text and an agent node a deterministic default reply (
lib/engine/core/execute/scope.ts:77-85). A mock run's results "were made up", so they cannot seed a live replay (lib/engine/core/record/replay.ts:305). - Approvals are out of the picture: "A mock test does not prove that a live approval will appear" (
docs/en/platform/approvals/configure.md:29).
A second mock mechanism, outside the connectors
services/platform/lib/mocks/is a Prism-based local gateway. It serves OpenAPI examples at/mock/<connector>/*for 10 vendor specs (Confluence, Discord, GitHub, Gmail, Google Drive, Microsoft Graph, Shopify, Slack, Tavily and Twilio, from a handful to a few dozen operations each) and for AI providers.- Its README says: "The specs cover the operations they list, not every operation an upstream service offers", and "There is no blanket connector redirect wired into the current backend by setting
TALE_MOCK_CONNECTORS_BASEalone." Its registry still names the retired Convex sandbox (lib/mocks/registry.ts). - It is test infrastructure of the repository. It is not shipped with a connector, and a test run in the app cannot reach it.
What the docs ask of a contributor
"Test three things separately when contributing: schema validation, deterministic mock behavior, and the live vendor path. Check failure handling as well as success: missing credential, wrong scope, denied destination, invalid input, vendor refusal, and an approval wait for writes." (docs/en/develop/connectors.md:130). Of the mocks, the shipped-catalog test checks only that each one runs and is deterministic (above); no catalog-wide test of the failure cases on that list was found.
Neighbouring work
- Improvement: durable test runs with stand-ins, preview mode, a wait step and the approval line in the run record #4929 (open,
needs discussion): stand-ins in durable runs, and a preview mode, "real connector reads and real model calls (billed, budgets apply), holds writes back as 'would have sent'". It records that "the owner said yes on 2026-10-08". A preview and a mock-only test run are two answers to "change nothing"; whatever this ticket settles has to fit the modes Improvement: durable test runs with stand-ins, preview mode, a wait step and the approval line in the run record #4929 settles. - Epic: a faster, parallel automation engine — what is left after the first slice #4936 (epic), Improvement: walk live and in-process automation runs with one walker #4927, Improvement: run independent steps and a forEach's items at the same time, and try a failed step again after a wait #4928: the engine's walkers. Epic: a faster, parallel automation engine — what is left after the first slice #4936 lists "a simulated 'fail once, then succeed' stand-in for tests" among the things it leaves out on purpose. A faithful mock set for retries and for an in-doubt write needs a case like it.
- Known gaps in the contract ledger (
.agents/repo.md): an in-doubt step is decided in the app only (:784); the session-bound connector runner has no caller (:474).
What "faithful" has to mean (considerations, not decisions)
- Cases per action. Success; an empty result; not found; the first, a middle and the last page; a refusal of invalid input; credentials missing, expired or short of a scope; a rate limit with a wait; a timeout or outage; a partial failure inside a batch; a repeated request with the same idempotency key; a large payload; text in other encodings and languages.
- State. Create then read, update then read, delete then read within one run. Per run, isolated, and discarded with the run.
- Shape fidelity. The mock's answer matches the action's declared output and what the vendor really returns. How drift is found (against recorded real responses, against the vendor's own OpenAPI document, or against a vendor sandbox) and who is told.
- Writes. A test run shows the write that would have happened (today an effect record) and the answer the vendor would give to it.
- Failure classes. A live failure is classified, and the class decides whether a step is retried or parked in doubt. A simulated failure has to pass through the same classification, or a test cannot prove either behaviour.
- Data. Synthetic only.
.agents/repo.mdkeeps client names, fixtures and business rules out of the shared implementation, and this repository is public. - Cost. Mocks multiply by integrations: 22 today, and Epic: the 1,000 integrations that matter most to businesses — rank them and open one issue per integration #4944 plans many more. What it costs to write and to review a mock per integration is the real constraint.
Open design space (no preference stated; the assignee decides)
- Where a mock lives. In the connector's file (today), as files beside it, as a pack, generated from the vendor's OpenAPI document, or recorded from real traffic and scrubbed.
- Where a test run swaps it in. At the action (today); at the HTTP layer, so the real live body runs against a vendor-shaped mock (what
lib/mocksdoes for tests); or both. - What a mock is. A function (today); a table of scenarios (input matcher to response, errors included); a small stateful simulator; or an OpenAPI mock server (Prism is already in the repository).
- How a test picks a case. By input, by a scenario name per node, or from a library of named scenarios per integration; and how a failing scenario is written in a test.
- How completeness is held. A catalog gate in CI: each action ships a minimum set of scenario kinds (a read: success, empty, error; a write: success, refusal, duplicate).
- Who writes them. How a person, or an agent (the product's own over MCP, or a coding agent), writes and checks the mocks of a new integration.
- Beyond mocks, "how integrations work". Open. The evidence above points at: how credentials, consent and per-credential endpoints are declared; idempotency (2 of 38 writes are declared); the two failure and retry classes; the second mock mechanism; the lack of an organization-level connector upload (a source contribution or the generic
httpconnector); the contributor flow and its docs; and how a call is observed. These are pointers, not a scope.
Maintained tools that already exist (each read on 2026-10-13): stripe/stripe-mock (MIT; "a mock HTTP server that responds like the real Stripe API", usable "instead of Stripe's testmode"), stoplightio/prism (Apache-2.0; already used in lib/mocks), wiremock/wiremock (Apache-2.0), mockoon/mockoon (MIT), mswjs/msw (MIT), nock/nock (MIT), and the Pact contract-testing framework.
Constraints
- Org configuration is files, not tables (
.agents/repo.md). If scenarios or mocks become organization-visible configuration, they follow that rule. - Tenant isolation. Any mock state is per run and per organization, and never shared across organizations.
- Isolation of code. Mock bodies run in the code runner's sandbox today; a new form of mock keeps that boundary.
- A domain's rules are a checked spec. The automations and connectors specs, the manual boxes and the docs move with the change, in English, German and French, with accessibility held.
- "Reach for a well-known, maintained library before hand-rolling" (
AGENTS.md:137).
Questions
- Is the aim "no real change, ever" (a mock-only test run), or also "real reads, held writes" (the preview of Improvement: durable test runs with stand-ins, preview mode, a wait step and the approval line in the run record #4929), as separate modes?
- Which cases count as "all cases", and who decides the list for each integration?
- Must a mock be checked against the real service on a schedule? That needs test accounts per vendor.
- Are the 22 shipped connectors the reference and upgraded first?
- Is a mock, with a minimum coverage, a required part of every connector, or optional per integration?
Not examined
- The code of each vendor's live body, and how closely any mock matches its vendor today.
- Whether a vendor offers a sandbox or test accounts, per integration. Nothing was run against a real vendor.
- The org-level custom connector gap beyond what the docs say, and the MCP and REST surfaces for connectors.
- The patterns used for the measurements above are heuristic. The counts describe the mock bodies as text.
Related
#4944 (the follow-up that ranks the integrations and opens one issue each), #4929, #4936, #4927, #4928.
Observed at main 0cf2c45fda (2026-10-13).
Activity
tale-code-bot commentedon Nov 1, 2026
Step 1 of this issue is worked in TALE-198 on the branch
feat/connector-mock-scenarios. After review it lands on the feature line:feature-train, thenrelease/0.6.What it does.
mock. Each scenario is data, never code: a kind (success,empty,error,refusal,duplicate), a description, an optionalwhen(the input members a call must carry), and an output or an error with an optional HTTP status.scenarios: {<node>: <name>}), and so doesrun_automationover MCP. A matching call gets the scenario's answer. An error is classified as the same live failure would be, soonErrorand the failure path act as they would live. Any other call gets the mock.get_cataloglists each action's scenarios.The parts left, each filed as its own issue:
Not filed.
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
tale-code-bot commentedon Nov 2, 2026
Done on the feature line: feature train #5279 landed on
release/0.6by rebase at 2026-11-02 01:30:34 UTC. This issue's change is commita6ff0fd5981784ff560e3adef18e88f2738fd447(feat(platform): let connector actions ship scenarios that tests pick) onrelease/0.6, and it ships with Tale 0.6.0. GitHub closes issues itself only for commits that reachmain, so the feature-train role closes this one now. Board task: TALE-198.feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick
feat(platform): let connector actions ship scenarios that tests pick