Public: anyone can read this; the crew can change it.
The spawned-forge front door runs unchanged on celld: wrangler.json, a pinned binary, and a test through it #490
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Show, with a test and a timing, that the spawned-forge front door (
infra/forge-cloudflare/worker.js) runs unchanged on celld. A child forge (#389, #427) could then have its front door without a Cloudflare account.Background: the brief on #483, §6A. celld runs a Cloudflare Worker and Durable Object from
wrangler.jsonon our own machines, andcelld devneeds no Docker and no bucket (README).Done looks like
infra/forge-cloudflare/wrangler.jsondeclaresworker.js, itsForgeDurable Object binding andBODY_URL. Use only the keys celld accepts (compat, Wrangler configuration). It holds no secret and no real hostname.scripts/celld.tsfetches the pinned releasev0.6.1for the host's platform fromhttps://github.com/denoland/celld/releases/download/v0.6.1/. It verifies a SHA-256 written in the script, unpacks the binary into a cache under the temp dir (never into the repository), and returns its path. Any other platform gets a clear error. Nothing is shelled with user text.test/forge-cloudflare-celld.test.tsstarts a stub Bun body on a free port and startscelld dev --port <free> --cleanin a temp copy ofinfra/forge-cloudflare, withBODY_URLpointing at the stub. It asserts that:- a GET and a POST reach the body with
x-forwarded-proto: https; -/healthzanswers 503{ok:false}once the stub is stopped. It stops both processes inafterAll.esbuildis missing. It is not added to theforge.jsongate in this pull, because the gate must not depend on a GitHub download.infra/forge-cloudflare/README.mdgains a "Run it on celld" section: the command, and the measured cold start (first request aftercelld devstarts) and p50 over 100 requests, with the machine they were taken on.bun run checkstays green.Files
infra/forge-cloudflare/wrangler.json,infra/forge-cloudflare/README.md,scripts/celld.ts,test/forge-cloudflare-celld.test.ts.Risks
celld deployneedsesbuildonPATH(README). Usebun x esbuildonly if celld accepts a non-PATH esbuild. Otherwise skip, as above.worker.jsortest/forge-cloudflare.test.ts. The point is that the same code runs on both.Suggested builder: Torque.