Skip to content

Revalidate stale connection health verdicts automatically - #1708

Draft
RhysSullivan wants to merge 1 commit into
mainfrom
health-verdict-revalidate
Draft

Revalidate stale connection health verdicts automatically#1708
RhysSullivan wants to merge 1 commit into
mainfrom
health-verdict-revalidate

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Agents read a connection's persisted health verdict through connections.list, but nothing server-side ever re-checked it — only the web UI's mount probe and the manual Check now button. One transient probe failure left a sticky unhealthy verdict, and agents kept telling users to reconnect a connection that worked fine (invocation auto-refreshes OAuth tokens). Reported in shared-owner.

Two repair paths:

  • The agent-facing connections.list re-runs the Check now probe before reporting a non-healthy verdict older than 60s (served cached inside the window via the existing ifStaleMs, so repeated lists collapse to one probe). Healthy verdicts are served as-is.
  • A successful tool invocation flips a persisted non-healthy verdict back to healthy — real traffic is stronger evidence than any probe.

Deliberately untouched: tool-sync failure verdicts (only a successful sync clears them) and grants recorded invalid_grant-dead (reconnect genuinely required). PluginCtx.connections gains checkHealth to support the read path.

Tested: new unit coverage for both paths in connections.test.ts; e2e selfhost/mcp-oauth-reconnect-health and scenarios/health-checks-ui pass.

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare preview

Console https://executor-preview-pr-1708.executor-e2e.workers.dev
MCP https://executor-preview-pr-1708.executor-e2e.workers.dev/mcp
Deployed commit 6dd93f9

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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 20, 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 6dd93f9 Commit Preview URL

Branch Preview URL
Aug 20 2026, 04:50 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 20, 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 6dd93f9 Aug 20 2026, 04:51 PM

@pkg-pr-new

pkg-pr-new Bot commented Aug 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

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

@executor-js/config

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

@executor-js/execution

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

@executor-js/sdk

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

@executor-js/codemode-core

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

@executor-js/runtime-quickjs

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

@executor-js/plugin-file-secrets

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

@executor-js/plugin-graphql

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

@executor-js/plugin-keychain

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

@executor-js/plugin-mcp

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

@executor-js/plugin-onepassword

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

@executor-js/plugin-openapi

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

executor

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

commit: 6dd93f9

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