Skip to content

chore(deps): alchemy 2.0.0-beta.85 with provider-split migration - #893

Open
elliotBraem wants to merge 2 commits into
mainfrom
chore/alchemy-beta85
Open

elliotBraem wants to merge 2 commits into
mainfrom
chore/alchemy-beta85

Conversation

@elliotBraem

Copy link
Copy Markdown
Contributor

Deliberate, version-locked bump of Alchemy to 2.0.0-beta.85 (npm latest, 2026-11-02 — not the older next-tag beta.72). Ticket: fly-hosting/03.

Changelog findings (beta.84 + beta.85)

beta.84 enforced the provider-package split (#2244 + #2309/#2311/#2312/#2313/#2315/#2316/#2348). At beta.85 the core alchemy package ships only the engine (Deploy, AdoptPolicy, Artifacts, Drift, Alchemist, State, Stack, Stage, AlchemyContext, Output, RemovalPolicy, Interaction, …); every provider lives in a versioned @alchemy.run/* package at 2.0.0-beta.85 (docker, cloudflare, fly, neon, aws, gcp, railway, axiom, acme, better-auth, …).

Breaking changes that touch us:

  • alchemy/Docker and alchemy/Cloudflare are gone → the two in-repo consumers migrate:
    • hosting adapter (packages/everything-dev/src/services/hosting/docker.ts): alchemy/Docker → @alchemy.run/docker. Same namespace shape (Docker.Container, Docker.providers(), Docker.Docker) — one import line. API tests pass unchanged against a live Docker daemon.
    • infra CDN stack (infra/alchemy.run.ts): alchemy/Cloudflare → @alchemy.run/cloudflare. Resource FQNs survived the split unchanged (Cloudflare.R2.Bucket, Cloudflare.ApiToken.AccountApiToken, verified against beta.79 vs beta.85 .d.ts), so existing state stays readable.
  • Cloudflare.state options narrowed to workerName only (#2945) — ours passes no options; workerName remains optional (default alchemy-state-store), no change needed.
  • Other beta.84/85 breaking changes (AWS DynamoDB default state, Lambda batch responses, Cloudflare DNS nameservers.type, GCP SQL settings, GitHub ruleset props, Test.make → @alchemy.run/test) touch nothing we use — recorded in the evaluation notes.
  • Effect 4.1 required: alchemy beta.85's code imports effect/dist/crypto/Digest.js and dist/SemVer.js, which only Effect 4.1 ships (its peer range >=4.0.0-rc.115 || >=4.0.0 is looser than reality — a known packaging gap). The catalog moves effect / @effect/platform-node / @effect/platform-node-shared rc.118 → 4.1.4 in lockstep, plus everything-dev's hard deps, @effect/vitest, the prepare clone tag, and the vendored repos/effect clone (re-targeted to effect@4.1.4). Full monorepo typecheck is green on 4.1.4. Note: effect@4.1.4 published today — minimumReleaseAgeExclude records the deliberate pin against pnpm's supply-chain age policy; this PR is that review.

The exact pin plan

  • pnpm-workspace.yaml catalog: alchemy: 2.0.0-beta.85 (exact) and @alchemy.run/docker: 2.0.0-beta.85 (exact) — the one place.
  • packages/everything-dev: devDependency catalog: for both.
  • infra/package.json: alchemy + @alchemy.run/cloudflare at 2.0.0-beta.85 exact (infra is not a workspace member).
  • Peer range tightened >=2.0.0-beta.79 <3.0.0 → >=2.0.0-beta.85 <3.0.0 (plus a new optional peer @alchemy.run/docker >=2.0.0-beta.85 <3.0.0). Rationale: the provider split (beta.84) means code written against beta.85 (@alchemy.run/docker imports) cannot run on anything older; keeping the wide range would advertise a compatibility that doesn't exist. The split packages at pre-84 versions don't exist at all.

Test evidence

  • pnpm run typecheck — green (16 workspaces) on Effect 4.1.4.
  • pnpm run lint — green (Biome + Effect rules).
  • Hosting tests: hosting-adapter-docker + hosting-secrets-delivery — 9/9 passed, deploying real containers through alchemy beta.85 + @alchemy.run/docker against a live Docker daemon.
  • api/tests/reconciler-docker.test.ts — 1/1 passed (Docker daemon available).
  • cd infra && pnpm exec alchemy plan --stage production — the beta.85 CLI now runs (previously broken even on beta.79: it imports effect/dist/unstable/cli/Command.js, missing in rc.118 — the infra effect bump fixes that too). The run imports the migrated stack module, resolves services, and reaches "Loading stack state", then stops at:
    error: Failed to resolve Cloudflare credentials from profile 'default': Cloudflare OAuth refresh failed

Fly provider capability note (feeds ticket 07)

Verified against the installed @alchemy.run/fly@2.0.0-beta.85 .d.ts (full table appended to ticket 07):

  • Import path: @alchemy.run/fly — Fly.App, Fly.Machine, Fly.Service, Fly.Secret, Fly.Certificate, Fly.IpAssignment, Fly.Postgres, Fly.Sprite all present.
  • Suspend: YES, native. Machine.autostop?: "off" | "stop" | "suspend" | boolean — no post-deploy Machines-API call required. (Caveat from the provider docs: autostop only affects already-existing machines.)
  • Blue/green: deploy: { strategy: "bluegreen", healthTimeout } + shutdown — confirmed in lib/Deployment.d.ts; attached volumes force rolling (matches ticket 07's "no volumes by default").
  • Fly.Volume is not a public resource (low-level helpers only); volumes are Machine.mounts: DiskSpec { path, sizeGb, encrypted?, fstype? } via the MountVolume service.
  • Fly.Postgres: plan (basic = the ~$38/mo tier), volumeSizeGb (default 10), postgis — all create-only; migrations on deploy over the direct URI; outputs pooledConnectionUri + direct URI; org-private network.

Owner-verify items

  1. Infra plan zero-diff is credential-blocked: Cloudflare OAuth for profile default expired. Run alchemy profile refresh --profile default --provider Cloudflare (device code, browser), then cd infra && pnpm exec alchemy plan --stage production and confirm zero diff (FQN stability above makes it likely; a non-zero diff blocks repo-cleanup/12 and should stop the train).
  2. infra/pnpm install now errors ERR_PNPM_IGNORED_BUILDS for workerd's postinstall under pnpm 12's strict policy — the tree installs fine (workerd is only needed for alchemy dev, not plan); the committed infra/pnpm-workspace.yaml records the exclusion. If you'd rather build workerd, pnpm approve-builds in infra/.
  3. Deploy-time: api/build.config.ts externalizes alchemy + everything-dev/hosting/docker; the external hosting module now also imports @alchemy.run/docker, so the runtime image's node_modules must provide it wherever alchemy is provisioned today (the optional peer declares this).

Out of scope (recorded, not adopted)

Alchemist.plan/apply + Alchemist.Drift.scan/execute, state stores (Cloudflare/AWS-DynamoDB/GCP + custom Postgres), Neon, Fly Sprites, Railway, Better Auth, Axiom, ACME, alchemy dev/Worktrees — one paragraph each in docs/plans/notes/alchemy-beta85-evaluation.md.

alchemy 2.0.0-beta.85 (npm latest, 2026-11-02) — NOT the next-tag beta.72.
One catalog pin (exact), referenced from packages/everything-dev and infra.

beta.84 enforced the provider-package split: Docker/Cloudflare/Fly/... now
ship as @alchemy.run/* packages. Migrate the two in-repo consumers:
- hosting adapter: alchemy/Docker -> @alchemy.run/docker (same namespace:
  Docker.Container/providers()/Docker); new optional peer on
  @alchemy.run/docker; alchemy peer tightened to >=2.0.0-beta.85 <3.0.0
  (the split makes pre-84 unusable for this code)
- infra CDN stack: alchemy/Cloudflare -> @alchemy.run/cloudflare; resource
  FQNs unchanged (Cloudflare.R2.Bucket, Cloudflare.ApiToken.AccountApiToken)
  so existing state stays readable

alchemy beta.85 imports effect/dist/crypto/Digest.js (Effect 4.1-only):
catalog effect/@effect/platform-node/@effect/platform-node-shared move
rc.118 -> 4.1.4 in lockstep (everything-dev pins, @effect/vitest, prepare
clone tag, infra deps); vendored repos/effect clone re-targeted to
effect@4.1.4. minimumReleaseAgeExclude records the deliberate pin of the
fresh 4.1.4 releases (pnpm supply-chain policy).

Gates: typecheck green (16 workspaces), lint green, hosting tests 9/9 +
api reconciler-docker 1/1 against a live Docker daemon, infra alchemy plan
loads the stack and reaches the state store (credential-blocked on expired
Cloudflare OAuth — owner verify).

This branch has not been deployed

No deployments
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