Skip to content

Revalidate stale connection health verdicts automatically - #1708

Merged
RhysSullivan merged 10 commits into
mainfrom
health-verdict-revalidate
Aug 28, 2026
Merged

Revalidate stale connection health verdicts automatically#1708
RhysSullivan merged 10 commits 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

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@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 432e488 Commit Preview URL

Branch Preview URL
Aug 28 2026, 08:38 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 432e488 Aug 28 2026, 08:40 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: 432e488

@RhysSullivan
RhysSullivan marked this pull request as ready for review August 28, 2026 20:59
@RhysSullivan
RhysSullivan merged commit 515d6aa into main Aug 28, 2026
44 checks passed
@RhysSullivan RhysSullivan mentioned this pull request Aug 28, 2026
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