diff --git a/BOOTSTRAP.md b/BOOTSTRAP.md index 5dfc898..44e4ccb 100644 --- a/BOOTSTRAP.md +++ b/BOOTSTRAP.md @@ -88,11 +88,16 @@ orun new --blueprint repo-blueprint.yaml \ --set subdomain= ``` -`subdomain` is the Cloudflare **account's** workers.dev subdomain, not the -product name. Every generated URL and the api-edge CORS allowlist derive from -it, so a wrong value ships a product that deploys cleanly and is unreachable -at every address it advertises. Find it under Workers & Pages in the -dashboard. +`subdomain` is the workers.dev subdomain of the Cloudflare account you deploy +into, not the product name. Every generated URL and the api-edge CORS +allowlist derive from it, so a wrong value ships a product that deploys +cleanly and is unreachable at every address it advertises. Find it under +Workers & Pages in the dashboard. + +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 tokens mint from. Only a hand-run build +like this one passes it. **`--run-hooks` is the difference between placing files and bootstrapping a product.** Without it `orun new` writes the tree and stops: no repo is @@ -111,8 +116,10 @@ every phase after `01-scaffold` brands the tree — derives as `drifted`, and The phases are `01-scaffold`, `02-foundation`, `03-infrastructure`, `03-infrastructure-database`, `04-workers`, `04-workers-restore`, `05-edge`, -`06-console`, `07-domain` (only when `domain=true`), `08-docs` — ten phases -filed under eight milestones. Each is idempotent, each follows one contract — +`06-console`, `08-docs` — nine phases filed under seven milestones. The gap +at 07 is the optional `07-domain` phase, whose parked custom-domain component +lands in `06-console` since baseline-v30 (the `domain` input that switched it +on is gone). Each is idempotent, each follows one contract — **place its modules → land them as a PR that must go green → watch the convergence → verify the outcome** — and each carries its own narration. Full guide: [docs/phases/README.md](docs/phases/README.md), with a page per @@ -132,8 +139,7 @@ orun new --blueprint repo-blueprint.yaml --out ~/sourceplane/acme --run-hooks \ orun new --blueprint repo-blueprint.yaml --out ~/sourceplane/acme --run-hooks \ --phase 02-foundation --values ~/sourceplane/acme/.rebrand/values.json # … 03-infrastructure, 03-infrastructure-database, 04-workers, -# 04-workers-restore, 05-edge, 06-console, 08-docs; -# 07-domain only with --set domain=true. +# 04-workers-restore, 05-edge, 06-console, 08-docs. ``` The flags that shape a run: @@ -247,7 +253,7 @@ The console renders **`blueprint.yaml`**, the card, and never this file or the blueprint directly. The card owns the build contract: the overview, the three integrations and the admin key role it requires, the inputs the form collects, a read-only preview of the five brokered secrets and of the -programme (the epic and its eight milestones), and `bootstrap.blueprint: +programme (the epic and its seven milestones), and `bootstrap.blueprint: repo-blueprint.yaml` — the document a runner places. The registry row in orun-cloud owns identity and the pinned tag; the card is fetched *at* that tag, which is why it carries none. @@ -255,12 +261,16 @@ tag, which is why it carries none. 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`, `productdomain` and `subdomain` are typed. + `productname` and `productdomain` are typed. - `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. -- The card collects no `domain`, so a console build skips `07-domain`. Run - it later from the CLI (and read its page first). +- There is no `domain` input. The custom-domain component lands in + `06-console`, parked, on every build, and an owner wires it later in an + ordinary PR (§4). - The runner hands its refreshed token over through `ORUN_TOKEN_FILE` (`bootstrap.tokenChannel`), so a session that rotates mid-build does not end it. @@ -273,11 +283,14 @@ 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**: `07-domain` needs the product zone to exist in - Cloudflare, and in this baseline the `cloudflare-domain` component ships - parked and mid-migration to provider v5, so the phase lands it without - deploying anything. See [docs/phases/07-domain.md](docs/phases/07-domain.md) - before running it. +- **Custom domain**: 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 + commented-out `subscribe` block in an ordinary PR (see + [docs/phases/06-console.md](docs/phases/06-console.md#the-custom-domain--parked)), + and re-run `--phase 08-docs` once it converges so the docs pick up the + domain URLs. - **Runtime secrets** (OAuth client secrets, billing keys, …): seed with `orun secrets set --org --env `; the next deploy pushes them to the workers (`wire-now-seed-later` — nothing blocks on them). @@ -342,7 +355,7 @@ purpose, written down so they read as instructions rather than breakage. | api-edge deploy: `Service binding '_WORKER' … not found` | A fleet worker never deployed in phase 04. Resume that convergence, then re-run `05-edge`. | | Convergence run fails, lanes look transient | `orun.run/watch@v1` already resumes it up to 3× (`gh run rerun --failed` is a true resume: exec-id + `--retry`). | | Convergence still red after the resume budget | Re-running the phase lands nothing new, and CI plans `--changed`, so nothing redeploys what the failed run left undeployed. Resume the run itself — `gh run rerun --failed ` — then re-run the phase so its `await` hooks verify. | -| `/health` probes fail against a green deploy | Check `subdomain` first: it must be the Cloudflare account's workers.dev subdomain, and the default is a placeholder. | +| `/health` probes fail against a green deploy | Check `subdomain` first: it must be the Cloudflare account's workers.dev subdomain, and the default is a placeholder. A console build reads it from the Cloudflare connection; a hand-run build passes it with `--set`. | | CLI login dies with 429 `rate_limited` | Fixed ≥ v2.48.1 (redeem honours Retry-After). Upgrade the CLI. | | `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. | diff --git a/README.md b/README.md index ddf8f9c..8e3e165 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,10 @@ _Not yet recorded — run [`08-docs`](docs/phases/08-docs.md) after This baseline births new products from one artifact — `repo-blueprint.yaml`, run by `orun new` (**[BOOTSTRAP.md](BOOTSTRAP.md)** → -[docs/phases/](docs/phases/README.md)). It declares ten idempotent phases — +[docs/phases/](docs/phases/README.md)). It declares nine idempotent phases — scaffold, foundation, infrastructure, database, workers, workers-restore, -edge, console, optional domain, docs — each landing a verified slice, each -selectable with `--phase `. +edge, console (with the custom-domain component, parked), docs — each landing +a verified slice, each selectable with `--phase `. Products receive **product-only content** (source, infra, CI, their own docs); none of this baseline's machinery ships, and a product's docs speak only about the product. diff --git a/ai/context/operations.md b/ai/context/operations.md index c1f6949..439886f 100644 --- a/ai/context/operations.md +++ b/ai/context/operations.md @@ -113,11 +113,11 @@ 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 | run the `07-domain` phase once the zone exists, then `08-docs` | +| 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 | | headless/CI credentials | `ORUN_TOKEN` (workspace-scoped) + `GITHUB_TOKEN` | -The ops phases (docs refresh, custom domain, and the original deployment -sequence) all live in ONE versioned artifact: `repo-blueprint.yaml` in the +The ops phases (docs refresh and the original deployment sequence) all +live in ONE versioned artifact: `repo-blueprint.yaml` in the baseline this product was born from. Clone it at a tag and select the phase — from anywhere, with the two tokens above exported: @@ -126,10 +126,6 @@ git clone --depth 1 https://github.com/OPSFLOWS baseline && cd baseline orun new --blueprint repo-blueprint.yaml --out \ --run-hooks --phase 08-docs --values # docs refresh - -orun new --blueprint repo-blueprint.yaml --out \ - --run-hooks --phase 07-domain --set domain=true \ - --values # custom domain ``` `` carries this product's identity — at minimum `reponame`, diff --git a/blueprint.yaml b/blueprint.yaml index 4f7dc30..20682b4 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -103,6 +103,19 @@ spec: pattern: "^[a-z0-9][a-z0-9-]{0,62}$" help: The workers.dev subdomain on the Cloudflare account this builds into. example: acme + # READ FROM THE CLOUDFLARE CONNECTION, not asked. 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, in CORS, OAuth origins, smoke checks and the verify URLs + # below. The integration reads it from Cloudflare at connect and on its + # hourly health check; the bootstrap door fills this input from the + # connection the build is BOUND to, the same one CLOUDFLARE_ACCOUNT_ID + # and the deploy tokens mint from, so all three name one account. + # + # No orun action and no `probe:` is needed, because the platform already + # holds the fact. An account with no workers.dev subdomain refuses the + # build at the door, naming the fix, before anything is created. + from: connection.cloudflare.workersSubdomain # ── PREVIEW ONLY. `repo-blueprint.yaml`'s `integrations/reconcile` hooks # mint these, brokered, during phase 03. ──────────────────────────────── @@ -141,7 +154,7 @@ spec: # these. Idempotent by identity — epic by slug, milestone by name-within-epic # — so a re-run finds what it made before. The console renders the programme # so an operator can see the shape of the work before pressing Build. - # Ten phases, eight milestones: `03-infrastructure-database` and + # Nine phases, seven milestones: `03-infrastructure-database` and # `04-workers-restore` are second landings of 03 and 04, and file under them. programme: epicSlug: infra-baselining # = repo-blueprint.yaml's `epicSlug` default @@ -152,13 +165,11 @@ spec: - name: 03-infrastructure - name: 04-workers - name: 05-edge + # The custom-domain component lands in 06-console, parked (it + # subscribes to no environment until an owner wires a zone), so the + # optional 07-domain milestone and the `domain` input that switched it + # on are gone. The numbering keeps its gaps so 08 keeps its name. - name: 06-console - # 07-domain carries `when: inputs.domain` in repo-blueprint.yaml (it - # needs the Cloudflare zone to already exist), so its milestone is - # ensured only on a run that asks for it. Declared with its condition - # rather than silently listed, so the console can say so. - - name: 07-domain - when: domain - name: 08-docs bootstrap: diff --git a/docs/phases/01-scaffold.md b/docs/phases/01-scaffold.md index bedb2ba..c0b2e3f 100644 --- a/docs/phases/01-scaffold.md +++ b/docs/phases/01-scaffold.md @@ -47,11 +47,10 @@ gates the set, so the promise is a test rather than a claim. | `productdomain` | `acme.dev` | REQUIRED. Product 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` | the Cloudflare account's workers.dev subdomain — every URL derives from it (worker names are brand-prefixed, so keeping the baseline's account is supported) | +| `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` | | `repoPrivate` | `true` (default) | visibility at creation only | | `epicSlug` | `infra-baselining` (default) | the epic every phase files its task under | -| `domain` | `false` (default) | `true` also runs `07-domain` | The full set, rebrand overrides included, is in the [phases README](README.md#inputs) and `repo-blueprint.yaml`'s `inputs:` diff --git a/docs/phases/06-console.md b/docs/phases/06-console.md index fc6ba67..bf1dcdb 100644 --- a/docs/phases/06-console.md +++ b/docs/phases/06-console.md @@ -2,7 +2,8 @@ Lands the **web console** (`repo-blueprint.yaml`, phase `06-console`) — the product UI served from Workers static assets — and proves both it and the -edge it talks to live. +edge it talks to live. The custom-domain component lands with it, parked +([below](#the-custom-domain--parked)). ## What it lands @@ -12,6 +13,52 @@ phase 05 edge. Console builds are the heaviest lane in the product, which is why this phase's landing waits up to 45 minutes for its PR and its convergence watch up to 45 minutes too. +`infra/terraform/cloudflare-domain` lands in the same pull request, parked. +`testing/phases.test.sh` holds the set: modules move whole, and nothing else +moves with them. + +## The custom domain — parked + +`infra/terraform/cloudflare-domain` — the zone lookup and, once wired, a +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: + +1. **It ships parked.** Its `component.yaml` declares + `subscribe.environments: []`, so CI plans no lanes for it. The product + runs on workers.dev URLs until an owner wires it. +2. **The attachment is fenced off.** The component is midway through a + two-step migration to Cloudflare provider v5: the v4 + `cloudflare_workers_domain` resource was dropped from state and its block + is commented out until the v5 `cloudflare_workers_custom_domain` replaces + it. Un-parked as it stands, the root would look up the zone and attach + nothing. + +It used to land on its own as the optional `07-domain` phase, behind a +`domain` input. That landing deployed nothing either — its convergence was a +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: + +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 + dashboard; zone creation is an account-plan operation the platform does + not broker. The component runs with `zoneMode: existing`: it looks the + zone up by `baseDomain` and manages records and custom domains IN it, not + the zone itself. Without the zone a plan fails with `no zone found` (or + the brokered token's account is not the zone's). +2. **Finish the v5 resource and restore the `subscribe` block** the + component carries commented out — both are described in its own comments, + and its `README.md` says where the migration stands. +3. **Land it.** The convergence on `main` applies it; check the product + resolves on its own domain (DNS propagation applies), then re-run + [`08-docs`](08-docs.md) so the deployment manifest records the + custom-domain URLs. + ## Inputs `--out` is the product repo. The blueprint's required inputs — `reponame`, @@ -79,9 +126,8 @@ nothing new, and the `await` hooks re-probe. ## Next -[Phase 08 — docs](08-docs.md) records what was built. Optional -[phase 07 — domain](07-domain.md) comes first only if you set -`domain=true` — read that page before you do. +[Phase 08 — docs](08-docs.md) records what was built. The custom domain is +wired later, in an ordinary PR ([above](#the-custom-domain--parked)). Post-baseline: seed runtime worker secrets (`orun secrets set --org --env `; wire-now-seed-later, nothing blocks on them) and ship diff --git a/docs/phases/07-domain.md b/docs/phases/07-domain.md deleted file mode 100644 index 206f53b..0000000 --- a/docs/phases/07-domain.md +++ /dev/null @@ -1,120 +0,0 @@ -# Phase 07 — domain (OPTIONAL, and not yet wired end to end) - -Lands the **custom product domain** (`repo-blueprint.yaml`, phase -`07-domain`): the `cloudflare-domain` terraform that is meant to put the -console on `` instead of workers.dev. - -Skip it until you own the domain — the baseline is fully functional on -workers.dev URLs after phase 06. And read the next section before you run it -at all. - -## What this phase does today — read this first - -In this baseline, running `07-domain` lands the component and **deploys -nothing**, for two reasons that live in the component rather than in the -phase: - -1. **`cloudflare-domain` ships parked.** Its `component.yaml` declares - `subscribe.environments: []`, so CI plans no lanes for it. The phase's - convergence is therefore a run with nothing in it, and reads green. This - is the "a green run that deployed nothing" trap every other phase guards - against with a probe; this phase has no probe to catch it. -2. **The custom-domain attachment is fenced off.** The component is midway - through a two-step migration to Cloudflare provider v5: the v4 - `cloudflare_workers_domain` resource was dropped from state and its - block is commented out until the v5 `cloudflare_workers_custom_domain` - replaces it. Un-parked as it stands, the root would look up the zone and - attach nothing. - -So the honest status is: the phase, its task and its PR work; the domain -does not. Wiring it for real means, in the product, finishing the v5 -resource and restoring the `subscribe` block (both are described in the -component's own comments), then landing that as a normal PR once the zone -exists. The phase's narration says as much when it is done: the component -is in the repository, and nothing is attached until it subscribes. - -## Prerequisite (hard) - -The product zone (e.g. `acme.dev`) must **already exist in the Cloudflare -account** — created in the dashboard; zone creation is an account-plan -operation the platform does not broker. The component runs with -`zoneMode: existing`: it looks the zone up by `baseDomain` and manages -records and custom domains IN it, not the zone itself. Without the zone a -plan fails with `no zone found`. - -## What it lands - -`infra/terraform/cloudflare-domain`: the zone lookup and, once the migration -above is finished, a 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`). - -## Inputs - -`--out` is the product repo. The blueprint's required inputs — `reponame`, -`productname`, `productdomain`, `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). - -The phase carries `when: inputs.domain`, so it is **skipped** unless -`domain=true` — set on the command line or recorded in the values file. A -skipped phase does not block `08-docs`, which requires `06-console` rather -than this one. The console card collects no `domain`, so a console build -always skips this phase. - -## Steps - -1. **requires** — `06-console` placed. -2. **pre** — the phase's task (its milestone is ensured only on a run that - asks for the phase). -3. **place** → **brand** → **lockfile** → **land** — the standard contract - (PR `phase(07-domain): custom domain`). -4. **converge** — `orun.run/watch@v1` on the merged commit. See above for - what that run contains today. - -## Verify / done means - -The convergence run is green. Then — once the component is wired — check the -product resolves on its own domain (DNS propagation applies), and re-run -[phase 08](08-docs.md) so the deployment manifest records the custom-domain -URLs. - -## Troubleshooting - -- **Plan fails: zone not found** — the zone does not exist in this - Cloudflare account yet, or the brokered token's account differs from the - zone's account. Create the zone, re-run. -- **Green convergence, domain does not resolve** — expected today; see - "What this phase does today". - -## Example commands - -From the baseline checkout: - -```bash -orun new --blueprint repo-blueprint.yaml --out $HOME/sourceplane/acme \ - --run-hooks --phase 07-domain --set domain=true \ - --values $HOME/sourceplane/acme/.rebrand/values.json -``` - -Headless (fresh container / no checkout — see BOOTSTRAP.md §2): clone the -baseline at a tag and run the same command, with `ORUN_TOKEN` + -`GITHUB_TOKEN` exported: - -```bash -export ORUN_TOKEN="$(orun auth token | tail -1)" GITHUB_TOKEN=… -git clone --depth 1 --branch https://github.com/sourceplane/lumen -cd lumen -orun new --blueprint repo-blueprint.yaml --out /work/acme \ - --run-hooks --phase 07-domain --set domain=true --values /work/acme.values.yaml -``` - -Preview with zero side effects: drop `--run-hooks` — the phase places files -and stops, with no landing, no convergence watch and no probe. `--status` -derives every phase's state and writes nothing at all. - -## Next - -[Phase 08 — docs](08-docs.md). diff --git a/docs/phases/08-docs.md b/docs/phases/08-docs.md index e5d525a..c84555f 100644 --- a/docs/phases/08-docs.md +++ b/docs/phases/08-docs.md @@ -25,8 +25,7 @@ this credential" rather than a failed render. ## Steps -1. **requires** — `06-console` placed. Not `07-domain`, so a bootstrap that - skips the custom domain still reaches this phase. +1. **requires** — `06-console` placed. 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 @@ -46,8 +45,9 @@ this credential" rather than a failed render. - Right after [phase 06](06-console.md) — the "working baseline" moment — to record it. -- Again after [phase 07](07-domain.md), once the domain actually resolves, - so the manifest picks up the custom-domain URLs. +- Again once the custom domain is wired (see + [06-console](06-console.md#the-custom-domain--parked)) and actually + resolves, so the manifest picks up the custom-domain URLs. - Any time later as a **live-state refresh**: the manifest is regenerated from scratch on every run and carries its own render timestamp. The product's `ai/context/operations.md` carries the same command for its own diff --git a/docs/phases/README.md b/docs/phases/README.md index 6103cc9..fb1fca8 100644 --- a/docs/phases/README.md +++ b/docs/phases/README.md @@ -1,6 +1,6 @@ -# The phases — one blueprint, ten selections +# The phases — one blueprint, nine selections -`repo-blueprint.yaml` declares ten phases that take a product from +`repo-blueprint.yaml` declares nine phases that take a product from **nothing** to a **live, documented baseline** on Cloudflare and Supabase. Run them one at a time at your own pace with `--phase `, or run the whole sequence unattended with `--resume`. There is no wrapper that runs @@ -41,17 +41,19 @@ deploying is what a merge does and a PR cannot. | [`04-workers`](04-workers.md) | 04-workers | the 12-worker fleet, two feedback bindings stripped | convergence green | | [`04-workers-restore`](04-workers.md#the-second-landing-04-workers-restore) | 04-workers | the two bindings put back (places no files) | convergence green | | [`05-edge`](05-edge.md) | 05-edge | `api-edge` (+ its tests, + `platform-limits-tests`) | `/health` answers on stage and prod | -| [`06-console`](06-console.md) | 06-console | web console | console + edge live on stage and prod | -| [`07-domain`](07-domain.md) | 07-domain | custom domain (OPTIONAL — `when: inputs.domain`) | convergence green | +| [`06-console`](06-console.md) | 06-console | web console, and the custom-domain component (parked until a zone is wired) | console + edge live on stage and prod | | [`08-docs`](08-docs.md) | 08-docs | live-deployment docs (places no files; a hook renders them) | the URLs the manifest claims, re-probed | -Ten phases, eight milestones. `03-infrastructure-database` and +Nine phases, seven milestones. `03-infrastructure-database` and `04-workers-restore` are second landings of the unit before them: each has its own PR and its own task, and each files under its predecessor's milestone. They are documented on their predecessor's page for the same -reason. +reason. The numbering keeps its gap at 07: the custom-domain component that +was the optional `07-domain` phase lands in `06-console`, parked, and an +owner wires it later in an ordinary PR (see +[06-console](06-console.md#the-custom-domain--parked)). -Two requirements look odd and are deliberate: +One requirement looks odd and is deliberate: - **`05-edge` requires `04-workers`, not `04-workers-restore`.** A phase that places no files derives as `unknown` — the product repo cannot be @@ -61,8 +63,6 @@ Two requirements look odd and are deliberate: that catches a phase run against a tree where its predecessor never happened. `testing/phases.test.sh` refuses a requirement on a hook-only phase. -- **`08-docs` requires `06-console`, not `07-domain`**, so a bootstrap that - skips the custom domain still reaches it. ## Inputs @@ -76,12 +76,11 @@ same words. | `productname` | yes | display name | | `productdomain` | yes | the apex domain the product answers on; it does not need to exist yet | | `githuborg` | yes | the org or user the repo lives under. The console fills it from the chosen repository's owner | -| `subdomain` | — | the Cloudflare **account's** workers.dev subdomain. The default is a placeholder; see below | +| `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.` | | `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 | -| `domain` | — | default `false`; `true` runs `07-domain` (read that page first) | | `pascalName`, `brandSlug`, `cliBin`, `salesEmail` | — | rebrand overrides. Empty, the first three derive from the names above (`brandSlug`, the worker prefix, from `reponame`); an empty `salesEmail` keeps the baseline mailbox | **`subdomain` is not the product name.** Every generated URL and the @@ -89,10 +88,15 @@ api-edge CORS allowlist derive from it, so a wrong value ships a product that deploys cleanly and is unreachable at every address it advertises — and the `/health` probes of 05, 06 and 08 fail against hosts that were never going to exist. Find it under Workers & Pages in the Cloudflare dashboard. +A build started from the console, or with `orun baseline new --from bst_…`, +never asks for it: `blueprint.yaml` declares +`from: connection.cloudflare.workersSubdomain`, so the platform reads it from +the workspace's Cloudflare connection, the same one the deploy tokens mint +from. Only a hand-run build passes it. `01-scaffold` writes the answers into the product as `.rebrand/values.json`, which is committed. Every later phase's rebrand hook -reads it, and it carries `githuborg`, `epicSlug` and `domain` too, so a phase +reads it, and it carries `githuborg` and `epicSlug` too, so a phase run months later in a fresh container can recover what the operator answered (orun's own record, `.orun/provenance.lock`, is gitignored and does not survive a container). The blueprint's **required** inputs are still @@ -171,8 +175,7 @@ Why it can run unattended: reverting your product's identity to `lumen`. Re-place one deliberately with `--phase `. - `04-workers-restore` and `08-docs` place no files, so they derive as - `unknown`; `07-domain` derives as `skipped` unless `domain=true`. - `--status` prints all of this without writing anything. + `unknown`. `--status` prints all of this without writing anything. - **Git-level idempotence is not deploy-level idempotence.** The product's CI plans `--changed`: a component deploys only when its files changed in the push. If a convergence is still red after the watch has spent its @@ -264,8 +267,7 @@ never product content. The whole design: `specs/epics/saas-baseline-tracking/`. The console previews the same programme from `blueprint.yaml`'s -`programme:` block — the epic and its eight milestones, with `07-domain` -marked conditional. +`programme:` block — the epic and its seven milestones. ## Why there is one document diff --git a/docs/phases/TIMINGS.md b/docs/phases/TIMINGS.md index f7829ea..2f9d4b6 100644 --- a/docs/phases/TIMINGS.md +++ b/docs/phases/TIMINGS.md @@ -44,13 +44,12 @@ quotes to an operator ("About N minutes"). | `04-workers-restore` | 5 | **estimate** | — as its own phase; its convergence was the 10m54s inside vela's 31m | billing + membership redeploy | | `05-edge` | 5 | measured | 5m22s vela; 5m03s ambient | land → converge → `/health` probes | | `06-console` | 16 | measured | 15m37s vela (all 3 resumes, self-healed); 14m01s ambient (0 resumes) | console builds are heavy | -| `07-domain` | 5 | **estimate, never run** | — | today its convergence plans nothing ([07-domain.md](07-domain.md)) | | `08-docs` | 1 | **estimate** | — (neither run's table records it) | probe + render + land | | tracking (BT) | seconds per landing | **estimate** | — | one task lookup and at most two creates per landing, plus the epic once | **Totals.** Measured: ~73m for 01–06 on vela, ~60m for 02–06 on ambient. The card (`blueprint.yaml`) promises ~60–75 minutes and budgets 75. The -per-phase numbers above sum to 84 without `07-domain` — they overstate, +per-phase numbers above sum to 84 — they overstate, because `04-workers`' 31 is vela's figure for the old phase 04, which already contained the restore landing that `04-workers-restore` budgets again. Budget **60–75 minutes**, and treat the 04 pair as ~20–31 between them. @@ -85,7 +84,9 @@ unchanged is a document nobody checked. over `ORUN_TOKEN`. 5. **A convergence that follows a commit touching NO components** plans zero lanes and reads "green". The phase's verify hook is the real gate; never - trust a green run without one. (`07-domain` is exactly this case today.) + trust a green run without one. (It is why the parked custom-domain + component no longer has a landing of its own: as `07-domain` it was + exactly this case. It lands in `06-console` now.) ## Defect log from the measured runs diff --git a/repo-blueprint.yaml b/repo-blueprint.yaml index 523c42b..64d4a98 100644 --- a/repo-blueprint.yaml +++ b/repo-blueprint.yaml @@ -60,7 +60,11 @@ inputs: subdomain: type: string default: "your-workers-subdomain" - description: workers.dev subdomain for app-config seams. + description: >- + workers.dev subdomain for app-config seams. 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. salesEmail: type: string default: "" @@ -80,9 +84,10 @@ inputs: the build runs in; with none anywhere, the scaffold writes a placeholder that fails loudly rather than silently cross-tenanting. # ── The facts the phases below need and the flows used to hold. They were - # workflow inputs (`githuborg`, `epicslug`, `domain` on the flows' per-phase - # workflow.yaml), which made them invisible to anything reading this file — - # including the console that has to render a form. + # workflow inputs (`githuborg`, `epicslug` — and `domain`, gone since the + # custom-domain component lands with the console, parked — on the flows' + # per-phase workflow.yaml), which made them invisible to anything reading + # this file — including the console that has to render a form. githuborg: type: string pattern: "^[A-Za-z0-9][A-Za-z0-9-]*$" @@ -106,14 +111,6 @@ inputs: cannot be un-made retroactively for anything already pushed. `orun.repo/ensure@v1` only sets this at creation: an existing repository keeps whatever visibility it already has. - domain: - type: boolean - default: false - description: >- - Whether to wire the product's custom domain (phase 07). It needs the - Cloudflare zone to already exist, so it is off unless asked for — the - condition the umbrella carried as a shell `[ = "true" ]` test and phase - 07 now carries as its own `when:`. # ── SOURCES ─────────────────────────────────────────────────────────────── # The baseline is this repo itself. Run `orun new` from the Lumen repo root so @@ -629,7 +626,7 @@ modules: # records the non-secret inputs in .orun/provenance.lock, but `.orun/` is # gitignored in the product, so it has never survived a container — this # file is committed, which is why every input a later phase needs must - # appear here. githuborg/epicSlug/domain are here for exactly that: a + # appear here. githuborg/epicSlug are here for exactly that: a # phase run months later in a fresh container reads them back. - name: rebrand-values mode: template @@ -647,8 +644,7 @@ modules: "salesEmail": "{{ .salesEmail }}"{{ end }}, "orunWorkspace": "{{ .orunWorkspace }}", "githuborg": "{{ .githuborg }}", - "epicSlug": "{{ .epicSlug }}", - "domain": {{ if .domain }}true{{ else }}false{{ end }} + "epicSlug": "{{ .epicSlug }}" } # ── PHASES ──────────────────────────────────────────────────────────────── @@ -1316,6 +1312,14 @@ phases: - "https://{{ .inputs.reponame }}-api-edge-stage.{{ .inputs.subdomain }}.workers.dev/health" - "https://{{ .inputs.reponame }}-api-edge-prod.{{ .inputs.subdomain }}.workers.dev/health" + # The custom-domain component lands here too, PARKED: it subscribes to no + # environment until an owner wires a zone (the commented-out `subscribe` + # block in infra/terraform/cloudflare-domain/component.yaml), so a landing of + # its own changed nothing live. It belongs with the last landing that + # converges a deploy because it routes the DEPLOYED console and edge (it + # `dependsOn` web-console-next). It was the optional 07-domain phase, behind + # a `domain` input, until that input was removed; the numbering keeps its + # gap so 08-docs keeps its name. - name: 06-console title: The web console expectedMinutes: 16 @@ -1324,7 +1328,7 @@ phases: await: "The console is building. This is the second-longest wait of the build." done: "The console is live on stage and prod, talking to the edge. {{ .meta.elapsed }}." failed: "The console did not build. The build log above carries the error." - modules: [web-console-next, web-console-next-tests] + modules: [cloudflare-domain, web-console-next, web-console-next-tests] requires: phases: [05-edge] hooks: @@ -1379,63 +1383,6 @@ phases: - "https://{{ .inputs.reponame }}-api-edge-prod.{{ .inputs.subdomain }}.workers.dev/health" - "https://{{ .inputs.reponame }}-web-console-next-prod.{{ .inputs.subdomain }}.workers.dev" - # cloudflare-domain trails the console because it wires the DEPLOYED - # console's custom domain. `when:` is the condition the umbrella carried as - # `[ "{{ inputs.domain }}" = "true" ]` in shell — a phase that declares when - # it runs beats a caller remembering not to ask for it. - - name: 07-domain - title: The custom domain - expectedMinutes: 5 - narrate: - start: "Now placing the custom-domain component for {{ .inputs.productdomain }} — the zone and the console's custom domains." - await: "Waiting for the convergence run that follows the domain PR." - done: "The custom-domain component is in the repository. It subscribes to no environment yet, so nothing is attached until it does — docs/phases/07-domain.md says what to change." - failed: "The domain phase did not land. Check that the zone for {{ .inputs.productdomain }} exists in this Cloudflare account." - modules: [cloudflare-domain] - when: inputs.domain - requires: - phases: [06-console] - hooks: - pre: - - id: task - uses: orun.task/ensure@v1 - with: - kind: task - epic: "{{ .inputs.epicSlug }}" - milestone: "{{ .phase.name }}" - name: "phase({{ .phase.name }}): custom domain" - prefix: BASE - contract: tasks/07-domain.TaskContract.yaml - post: - # Brand what this phase placed before it lands (see 02-foundation). - - id: stage - run: ["git", "add", "-A"] - - id: rebrand - run: ["node", "{{ .baseline.dir }}/tooling/rebrand/rebrand.mjs", "--values", ".rebrand/values.json", "--allow-dirty"] - - id: restage - run: ["git", "add", "-A"] - - id: rebrand-verify - run: ["node", "{{ .baseline.dir }}/tooling/rebrand/rebrand.mjs", "--verify", "--values", ".rebrand/values.json"] - - id: pnpm-lockfile - run: ["pnpm", "install", "--lockfile-only"] - - id: land - uses: orun.pr/land@v1 - narrate: "The domain PR is merged into main." - with: - task: "{{ .phase.hooks.task.outputs.key }}" - epic: "{{ .inputs.epicSlug }}" - branchSlug: "{{ .phase.name }}" - title: "phase({{ .phase.name }}): custom domain" - await: - - id: converge - uses: orun.run/watch@v1 - narrate: "The convergence run after the domain PR came back green." - with: - sha: "{{ .phase.hooks.land.outputs.mergeSha }}" - repo: "{{ .inputs.githuborg }}/{{ .inputs.reponame }}" - resumeBudget: 3 - waitSeconds: 1800 - # Places nothing. It records what the other phases built, from PROBED facts # rather than from what the blueprint intended — which is why it runs last # and why its verify is the same probe 06-console ends on. diff --git a/specs/epics/saas-baseline-tracking/README.md b/specs/epics/saas-baseline-tracking/README.md index a0c6f31..0628b7f 100644 --- a/specs/epics/saas-baseline-tracking/README.md +++ b/specs/epics/saas-baseline-tracking/README.md @@ -53,6 +53,13 @@ folder records what was ported here and where Lumen differs. - **The rehearsal.** One real Lumen bootstrap with `track=true` whose epic rollup reads `8/8 done`, recorded here with the task keys. +> **Since then.** The flows became `repo-blueprint.yaml`, and in +> `baseline-v30` the `domain` input was removed: `07-domain`'s one component +> ships parked, so it lands in `06-console`. A bootstrap today opens seven +> milestones (`01-scaffold` to `06-console`, then `08-docs`), so the rollup to +> look for is `7/7`. The text above is the shape BT shipped, kept as the +> record. + ## Agent brief v2 — one command, four kinds of line Ported from cirrus (its #36). The brief is 65 lines: ask three questions, diff --git a/specs/epics/saas-bootstrap-factory/IMPLEMENTATION-STATUS.md b/specs/epics/saas-bootstrap-factory/IMPLEMENTATION-STATUS.md index 3c7aa09..277acdd 100644 --- a/specs/epics/saas-bootstrap-factory/IMPLEMENTATION-STATUS.md +++ b/specs/epics/saas-bootstrap-factory/IMPLEMENTATION-STATUS.md @@ -21,3 +21,89 @@ and `README.md` (at-a-glance). One row per shipped milestone, newest first. compiled plan DAG is unchanged and CI produces no component jobs. - Follow-on milestones (BF1+) begin changing `component.yaml` and Stack Tectonic contracts and will produce real plan/verify jobs. + +## The workers.dev subdomain, read from the Cloudflare connection (2026-10-21, `baseline-v30`) + +Ported from cirrus-baseline (its #30). `subdomain` was a typed field on the +console card, though it belongs to the Cloudflare account the same way its id +does and has exactly one right answer: a wrong one surfaced only after deploy, +in CORS, OAuth origins, smoke checks and the verify URLs. + +`blueprint.yaml` now declares `from: connection.cloudflare.workersSubdomain`. +The Cloudflare integration reads the subdomain from the account at connect and +on its hourly health check, and the bootstrap door fills the input from the +connection the build is BOUND to — the same one `CLOUDFLARE_ACCOUNT_ID` and the +deploy tokens mint from. The console renders no field for it, and an account +with no workers.dev subdomain refuses the build at the door, naming the fix. + +- `testing/manifest.test.sh` accepts the source and requires its provider to be + in `spec.requires.integrations` (cirrus's block, byte for byte). The card + already lists `cloudflare`. +- `repo-blueprint.yaml`, `BOOTSTRAP.md`, `docs/phases/01-scaffold.md` and + `docs/phases/README.md` say a hand-run build still passes `--set subdomain`. +- Cirrus also marked a BE3 "not probed" note superseded and answered its risk + #13. Lumen carried neither, so this section is the whole record. + +| check | result | +|---|---| +| manifest, phases, coverage, rebrand | all pass | +| mutation: `cloudflare` removed from the card's `spec.requires.integrations` | `manifest.test.sh` fails (exit 1) naming `inputs[subdomain]` — "there is no connection to read it from"; restored, it passes | +| `orun new --status`, `testing/leak.test.sh`, `testing/placement.test.sh` (orun 2.58.11, the CI pin) | pass — 1103 files derived and placed, unchanged | + +## The `domain` input, removed (2026-10-21, `baseline-v30`) + +Ported from cirrus-baseline (its #31). `07-domain` was the one conditional +phase: `when: inputs.domain`, off by default, landing a single component, +`cloudflare-domain`. That component ships PARKED — `subscribe.environments: +[]` — so CI plans no lanes for it and the phase's convergence was a green run +with nothing in it. A landing that deploys nothing, behind a switch that turns +on a component which is already off, was one more question and one more PR for +no effect. Cirrus has one landing and folded the component into `01-product`; +Lumen keeps its landings, so it folds into `06-console`, the last landing that +converges a deploy and the one that places `web-console-next`, which the +component routes and `dependsOn`. + +### What shipped + +- `repo-blueprint.yaml`: the `domain` input is gone, and with it the + `"domain"` key of the `.rebrand/values.json` template; `cloudflare-domain` + joins `06-console`'s modules; the `07-domain` phase is deleted. Nine phases + remain; the numbering keeps its gap so `08-docs` keeps its name. `08-docs` + already required `06-console`. +- `blueprint.yaml`: the programme lists seven milestones; `07-domain` (and its + `when: domain`) is gone. +- `tasks/07-domain.TaskContract.yaml` and `docs/phases/07-domain.md` are + deleted. What the page said that is still true — the component ships parked, + its custom-domain attachment is fenced off mid-migration to provider v5, the + zone must exist in the account first, wiring it is restoring the + commented-out `subscribe` block — is now a section of + `docs/phases/06-console.md`, and `ai/context/operations.md` (which ships) + says the same without naming a factory path. +- `06-console`'s task contract leaves `cloudflare-domain` out of `affects`: + that list is what the convergence deploys, and a parked component deploys + nothing. +- `tests/fixtures/acme.json` loses `"domain": false`. + +### What the tests had to become + +- `testing/phases.test.sh` has no FOLDED map, so its partition records the + move in place: `06-console` expects `cloudflare-domain`, with a comment + saying why, and the gate still proves the component moved whole and nothing + moved with it. +- `testing/leak.test.sh` and `testing/placement.test.sh` no longer force + `domain` on: `06-console` places the component on every build, so the gates + cover it without help. The placement tier's phased sequence now places + `08-docs` after `06-console` — it requires the drifted `06-console`, the + exact case BE-O12 fixed. +- `testing/manifest.test.sh` (comments only) no longer lists `domain` among + the blueprint's build-driving inputs. + +### Verification + +| check | result | +|---|---| +| manifest, phases, coverage, rebrand | all pass — 7 milestones agree; 9 phases, 65 modules | +| `orun new --status` (orun 2.58.11, the CI pin) | parses; nine phases derived | +| `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) | diff --git a/tasks/06-console.TaskContract.yaml b/tasks/06-console.TaskContract.yaml index eb914f8..799e09f 100644 --- a/tasks/06-console.TaskContract.yaml +++ b/tasks/06-console.TaskContract.yaml @@ -9,6 +9,8 @@ spec: goal: The web console is live on stage and prod, talking to the edge affects: - web-console-next + # Not cloudflare-domain, though 06-console lands it: it ships parked + # (subscribe.environments: []), and a parked component deploys nothing. doneWhen: - console and edge live on stage and prod gates: [] diff --git a/tasks/07-domain.TaskContract.yaml b/tasks/07-domain.TaskContract.yaml deleted file mode 100644 index 3a1de97..0000000 --- a/tasks/07-domain.TaskContract.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Task contract template for the 07-domain landing (saas-baseline-tracking BT1). -# Unbound to a key on purpose: `orun task create --contract` seals and -# attaches it to the key the allocator issues. gates: [] is a DECLARATION — -# merge alone finishes this task; the main convergence is the gate the flow -# watches, not one the plane observes as a PR check. -apiVersion: orun.io/v1 -kind: TaskContract -spec: - goal: The product answers on its custom domain instead of workers.dev - affects: - - cloudflare-domain - doneWhen: - - convergence green on the custom domain - gates: [] diff --git a/testing/leak.test.sh b/testing/leak.test.sh index 6678baf..3ceef5d 100755 --- a/testing/leak.test.sh +++ b/testing/leak.test.sh @@ -27,14 +27,12 @@ trap 'rm -rf "$scratch"' EXIT echo "── deriving what every phase would place" # Inputs come from the fixture, so a new required input fails HERE rather than -# in front of an operator. `domain` is forced on: 07-domain is conditional, and -# a gate that never looks at a phase cannot vouch for it. +# in front of an operator. sets=() while IFS=$'\t' read -r k v; do sets+=( --set "$k=$v" ); done < <( python3 - "$root/tests/fixtures/acme.json" <<'PY' import json, sys vals = json.load(open(sys.argv[1])) -vals["domain"] = True for k, v in vals.items(): if k.startswith("_"): continue diff --git a/testing/manifest.test.sh b/testing/manifest.test.sh index cf6dcd2..4ae5cab 100755 --- a/testing/manifest.test.sh +++ b/testing/manifest.test.sh @@ -218,9 +218,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 [])} @@ -311,7 +322,7 @@ for path in manifests: # refused. # # ONE DIRECTION ONLY. The blueprint declares more than this file does — - # `githuborg`, `epicSlug`, `domain`, `orunWorkspace` and the identity + # `githuborg`, `epicSlug`, `orunWorkspace` and the identity # defaults are how a BUILD is driven, not what a product is configured # with. What must hold is that nothing this file declares arrives at an # engine that cannot take it. @@ -328,7 +339,7 @@ for path in manifests: # ── …AND THE OTHER DIRECTION, for REQUIRED inputs only ─────────────── # # The check above is one-directional on purpose: the blueprint declares - # more than this card does, because `epicSlug`, `domain` and the identity + # more than this card does, because `epicSlug` and the identity # defaults are how a BUILD is driven rather than what a product is # configured with. That tolerance had no floor, and `githuborg` fell # through it — `required: true` in the blueprint, absent from this card, @@ -361,8 +372,9 @@ for path in manifests: # # A milestone is what a phase CLUBS ITS TASK UNDER, which the phase states # as `orun.task/ensure@v1`'s `milestone:`. Reading that is why nine phases - # correctly produce eight milestones: `04-workers-restore` names - # `04-workers`, because it is the second landing of one unit of work. + # correctly produce seven milestones: `03-infrastructure-database` and + # `04-workers-restore` name `03-infrastructure` and `04-workers`, because + # each is the second landing of one unit of work. # # Distinct, in phase order. The old check grepped the umbrella's # `ensure-milestone` lines for the same list. diff --git a/testing/phases.test.sh b/testing/phases.test.sh index 238c8ea..b8027cb 100755 --- a/testing/phases.test.sh +++ b/testing/phases.test.sh @@ -71,8 +71,13 @@ WAS = { "projects-worker", "projects-worker-tests", "webhooks-worker", "webhooks-worker-tests"], "05-edge": ["api-edge", "api-edge-tests"], - "06-console": ["web-console-next", "web-console-next-tests"], - "07-domain": ["cloudflare-domain"], + # `cloudflare-domain` was 07-domain's one module. It folded into 06-console + # when the `domain` input went: the component ships parked (it subscribes + # to no environment until an owner wires a zone), so a landing of its own + # deployed nothing, and an on/off switch for a component that is already + # off was one more question for nothing. It moved whole, and nothing else + # moved with it. + "06-console": ["cloudflare-domain", "web-console-next", "web-console-next-tests"], } # Declared since BE1 and placing nothing: their work is hooks. `discovery-roots` # is likewise new — the empty apps/infra/packages/tests roots orun's repo-scale diff --git a/testing/placement.test.sh b/testing/placement.test.sh index 7c954c0..bcc9483 100755 --- a/testing/placement.test.sh +++ b/testing/placement.test.sh @@ -43,14 +43,12 @@ fails=0 fail() { echo " ✕ $*" >&2; fails=$((fails + 1)); } # The fixture is the source of inputs, so a new required input fails HERE rather -# than in front of an operator. `domain` is forced on: 07-domain is conditional, -# and a tier that never places a phase cannot vouch for it. +# than in front of an operator. sets=() while IFS=$'\t' read -r k v; do sets+=( --set "$k=$v" ); done < <( python3 - "$root/tests/fixtures/acme.json" <<'PY' import json, sys vals = json.load(open(sys.argv[1])) -vals["domain"] = True for k, v in vals.items(): if k.startswith("_"): continue @@ -221,7 +219,10 @@ name_after_brand="$(python3 -c "import json;print(json.load(open('$seq/package.j [ "$name_after_brand" = "acme-cloud" ] \ || fail "after branding, package.json name is $name_after_brand, not the product's" -for ph in 02-foundation 03-infrastructure 03-infrastructure-database 04-workers 05-edge 06-console 07-domain; do +# 08-docs requires 06-console, which the rebrand has drifted: the case BE-O12 +# used to refuse. (The custom-domain component used to land after 06-console as +# 07-domain; it lands in 06-console now, parked.) +for ph in 02-foundation 03-infrastructure 03-infrastructure-database 04-workers 05-edge 06-console 08-docs; do if ! orun new --blueprint "$root/repo-blueprint.yaml" --out "$seq" --phase "$ph" \ "${sets[@]}" > "$scratch/p-$ph.log" 2>&1; then fail "phase $ph refused after the rebrand: $(tail -1 "$scratch/p-$ph.log")" @@ -241,7 +242,7 @@ name_after_resume="$(python3 -c "import json;print(json.load(open('$seq/package. $name_after_resume. A resume between phases must not un-brand a product." [ "$fails" -eq 0 ] && \ - echo " 01 → 07 place through the rebrand; --resume leaves the branding alone" + echo " 01 → 08 place through the rebrand; --resume leaves the branding alone" [ "$fails" -eq 0 ] || { echo "placement.test.sh: $fails failure(s)" >&2; exit 1; } echo "placement.test.sh: ok" diff --git a/tests/fixtures/acme.json b/tests/fixtures/acme.json index 194bdbb..6813d82 100644 --- a/tests/fixtures/acme.json +++ b/tests/fixtures/acme.json @@ -16,6 +16,5 @@ "githuborg": "acme-inc", "subdomain": "acme", "orunWorkspace": "ws_0000000000000000000000000000000f", - "epicSlug": "infra-baselining", - "domain": false + "epicSlug": "infra-baselining" } diff --git a/tooling/rebrand/rebrand.mjs b/tooling/rebrand/rebrand.mjs index 0d349b4..241e290 100644 --- a/tooling/rebrand/rebrand.mjs +++ b/tooling/rebrand/rebrand.mjs @@ -65,8 +65,8 @@ if (valuesPath) { // blueprint renders values.json with those. Every product born before the // blueprint was the bootstrap (from the flows' phase slices) COMMITTED a // values.json with the camelCase keys this file used to read (`repoName`, - // `productName`, …), and a phase run against one later — 07-domain, a docs - // refresh — brands with that file. Both are read, and the manifest's key + // `productName`, …), and a phase run against one later — a docs refresh — + // brands with that file. Both are read, and the manifest's key // wins where both are present. const LEGACY = { reponame: "repoName",