Conversation
flamboh
added this pull request to stack #199
September 23, 2026 00:17
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tagium | 6e057b6 | Commit Preview URL Branch Preview URL |
Sep 23 2026, 04:09 AM |
Fly.Machine("Cobalt") shared the Fly.App logical id, so Alchemy returned the
existing app resource and never created any machines.
Fly reports the canonical org slug, so an alias such as FLY_ORG=personal never matched and every deploy replaced the Fly app with delete-first.
BuildKit's provenance attestation changes the image id on every build, so unchanged deploys re-pushed the image and rolled every Cobalt machine.
Rolling updates fail after Alchemy's fixed 60-second wait while Fly drains the old instance, so a deploy during a long tunnel errored. Blue/green retirement waits for the SIGTERM drain before destroying old machines.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
🤖 Claude Opus 5.5 on behalf of Oliver. Deploy-tested on a throwaway stage and torn down. Pins an unreleased Alchemy build and moves to Bun 1.4.2, so Workers Builds needs
BUN_VERSION=1.4.2before merge. Stacked on #198.ELI5
Each test copy of the site now also gets its own private Cobalt download server on Fly. Alchemy creates and deletes it along with everything else, so one command sets up or tears down the whole thing.
Why
Layer 3 of the Alchemy migration (#197 → #198 → this). Until now, previews shared production's Cobalt and its API key, and Cobalt was deployed separately with
flyctl. Alchemy'smainbranch now supports a 300 s graceful shutdown for Fly machines, which makes onealchemy deployfor Cloudflare and Fly possible.Implementation
mainpreview build4eae83e. That build only installs with Bun ≥ 1.4, sopackageManageris nowbun@1.4.2and the lockfile is regenerated. It swaps to the next npm beta once it ships.alchemy.run.ts:Fly.Appnamedtagium-cobalt-<stage>: nevertagium-cobalt, with a 30-character guard and prod stages refused. The org comes from the org-scoped token.Docker.Image, which buildsDockerfile.cobaltwith--provenance=false(so identical builds keep the same digest) and pushes it to the stage app's registry.Fly.Machine, running the image by digest. It mirrorsfly.cobalt.toml: lax, 1 GB shared, suspend when idle, the/readyzcheck, andSIGTERMwith a 300 s drain.shutdown.timeout.)data:URL keys file withAPI_AUTH_REQUIRED=1. The Worker gets the same key, andCOBALT_API_URLcomes from the Fly app's URL. Previews no longer depend on production'sCOBALT_API_KEY.preview.yamlneeds aFLY_PREVIEW_API_TOKENsecret (org-scoped) and gets Docker from the runner. It logs in toregistry.fly.io, because the base image lives in production's registry.fly.cobalt.tomland theci.yamlCobalt jobs) and production Cloudflare.Review
CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_IDand an org-scopedFLY_API_TOKENin your env.echo "$FLY_API_TOKEN" | docker login registry.fly.io -u x --password-stdinbun run alchemy:deploy --stage dev-you --yesbun run alchemy:destroy --stage dev-you --yesremoves the Fly app too.dev-layer3(2 machines):/readyzare healthy. Requests without the key →error.api.auth.key.missing.error.api.content.video.unavailablefrom Fly IPs, identical to production tagium.app.tagium-cobalt(machine, image, instance) was untouched.FLY_ORG=personaldidn't match Fly's canonical org slug, so Alchemy replaced the app on every deploy. TheFLY_ORGvariable is removed.cobalt-machine-proxy.mjsis unchanged frommain, so production has the same behavior. Real imports go through the Worker, which reads at full speed.vp check(0 errors),bun run typecheck,vp test(661) andvp buildpass.BUN_VERSION=1.4.2in Workers Builds, or wait for beta.80 and drop the Bun bump.Claude Opus 5.5 · Claude Code (T3 Code)