diff --git a/BOOTSTRAP.md b/BOOTSTRAP.md index 52af685..7190e63 100644 --- a/BOOTSTRAP.md +++ b/BOOTSTRAP.md @@ -67,6 +67,12 @@ orun new --blueprint repo-blueprint.yaml \ --set subdomain= ``` +`subdomain` is the workers.dev subdomain of the Cloudflare account you deploy +into (Workers & Pages → your subdomain). A build started from the console, or +with `orun baseline new --from bst_…`, never asks for it: the platform reads +it from the workspace's Cloudflare connection, the same one the deploy token +is minted from. Only a hand-run build like this one passes it. + **`--run-hooks` is the difference between placing files and bootstrapping a site.** Without it `orun new` writes the tree and stops: no repository, no landing, no convergence watch, no probe. That is deliberate — it is what diff --git a/blueprint.yaml b/blueprint.yaml index 21ec433..91ead5b 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -88,6 +88,18 @@ spec: pattern: "^[a-z0-9][a-z0-9-]{0,62}$" help: The workers.dev subdomain of the Cloudflare account the site deploys into. example: acme + # READ FROM THE CLOUDFLARE CONNECTION, not asked (risk NB-N). The + # subdomain belongs to the account the same way its id does, and there + # is exactly one right answer — a typed one could only be wrong, and + # wrong showed up after deploy: a console build carried `next`, and its + # smoke checks tested addresses nothing answers on while the site was + # live. The bootstrap door fills this input from the connection the + # build is BOUND to, the same one CLOUDFLARE_ACCOUNT_ID and the deploy + # token mint from, so all three name one account. The console renders + # no field for it, and an account with no workers.dev subdomain refuses + # the build at the door, naming the fix, before anything is created. + # As blog-starter and portfolio-starter-kit declare it. + from: connection.cloudflare.workersSubdomain # ── PREVIEW ONLY. repo-blueprint.yaml's `orun.integrations/reconcile@v1` # hook mints these, brokered, during 01-product. ────────────────────────── diff --git a/docs/phases/README.md b/docs/phases/README.md index a75583d..2ba8393 100644 --- a/docs/phases/README.md +++ b/docs/phases/README.md @@ -59,8 +59,10 @@ tree. But the blueprint's **required** inputs — `reponame`, `productname`, must be supplied on every invocation, single-phase ones included. A `--values` file is easier than repeating `--set`. -- `subdomain` — the workers.dev subdomain of the Cloudflare account. It is - in every URL the site answers on, and so in every URL the phases probe. +- `subdomain` — the workers.dev subdomain of the Cloudflare account you + deploy into. It is in every URL the site answers on, and so in every URL + the phases probe. A console or `--from bst_…` build reads it from the + Cloudflare connection; pass it only for a hand-run build. - `orunWorkspace` — workspace id (`ws_…`). Unset, it is the workspace the build runs in (`from: workspace`); with none anywhere, a placeholder that fails loudly rather than silently claiming another tenant's workspace. diff --git a/repo-blueprint.yaml b/repo-blueprint.yaml index db25be1..682edc6 100644 --- a/repo-blueprint.yaml +++ b/repo-blueprint.yaml @@ -50,7 +50,12 @@ inputs: subdomain: type: string default: "your-workers-subdomain" - description: The workers.dev subdomain of the Cloudflare account the site deploys into — its URLs and the probes. + description: >- + The workers.dev subdomain of the Cloudflare account the site deploys + into — its URLs and the probes. A console or `--from bst_…` build gets + it from the workspace's Cloudflare connection (blueprint.yaml declares + `from: connection.cloudflare.workersSubdomain`); pass it with --set only + for a hand-run build. repoPrivate: type: boolean default: true diff --git a/specs/epics/nuxt-boilerplate/IMPLEMENTATION-STATUS.md b/specs/epics/nuxt-boilerplate/IMPLEMENTATION-STATUS.md index 3cf1c42..3be595e 100644 --- a/specs/epics/nuxt-boilerplate/IMPLEMENTATION-STATUS.md +++ b/specs/epics/nuxt-boilerplate/IMPLEMENTATION-STATUS.md @@ -10,6 +10,7 @@ the code departed from `design.md` or from the upstream template. | NB2 — ready to instantiate | ✅ Shipped | [#3](https://github.com/sourceplane/nuxt-boilerplate/pull/3) | | NB3 — a baseline | ✅ Shipped | [#4](https://github.com/sourceplane/nuxt-boilerplate/pull/4) (NB-4), tagged `baseline-v1` | | NB4 — one landing | 🟡 In progress | this PR (NB-5), to be tagged `baseline-v2` | +| The subdomain from the connection (risk NB-N) | 🟡 In review | this PR, to be tagged `baseline-v5` | ## Departures from the upstream template diff --git a/specs/epics/nuxt-boilerplate/risks-and-open-questions.md b/specs/epics/nuxt-boilerplate/risks-and-open-questions.md index 7c3125e..d289b85 100644 --- a/specs/epics/nuxt-boilerplate/risks-and-open-questions.md +++ b/specs/epics/nuxt-boilerplate/risks-and-open-questions.md @@ -138,3 +138,17 @@ astro-boilerplate (AB-L) and portfolio-starter-kit (PK-L) hit it first (2026-11-06). The hook now uses PyYAML when present and reads that one key by indentation otherwise; `testing/render.test.sh` runs it under a python3 with no third-party packages. + +## NB-N — A typed workers.dev subdomain fails after deploy (RESOLVED) + +The card asked for the subdomain in a form. There is one right answer, the +account's own, and a wrong one is only found when the smoke check tests an +address nothing answers on: a console build on 2026-11-11 +(`vijayakrishnans/nuxt-site`, run 42994816304) carried `next`, so both lanes +deployed to the real address and then smoked `*.next.workers.dev` until the +convergence watch gave up. blog-starter (BS-G) and portfolio-starter-kit +(PK6) had already moved to reading it from the Cloudflare connection; this +baseline had not. The card now declares +`from: connection.cloudflare.workersSubdomain`, so the console renders no +field and there is no box to get wrong. A hand-run build still passes +`--set subdomain`. diff --git a/testing/manifest.test.sh b/testing/manifest.test.sh index 1982abe..a834d4d 100755 --- a/testing/manifest.test.sh +++ b/testing/manifest.test.sh @@ -220,9 +220,20 @@ for path in manifests: # field for it (saas-bootstrap-console BC-K5). Two ways to get it # wrong, and the platform refuses both — check them here too, so the # mistake is caught in this repo rather than at a live bootstrap. + # + # A `connection..` source is read from the connection + # the build is bound to, so the provider must be one the manifest + # requires — the platform's parser refuses it otherwise. + sources_known = ("repo.name", "repo.owner", "repo.fullName", + "connection.cloudflare.workersSubdomain") src = field.get("from") - if src is not None and src not in ("repo.name", "repo.owner", "repo.fullName"): - B(f"inputs[{key}].from is {src!r} — must be repo.name, repo.owner or repo.fullName") + if src is not None and src not in sources_known: + B(f"inputs[{key}].from is {src!r} — must be one of {', '.join(sources_known)}") + if isinstance(src, str) and src.startswith("connection."): + provider = src.split(".")[1] + if provider not in ((spec.get("requires") or {}).get("integrations") or []): + B(f"inputs[{key}].from is {src!r} but spec.requires.integrations " + f"does not list {provider} — there is no connection to read it from") # ── secrets: BOTH or NEITHER, checked both ways ─────────────────────── declared = {s.get("key"): (s.get("provider"), s.get("template")) for s in (spec.get("secrets") or [])}