Repository navigation
Description
Part of #5272, split off while working on it (task TALE-365): one connector per change.
Status quo. Discord (configs/platform/system/connectors/discord/connector.yml) ships no scenarios, so discord is not on SCENARIO_CONNECTORS in services/platform/lib/shared/schemas/shipped-connectors.test.ts. Its actions:
- yaml-js live bodies: reads
list_guilds,get_guild,list_channels,list_messages,get_user,list_members; writessend_message,create_channel.
Asked. Give every action its scenarios, and add discord to SCENARIO_CONNECTORS:
- Each read ships at least
success,emptyanderror, and each writesuccess,refusalandduplicate. - Each error scenario raises what the action really raises: the same message, and the HTTP
statusonly where that error carries one. - Prove each scenario of an action against its live body: give
SCENARIO_PROOFSin 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 use only
ctx.http, as Slack's do, so its proofs need nothing the proof host lacks. get_guildtypesdescriptionasstring, but the repo's mock spec (services/platform/lib/mocks/specs/connectors/discord.openapi.yaml,Guild) allowsnull, for a guild without one. Check a user'sglobal_name(get_user) and a member'snick(list_members) the same way: Discord's API reference documents both as nullable, and the mock spec does not model them so. A scenario's output must fit the declared output, so where Discord answersnull, the change decides whether the signature or the scenario gives way, and says why.
Done means: discord is on SCENARIO_CONNECTORS, the catalog test proves each of its scenarios, and docs/{en,de,fr}/develop/connectors.md#scenarios stays true.
Activity