Skip to content

chore(test): widen RpcHttp warmup retry budgets for slow DO binding propagation - #958

Merged
sam-goodwin merged 1 commit into
mainfrom
claude/laughing-elbakyan-bc288e
Jul 27, 2026
Merged

sam-goodwin merged 1 commit into
mainfrom
claude/laughing-elbakyan-bc288e

Conversation

@sam-goodwin

Copy link
Copy Markdown
Member

In a full-suite test/Cloudflare/Workers run, RpcHttp.test.ts's shared beforeAll failed once with ~effect/rpc/RpcClientError: HttpError, cascading to all 10 tests. The failing run's log shows the error was created in the RPC client's Defect-message branch: while the worker→DO namespace binding is still propagating, the worker's internal DO client fails with HttpError, the fixture's Effect.orDie turns it into a server-sent defect, and the client kills the pending call with it.

The warmup gate already promoted those defects and retried (retryReadyN(15)), but that is only ~40s of capped backoff — under full-suite parallel load the propagation window outlasted it and the 16th failure escaped the hook.

-        yield* client.PingDO({ message: "warmup" }).pipe(retryReady);
-        yield* client.CountDO({ upto: 1 }).pipe(Stream.runCollect, retryReady);
+        yield* client.PingDO({ message: "warmup" }).pipe(retryReadyN(40));
+        yield* client
+          .CountDO({ upto: 1 })
+          .pipe(Stream.runCollect, retryReadyN(40));
  • DO-pathway warmup budget: 15 → 40 attempts (~2 min of 3s-capped backoff)
  • The plain Ping warmup now also goes through retryReadyN(20) instead of a bare Effect.retry, so a defect on that path can't escape unretried either
  • beforeAll timeout: 180s → 300s so deploy + worst-case warmup fits

A plain HTTP readiness probe was considered and rejected: the workers.dev placeholder serves HTTP 200, so only the RPC-level warmup proves the pathway works. All retries stay bounded on the existing defect-promoting combinators.

Verified: timeout 400 bun run test test/Cloudflare/Workers/RpcHttp.test.ts --profile testing — 10/10 pass (87s); bun tsc -b clean.

🤖 Generated with Claude Code

…can't fail the whole file

Under full-suite load the worker->DO namespace binding can take longer to
propagate than the beforeAll gate's ~40s defect-promoting retry budget
(retryReadyN(15)); the 16th server-sent HttpError defect escaped the hook
and cascaded to all 10 tests. Bump the DO-pathway warmup to retryReadyN(40)
(~2 min of capped backoff), route the plain Ping warmup through
retryReadyN(20) so defects on that path are retried too, and raise the
beforeAll timeout to 300s.

Co-Authored-By: Claude Fable 5 <[email protected]>
@sam-goodwin sam-goodwin changed the title fix(test): widen RpcHttp warmup retry budgets for slow DO binding propagation chore(test): widen RpcHttp warmup retry budgets for slow DO binding propagation Jul 27, 2026
@sam-goodwin
sam-goodwin merged commit c2e1971 into main Jul 27, 2026
4 checks passed
@sam-goodwin
sam-goodwin deleted the claude/laughing-elbakyan-bc288e branch July 27, 2026 18:12
@alchemy-version-bot

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

alchemy

bun add alchemy@https://pkg.ing/alchemy/a52c67e

@alchemy.run/better-auth

bun add @alchemy.run/better-auth@https://pkg.ing/@alchemy.run/better-auth/a52c67e

@alchemy.run/pr-package

bun add @alchemy.run/pr-package@https://pkg.ing/@alchemy.run/pr-package/a52c67e

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