Repository navigation
Description
Part of #5272, split off while working on it (task TALE-365): one connector per change.
Status quo. GitHub (configs/platform/system/connectors/github/connector.yml) ships no scenarios, so github is not on SCENARIO_CONNECTORS in services/platform/lib/shared/schemas/shipped-connectors.test.ts. Its actions:
- yaml-js live bodies: reads
list_repos,get_repo,list_issues,get_issue,list_pull_requests,get_pull_request,get_pull_request_files,get_pull_request_diff,list_pull_requests_to_review,list_issue_comments,list_commits,search_code; writescreate_issue,create_pull_request,merge_pull_request,create_pull_request_review,create_pull_request_review_comment,create_issue_comment,update_issue,add_labels_to_issue. - native, in
services/platform/lib/connectors/natives/issue-import.tsandservices/platform/lib/connectors/natives/issue-import-alerts.ts: readslist_import_issues,get_import_issue,refresh_import_issues,list_import_alerts,get_import_alert,refresh_import_alerts.
Asked. Give every action its scenarios, and add github 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 a yaml-js 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. - Prove each scenario of a native action against its native implementation: given what its services answer in that case, the action 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.
Native actions have no live body. Their failures are the ConnectorErrors the implementation throws, each with a code of its own, while a scenario's error is a message and an optional status that the run classifies by that status. If no native connector is on SCENARIO_CONNECTORS when this change starts, it decides how the catalog test proves a native action's scenarios and how a native failure maps onto a scenario's error, and docs/{en,de,fr}/develop/connectors.md#scenarios says so: today it describes only the proof against a live body.
Notes.
- With 26 actions it is the largest connector.
- Two open changes touch its yml: branch
feat/github-app-connector(a GitHub App auth method) and branchfeat/issue-sync-mirror-labels(issue labels in the import). Whichever lands second makes the scenarios fit.
Done means: github is on SCENARIO_CONNECTORS, the catalog test proves each of its scenarios, and docs/{en,de,fr}/develop/connectors.md#scenarios stays true.
Activity
yannickmonney commentedon Nov 14, 2026
Decision
Rule. Ship GitHub's scenarios in five units on
feature-train, with one native proof convention for every native connector.ctx.httpanswers each request by<METHOD> <url>throughtoConnectorResponse, with the credential's secrets,ctx.endpointand a fixed clock. Natives whose services are not HTTP get service fakes.vendorStatusOf(thrown), absent when it returns nothing.failureCauseOfbeforeconnectorFailureOf) equals the scenario error's cause in reason and params. The only exception is the error class (errorName/errorCode), which a scenario cannot carry.errormay answer with an output, asduplicatemay, for an action that reports a failed read in its answer. Its proof must contain a failing service answer, so it never disguises a success.Answers
ctx.httpanswered by<METHOD> <url>, a fixed clock and service fakes.vendorStatusOf, and an equal cause. GitHub's 403 rate limit carries CONNECTOR_RATE_LIMITED, so ship the 429 rate limit instead.docs/{en,de,fr}/develop/connectors.md#scenariosgains the native proof paragraph, the "every shipped scenario is proven" rule, and the widererrorrow.erroranswers underwhen: {report: true}with the real report (failed,notRead,retryAfter), proven with a failing GitHub answer.get_import_issue/get_import_alert: a 404 is thesuccessscenariosource_gone. Theirerroris a 401, a 403 that is not a rate limit, or a 5xx.create_pull_request; a 405 formerge_pull_request; the same record foradd_labels_to_issueandupdate_issue. Messages are the bodies' exact sentences.Rationale. A scenario is only worth having if it shows what a real run records. Comparing with the run's own status and cause functions, as strictly as the existing live-body proof, checks exactly that. One harness covers live bodies and natives and avoids a fifth convention. Proving every shipped scenario tightens the test without breaking anything today, and it makes the connector splittable. The guard on
erroroutputs keeps the minimum kinds meaningful.Units (all on
feature-train)errormay answer with an output, with the catalog test requiring a failing service answer in its proof. Depends on 1. (S)githubjoinsSCENARIO_CONNECTORS. Depends on 1 to 4. (M)Cross-issue amendments (decisions taken together with #5321):
<METHOD> <url>, the clock is fixed, and ctx.endpoint comes from feat(platform): ship scenarios for the Shopify connector #5320's createLiveHost derivation. Scenario errors carrycode/failure(the 429 rate limit as CONNECTOR_RATE_LIMITED) and are compared strictly, error class included. Drop feat(platform): ship scenarios for the GitHub connector #5310 unit 1's proof-rule part (feat(platform): ship scenarios for the Tasks connector #5321 unit 2 owns it) and keep only the output-answeringerrorkind. Order: test(platform): check connector scenarios against each vendor's OpenAPI document #5273 unit 0 (move proofs to shipped-connector-proofs.ts), then feat(platform): ship scenarios for the Tasks connector #5321 units 1-2, then feat(platform): ship scenarios for the Shopify connector #5320, then feat(platform): ship scenarios for the GitHub connector #5310.