You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(platform): check connector scenarios against each vendor's OpenAPI document #5273
Status quo. The catalog test checks each shipped connector scenario against its own action. A when may name only the action's input properties, and an output must fit the action's declared output, through the engine's assignable, which is lenient: it passes extra fields, and passes a list whose elements differ in shape once one element fits. Nothing compares a scenario, or a mock, with what the vendor really answers. For several vendors, services/platform/lib/mocks/ already holds an OpenAPI document; the vendors publish others.
Asked. Where a vendor publishes an OpenAPI document, check in CI that each scenario's answer has the shape the vendor's operation answers (status and body):
Pin the document in the repository, so the check runs offline and stays deterministic.
When a vendor changes its document, the pin moves in a reviewed change, and the check names each scenario that no longer fits.
Decide whether lib/mocks (the Prism gateway, whose registry still names the retired Convex sandbox) is the place for those documents, or is retired.
Out of scope: checks against live vendor accounts. They need test accounts and credentials, which only a person can create.
On lib/mocks: the vendors' documents are pinned in services/platform/tests/fixtures/vendor-openapi, not in the mock gateway. The gateway's specs are fixtures written for it to answer with, and its provider and OIDC stand-ins still serve the E2E suite and the docs screenshots, so the gateway stays. Its connector half lost its only consumer, the Convex sandbox's URL rewrite. Its retirement is filed as #5327 (task TALE-366).
The rule. Check what the vendor actually sends, the proof answers in SCENARIO_PROOFS, and not the scenario outputs, which are in Tale's own action shape. CONN-R33 already proves that the live body turns each proof answer into its scenario's output. Holding every proof answer to the vendor's pinned OpenAPI operation therefore means the scenario fits the vendor.
One copy of the proofs. The scenario list and the proofs move out of shipped-connectors.test.ts into a shared non-test module, which both CONN-R33 and the new check import.
Where the pins live.services/platform/tests/fixtures/vendor-openapi/<vendor>/.
document.yml is a canonical extract of the upstream document: the operations the connector calls plus every component they reference.
source.yml records the URL, the revision (a tag or commit, or the retrieval date for an unversioned URL), the upstream sha256, the extract sha256, the hosts, the kept operations and the deviations.
A hand-run refresh script is the only way a pin moves, and the result lands as a reviewed change. CI never fetches; it recomputes the extract hash.
How a request is matched. The query string is stripped. The request is matched by host to a vendor, then by method and path template to an operation; no match fails.
The status must be declared: the exact code, then NXX, then default.
The media type comes from the answer's content-type header, otherwise text/plain for a string body and JSON for anything else. It must be declared by the operation.
A JSON body is validated with ajv against the schema, normalized from OAS2 or OAS3 by @stoplight/http-spec.
How strict the check is. Types, enums, formats, nesting and composition are enforced. Objects are closed with unevaluatedProperties (which stays correct under allOf) unless the schema explicitly allows extra members. required is relaxed, because proofs are minimal (CONN-R36).
Deviations. A wrong or stale vendor document is handled only by a deviations entry with a reason, an evidence link and, for an undeclared status or URL, a substitute schema that the body is still validated against. Unused deviations fail as stale. Nothing is skipped.
Coverage guard. Every scenario-list connector is pinned or listed as not pinned with a reason, and a test enforces this.
Failure messages. A failure names connector/action/scenario, the request, the status, the media type and the JSON pointer.
Offline and deterministic. The pins are committed, hash-anchored extracts. CI only reads files.
When a vendor changes its document. Someone reruns the refresh script, and the result lands as a reviewed PR. The check names each scenario that no longer fits.
Which vendors. Twilio, Tavily, jev (OpenRouter), Slack and Teams (Graph), each where the published document describes the endpoints called. Gmail is not pinned (a Discovery document, not OpenAPI). An endpoint the vendor does not publish, such as OpenRouter's alpha decisions endpoint, stays not pinned with that reason.
Mocks. They are not checked. They answer in Tale's shape.
Out of scope. Live accounts, the engine's lenient assignable, and request bodies.
Rationale. The proofs are the repository's vendor-shaped data, and CONN-R33 already binds them to their scenarios, so checking them closes the loop with one copy. Hash-anchored extracts keep CI offline, the repository small and vendor changes reviewable. The extract hash is what lets CI catch a hand-edited pin. unevaluatedProperties catches invented members without breaking Graph's allOf inheritance. Deviations that carry substitute schemas cover vendors that document only success codes, such as Twilio, or the wrong ones, such as Slack, without leaving a body unchecked.
Implementation units (base: release/0.6, through feature-train)
Shared proofs module, comparator, pin format, refresh script, coverage guard and consistency test, with Twilio first (L). Acceptance: the Twilio proofs fit, or are covered by deviations with substitute schemas. An undeclared member (including inside allOf), a wrong type, an undeclared status, a wrong media type and an unmatched request each fail with a named scenario and pointer. Stale deviations fail. An unlisted connector fails the guard. A hand-edited extract fails the consistency test. CONN-R33 is unchanged. No network access.
Pin Tavily (S). Acceptance: it fits and leaves the not-pinned list, or it stays listed with a linked reason.
Pin OpenRouter for jev (S). The same, with 'endpoint not in the published document' as the expected fallback.
Pin Slack (OAS2) (M). Its deviations cover ok:false at 200, 429s and the plain-text upload URL, each with evidence. Removing a deviation fails the named scenarios.
Pin a Graph v1.0 extract for Teams (M). The extract stays well under 1 MB and matches its manifest; every Teams proof fits, or has a reasoned deviation.
Activity
tale-code-bot commentedon Nov 2, 2026
On
lib/mocks: the vendors' documents are pinned inservices/platform/tests/fixtures/vendor-openapi, not in the mock gateway. The gateway's specs are fixtures written for it to answer with, and its provider and OIDC stand-ins still serve the E2E suite and the docs screenshots, so the gateway stays. Its connector half lost its only consumer, the Convex sandbox's URL rewrite. Its retirement is filed as #5327 (task TALE-366).yannickmonney commentedon Nov 14, 2026
Decision
The rule. Check what the vendor actually sends, the proof answers in
SCENARIO_PROOFS, and not the scenario outputs, which are in Tale's own action shape. CONN-R33 already proves that the live body turns each proof answer into its scenario's output. Holding every proof answer to the vendor's pinned OpenAPI operation therefore means the scenario fits the vendor.shipped-connectors.test.tsinto a shared non-test module, which both CONN-R33 and the new check import.services/platform/tests/fixtures/vendor-openapi/<vendor>/.document.ymlis a canonical extract of the upstream document: the operations the connector calls plus every component they reference.source.ymlrecords the URL, the revision (a tag or commit, or the retrieval date for an unversioned URL), the upstream sha256, the extract sha256, the hosts, the kept operations and the deviations.NXX, thendefault.@stoplight/http-spec.unevaluatedProperties(which stays correct underallOf) unless the schema explicitly allows extra members.requiredis relaxed, because proofs are minimal (CONN-R36).deviationsentry with a reason, an evidence link and, for an undeclared status or URL, a substitute schema that the body is still validated against. Unused deviations fail as stale. Nothing is skipped.Answers
lib/mocks. It is not where the pins live. The gateway keeps its provider and OIDC stand-ins. Its connector half was retired by refactor(platform): retire the mock gateway's connector half #5327.assignable, and request bodies.Rationale. The proofs are the repository's vendor-shaped data, and CONN-R33 already binds them to their scenarios, so checking them closes the loop with one copy. Hash-anchored extracts keep CI offline, the repository small and vendor changes reviewable. The extract hash is what lets CI catch a hand-edited pin.
unevaluatedPropertiescatches invented members without breaking Graph'sallOfinheritance. Deviations that carry substitute schemas cover vendors that document only success codes, such as Twilio, or the wrong ones, such as Slack, without leaving a body unchecked.Implementation units (base: release/0.6, through feature-train)
allOf), a wrong type, an undeclared status, a wrong media type and an unmatched request each fail with a named scenario and pointer. Stale deviations fail. An unlisted connector fails the guard. A hand-edited extract fails the consistency test. CONN-R33 is unchanged. No network access.ok:falseat 200, 429s and the plain-text upload URL, each with evidence. Removing a deviation fails the named scenarios.