Skip to content

fix(cloudflare): provide worker env to do methods - #369

Merged
sam-goodwin merged 1 commit into
alchemy-run:mainfrom
dmmulroy:fix/do-method-worker-environment
May 18, 2026
Merged

fix(cloudflare): provide worker env to do methods#369
sam-goodwin merged 1 commit into
alchemy-run:mainfrom
dmmulroy:fix/do-method-worker-environment

Conversation

@dmmulroy

Copy link
Copy Markdown
Contributor

Provide WorkerEnvironment when DurableObjectNamespace wraps returned method Effects.

const provideRuntimeServices = (effect) =>
  effect.pipe(
    Effect.provideService(DurableObjectState, doState),
    Effect.provideService(WorkerEnvironment, env),
  );

Adds a regression fixture where a Durable Object method calls KVNamespaceClient directly.

Fixes #368.

Attribution: Pi GPT5.5 on high, guided by Dillon Mulroy dillon@cloudflare.com.

Attribution: Pi GPT5.5 on high, guided by Dillon Mulroy <dillon@cloudflare.com>.
@john-royal
john-royal requested a review from sam-goodwin May 18, 2026 17:45
@sam-goodwin
sam-goodwin merged commit 7b5be8b into alchemy-run:main May 18, 2026
@dmmulroy
dmmulroy deleted the fix/do-method-worker-environment branch May 19, 2026 12:41
sam-goodwin added a commit that referenced this pull request Jul 18, 2026
Resolves conflicts from the distilled #369 merge landing on main; bumps
the distilled submodule to distilled main (a945d874c) and initializes
the new cloudflare-tools submodule from main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DavidJFelix pushed a commit to DavidJFelix/alchemy-effect that referenced this pull request Aug 7, 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.

Durable Object method Effects lose WorkerEnvironment

2 participants