Skip to content

Health checks for Microsoft Graph and Google#1109

Open
RhysSullivan wants to merge 1 commit into
claude/health-checks-mcpfrom
claude/health-checks-providers
Open

Health checks for Microsoft Graph and Google#1109
RhysSullivan wants to merge 1 commit into
claude/health-checks-mcpfrom
claude/health-checks-providers

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Extends connection health checks to the provider plugins.

  • Microsoft Graph and Google wire the four OpenAPI health-check hooks to the shared backing (same store + config superset). Google auto-configures the People API identity check when the bundle includes it; Graph exposes the picker so the user selects the identity operation.
  • MCP gets a liveness-only probe (connect + list tools, classify the result). MCP has no usable identity source, so no identity is derived; the connection keeps its user-given label.
  • The MCP HTTP-status extractor moved to a small shared module so the connect path can surface a 401/403 to the liveness check.

E2E: health-checks-providers.test.ts (MCP healthy→expired + validate; Google auto-default + candidate response fields).

Stacked on #1108.

Stack

  1. Fix combobox inside the health-check editor sheet #1110
  2. Connection health checks (liveness) with OpenAPI backing #1108
  3. Connection account info: derive identity from the health-check probe #1111
  4. MCP connection liveness health checks #1112
  5. Health checks for Microsoft Graph and Google #1109 👈 current

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 2cbcd9c Commit Preview URL

Branch Preview URL
Jun 26 2026, 02:30 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 2cbcd9c Jun 26 2026, 02:32 AM

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Console https://executor-preview-pr-1109.executor-e2e.workers.dev
MCP https://executor-preview-pr-1109.executor-e2e.workers.dev/mcp
Deployed commit 2cbcd9c

Sign-in is Cloudflare Access (one-time PIN to an allowed email). The preview has its own database and encryption key; it is destroyed when this PR closes.

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@1109

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@1109

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@1109

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@1109

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@1109

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@1109

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@1109

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@1109

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@1109

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@1109

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@1109

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@1109

executor

npm i https://pkg.pr.new/executor@1109

commit: 2cbcd9c

@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown

Greptile Summary

This PR wires the four OpenAPI health-check hooks (describeHealthCheck, listHealthCheckCandidates, setHealthCheck, checkHealth) into the Google and Microsoft Graph provider plugins, reusing the shared OpenAPI backing already in place for MCP. Google uniquely auto-configures a default identity probe (People API people.get) at addBundle time when the bundle URL contains the People API.

  • Both Google and Microsoft add healthCheck: Schema.optional(HealthCheckSpec) to their plugin-specific config schemas so the stored health check survives the plugins' own updateBundle/updateGraph read-modify-write cycles (without this, the decode strips the unknown field and the next write drops it).
  • The defaultGoogleHealthCheck helper matches the People API by URL substring and then finds the GET /v1/{+resourceName} operation (by tool-path or path-template), pinning resourceName=people/me and personFields=names,emailAddresses so connections report alive/expired and the user's email identity out of the box.
  • An E2E scenario (health-checks-providers.test.ts) validates the auto-default and the candidate response fields served to the editor.

Confidence Score: 5/5

Safe to merge. The health-check wiring is additive and the config schema changes correctly prevent stored health checks from being silently dropped on updateBundle read-modify-write cycles.

Both Google and Microsoft plugins correctly add healthCheck to their decode schemas so the field survives their own read-modify-write paths. The defaultGoogleHealthCheck helper is conservative: it returns undefined rather than writing a bad default when neither the tool-path nor path-template check matches, so the editor remains the fallback. The setHealthCheckOpenApi function merges over the raw (un-decoded) config to preserve provider-specific keys that decodeOpenApiIntegrationConfig would otherwise strip. The E2E scenario validates the auto-default path end-to-end using a hermetic local discovery server. No correctness issues were found in this diff.

No files require special attention. The putDefs absence in google/src/sdk/plugin.ts (noted in a prior review) is a performance concern on the serve path but does not affect correctness here.

Important Files Changed

Filename Overview
packages/plugins/google/src/sdk/plugin.ts Wires four OpenAPI health-check hooks and introduces defaultGoogleHealthCheck to auto-configure the People API probe at addBundle time. Both putDefs calls were removed (flagged as P2 in a prior review); the rest of the logic is correct.
packages/plugins/google/src/sdk/config.ts Adds healthCheck: Schema.optional(HealthCheckSpec) to GoogleIntegrationConfigSchema, ensuring the stored health check survives updateBundle's decode-then-spread round-trip without being silently dropped.
packages/plugins/microsoft/src/sdk/graph.ts Adds healthCheck: Schema.optional(HealthCheckSpec) to MicrosoftGraphIntegrationConfigSchema for the same round-trip preservation reason as the Google config change.
packages/plugins/microsoft/src/sdk/plugin.ts Wires the four OpenAPI health-check hooks for the Microsoft Graph plugin, delegating to the shared backing. No auto-default is set; the user selects the identity operation via the editor.
e2e/scenarios/health-checks-providers.test.ts New E2E scenario that spins up a local People API discovery server, calls addBundle, and asserts the auto-defaulted health check operation, identity field, and pinned args. Cleanup is correct via Effect.ensuring + Effect.ignore.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[addBundle / addGraph] --> B{Google: People API URL?}
    B -- Yes --> C[defaultGoogleHealthCheck<br/>find people.people.get op]
    C -- found --> D[write healthCheck into integrationConfig]
    C -- not found --> E[no default health check set]
    B -- No --> E
    D --> F[ctx.core.integrations.register<br/>config includes healthCheck]
    E --> F

    G[updateBundle / updateGraph] --> H[spread ...current config<br/>existing healthCheck preserved]
    H --> I[ctx.core.integrations.update]

    J[setHealthCheck] --> K[setHealthCheckOpenApi<br/>read raw config, merge key]
    K --> L[write back raw config<br/>healthCheck undefined = cleared]

    M[checkHealth] --> N[checkHealthOpenApi<br/>resolve binding for spec.operation]
    N --> O{binding found?}
    O -- Yes --> P[invoke HTTP probe]
    P --> Q{HTTP status}
    Q -- 2xx --> R[healthy + extract identity]
    Q -- 4xx/5xx --> S[expired / degraded]
    O -- No --> T[unknown: operation not found]

    U[listHealthCheckCandidates] --> V[listHealthCheckCandidatesOpenApi<br/>list stored ops, reparse spec for summaries]
    V --> W[ranked candidates returned to editor]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[addBundle / addGraph] --> B{Google: People API URL?}
    B -- Yes --> C[defaultGoogleHealthCheck<br/>find people.people.get op]
    C -- found --> D[write healthCheck into integrationConfig]
    C -- not found --> E[no default health check set]
    B -- No --> E
    D --> F[ctx.core.integrations.register<br/>config includes healthCheck]
    E --> F

    G[updateBundle / updateGraph] --> H[spread ...current config<br/>existing healthCheck preserved]
    H --> I[ctx.core.integrations.update]

    J[setHealthCheck] --> K[setHealthCheckOpenApi<br/>read raw config, merge key]
    K --> L[write back raw config<br/>healthCheck undefined = cleared]

    M[checkHealth] --> N[checkHealthOpenApi<br/>resolve binding for spec.operation]
    N --> O{binding found?}
    O -- Yes --> P[invoke HTTP probe]
    P --> Q{HTTP status}
    Q -- 2xx --> R[healthy + extract identity]
    Q -- 4xx/5xx --> S[expired / degraded]
    O -- No --> T[unknown: operation not found]

    U[listHealthCheckCandidates] --> V[listHealthCheckCandidatesOpenApi<br/>list stored ops, reparse spec for summaries]
    V --> W[ranked candidates returned to editor]
Loading

Reviews (5): Last reviewed commit: "feat: health checks for Microsoft Graph ..." | Re-trigger Greptile

@RhysSullivan RhysSullivan force-pushed the claude/health-checks branch from 522f93b to 59fd53f Compare June 23, 2026 22:25
@RhysSullivan RhysSullivan force-pushed the claude/health-checks-providers branch from 1287945 to 761118f Compare June 23, 2026 22:25
@RhysSullivan RhysSullivan changed the title Health checks for Microsoft, Google, and MCP Health checks for Microsoft Graph and Google Jun 23, 2026
@RhysSullivan RhysSullivan changed the base branch from claude/health-checks to claude/health-checks-mcp June 23, 2026 22:25
@RhysSullivan RhysSullivan force-pushed the claude/health-checks-mcp branch from f87af0f to 0fdd8fe Compare June 25, 2026 20:30
@RhysSullivan RhysSullivan force-pushed the claude/health-checks-providers branch from 761118f to 69d2ed8 Compare June 25, 2026 20:30
@RhysSullivan RhysSullivan force-pushed the claude/health-checks-mcp branch from 0fdd8fe to 169e9b7 Compare June 25, 2026 20:45
@RhysSullivan RhysSullivan force-pushed the claude/health-checks-providers branch from 69d2ed8 to cc3fa8e Compare June 25, 2026 20:46
Wire the OpenAPI health-check backing into the Microsoft Graph and Google
provider plugins (both compile their spec through the OpenAPI machinery and store
config in the same shape), so their connections report alive/expired + identity
instead of always "unknown".

Both plugins now implement the four health-check hooks by delegating to the
shared OpenAPI backing, and persist a `healthCheck` field on their own config
schema (so it survives the plugin's own decode). Each auto-configures a sensible
default at add time:

- Microsoft Graph: `GET /me` with identity `userPrincipalName` (always present on
  /me, unlike `mail`), when the default profile preset is selected.
- Google: People API `people.get` with the required args pinned
  (`resourceName=people/me`, `personFields=names,emailAddresses`) and identity
  `emailAddresses.0.value`, when the bundle includes the People API.

The user can switch the operation/identity from the now-available editor.

Covered by e2e: adding a Google People bundle (against a local discovery doc)
auto-writes the default identity check and projects the email field as a typed
candidate. Graph's spec source is a fixed upstream URL, so its hooks + default
are covered through the shared backing path and verified against a live tenant.
@RhysSullivan RhysSullivan force-pushed the claude/health-checks-mcp branch from 169e9b7 to 1327086 Compare June 26, 2026 02:26
@RhysSullivan RhysSullivan force-pushed the claude/health-checks-providers branch from cc3fa8e to 2cbcd9c Compare June 26, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant