Skip to content

Deflake concurrent health-check coalescing tests - #1844

Merged
RhysSullivan merged 1 commit into
mainfrom
deflake-credential-coalescing
Aug 29, 2026
Merged

Deflake concurrent health-check coalescing tests#1844
RhysSullivan merged 1 commit into
mainfrom
deflake-credential-coalescing

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

The three concurrent-coalescing tests in connections.test.ts forked their checks, slept 25ms of wall time, and then asserted how many probe or credential resolutions had started. Under parallel suite load the forked fibers can still be inside their row loads when the timer fires, so the counter reads 0 where 1 (or 2) is expected. The sleep was a timing assumption, not a synchronization point. Reproduced locally: 4 of 20 runs of the old test failed with "expected +0 to be 1" under CPU saturation.

The fix makes the ordering explicit. Each gated provider/probe now completes an entered Deferred on entry, right after it bumps the counter, and the test awaits that Deferred instead of sleeping. For the two-tenant gate-key test, the Deferred completes when the second probe arrives, so the await is the "both probes started" point; a collided gate never completes it and fails the test by timeout.

Assertions are unchanged: exactly one resolution (or two distinct probes), all concurrent callers served, zero plugin probes on the credential-only path. Test-only change.

Verified: connections suite 10x consecutively green, full sdk suite green, fixed tests green 12/12 under the same CPU load that flipped the old ones.

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@cloudflare-workers-and-pages

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 1b43089 Commit Preview URL

Branch Preview URL
Aug 29 2026, 07:13 AM

@cloudflare-workers-and-pages

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 1b43089 Aug 29 2026, 07:13 AM

@pkg-pr-new

pkg-pr-new Bot commented Aug 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

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

@executor-js/config

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

@executor-js/execution

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

@executor-js/sdk

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

@executor-js/codemode-core

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

@executor-js/runtime-quickjs

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

@executor-js/plugin-file-secrets

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

@executor-js/plugin-graphql

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

@executor-js/plugin-keychain

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

@executor-js/plugin-mcp

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

@executor-js/plugin-onepassword

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

@executor-js/plugin-openapi

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

executor

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

commit: 1b43089

@RhysSullivan
RhysSullivan marked this pull request as ready for review August 29, 2026 08:16
@RhysSullivan
RhysSullivan merged commit 9fa1e9f into main Aug 29, 2026
79 of 80 checks passed
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