Integration verification and probes
Integration verification is the health check layer that decides whether a configured integration can be used. It resolves the active local configuration, selects the verifier for the service, checks configuration or remote access, and returns a small result that CLI, health, onboarding, and interactive-shell surfaces can show. See Integration platform, Integration catalog and registry, and Integration setup and credentials for the surrounding system.
Verification model
Verification sits between configuration resolution and integration use. It does not store credentials or define the full integration catalog; instead, it turns the effective configuration for each supported service into a clear health result.
Effective integration configuration
The verification runner uses the effective integration set. This set combines local store records and local environment configuration, while giving the store precedence when both sources provide a service. The result keeps the source label so an engineer can tell which configuration was checked. An incomplete store record remains visible to verification so the result can explain that credentials are missing instead of silently falling back to another source.
The runner can check one requested service or the full set of services that the integration registry marks as verifiable. Service aliases are resolved before dispatch at the CLI boundary. Family mappings also let a service use the related record that represents its configured form.
References: integrations/verify.py• L57-59 integrations/verify.py• L106-137 integrations/catalog.py• L56-64 integrations/registry.py• L581-601
Verifier registry
The verifier registry is the service-name to verifier contract. A verifier receives the configuration source and a dictionary of resolved values. It returns the service, source, status, and human-readable detail in one common shape.
Verifier modules live with their integrations. The loader scans those integration packages and imports each verifier module. Importing a module performs registration, so a new local verifier becomes available without a central import list. Repeated loading is safe because a later registration replaces the earlier entry. For example, integrations/…/verifier.py registers Neon as a probe verifier with its config builder and read-only API client.
The integration registry supplies the supported verification list. The registry tests keep that list aligned with the loaded verifier names. This prevents a service from appearing as verifiable while dispatch has no verifier for it.
References: integrations/…/registry.py• L19-52 integrations/_verifiers_loader.py• L34-59 integrations/…/__init__.py• L1-14 integrations/registry.py• L593-615 integrations/…/verifier.py• L5-13
Verification paths
Each service chooses the lightest check that can establish usability. Services with a remote client normally use a connection probe. Other services use a direct vendor request or a validation path that combines remote access with local readiness rules. Onboarding also has small HTTP and local-target probes that check whether setup can reach its target without performing the full integration verification run.
Remote connection probes
A connection probe checks the smallest vendor capability that proves the configured identity can use the integration. Some probes build a typed service configuration and call a shared client probe. Others make one direct HTTP request when a vendor endpoint gives a simpler and safer check.
The shared probe adapter maps configuration-build errors to missing. It maps client construction and probe errors to failed. Direct verifiers apply the same result contract around vendor requests. Discord and Telegram check bot identity endpoints. Neon reads the configured project to prove that its API key and project ID can access the project. Rocket.Chat checks the authenticated user or performs a non-posting webhook reachability check. Slack checks auth.test for Socket Mode tokens. WhatsApp checks the linked Twilio account. These checks can return useful identity context without performing the main delivery action.
Examples include checking an AWS caller identity, discovering supported Grafana data sources, and calling a vendor API to list or validate a small resource set. A network response alone is not always enough: Grafana fails when it connects but exposes none of the data sources that OpenSRE needs. Its verifier also keeps remote error detail short enough for the verification view.
The diagram shows how a configured service moves from resolved values to a probe result.
flowchart LR
A[Effective service config] --> B[Build or read probe inputs]
B -->|invalid or incomplete| M[Missing]
B --> C[Call vendor or client probe]
C -->|client or network error| F[Failed]
C --> D[Check response and capability]
D --> P[Passed]
D --> F
References: integrations/…/probe.py• L16-55 integrations/probes.py• L11-44 integrations/…/verifier.py• L5-12 integrations/…/verifier.py• L76-113 integrations/…/verifier.py• L15-45 integrations/…/verifier.py• L25-54 integrations/…/verifier.py• L5-13 integrations/…/client.py• L196-211 integrations/…/verifier.py• L14-105 integrations/…/verifier.py• L27-67 integrations/…/verifier.py• L13-47 integrations/…/verifier.py• L13-40
Configuration validation
The validation path is for integrations that need a vendor-specific validation function. It first builds the typed configuration, then calls that function for a result with an ok flag and detail. Missing required values produce missing; a complete configuration that fails the service rule produces failed.
Cross-field rules belong in the verifier or its validation function. This gives setup and later health checks one definition of usable configuration. GitLab uses this path with a lightweight authenticated user query. Twilio uses it to verify the account and then confirm that the SMS channel has a sender or messaging service ready. A valid Twilio account therefore does not pass when SMS is enabled without a usable channel.
References: integrations/…/validation.py• L18-39 integrations/…/validation.py• L60-76 integrations/…/verifier.py• L5-12 integrations/…/client.py• L113-149 integrations/…/verifier.py• L16-27 integrations/…/verifier.py• L21-111
Onboarding reachability probes
The quickstart wizard uses a separate lightweight probe result with a target, a reachability flag, and display detail. The local probe checks that the wizard can write both local configuration targets. The remote probe validates the Tracer URL before making a short GET request and treats successful responses through the server-error range as reachable. These checks establish setup-path reachability; they do not replace a vendor verifier.
The onboarding HTTP validators apply the same small-request idea to optional integrations. Slack and Rocket.Chat webhook checks do not post a message. Notion checks the target database. Jira checks both the current user and the selected project. ServiceNow reuses its integration validation rule, while Discord checks the bot identity endpoint. Each validator converts URL, credential, HTTP, or transport problems into an IntegrationHealthResult for the wizard.
References: surfaces/…/probes.py• L17-77 surfaces/…/shared.py• L12-18 surfaces/…/http_probe_validators.py• L14-228
Side-effecting verification
Most verification checks are read-only. A service can expose an explicit stronger check when configuration alone does not prove delivery. Slack treats a webhook as configured without sending a message by default. Socket Mode can still prove token access through auth.test. The optional --send-slack-test flag asks the verifier to send one test message and report delivery failure as failed.
This distinction matters for callers: a normal health run should not create an outbound message, while an operator who asks for delivery verification must understand that the check has an external effect. The runtime flag is passed only for the current verification call and is not part of saved integration configuration.
References: integrations/verify.py• L106-137 integrations/verify.py• L140-165 integrations/…/verifier.py• L24-110 surfaces/…/integrations.py• L107-126
Result handling
The runner normalizes every service check into three meaningful states: passed, missing, or failed. It catches unexpected verifier exceptions so one broken integration produces a result row instead of stopping checks for the other services.
Status meanings
The status tells the operator which kind of action is needed. passed means the verifier established the service contract. missing means the runner could not form a usable configuration, usually because setup values are absent or incomplete. failed means configuration was present enough to check, but the check or the service response did not establish access.
| Status | Meaning | Typical next step |
|---|---|---|
passed | The configured integration meets its verification contract. | Use the integration or continue startup checks. |
missing | No usable configuration was resolved. | Run setup or correct the required fields. |
failed | The check reached a failing rule, endpoint, or service response. | Fix credentials, permissions, endpoint, or service health, then rerun verification. |
ProbeResult is the typed result used by client probes. Its ok property is true only for passed; its metadata can carry structured context without changing the user-facing status and detail fields.
References: integrations/probes.py• L11-44 integrations/verify.py• L112-137 integrations/…/probe.py• L44-53 integrations/…/validation.py• L26-39
CLI and health surfaces
The CLI exposes verification for all supported services or one service. It prints either a table or JSON and returns an exit code for automation. The general health command reuses the same results and adds environment, integration-store, and summary information.
The exit policy differs by scope. A requested service fails when it is missing or failed. A full run fails on any failed result, or when none of the designated core services pass. This lets a partial local setup remain useful while still making a broken configured integration visible to automation.
The interactive shell uses the same runner for /integrations verify and for health reporting. It also stores a bounded text summary for the agent so later conversation can refer to observed integration status without rerunning or exposing full credential data.
References: integrations/cli.py• L973-987 integrations/verify.py• L169-215 surfaces/…/general.py• L80-117 surfaces/…/repl_data.py• L8-30 surfaces/…/integrations.py• L46-70
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the service names in the integration registry, the supported verification list, and the loaded verifier registry aligned.
- Preserve the
passed/missing/failedresult contract when changing a client probe or a validation rule. - Keep source precedence and incomplete-store behavior aligned with effective configuration resolution so stale saved records do not hide valid environment configuration or produce misleading failures.
- When adding a cross-field setup rule, place it in the verifier path so setup-time checks and later health checks use the same rule.
- Keep onboarding reachability checks distinct from full integration checks. A non-posting HTTP result must not be treated as proof that an integration can perform its main operation.
- Keep each vendor probe tied to the capability it proves. Account access does not by itself prove channel readiness for Twilio, and token shape does not by itself prove Slack access.
- When changing a GitLab validation request or a Grafana capability check, keep the user-facing result tied to authenticated access and the capability needed by downstream tools.
- When adding a Neon probe, keep the check read-only and tied to project access. A successful API response for another Neon resource must not replace the configured project check.
- If a verification option has an external side effect, keep it opt-in and pass it as runtime data rather than saving it as integration configuration.
- Keep verifier detail safe for display. Redact tokens when an SDK, URL, or HTTP error can include credentials in its message.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A supported service has no registered verifier. | Dispatch reports that verification is unsupported, or catalog and verification views disagree. | Keep SUPPORTED_VERIFY_SERVICES synchronized with auto-loaded verifier modules. |
| A local store record has incomplete credentials. | The record can take precedence over environment values and produce a missing result. | Complete or remove the saved record, then rerun setup or verification. |
| A client probe raises during connection or the remote API rejects access. | The service reports failed; a full run returns a failing result for automation. | Check endpoint, credentials, permissions, and service availability. |
| Neon has no API key or project ID. | The project probe reports missing and cannot establish Neon access. | Set both required Neon values, then rerun verification. |
| The Neon API rejects the key or cannot find the configured project. | The integration reports failed instead of proving that the configured project is usable. | Check the API key, project ID, permissions, and Neon service status. |
| Grafana is reachable but has no Loki, Tempo, or Prometheus data source. | The verifier reports failed even though transport access works. | Add or expose the data source required by the Grafana integration. |
| GitLab has no auth token or its lightweight user query fails. | Validation reports a missing token or a failed connection instead of marking the integration usable. | Supply a valid token and check the normalized GitLab API endpoint. |
| Discord or Telegram has a missing, revoked, or rejected bot token. | The identity probe reports missing or failed instead of proving the bot is usable. | Supply a valid bot token and check the vendor API response. |
| Rocket.Chat has neither a complete account credential set nor a valid webhook URL. | Verification reports missing or rejects the webhook as unreachable. | Choose one supported path and complete its required values. |
| Slack has only one Socket Mode token, or a token has the wrong prefix. | Socket Mode verification reports missing or failed even when a webhook is also present. | Provide both correctly formed tokens and check auth.test. |
| Twilio account authentication passes but SMS has no sender or messaging service. | Validation reports failed because the SMS channel is not ready. | Enable SMS and set a valid from_number or messaging_service_sid. |
| An onboarding webhook probe receives 404 or another unexpected response. | The wizard rejects the optional integration without sending a message. | Check the webhook URL and the service endpoint. |
Slack verification is run with --send-slack-test. | A real test message is sent to the configured webhook. | Use the flag only when delivery testing is intended. |
| A verifier includes a raw vendor exception with a secret-bearing URL. | Verification output can disclose a token. | Redact secret values before returning detail. |
Key files
| File | Why to read it |
|---|---|
| integrations/verify.py | Top-level resolution, dispatch, parallel execution, result formatting, and exit-code policy. |
| integrations/…/registry.py | Shared service-to-verifier contract and lookup behavior. |
| integrations/_verifiers_loader.py | Auto-discovery boundary for integration-local verifier modules. |
| integrations/…/probe.py | Common remote probe flow and error-to-status mapping. |
| integrations/…/validation.py | Common config-only validation flow and status mapping. |
| integrations/probes.py | Canonical typed statuses and client probe result shape. |
| integrations/registry.py | Supported verification services and core verification policy. |
| integrations/catalog.py | Public entry point for effective integration configuration. |
| integrations/…/verifier.py | Example of a capability-aware connection probe that discovers required data sources. |
| integrations/…/verifier.py | Example of compact registration for a validation-style verifier. |
| integrations/…/client.py | GitLab configuration normalization and lightweight authenticated validation. |
| integrations/…/verifier.py | Direct bot identity probe that avoids a client dependency. |
| integrations/…/verifier.py | Neon registration that connects the shared probe flow to the Neon config and client. |
| integrations/…/config.py | Neon configuration normalization and required project access values. |
| integrations/…/client.py | Read-only Neon project access probe and safe remote error handling. |
| integrations/…/verifier.py | Two verification paths for account credentials and non-posting webhooks. |
| integrations/…/verifier.py | Combined webhook and Socket Mode checks plus explicit delivery testing. |
| integrations/…/verifier.py | Direct Bot API identity probe with safe error detail. |
| integrations/…/verifier.py | Validation of account access and SMS channel readiness. |
| integrations/…/verifier.py | Direct Twilio account probe for the WhatsApp integration. |
| surfaces/…/probes.py | Wizard checks for writable local targets and Tracer remote reachability. |
| surfaces/…/http_probe_validators.py | Wizard-level HTTP checks for optional integrations. |
| surfaces/…/integrations.py | User-facing verify command and optional Slack test flag. |
| surfaces/…/__init__.py | Health report and machine-readable health output built from verification results. |