diff --git a/.github/workflows/baseline.yml b/.github/workflows/baseline.yml index 7956f83..0446365 100644 --- a/.github/workflows/baseline.yml +++ b/.github/workflows/baseline.yml @@ -95,12 +95,13 @@ jobs: set -euo pipefail orun --version # Inputs that are `required: true` must be supplied for the document - # to resolve; the values are arbitrary and nothing is written. + # to resolve; the values are arbitrary and nothing is written. No + # domain: the console asks for none, so the document must resolve + # without one. orun new --blueprint repo-blueprint.yaml --status \ --out "$(mktemp -d)" \ --set reponame=acme-cloud \ --set "productname=Acme Cloud" \ - --set productdomain=acme.dev \ --set githuborg=acme-inc # Tier 1's leak gate. It derives what every phase WOULD place and gates # that set — so it needs orun, which is why it rides this job rather than diff --git a/BOOTSTRAP.md b/BOOTSTRAP.md index 44e4ccb..d679114 100644 --- a/BOOTSTRAP.md +++ b/BOOTSTRAP.md @@ -83,7 +83,7 @@ cd lumen orun new --blueprint repo-blueprint.yaml \ --out ~/sourceplane/acme --run-hooks --resume \ --set reponame=acme --set productname="Acme Cloud" \ - --set productdomain=acme.dev --set githuborg=sourceplane \ + --set githuborg=sourceplane \ --set orunWorkspace=ws_XXXXXXXX \ --set subdomain= ``` @@ -99,6 +99,17 @@ never asks for it: the platform reads it from the workspace's Cloudflare connection, the same one the deploy tokens mint from. Only a hand-run build like this one passes it. +**No domain is asked.** The blueprint's required inputs are `reponame`, +`productname` and `githuborg`; the domain is not one of them. The product +goes live on workers.dev, and `productdomain` defaults to empty, which brands +the reserved placeholder `.example.com` wherever the domain goes +(intent's `BASE_DOMAIN` and `CONSOLE_CUSTOM_DOMAIN`, the edge and identity +console origins, the mail sender, the billing return URLs) for an owner to +replace later (§4). With no domain the CLI's default API is the product's own +prod edge, `https://-api-edge-prod..workers.dev`. Pass +`--set productdomain=` only for a product that already has its domain; the +CLI then defaults to `https://api.`. + **`--run-hooks` is the difference between placing files and bootstrapping a product.** Without it `orun new` writes the tree and stops: no repo is created, nothing is landed, no convergence is watched, and no phase probes @@ -130,7 +141,7 @@ phase in that folder. orun new --blueprint repo-blueprint.yaml --out ~/sourceplane/acme --run-hooks \ --phase 01-scaffold \ --set reponame=acme --set productname="Acme Cloud" \ - --set productdomain=acme.dev --set githuborg=sourceplane \ + --set githuborg=sourceplane \ --set orunWorkspace=ws_XXXXXXXX --set subdomain= # 01 committed the answers as .rebrand/values.json, keyed by the blueprint's @@ -263,9 +274,13 @@ What that means for a console build: - `reponame` and `githuborg` come from the repository the operator picked; `subdomain` from the workspace's Cloudflare connection (`from: connection.cloudflare.workersSubdomain` — the connection the build - is bound to, so it names the account the deploy tokens mint from); - `apibaseurl` is derived (`https://api.{productdomain}`); only - `productname` and `productdomain` are typed. + is bound to, so it names the account the deploy tokens mint from); only + `productname` is typed. +- No domain is asked. `productdomain` and `apibaseurl` (which the card + derived from it, and a card can only derive from inputs it declares) left + the card in baseline-v30: the product is born with the placeholder + `.example.com` where the domain goes, and its CLI defaults to its + own prod edge on workers.dev. An owner sets the domain later (§4). - `orunWorkspace` is not on the form — it cannot be. The build runs inside the workspace, and `from: workspace` (orun ≥ v2.58.11) fills it from there. - There is no `domain` input. The custom-domain component lands in @@ -283,7 +298,11 @@ that mint them, and its programme and inputs to the blueprint's. - **Deployment record**: `08-docs` is the close-out, and safe to re-run any time as a live-state refresh. -- **Custom domain**: the `cloudflare-domain` component is already in the +- **Custom domain**: a product built without one carries the placeholder + `.example.com` wherever the domain goes; replacing it + (`git grep -l .example.com`) is the first step, and the + product's `ai/context/operations.md`, "Setting the domain later", lists + every place and step. The `cloudflare-domain` component is already in the product, landed by `06-console`: parked (it subscribes to no environment) and mid-migration to provider v5. Create the product zone in Cloudflare, finish the v5 resource and restore the component's @@ -360,7 +379,7 @@ purpose, written down so they read as instructions rather than breakage. | `unknown flag: --phase`, `cannot unmarshal !!map into []scaffold.Hook`, or an action `has no parameter "githubOwner"` / `"sha"` | The CLI is below the v2.58.11 floor. This blueprint is not readable by an older one. | | A fresh build stops before 01-scaffold: `✕ phase "04-workers" precondition "wiring" is not met: … project "" not found` | The CLI is below v2.58.10, which asks the preflight about the product's project before phase 01 has created it and calls the answer a failure. Upgrade; the probe is then deferred to phase 04. | | The product's `intent.yaml` says `workspace: ws_SET_ME`, or its secret refs name the repository (`secret:///…`) | `orunWorkspace` was empty: set it, or run the build in the workspace (ORUN_WORKSPACE) with a CLI ≥ v2.58.11, which fills it from there. | -| `✕ input "productdomain" is required` | Required inputs are validated before anything else, so this names the key nobody typed. All four — `reponame`, `productname`, `productdomain`, `githuborg` — must be set on every invocation, including single-phase ones. `--values /.rebrand/values.json` carries them. | +| `✕ input "productname" is required` | Required inputs are validated before anything else, so this names the key nobody typed. All three — `reponame`, `productname`, `githuborg` — must be set on every invocation, including single-phase ones. `--values /.rebrand/values.json` carries them. The domain is not required (a baseline before v30 asked for `productdomain` too). | | Console/edge smoke fails right after the FIRST deploy of a worker | workers.dev route propagation race — the deploy lane's smoke retries with backoff (stack-tectonic ≥ 0.18.2); a convergence resume clears older pins. | | Terraform lane: "state already locked" by ITS OWN plan | Backend lock-release race — a convergence resume clears it. | | Lanes fail with NO logs at all | GitHub Actions billing or spending limit. The message lives only in the check-run annotations (`gh api repos///check-runs//annotations`). | diff --git a/ai/context/operations.md b/ai/context/operations.md index 439886f..ab407fe 100644 --- a/ai/context/operations.md +++ b/ai/context/operations.md @@ -113,7 +113,7 @@ orun integrations list --org --json && orun cloud check --org | add a runtime secret | `orun secrets set --org --env ` | | resolve workspace identity | `orun workspace ` | | check integrations | `orun integrations list --org --json` | -| custom domain | `infra/terraform/cloudflare-domain` ships parked (`subscribe.environments: []`). Once the zone exists in the Cloudflare account, finish the provider-v5 resource and restore the `subscribe` block its `component.yaml` carries commented out, merge, then run the `08-docs` phase | +| custom domain | see [Setting the domain later](#setting-the-domain-later): replace the domain string, create the zone, restore `infra/terraform/cloudflare-domain`'s commented-out `subscribe` block (it ships parked, `subscribe.environments: []`, mid-way to provider v5), merge, then run the `08-docs` phase | | headless/CI credentials | `ORUN_TOKEN` (workspace-scoped) + `GITHUB_TOKEN` | The ops phases (docs refresh and the original deployment sequence) all @@ -129,12 +129,65 @@ orun new --blueprint repo-blueprint.yaml --out \ ``` `` carries this product's identity — at minimum `reponame`, -`productname`, `productdomain`, `githuborg` and `orunWorkspace`, which the -blueprint validates before anything runs. `--run-hooks` is what makes a phase +`productname`, `githuborg` and `orunWorkspace`, which the blueprint validates +before anything runs (and `productdomain` once the product has a domain); +`.rebrand/values.json` in this repository is a complete one. `--run-hooks` is what makes a phase land and verify rather than just place files; `--status` previews without writing. Every phase is idempotent — re-running a completed one is a no-op that re-verifies. +## Setting the domain later + +This product answers on workers.dev from its first deploy, and it was built +without a domain. Every place the domain goes carries one string until an +owner sets it — in this repository, `lumen.app` (built without a domain, that +is the reserved placeholder `.example.com`, which can never be +anyone's real domain). Nothing that uses the domain was removed; it waits: + +| where | what it is | +|---|---| +| `intent.yaml` | `BASE_DOMAIN` (every environment) and `CONSOLE_CUSTOM_DOMAIN` (`stage.lumen.app`, `prod.lumen.app`) — the parameters of the parked `infra/terraform/cloudflare-domain` | +| `infra/terraform/cloudflare-domain` | `baseDomain` in its `component.yaml`, the Terraform variable's default, its README | +| `apps/api-edge/wrangler.template.jsonc` | `CONSOLE_CUSTOM_DOMAIN`, the console origin CORS allows besides the workers.dev one | +| `apps/identity-worker/wrangler.template.jsonc` | `OAUTH_ALLOWED_CONSOLE_ORIGINS`, which lists the workers.dev console too, so sign-in works without a domain | +| `apps/notifications-worker/wrangler.template.jsonc` | `EMAIL_FROM_ADDRESS`, `no-reply@mail.lumen.app` | +| `apps/billing-worker/wrangler.template.jsonc` | `POLAR_SUCCESS_URL`, the fallback return after checkout | +| `tests/api-edge` | the CORS fixtures, which follow the edge's config | + +To set it, in one PR: + +1. **Replace the string everywhere**, and record the domain as + `productdomain` in `.rebrand/values.json`, where the docs refresh reads + it: + + ```bash + git grep -lF 'lumen.app' # every file that names it + git grep -lzF 'lumen.app' | xargs -0 perl -pi -e 's/\Qlumen.app\E/acme.dev/g' # acme.dev: yours + ``` + +2. **Create the zone** in the Cloudflare account the product deploys into + (dashboard; the platform does not create zones), then restore the + `subscribe` block `infra/terraform/cloudflare-domain/component.yaml` + carries commented out, and finish the provider-v5 custom-domain resource + its comments describe. Until then the console has no custom domain and + keeps its workers.dev URL. +3. **Verify the mail domain** — `mail.` in Cloudflare Email + Service (DKIM/SPF). The notifications worker sends from + `no-reply@mail.`; until it is verified, sends surface as + `notification.failed` events and nothing else breaks. +4. **Supabase auth URLs.** This product sets none: sign-in is the identity + worker's, and `infra/terraform/supabase` names no domain. If you have + since set Supabase Auth's site URL or redirect URLs in its dashboard, + point them at the domain too. +5. **The CLI default, if you want it on the domain.** Built without a + domain, `DEFAULT_API_URL` in `packages/cli/src/brand.ts` is the prod edge + on workers.dev, `https://lumen-api-edge-prod..workers.dev`; + replacing the domain string does not move it. Re-point it once a host on + your domain routes to the edge. +6. **Merge, then run the docs flow** (the `08-docs` phase, above) once the + convergence is green and DNS resolves, so `deployment.md` records the + domain. + ## Evolution Structural changes (new workers, infra components, packages) follow the diff --git a/blueprint.yaml b/blueprint.yaml index 20682b4..678080c 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -61,6 +61,18 @@ spec: # The cost lands here. An `askedBy: agent` input was exempt from `pattern`, # because prose asked for it and prose does not validate. Every input now # carries the rule its value is checked against before Continue. + # + # THE DOMAIN IS NOT ASKED. The product goes live on workers.dev, and a + # domain is an owner's step after the bootstrap: `productdomain` defaults + # to empty in repo-blueprint.yaml, and the rebrand writes the reserved + # placeholder `.example.com` wherever the domain goes (intent's + # BASE_DOMAIN and CONSOLE_CUSTOM_DOMAIN, the edge and identity origins, the + # mail sender, the billing return URLs) for the product's + # ai/context/operations.md, "Setting the domain later", to replace. Nothing + # that needs a domain is removed — it waits for one. `apibaseurl` went with + # it: it was derived from `{productdomain}`, and a card can only derive + # from inputs it declares. With no domain, the CLI's default API is the + # product's own prod edge on workers.dev (rebrand.mjs). - key: reponame label: Repo name pattern: "^[a-z][a-z0-9-]{1,38}$" @@ -75,19 +87,6 @@ spec: pattern: "^[A-Za-z0-9][A-Za-z0-9 .,'&-]{1,48}$" help: The name people will see — in the console header, the emails, the docs. example: Acme Cloud - - key: productdomain - label: Product domain - pattern: "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$" - help: The apex domain the product answers on. It does not need to exist yet. - example: acme.dev - - key: apibaseurl - label: API base URL - pattern: "^https://[a-z0-9.-]+$" - help: Where the CLI and SDK point by default. - # Derived rather than asked: it is the product domain with a prefix, and - # a field for it is a field an operator can get subtly wrong (http, a - # trailing slash, api. on the wrong half) for no gain. - derive: "https://api.{productdomain}" - key: githuborg label: GitHub organisation pattern: "^[A-Za-z0-9][A-Za-z0-9-]*$" diff --git a/docs/phases/01-scaffold.md b/docs/phases/01-scaffold.md index c0b2e3f..f036864 100644 --- a/docs/phases/01-scaffold.md +++ b/docs/phases/01-scaffold.md @@ -44,11 +44,11 @@ gates the set, so the promise is a test rather than a claim. | `--out` | `$HOME/sourceplane/acme` | a flag, not an input; created if absent | | `reponame` | `acme` | REQUIRED. Lowercase slug (`^[a-z][a-z0-9-]*$`); repo becomes `/` | | `productname` | `Acme Cloud` | REQUIRED. Display name | -| `productdomain` | `acme.dev` | REQUIRED. Product domain | +| `productdomain` | — (default empty) | NOT ASKED. Empty brands the placeholder `.example.com` where the domain goes, for an owner to replace later; pass it only for a product that already has its domain | | `githuborg` | `sourceplane` | REQUIRED. The org or user the repo is created under | | `orunWorkspace` | `ws_ABCD1234` | workspace id. Unset, the workspace the build runs in (ORUN_WORKSPACE); with none anywhere, the placeholder `ws_SET_ME` | | `subdomain` | `rahulvarghesepullely` | workers.dev subdomain of the Cloudflare account you deploy into — every URL derives from it (worker names are brand-prefixed, so keeping the baseline's account is supported). A console or `--from bst_…` build reads it from the Cloudflare connection; pass it only for a hand-run build | -| `apibaseurl` | `https://api.acme.dev` | CLI default API base; empty derives from `productdomain` | +| `apibaseurl` | — (default empty) | CLI default API base; empty derives `https://api.`, or with no domain the prod edge, `https://-api-edge-prod..workers.dev` | | `repoPrivate` | `true` (default) | visibility at creation only | | `epicSlug` | `infra-baselining` (default) | the epic every phase files its task under | @@ -149,7 +149,6 @@ orun new --blueprint repo-blueprint.yaml \ --out $HOME/sourceplane/acme --run-hooks --phase 01-scaffold \ --set reponame=acme \ --set productname="Acme Cloud" \ - --set productdomain=acme.dev \ --set githuborg=sourceplane \ --set orunWorkspace=ws_ABCD1234 \ --set subdomain=rahulvarghesepullely diff --git a/docs/phases/02-foundation.md b/docs/phases/02-foundation.md index 63ee054..7c4c3e8 100644 --- a/docs/phases/02-foundation.md +++ b/docs/phases/02-foundation.md @@ -20,7 +20,7 @@ applies them yet: the migration runner (`infra/db-migrate`) lands in ## Inputs `--out` is the product repo. The blueprint's required inputs — `reponame`, -`productname`, `productdomain`, `githuborg` — are validated before any phase +`productname`, `githuborg` — are validated before any phase runs, so pass them on every invocation; the product's own `.rebrand/values.json` is a complete values file. See [the phases README](README.md#inputs). diff --git a/docs/phases/04-workers.md b/docs/phases/04-workers.md index da903f8..97ccc1c 100644 --- a/docs/phases/04-workers.md +++ b/docs/phases/04-workers.md @@ -64,7 +64,7 @@ PRs and two task contracts, are two phases here. ## Inputs `--out` is the product repo. The blueprint's required inputs — `reponame`, -`productname`, `productdomain`, `githuborg` — are validated before any phase +`productname`, `githuborg` — are validated before any phase runs, so pass them on every invocation; the product's own `.rebrand/values.json` is a complete values file. See [the phases README](README.md#inputs). diff --git a/docs/phases/05-edge.md b/docs/phases/05-edge.md index db422d5..c602cd5 100644 --- a/docs/phases/05-edge.md +++ b/docs/phases/05-edge.md @@ -28,7 +28,7 @@ own deploy lane in phase 04 is the evidence for it. ## Inputs `--out` is the product repo. The blueprint's required inputs — `reponame`, -`productname`, `productdomain`, `githuborg` — are validated before any phase +`productname`, `githuborg` — are validated before any phase runs, so pass them on every invocation; the product's own `.rebrand/values.json` is a complete values file. See [the phases README](README.md#inputs). diff --git a/docs/phases/06-console.md b/docs/phases/06-console.md index bf1dcdb..c2570b1 100644 --- a/docs/phases/06-console.md +++ b/docs/phases/06-console.md @@ -23,8 +23,10 @@ moves with them. custom domain per environment for the console worker (`CONSOLE_CUSTOM_DOMAIN` in the product's `intent.yaml`: `stage.` and `prod.` after rebrand, empty for -`dev`) — lands with the console and **deploys nothing**, for two reasons -that live in the component rather than in the phase: +`dev` — and, since the console asks for no domain, `` is the +placeholder `.example.com` until an owner sets one) — lands with +the console and **deploys nothing**, for two reasons that live in the +component rather than in the phase: 1. **It ships parked.** Its `component.yaml` declares `subscribe.environments: []`, so CI plans no lanes for it. The product @@ -42,7 +44,11 @@ green run with nothing in it — so the phase and the switch are gone, and this phase's task contract leaves the component out of `affects`: there is nothing in it to re-plan. -Wiring it is a normal pull request in the product, once the zone exists: +Wiring it is a normal pull request in the product, once the zone exists. +The product's `ai/context/operations.md` ("Setting the domain later") carries +the whole list for its owner: replace the placeholder everywhere it stands +(`git grep -l .example.com` — intent, the edge and identity console +origins, the mail sender, the billing return URLs), then: 1. **The zone first.** The product zone (e.g. `acme.dev`) must already exist in the Cloudflare account the product deploys into, created in the @@ -62,7 +68,7 @@ Wiring it is a normal pull request in the product, once the zone exists: ## Inputs `--out` is the product repo. The blueprint's required inputs — `reponame`, -`productname`, `productdomain`, `githuborg` — are validated before any phase +`productname`, `githuborg` — are validated before any phase runs, so pass them on every invocation; the product's own `.rebrand/values.json` is a complete values file. See [the phases README](README.md#inputs). diff --git a/docs/phases/08-docs.md b/docs/phases/08-docs.md index c84555f..4e28d5b 100644 --- a/docs/phases/08-docs.md +++ b/docs/phases/08-docs.md @@ -29,9 +29,10 @@ this credential" rather than a failed render. 2. **pre** — the phase's task. 3. **render** — a `post` hook runs `hooks/render-deployment-docs.sh . ` from the baseline checkout. It reads identity from - `.rebrand/values.json`, probes the four public URLs (and - `api./health` and `app.`, reported as - pending when they do not answer), lists secrets and integrations by name + `.rebrand/values.json`, probes the four public URLs (and, when that file + records a domain, `api./health` and `app.`, + reported as pending when they do not answer — a product built without a + domain records none, so they are skipped), lists secrets and integrations by name with `orun secrets list` / `orun integrations list`, and renders the files above. It refuses to finish if a `TBD_08DOCS` placeholder survives. 4. **land** — `orun.pr/land@v1`: PR `docs(deployment): record live @@ -56,7 +57,7 @@ this credential" rather than a failed render. ## Inputs `--out` is the product repo. The blueprint's required inputs — `reponame`, -`productname`, `productdomain`, `githuborg` — are validated before any phase +`productname`, `githuborg` — are validated before any phase runs, so pass them on every invocation; the product's own `.rebrand/values.json` is a complete values file. The renderer also takes `orunWorkspace`, which that file records. See diff --git a/docs/phases/README.md b/docs/phases/README.md index fb1fca8..b12ef4d 100644 --- a/docs/phases/README.md +++ b/docs/phases/README.md @@ -74,10 +74,10 @@ same words. |---|---|---| | `reponame` | yes | lowercase slug (`^[a-z][a-z0-9-]*$`); the repo becomes `/`, and it prefixes the Supabase projects and every worker. The console fills it from the chosen repository | | `productname` | yes | display name | -| `productdomain` | yes | the apex domain the product answers on; it does not need to exist yet | +| `productdomain` | — | NOT ASKED, default empty. The product goes live on workers.dev; empty brands the reserved placeholder `.example.com` wherever the domain goes (intent's `BASE_DOMAIN` / `CONSOLE_CUSTOM_DOMAIN`, the edge and identity console origins, the mail sender, the billing return URLs), for an owner to replace later (the product's `ai/context/operations.md`, "Setting the domain later"). Pass it only for a product that already has its domain | | `githuborg` | yes | the org or user the repo lives under. The console fills it from the chosen repository's owner | | `subdomain` | — | workers.dev subdomain of the Cloudflare **account** you deploy into. A console or `--from bst_…` build reads it from the Cloudflare connection; pass it only for a hand-run build. The default is a placeholder; see below | -| `apibaseurl` | — | the CLI/SDK default API base; empty means `https://api.` | +| `apibaseurl` | — | the CLI default API base. Empty, it is `https://api.` when a domain is given, and otherwise the product's own prod edge on workers.dev, `https://-api-edge-prod..workers.dev`. Not on the card: it was derived from the domain | | `orunWorkspace` | — | workspace id. Unset, it is the workspace the build runs in (`from: workspace`, ORUN_WORKSPACE, which a console build always has); with none anywhere, 01 writes the placeholder `ws_SET_ME`, which fails loudly rather than silently cross-tenanting | | `epicSlug` | — | default `infra-baselining`; the epic every phase files its task under, found by slug so a fresh run and a resumed run find the same work | | `repoPrivate` | — | default `true`; applied only when `01-scaffold` creates the repo — an existing repo keeps its visibility | diff --git a/hooks/render-deployment-docs.sh b/hooks/render-deployment-docs.sh index 491689d..cc6feb4 100755 --- a/hooks/render-deployment-docs.sh +++ b/hooks/render-deployment-docs.sh @@ -3,7 +3,7 @@ # Called by phase 08-docs as a `run:` hook (and safe to run by hand). # Idempotent: the # generated files and the README section are fully re-rendered on every run, -# so re-running after phase 07 (custom domain) or any redeploy refreshes them. +# so re-running after the custom domain is wired or any redeploy refreshes them. # # hooks/render-deployment-docs.sh # @@ -31,6 +31,10 @@ vals=".rebrand/values.json" repo="$(python3 -c "import json;print(json.load(open('$vals'))['reponame'])")" sub="$(python3 -c "import json;print(json.load(open('$vals'))['subdomain'])")" domain="$(python3 -c "import json;print(json.load(open('$vals')).get('productdomain',''))")" +# A product is built with no domain (the console asks for none): values.json +# records "" and the tree carries the reserved placeholder .example.com +# until an owner sets one. Neither is a domain to probe. +case "$domain" in *.example.com) domain="" ;; esac # Workspace slug via the direct backend read (works for user sessions AND # workspace-scoped ORUN_TOKENs); tolerate failure — slug then shows as "?". @@ -54,14 +58,14 @@ con_prod="https://${repo}-web-console-next-prod.${sub}.workers.dev" p_es="$(probe "$edge_stage/health")"; p_ep="$(probe "$edge_prod/health")" p_cs="$(probe "$con_stage")"; p_cp="$(probe "$con_prod")" -# Custom domain (phase 07, optional): probe only if a domain is declared; +# Custom domain (set later, by an owner): probe only if a domain is recorded; # an unreachable domain is reported as pending, never a failure. dom_rows="" if [ -n "$domain" ]; then p_da="$(probe "https://api.${domain}/health")" p_dc="$(probe "https://app.${domain}")" - dom_rows="| edge (custom domain) | https://api.${domain}/health | $( [ "$p_da" = 000 ] && echo 'pending (phase 07 not run, or DNS propagating)' || badge "$p_da" ) | -| console (custom domain) | https://app.${domain} | $( [ "$p_dc" = 000 ] && echo 'pending (phase 07 not run, or DNS propagating)' || badge "$p_dc" ) |" + dom_rows="| edge (custom domain) | https://api.${domain}/health | $( [ "$p_da" = 000 ] && echo 'pending (not wired yet, or DNS propagating)' || badge "$p_da" ) | +| console (custom domain) | https://app.${domain} | $( [ "$p_dc" = 000 ] && echo 'pending (not wired yet, or DNS propagating)' || badge "$p_dc" ) |" fi # Inventories — NAMES/status only, never values. Tolerant: a token that diff --git a/repo-blueprint.yaml b/repo-blueprint.yaml index 64d4a98..ff6d733 100644 --- a/repo-blueprint.yaml +++ b/repo-blueprint.yaml @@ -39,8 +39,20 @@ inputs: description: Human display name (e.g. "Acme Cloud"). productdomain: type: string - required: true - description: Product domain (e.g. acme.dev) — BASE_DOMAIN, console custom domains, OAuth origins. + default: "" + description: >- + The product's own domain, once it has one (e.g. acme.dev). NOT ASKED: + the product answers on workers.dev from its first deploy, and a domain + is an owner's step after it. Empty, the rebrand writes the reserved + placeholder `.example.com` wherever the domain goes — + intent.yaml's BASE_DOMAIN and CONSOLE_CUSTOM_DOMAIN (the parked + cloudflare-domain's parameters), the api-edge CORS and identity-worker + OAuth console origins (both also allow the workers.dev console, so + sign-in works without it), the notifications sender and the billing + success URLs — so setting it later is replacing that one string; the + product's ai/context/operations.md, "Setting the domain later", says + how. Pass it with --set only to brand a hand-run build with a domain it + already has. pascalName: type: string default: "" @@ -56,7 +68,12 @@ inputs: apibaseurl: type: string default: "" - description: CLI default API base (default https://api.). + description: >- + CLI default API base. Empty, the rebrand derives it: with a + `productdomain`, https://api.; with none (the console + asks for none), the product's own prod edge on workers.dev, + https://-api-edge-prod..workers.dev, which is + live from the first deploy. subdomain: type: string default: "your-workers-subdomain" diff --git a/specs/epics/saas-bootstrap-factory/IMPLEMENTATION-STATUS.md b/specs/epics/saas-bootstrap-factory/IMPLEMENTATION-STATUS.md index 277acdd..5899a67 100644 --- a/specs/epics/saas-bootstrap-factory/IMPLEMENTATION-STATUS.md +++ b/specs/epics/saas-bootstrap-factory/IMPLEMENTATION-STATUS.md @@ -107,3 +107,96 @@ component routes and `dependsOn`. | `testing/leak.test.sh` (orun 2.58.11) | pass — 1103 files derived, 2 context files, no factory paths | | `testing/placement.test.sh` (orun 2.58.11) | pass — 1103 product files, the same count as with `domain` forced on before; `01 → 08` place through the rebrand; `--resume` keeps the branding | | derived file set against `main` with `domain=true` | identical: 1103 files, and `06-console`'s 186 are exactly `main`'s 06-console (176) plus 07-domain (10) | + +## The domain is set later (2026-10-22, `baseline-v30`) + +Ported from turso-starter (its #9). The console card asked for the product's +domain, with help text that said it did not need to exist — and nothing in +the build needed one: the product answers on workers.dev from its first +deploy, every phase probes workers.dev, and the one component that attaches +a domain, `cloudflare-domain`, ships parked. The owner asked for the domain +to stop being an input at bootstrap, with the logic that uses it kept where +it is so it can be set later. Ships in `baseline-v30` with #115: the tag was +never pushed, and the owner pushes it at this PR's merge commit, so the one +release carries the subdomain source, the removed `domain` switch and this. + +### What shipped + +- `blueprint.yaml` declares no `productdomain` and no `apibaseurl`. The card + derived `apibaseurl` as `https://api.{productdomain}`, and a card can only + derive from inputs it declares, so it left with the domain. The console's + Product step asks for the display name alone. +- `repo-blueprint.yaml`: `productdomain` is optional, default `""`, and its + description names where the domain goes and how it is set later; + `apibaseurl`'s description states the CLI rule below. The values template + still writes `"productdomain": ""`. A hand-run build may pass + `--set productdomain=` for a product that already has its domain. +- `tooling/rebrand/rebrand.mjs` no longer requires `productdomain`. Empty, it + brands the reserved placeholder `.example.com` (RFC 2606) where + `lumen.app` stood — intent's `BASE_DOMAIN` and `CONSOLE_CUSTOM_DOMAIN` (the + parked `cloudflare-domain`'s parameters, and the component's own + `baseDomain`), api-edge's `CONSOLE_CUSTOM_DOMAIN` (CORS), identity-worker's + `OAUTH_ALLOWED_CONSOLE_ORIGINS` (which also lists the workers.dev console, + so sign-in works without a domain), the notifications sender + `no-reply@mail.`, billing's `POLAR_SUCCESS_URL`, and the edge's + CORS test fixtures. No component logic changed. Lumen's Supabase root + configures no auth URLs, so nothing there names the domain. +- The CLI's default API. `apibaseurl` fell back to `https://api.`, + which with the placeholder is a host that can never answer. With no domain + it is now the product's own prod edge on workers.dev, + `https://-api-edge-prod..workers.dev` — the worker + rule's name for `lumen-api-edge` deployed `--env prod`, live from the first + deploy. With a domain it stays `https://api.`; an explicit + `apibaseurl` still wins. +- `hooks/render-deployment-docs.sh` already probed the custom domain only + when `.rebrand/values.json` records one, so the empty value skips it; it + now also treats the `*.example.com` placeholder as no domain, and its + narration no longer names the removed `07-domain`. +- The shipped `ai/context/operations.md` gains "Setting the domain later": + every place the domain goes, then replace the placeholder + (`git grep -lF`), create the zone and restore `cloudflare-domain`'s + commented-out `subscribe` block, verify the mail domain, Supabase auth URLs + (none configured), re-point the CLI default if wanted, merge, run the docs + flow. It names the baseline's `lumen.app`, which the rebrand turns into + the product's own placeholder, and no factory path. +- `BOOTSTRAP.md`, `docs/phases/README.md`, `docs/phases/01-scaffold.md` and + the required-inputs sentence of five phase pages: three required inputs + (`reponame`, `productname`, `githuborg`); `productdomain` NOT ASKED; + `06-console.md` and `08-docs.md` say the custom domain is the placeholder + until set. The troubleshooting row for a missing input names + `productname`. + +### What the tests had to become + +- `tests/fixtures/acme.json` carries no domain, so the leak gate and the + placement tier exercise exactly what a console build supplies. +- `testing/placement.test.sh` read the card's `derive` and exited "gone + blind" without it. It now checks the value a no-domain product gets: its + `DEFAULT_API_URL` must be the PLACED, BRANDED api-edge's wrangler name plus + `-prod` on the fixture's subdomain (with `--env prod` read from its + `component.yaml`), and every `BASE_DOMAIN` / non-empty + `CONSOLE_CUSTOM_DOMAIN` in its `intent.yaml` must be the placeholder. It + refuses to pass on nothing: a fixture with a domain or an `apibaseurl`, a + missing worker name, deploy env, `DEFAULT_API_URL` or `BASE_DOMAIN` each + fail it. +- `testing/rebrand.test.sh` gains nine checks: no domain and an empty domain + brand the placeholder; the OAuth origins keep the workers.dev console; the + no-domain CLI default is the prod edge, follows `brandSlug`, and survives + three passes; a given domain brands itself and `https://api.`; an + explicit `apibaseurl` wins. +- `testing/manifest.test.sh` (comment only): the derive-agreement check has + nothing to hold today and stays for the next derived input. +- `baseline.yml`'s blueprint read sets no domain, so CI proves the document + resolves without one. + +### Verification + +| check | result | +|---|---| +| manifest, phases, coverage, rebrand | all pass — 7 milestones agree; 9 phases, 65 modules; 45 of 45 components; rebrand 23 checks (14 before) | +| `orun new --status` with no `productdomain` (orun 2.58.11, the CI pin) | parses; nine phases derived | +| `testing/leak.test.sh` (orun 2.58.11) | pass — 1103 files derived, unchanged; 2 context files, no factory paths | +| `testing/placement.test.sh` (orun 2.58.11) | pass — 1103 product files, unchanged; `DEFAULT_API_URL` is `https://acme-cloud-api-edge-prod.acme.workers.dev`; the placeholder `acme-cloud.example.com` in `BASE_DOMAIN` ×3 and `CONSOLE_CUSTOM_DOMAIN` ×2, 10 files carry it; `01 → 08` place through the rebrand | +| mutation: the old CLI rule (`https://api.` always) | `rebrand.test.sh` fails 3 checks, `placement.test.sh` fails naming `https://api.acme-cloud.example.com`; restored, both pass | +| mutation: no placeholder (empty domain stays empty) | `rebrand.test.sh` fails 3 checks, `placement.test.sh` fails on `BASE_DOMAIN ''`; restored, both pass | +| the documented replacement, on a placed product | `git grep -lF acme-cloud.example.com` lists 10 files; the `perl` one-liner leaves 0, and `BASE_DOMAIN` reads `acme.dev` | diff --git a/testing/manifest.test.sh b/testing/manifest.test.sh index 4ae5cab..a6ac6ef 100755 --- a/testing/manifest.test.sh +++ b/testing/manifest.test.sh @@ -193,6 +193,13 @@ for path in manifests: # run by hand passes nothing and rebrand's fallback wins. One rule, two # implementations — which is the thing this file's header warns about, # unless something holds them equal. This does. + # + # Since the console stopped asking for the domain, the card derives + # nothing: `apibaseurl` left it with `productdomain` (a card can only + # derive from inputs it declares), and rebrand's fallback alone picks + # the value — `https://api.`, or with no domain the product's + # prod edge on workers.dev, which placement.test.sh checks in a placed + # product. This stays for the next input that derives. if derive is not None and (root / REBRAND).exists(): js = (root / REBRAND).read_text(errors="replace") for m in re.finditer(r"const (\w+) = values\.\w+ \?\? `([^`]+)`", js): diff --git a/testing/placement.test.sh b/testing/placement.test.sh index bcc9483..a4b4721 100755 --- a/testing/placement.test.sh +++ b/testing/placement.test.sh @@ -20,9 +20,9 @@ # because that already happened once with a version pin; # 3. brand it as `01-scaffold`'s hook chain does, then `rebrand.mjs --verify`; # 4. run the leak rules over the REAL FILES rather than the derivation; -# 5. check the API base the product ends up with against the rule -# `blueprint.yaml` states as its `derive` — the last mile of BE3's gate, -# in the product; +# 5. check the API base and the domain the product ends up with: built with +# no domain, as a console build is, its CLI defaults to its own prod edge +# on workers.dev and the domain's places carry `.example.com`; # 6. THE PHASED SEQUENCE THROUGH A REBRAND: place 01, brand, then place the # phases that follow. This is the step no test in this repository has ever # taken, and it is where BE-O12's two defects lived. @@ -164,30 +164,74 @@ print(f" {len(placed)} product files; ai/context is exactly " f"{len(ALLOWED_AI)}; no factory, no provenance prose") PY -# ── the derived API base, in the product ─────────────────────────────────── -# BE3 states `derive: "https://api.{productdomain}"` in blueprint.yaml and holds -# it equal to rebrand.mjs's fallback. Both of those are checks on the RULES. -# This checks the value a product ends up with. -echo "── the API base the product ends up with" +# ── the API base and the domain, in the product ──────────────────────────── +# The console asks for no domain, so the fixture carries none, and BE3's +# `derive: "https://api.{productdomain}"` left the card with it (a card can +# only derive from inputs it declares). What a product built that way must +# end up with, checked in the product rather than as a rule: +# +# - its CLI's DEFAULT_API_URL is its own prod edge on workers.dev. The name +# is read from the PLACED, BRANDED api-edge — its wrangler `name` plus the +# `--env prod` its component.yaml deploys — so the CLI and the worker it +# points at are held to one rule. `https://api.` could never +# answer; +# - every place the domain goes carries the reserved placeholder +# `.example.com`, for an owner to replace later. +# +# Neither half can pass on nothing: a fixture that gains a domain, a brand.ts +# without DEFAULT_API_URL, an api-edge that stops deploying `--env prod`, or an +# intent without BASE_DOMAIN fails here instead of going blind. +echo "── the API base and the domain the product ends up with" python3 - "$tree" "$root" <<'PY' import json, pathlib, re, sys -import yaml tree, root = pathlib.Path(sys.argv[1]), pathlib.Path(sys.argv[2]) -man = yaml.safe_load((root / "blueprint.yaml").read_text())["spec"] -derive = next((f.get("derive") for f in man["inputs"] if f["key"] == "apibaseurl"), None) -if not derive: - sys.exit("blueprint.yaml no longer derives apibaseurl — this check has gone blind") vals = json.loads((root / "tests/fixtures/acme.json").read_text()) -want = re.sub(r"\{([a-z]+)\}", - lambda m: {"productdomain": vals["productdomain"]}[m.group(1)], derive) +if (vals.get("productdomain") or "").strip(): + sys.exit("tests/fixtures/acme.json carries a productdomain — a console build " + "supplies none, so this would no longer check what one produces") +if (vals.get("apibaseurl") or "").strip(): + sys.exit("tests/fixtures/acme.json carries an apibaseurl — the CLI default " + "would be that, and the no-domain rule would go unchecked") + +wr = (tree / "apps/api-edge/wrangler.template.jsonc").read_text() +name = re.search(r'"name":\s*"([a-z0-9-]+)"', wr) +if not name: + sys.exit("apps/api-edge/wrangler.template.jsonc has no worker name — gone blind") +if not name.group(1).startswith(vals["reponame"] + "-"): + sys.exit(f"FAIL: the placed api-edge is named {name.group(1)!r}, not branded " + f"with {vals['reponame']!r}") +comp = (tree / "apps/api-edge/component.yaml").read_text() +if not re.search(r"^\s*deployCommand:.*--env prod\s*$", comp, re.M): + sys.exit("apps/api-edge/component.yaml no longer deploys `--env prod` — gone blind") +want = f"https://{name.group(1)}-prod.{vals['subdomain']}.workers.dev" brand = (tree / "packages/cli/src/brand.ts").read_text() m = re.search(r'DEFAULT_API_URL = "([^"]+)"', brand) if not m: sys.exit("packages/cli/src/brand.ts no longer declares DEFAULT_API_URL — gone blind") if m.group(1) != want: - sys.exit(f"FAIL: the product's DEFAULT_API_URL is {m.group(1)!r}; " - f"blueprint.yaml's derive over this fixture says {want!r}") -print(f" DEFAULT_API_URL is {want} — the rule blueprint.yaml declares") + sys.exit(f"FAIL: the product's DEFAULT_API_URL is {m.group(1)!r}; built with no " + f"domain it must be its own prod edge, {want!r}") +print(f" DEFAULT_API_URL is {want} — api-edge's prod worker") + +placeholder = f"{vals['reponame']}.example.com" +intent = (tree / "intent.yaml").read_text() +bases = re.findall(r"^[ \t]*BASE_DOMAIN:[ \t]*(.*?)[ \t]*$", intent, re.M) +consoles = [c for c in re.findall(r"^[ \t]*CONSOLE_CUSTOM_DOMAIN:[ \t]*(.*?)[ \t]*$", intent, re.M) + if c not in ('""', "''")] +if not bases or not consoles: + sys.exit("intent.yaml carries no BASE_DOMAIN or CONSOLE_CUSTOM_DOMAIN — gone blind") +for b in bases: + if b != placeholder: + sys.exit(f"FAIL: intent.yaml's BASE_DOMAIN is {b!r}, not the placeholder {placeholder!r}") +for c in consoles: + if not c.endswith("." + placeholder): + sys.exit(f"FAIL: intent.yaml's CONSOLE_CUSTOM_DOMAIN is {c!r}, not under {placeholder!r}") +carrying = sorted( + str(p.relative_to(tree)) for p in tree.rglob("*") + if p.is_file() and ".git" not in p.parts and ".orun" not in p.parts + and placeholder in p.read_text(errors="replace")) +print(f" the domain is the placeholder {placeholder}: BASE_DOMAIN x{len(bases)}, " + f"CONSOLE_CUSTOM_DOMAIN x{len(consoles)}; {len(carrying)} files carry it") PY # ── THE PHASED SEQUENCE THROUGH A REBRAND ────────────────────────────────── diff --git a/testing/rebrand.test.sh b/testing/rebrand.test.sh index 01a8251..ada2d01 100755 --- a/testing/rebrand.test.sh +++ b/testing/rebrand.test.sh @@ -104,6 +104,49 @@ check "a token keeps the word boundaries its value had" \ "{$base}" apps/w/notes.yaml 'id: lumen.applumen' \ 'id: altocumulus.devlumen' +# THE DOMAIN IS SET LATER. The console asks for none, so the values file a +# console build writes has an empty `productdomain`, and the rebrand writes the +# reserved placeholder `.example.com` wherever the domain goes. The +# CLI's default API cannot be `https://api.`, which never answers: +# it is the product's own prod edge on workers.dev, named by the worker rule +# (`-api-edge-prod`). A hand-run build that passes a domain keeps +# `https://api.`. +echo "── rebrand: no domain given, and a domain given" +nodomain='{"reponame":"acme-cloud","productname":"Acme Cloud","githuborg":"acme-inc","subdomain":"acme"}' +check "no domain given: the reserved placeholder, for an owner to replace later" \ + "$nodomain" intent.yaml ' BASE_DOMAIN: lumen.app' \ + ' BASE_DOMAIN: acme-cloud.example.com' +check "an empty domain is no domain" \ + '{"reponame":"acme-cloud","productname":"Acme Cloud","productdomain":""}' \ + intent.yaml ' BASE_DOMAIN: lumen.app' \ + ' BASE_DOMAIN: acme-cloud.example.com' +check "no domain: the OAuth console origins keep the workers.dev console" \ + "$nodomain" apps/identity-worker/wrangler.template.jsonc \ + ' "OAUTH_ALLOWED_CONSOLE_ORIGINS": "https://prod.lumen.app,https://lumen-web-console-next-prod.rahulvarghesepullely.workers.dev",' \ + ' "OAUTH_ALLOWED_CONSOLE_ORIGINS": "https://prod.acme-cloud.example.com,https://acme-cloud-web-console-next-prod.acme.workers.dev",' +check "no domain: the CLI defaults to the product's prod edge on workers.dev" \ + "$nodomain" packages/cli/src/brand.ts 'export const DEFAULT_API_URL = "https://api.lumen.app";' \ + 'export const DEFAULT_API_URL = "https://acme-cloud-api-edge-prod.acme.workers.dev";' +check "…named by the worker rule, so a brandSlug renames it too" \ + '{"reponame":"acme-cloud","productname":"Acme Cloud","brandSlug":"acme","subdomain":"acme"}' \ + packages/cli/src/brand.ts 'export const DEFAULT_API_URL = "https://api.lumen.app";' \ + 'export const DEFAULT_API_URL = "https://acme-api-edge-prod.acme.workers.dev";' +check "…and survives every later phase's pass" \ + "$nodomain" packages/cli/src/brand.ts 'export const DEFAULT_API_URL = "https://api.lumen.app";' \ + 'export const DEFAULT_API_URL = "https://acme-cloud-api-edge-prod.acme.workers.dev";' 3 +check "a domain given: the domain where the domain goes" \ + '{"reponame":"acme-cloud","productname":"Acme Cloud","productdomain":"acme.dev","subdomain":"acme"}' \ + intent.yaml ' BASE_DOMAIN: lumen.app' \ + ' BASE_DOMAIN: acme.dev' +check "a domain given: the CLI defaults to api." \ + '{"reponame":"acme-cloud","productname":"Acme Cloud","productdomain":"acme.dev","subdomain":"acme"}' \ + packages/cli/src/brand.ts 'export const DEFAULT_API_URL = "https://api.lumen.app";' \ + 'export const DEFAULT_API_URL = "https://api.acme.dev";' +check "an explicit apibaseurl wins either way" \ + '{"reponame":"acme-cloud","productname":"Acme Cloud","apibaseurl":"https://edge.acme.dev"}' \ + packages/cli/src/brand.ts 'export const DEFAULT_API_URL = "https://api.lumen.app";' \ + 'export const DEFAULT_API_URL = "https://edge.acme.dev";' + # --verify runs in every phase of a bootstrap. Without the product's values it # cannot tell the product's own identity from a baseline leftover, and a product # whose domain contains `lumen` failed it in every phase; with them it passes. diff --git a/tests/fixtures/acme.json b/tests/fixtures/acme.json index 6813d82..38c21a3 100644 --- a/tests/fixtures/acme.json +++ b/tests/fixtures/acme.json @@ -3,16 +3,17 @@ "The inputs a Tier 1 dry instantiation renders with (saas-bootstrap-engine BE5).", "Acme is not a real product and never becomes one: this tree is placed into a", "temp directory, asserted against, and deleted. The values are chosen to be", - "AWKWARD rather than tidy — a two-word product name, a hyphenated repo slug, a", - "multi-label domain — because a fixture that only uses values the templates", - "were written against proves the templates work on the values they were", - "written against.", + "AWKWARD rather than tidy — a two-word product name, a hyphenated repo slug,", + "and NO domain: a console build asks for none, so the placeholder", + ".example.com is what a product is born with, and the CLI defaults", + "to the product's own prod edge on workers.dev — because a fixture that only", + "uses values the templates were written against proves the templates work on", + "the values they were written against.", "Every key here is an input repo-blueprint.yaml declares. A key it does not", "declare is a fixture that has drifted, and orun refuses it." ], "reponame": "acme-cloud", "productname": "Acme Cloud", - "productdomain": "acme.dev", "githuborg": "acme-inc", "subdomain": "acme", "orunWorkspace": "ws_0000000000000000000000000000000f", diff --git a/tooling/rebrand/rebrand.mjs b/tooling/rebrand/rebrand.mjs index 241e290..50ffdd3 100644 --- a/tooling/rebrand/rebrand.mjs +++ b/tooling/rebrand/rebrand.mjs @@ -20,11 +20,12 @@ // { // "reponame": "acme-cloud", // required — repo slug // "productname": "Acme Cloud", // required — display name -// "productdomain": "acme.dev", // required — product domain +// "productdomain": "acme.dev", // optional — default .example.com (set later) // "pascalName": "AcmeCloud", // default: productname, non-alnum stripped // "brandSlug": "acme", // default: reponame // "cliBin": "acme", // default: reponame -// "apibaseurl": "https://api.acme.dev",// default: https://api. +// "apibaseurl": "https://api.acme.dev",// default: https://api., or with no +// // domain https://-api-edge-prod..workers.dev // "subdomain": "my-subdomain", // default: "your-workers-subdomain" // "salesEmail": "sales@acme.dev" // optional: keeps baseline mailbox if absent // } @@ -78,7 +79,7 @@ if (valuesPath) { for (const [key, old] of Object.entries(LEGACY)) { if (values[key] === undefined && values[old] !== undefined) values[key] = values[old]; } - for (const required of ["reponame", "productname", "productdomain"]) { + for (const required of ["reponame", "productname"]) { if (typeof values[required] !== "string" || values[required].length === 0) { console.error(`rebrand: values file is missing required field "${required}"`); process.exit(2); @@ -89,12 +90,27 @@ if (valuesPath) { // All fields are unused under --verify; the fallbacks keep derivation total. const reponame = values.reponame ?? ""; const productname = values.productname ?? ""; -const productdomain = values.productdomain ?? ""; +// The domain is NOT ASKED at bootstrap: a product goes live on workers.dev and +// an owner sets a domain later. Until then the reserved placeholder +// `.example.com` (RFC 2606 — it can never be someone else's) stands +// wherever the domain goes, so setting it is replacing one string. +const productdomain = (values.productdomain ?? "").trim() || (reponame ? `${reponame}.example.com` : ""); const pascalName = values.pascalName ?? productname.replace(/[^A-Za-z0-9]/g, ""); const brandSlug = values.brandSlug ?? reponame; const cliBin = values.cliBin ?? reponame; -const apibaseurl = values.apibaseurl ?? `https://api.${productdomain}`; const subdomain = values.subdomain ?? "your-workers-subdomain"; +// The CLI's default API. With a domain it is `https://api.`. With none, +// `api.` would point every CLI at a host that can never answer, so +// it is the product's own prod edge on workers.dev, live from the first deploy: +// api-edge deploys `--env prod` (apps/api-edge/component.yaml) as the wrangler +// name `lumen-api-edge` + `-prod`, which the worker rule below re-prefixes to +// `-api-edge-prod`. Re-pointing it at a domain later is an edit to +// packages/cli/src/brand.ts. +const apibaseurl = + (values.apibaseurl ?? "").trim() || + ((values.productdomain ?? "").trim() + ? `https://api.${productdomain}` + : `https://${brandSlug}-api-edge-prod.${subdomain}.workers.dev`); const salesEmail = values.salesEmail; // optional // A `secret://///` ref names the WORKSPACE // first and the project (repo) second. In the baseline the two happen to be