Probe connection health through a per-connection atom - #2071
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 9ca6f34 | Commit Preview URL Branch Preview URL |
Sep 19 2026, 04:49 AM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 9ca6f34 | Sep 19 2026, 04:49 AM |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the client-side health-probe churn seen in production on 2026-09-18, and adds a browser scenario that reproduces it.
Symptom
One signed-in browser with many non-healthy connections sent hundreds of
/api/connections/.../healthPOSTs and/api/connectionsGETs per minute for as long as the dashboard stayed open. Most were aborted client-side, but hundreds per minute reached the server and upstreams. The server annotated every verdict as unchanged.Cause
checkConnectionHealthis one shared mutation atom.useAtomSet(..., { mode: "promiseExit" })callsregistry.setand then awaits that atom's next settled result. The health hook fires one probe per list row in a loop, so each call interrupts the previous one and every row's promise resolves with the last row's verdict. Rows compare a foreign verdict against their own persisted status, see a change, refresh the connections cache, and re-probe.Fix
checkConnectionHealthFor(address): anAtom.familyof per-connection probe atoms. The hooks set and await the connection's own atom, so each probe has its own fiber and its own result. Manual "Check now" keeps its reactivity keys.Evidence
e2e/scenarios/health-probe-churn.test.ts: 8 integrations, 4 with a probe that readsdegraded, 4 with none (unknown), verdicts persisted before the browser opens, one mount of the integrations list.connection-health-verdict.test.tsstill passes.🤖 Generated with Claude Code