Skip to content

fix: migrate to effect 4.0.0-beta.97 Schedule/Config APIs#370

Merged
sam-goodwin merged 3 commits into
mainfrom
claude/effect-beta-97
Jul 10, 2026
Merged

fix: migrate to effect 4.0.0-beta.97 Schedule/Config APIs#370
sam-goodwin merged 3 commits into
mainfrom
claude/effect-beta-97

Conversation

@sam-goodwin

@sam-goodwin sam-goodwin commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Migrate to the Schedule/Config APIs in effect@4.0.0-beta.97 (beta.94–97 removed Schedule.either, Schedule.both, and Schedule.tapOutput, breaking downstream consumers — see the TypeError: Schedule.either is not a function report against alchemy).

- schedule: Schedule.spaced("1 second").pipe(
-   Schedule.both(Schedule.recurs(10)),
- ),
+ schedule: Schedule.max([
+   Schedule.spaced("1 second"),
+   Schedule.recurs(10),
+ ]),
  • Schedule.either(a, b)Schedule.min([a, b]) (union: recur while any recurs, shortest delay)
  • Schedule.both(a, b)Schedule.max([a, b]) (intersection: recur while all recur, longest delay)
  • Schedule.tapOutput(f)Schedule.tap(f) — the callback now receives schedule Metadata; attempt is 1-based (the old recurs output was 0-based), so (attempt + 1) * 10 becomes attempt * 10
  • Schedule.modifyDelay callbacks now receive Metadata instead of the delay: (duration) => ...({ duration }) => ...
  • The new default ConfigProvider caches env reads, so readServerRetryHintCapMsFromEnv / resolveServerRetryHintCapMs now provide a fresh ConfigProvider.fromEnv() per read to keep observing the current process.env

Toolchain

  • Bump the effect catalog floor from beta.66 to beta.97 and refresh bun.lock — the repo previously resolved effect@4.0.0-beta.66, which is why CI failed on the new Schedule APIs
  • Extend minimumReleaseAgeExcludes with fast-check (new effect dependency) and the @effect/platform-* packages
  • Remove noCheck from the gcp and azure tsconfigs; aws and cloudflare were verified to type-check clean against beta.97 but keep noCheck intentionally — full checking is too heavy for those generated codebases as a routine build step

🤖 Generated with Claude Code

effect 4.0.0-beta.94–97 removed Schedule.either/Schedule.both/Schedule.tapOutput:

- Schedule.either(a, b) -> Schedule.min([a, b])
- Schedule.both(a, b) -> Schedule.max([a, b])
- Schedule.tapOutput(f) -> Schedule.tap(f) with Metadata callback ({ attempt } is 1-based)
- Schedule.modifyDelay callbacks now receive Metadata instead of the bare delay Duration

Also provide a fresh ConfigProvider.fromEnv() in readServerRetryHintCapMsFromEnv / resolveServerRetryHintCapMs since the new default ConfigProvider caches env reads.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alchemy-version-bot

alchemy-version-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

@distilled.cloud/core

bun add @distilled.cloud/core@https://pkg.distilled.cloud/core/4a00825

@distilled.cloud/aws

bun add @distilled.cloud/aws@https://pkg.distilled.cloud/aws/4a00825

@distilled.cloud/axiom

bun add @distilled.cloud/axiom@https://pkg.distilled.cloud/axiom/4a00825

@distilled.cloud/azure

bun add @distilled.cloud/azure@https://pkg.distilled.cloud/azure/4a00825

@distilled.cloud/cloudflare

bun add @distilled.cloud/cloudflare@https://pkg.distilled.cloud/cloudflare/4a00825

@distilled.cloud/coinbase

bun add @distilled.cloud/coinbase@https://pkg.distilled.cloud/coinbase/4a00825

@distilled.cloud/expo-eas

bun add @distilled.cloud/expo-eas@https://pkg.distilled.cloud/expo-eas/4a00825

@distilled.cloud/fly-io

bun add @distilled.cloud/fly-io@https://pkg.distilled.cloud/fly-io/4a00825

@distilled.cloud/gcp

bun add @distilled.cloud/gcp@https://pkg.distilled.cloud/gcp/4a00825

@distilled.cloud/kubernetes

bun add @distilled.cloud/kubernetes@https://pkg.distilled.cloud/kubernetes/4a00825

@distilled.cloud/mongodb-atlas

bun add @distilled.cloud/mongodb-atlas@https://pkg.distilled.cloud/mongodb-atlas/4a00825

@distilled.cloud/neon

bun add @distilled.cloud/neon@https://pkg.distilled.cloud/neon/4a00825

@distilled.cloud/planetscale

bun add @distilled.cloud/planetscale@https://pkg.distilled.cloud/planetscale/4a00825

@distilled.cloud/posthog

bun add @distilled.cloud/posthog@https://pkg.distilled.cloud/posthog/4a00825

@distilled.cloud/prisma-postgres

bun add @distilled.cloud/prisma-postgres@https://pkg.distilled.cloud/prisma-postgres/4a00825

@distilled.cloud/stripe

bun add @distilled.cloud/stripe@https://pkg.distilled.cloud/stripe/4a00825

@distilled.cloud/supabase

bun add @distilled.cloud/supabase@https://pkg.distilled.cloud/supabase/4a00825

@distilled.cloud/turso

bun add @distilled.cloud/turso@https://pkg.distilled.cloud/turso/4a00825

@distilled.cloud/typesense

bun add @distilled.cloud/typesense@https://pkg.distilled.cloud/typesense/4a00825

@distilled.cloud/workos

bun add @distilled.cloud/workos@https://pkg.distilled.cloud/workos/4a00825

sam-goodwin and others added 2 commits July 10, 2026 09:13
The standalone repo still resolved effect@4.0.0-beta.66, so CI failed on the
beta.97 Schedule APIs that the parent workspace already compiles against.

- bump the effect catalog floor from beta.66 to beta.97 and refresh bun.lock
- extend minimumReleaseAgeExcludes with fast-check and the @effect/* platform
  packages so the fresh effect resolves
- remove "noCheck": true from aws/cloudflare/gcp/azure tsconfigs so tsgo
  actually type-checks those packages again
- oxfmt drift in aws/src/hash from the refreshed toolchain

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both packages were verified to type-check clean against effect@4.0.0-beta.97,
but full checking is too heavy for these generated codebases as a routine
build step. gcp and azure stay checked.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sam-goodwin sam-goodwin merged commit da355da into main Jul 10, 2026
35 of 43 checks passed
@sam-goodwin sam-goodwin deleted the claude/effect-beta-97 branch July 10, 2026 16:20
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