celld: SMTP_PASSWORD is a copied secret, and cloudflare:sockets an allowed module
The SMTP transport and celld support merged separately, so main's celld test failed: SMTP_PASSWORD was missing from the secrets copied into the Worker, and smtp.ts imports cloudflare:sockets, which the test's module list didn't name. smtp.ts notes that celld provides it.
4 files changed+4−4
Files (4)
modifiedAGENTS.md+1−1View file
| @@ -58,7 +58,7 @@ | ||
| 58 | 58 | - **Keep it running on celld**, the open-source Workers runtime |
| 59 | 59 | (`apps/diffinery/docs/self-hosting/celld.md`). Make a binding celld lacks optional (and list it in |
| 60 | 60 | `CELLD_ABSENT_BINDINGS`), map any new `wrangler.jsonc` key in `scripts/celld-config.mjs`, and import only |
| 61 | - `cloudflare:workers`, `cloudflare:workflows` and the `node:` modules celld has. Never return a stream or a | |
| 61 | + `cloudflare:workers`, `cloudflare:workflows`, `cloudflare:sockets` and the `node:` modules celld has. Never return a stream or a | |
| 62 | 62 | `Response` from a Durable Object RPC method: stream through its `fetch()`. `test/unit/celld.test.ts` checks it. |
| 63 | 63 | - **D1 migrations** live in `apps/diffinery/migrations`. Use the next free number and never |
| 64 | 64 | edit a migration that has shipped. |
modifiedapps/diffinery/docs/self-hosting/celld.md+1−1View file
| @@ -55,7 +55,7 @@ | ||
| 55 | 55 | pnpm -r build |
| 56 | 56 | ``` |
| 57 | 57 | |
| 58 | -2. Create the Worker's secrets once and keep them. `celld deploy` has no secret store, so `scripts/celld-config.mjs` copies `MASTER_KEY`, `MASTER_KEY_PREV`, `OIDC_PRIVATE_KEY`, `MAIL_EVENTS_SECRET`, `TURNSTILE_SECRET`, `GITHUB_OAUTH_CLIENT_SECRET`, `SANDBOX_POOL_SECRET`, `GITHUB_APP_CLIENT_SECRET`, `GITHUB_APP_PRIVATE_KEY` and `GITHUB_APP_WEBHOOK_SECRET` from the environment into the Worker's variables. Never change `MASTER_KEY` once it is in use. | |
| 58 | +2. Create the Worker's secrets once and keep them. `celld deploy` has no secret store, so `scripts/celld-config.mjs` copies `MASTER_KEY`, `MASTER_KEY_PREV`, `OIDC_PRIVATE_KEY`, `MAIL_EVENTS_SECRET`, `TURNSTILE_SECRET`, `GITHUB_OAUTH_CLIENT_SECRET`, `SANDBOX_POOL_SECRET`, `GITHUB_APP_CLIENT_SECRET`, `GITHUB_APP_PRIVATE_KEY`, `GITHUB_APP_WEBHOOK_SECRET` and `SMTP_PASSWORD` from the environment into the Worker's variables. Never change `MASTER_KEY` once it is in use. | |
| 59 | 59 | |
| 60 | 60 | ```sh |
| 61 | 61 | export MASTER_KEY="$(openssl rand -base64 32)" |
modifiedapps/diffinery/test/unit/celld.test.ts+1−1View file
| @@ -56,7 +56,7 @@ | ||
| 56 | 56 | }); |
| 57 | 57 | |
| 58 | 58 | /** Built-in modules celld implements (its docs/cloudflare-compat.md); node:crypto and node:zlib only in part. */ |
| 59 | -const CELLD_MODULES = new Set(["cloudflare:workers", "cloudflare:workflows", ...["assert", "async_hooks", "buffer", "crypto", "diagnostics_channel", "events", "fs", "os", "path", "stream", "timers/promises", "util", "zlib"].map((m) => `node:${m}`)]); | |
| 59 | +const CELLD_MODULES = new Set(["cloudflare:workers", "cloudflare:workflows", "cloudflare:sockets", ...["assert", "async_hooks", "buffer", "crypto", "diagnostics_channel", "events", "fs", "os", "path", "stream", "timers/promises", "util", "zlib"].map((m) => `node:${m}`)]); | |
| 60 | 60 | |
| 61 | 61 | function sources(dir: string): string[] { |
| 62 | 62 | return readdirSync(dir).flatMap((f) => { |
modifiedscripts/celld-config.mjs+1−1View file
| @@ -51,7 +51,7 @@ | ||
| 51 | 51 | const CONTAINER_KEYS = ["class_name", "image", "name", "instance_type", "max_instances", "runtime"]; |
| 52 | 52 | |
| 53 | 53 | /** Secrets (`wrangler secret put` on Cloudflare) copied from the environment into `vars`. */ |
| 54 | -export const SECRETS = ["MASTER_KEY", "MASTER_KEY_PREV", "OIDC_PRIVATE_KEY", "MAIL_EVENTS_SECRET", "TURNSTILE_SECRET", "GITHUB_OAUTH_CLIENT_SECRET", "SANDBOX_POOL_SECRET", "GITHUB_APP_CLIENT_SECRET", "GITHUB_APP_PRIVATE_KEY", "GITHUB_APP_WEBHOOK_SECRET"]; | |
| 54 | +export const SECRETS = ["MASTER_KEY", "MASTER_KEY_PREV", "OIDC_PRIVATE_KEY", "MAIL_EVENTS_SECRET", "TURNSTILE_SECRET", "GITHUB_OAUTH_CLIENT_SECRET", "SANDBOX_POOL_SECRET", "GITHUB_APP_CLIENT_SECRET", "GITHUB_APP_PRIVATE_KEY", "GITHUB_APP_WEBHOOK_SECRET", "SMTP_PASSWORD"]; | |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * wrangler.jsonc as celld takes it. Returns the config and the bindings left out (`absent`), which |