Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .baseline/product/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,8 @@ The site answers on workers.dev from its first deploy. To serve it on your
own domain, add the domain to the Cloudflare account the site deploys into
and attach it to the Worker (dashboard → Workers & Pages →
`blob-starter-web-prod` → Settings → Domains & Routes → Add → Custom
domain). Nothing in the repository changes: the page builds its absolute
links from the request it is answering.
domain). The page builds its absolute links from the request it is
answering, so nothing else has to change; the repository names the domain in
one place, `BASE_DOMAIN` in `intent.yaml`, which the site was born with as
the reserved placeholder `blob-starter.example.com`. Replace it with your
domain in the same change that records it.
1 change: 0 additions & 1 deletion .github/workflows/baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ jobs:
--out "$(mktemp -d)" \
--set reponame=acme-uploads \
--set "productname=Acme Uploads" \
--set productdomain=acme.dev \
--set githuborg=acme-inc
- name: the leak gate — what a product carries
run: bash testing/leak.test.sh
Expand Down
14 changes: 9 additions & 5 deletions BOOTSTRAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ cd blob-starter
orun new --blueprint repo-blueprint.yaml \
--out ~/sites/acme-uploads --run-hooks --resume \
--set reponame=acme-uploads --set productname="Acme Uploads" \
--set productdomain=acme.dev --set githuborg=acme-inc \
--set githuborg=acme-inc \
--set orunWorkspace=ws_XXXXXXXX \
--set subdomain=<workers-dev-subdomain>
```
Expand Down Expand Up @@ -96,9 +96,13 @@ orun new --blueprint repo-blueprint.yaml --out ~/sites/acme-uploads --run-hooks

`02-docs` reads the identity back from `.rebrand/values.json` in the placed
tree, but the blueprint's **required** inputs — `reponame`, `productname`,
`productdomain`, `githuborg` — are validated before anything runs, so pass
them every time (a `--values` file is easier). The full guide, one page per
phase: [docs/phases/README.md](docs/phases/README.md).
`githuborg` — are validated before anything runs, so pass them every time (a
`--values` file is easier). The domain is not one of them: the site goes live
on workers.dev, and `productdomain` defaults to empty, which brands the
reserved placeholder `<reponame>.example.com` into `BASE_DOMAIN` for an owner
to replace when they attach a domain (README, "Custom domain"). Pass
`--set productdomain=` only for a site that already has its domain.
The full guide, one page per phase: [docs/phases/README.md](docs/phases/README.md).

| flag | what it does |
|---|---|
Expand Down Expand Up @@ -232,7 +236,7 @@ at the tag and refuses the whole catalogue if it 404s.
| Convergence failed AFTER the PR merged; re-running lands nothing | expected on its own — the files are on main. Re-run the phase (`--phase 01-product`, `--redo 01-product`, or the console's Retry): its `retouch` hook gives the landing a diff and the R2 root and the uploader re-plan |
| The product's `intent.yaml` says `workspace: ws_SET_ME` | `orunWorkspace` was empty and the build ran outside a workspace; set it and re-run `01-product` |
| A bootstrap stopped before `02-docs`; prod no longer waits on stage | the gate is deferred, not dropped: run `02-docs`, or `node tooling/bootstrap/promotion.mjs --restore --file <product>/intent.yaml` |
| `✕ input "productdomain" is required` | all four required inputs must be set on every invocation, single-phase ones included |
| `✕ input "productname" is required` | all three required inputs (`reponame`, `productname`, `githuborg`) must be set on every invocation, single-phase ones included |
| `unknown flag: --phase` or a parse error in the blueprint | the CLI is below the v2.58.11 floor |
| web lane `verify-app-structure` fails on `wrangler.jsonc` | the config is not committed. It is the fixture render of `wrangler.template.jsonc`: `pnpm run wire:fixture` and commit it |
| web lane `build-app`: `Symlink apps/web/node_modules/next is invalid, it points out of the filesystem root` | the product's intent pins stack-tectonic ≥ 0.20.0, whose lane-scoped install links each job's node_modules out of its tree, which Next 16's Turbopack refuses. Pin 0.19.0 (`intent.yaml` says why) |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ design, the milestones and the as-built status.
git clone --depth 1 --branch <baseline-tag> https://github.com/sourceplane/blob-starter
cd blob-starter
orun new --blueprint repo-blueprint.yaml --out ~/sites/acme-uploads --run-hooks --resume \
--set reponame=acme-uploads --set productname="Acme Uploads" --set productdomain=acme.dev \
--set reponame=acme-uploads --set productname="Acme Uploads" \
--set githuborg=acme-inc --set subdomain=<workers-dev-subdomain>
```

Expand Down
6 changes: 3 additions & 3 deletions ai/context/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ then the Worker deployed), then records what went live (`02-docs`).

| | |
|---|---|
| Latest tag | `baseline-v2` (BL5 — the cirrus standard: no kiox, generated component docs, this context pack, and the console card reading `subdomain` from the Cloudflare connection; SVG uploads closed, risk BL-L); `baseline-v1` is BL4 |
| Latest tag | `baseline-v3` (BL6 — the domain is set later: the console asks for no domain, and a site is born with the placeholder `<reponame>.example.com` for an owner to replace); `baseline-v2` is BL5 (the cirrus standard; SVG uploads closed, risk BL-L), `baseline-v1` BL4 |
| Proven live | No. Everything short of the platform is proven offline in Baseline CI, an upload round-tripped through the built Worker included; a live bootstrap from a tag is still to come (risk BL-G) |

`baseline-v1` accepts any `image/*` upload, SVG included, and serves it from
the product's own origin (BL-L). A product built from it needs BL5's change
to `apps/web/lib/blob`, the delivery route and the uploader, which
`baseline-v2` carries.
`baseline-v2` and later carry.

## Where to read

Expand All @@ -38,6 +38,6 @@ to `apps/web/lib/blob`, the delivery route and the uploader, which

## Next

1. Bootstrap one product from `baseline-v2` against a workspace whose
1. Bootstrap one product from `baseline-v3` against a workspace whose
Cloudflare account has R2 enabled (BL-J), and record its timings (closes
BL-G).
1 change: 1 addition & 0 deletions ai/context/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ reads in order.
| 11 | orun is pinned only where it runs (the `orun-action` `version:` in each workflow); no kiox | `kiox.yaml` pinned a version (v2.15.0) nothing ran | IMPLEMENTATION-STATUS (BL5) |
| 12 | Component docs are generated from the manifests and checked in CI | A hand-written copy of the dependency graph and bindings drifts silently | `tooling/catalog/gen-component-docs.py` |
| 13 | The console card reads `subdomain` from the Cloudflare connection (`from: connection.cloudflare.workersSubdomain`); only a hand-run build passes it | It belongs to the account like its id and has one right answer; a typed one could only be wrong, and wrong showed up after deploy (cirrus-baseline since baseline-v23) | `blueprint.yaml`, IMPLEMENTATION-STATUS (BL-7) |
| 14 | The console asks for no domain; an empty `productdomain` brands the placeholder `<reponame>.example.com` | The site goes live on workers.dev and nothing in the build needs a domain; attaching one is an owner's step, and the placeholder keeps every place the domain goes in the repository, ready to replace | `repo-blueprint.yaml`, `tooling/rebrand/rebrand.mjs`, IMPLEMENTATION-STATUS (BL-8) |
2 changes: 1 addition & 1 deletion ai/context/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ orun integrations list --org <ws> --json && orun cloud check --org <ws>
| redeploy without a change | edit the last line of `apps/web/component.yaml` (`# orun: redeploy <reason> <stamp>`) and merge — it is a deploy trigger, nothing reads it |
| list or delete stored files | `wrangler r2 object …` on the bucket named in the environment's `WIRING_CLOUDFLARE_R2` (`--remote`), or the dashboard's R2 page |
| add a binding (D1, KV, another bucket) | a Terraform root under `infra/terraform/` that publishes `WIRING_<ROOT>`, a token in `wrangler.template.jsonc`, its fixture entry, the root in the build's `--components`, the `WIRING_<ROOT>_<ENV>` secretEnv and an enforced `dependsOn` on it in `apps/web/component.yaml` |
| serve a custom domain | attach it to the Worker in Cloudflare (README, "Custom domain"); nothing in the repository changes |
| serve a custom domain | attach it to the Worker in Cloudflare (README, "Custom domain"), then replace the placeholder `blob-starter.example.com` in `intent.yaml`'s `BASE_DOMAIN` with it |
| add a runtime secret | `orun secrets set <KEY> --org <ws> --env <env>` |
| headless credentials | `ORUN_TOKEN` (workspace-scoped) + `GITHUB_TOKEN` |

Expand Down
11 changes: 6 additions & 5 deletions blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ spec:
# already holds says so with `from`. repo-blueprint.yaml declares the same
# names; `repoPrivate`, `orunWorkspace` and `epicSlug` are build inputs with
# defaults (or filled from the build's workspace) and are not asked.
#
# NOR IS THE DOMAIN. The site goes live on workers.dev, and a domain is an
# owner's step after the bootstrap: `productdomain` defaults to empty, the
# rebrand writes the reserved placeholder `<reponame>.example.com` where
# the domain goes, and the site's README ("Custom domain") says how to
# set it. Nothing that needs a domain is removed — it waits for one.
inputs:
- key: reponame
label: Repo name
Expand All @@ -76,11 +82,6 @@ spec:
pattern: "^[A-Za-z0-9][A-Za-z0-9 .,'&-]{1,48}$"
help: The name visitors see — the page's heading and its title.
example: Acme Uploads
- key: productdomain
label: Site domain
pattern: "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"
help: The domain the site will answer on. It does not need to exist — the site goes live on workers.dev first.
example: acme.dev
- key: githuborg
label: GitHub organisation
pattern: "^[A-Za-z0-9][A-Za-z0-9-]*$"
Expand Down
12 changes: 9 additions & 3 deletions docs/phases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,15 @@ its absolute links from the request.
`01-product` takes the site's identity once and writes it into the repo
(`.rebrand/values.json`); `02-docs` reads it back from the placed tree. But
the blueprint's **required** inputs — `reponame`, `productname`,
`productdomain`, `githuborg` — are validated before any phase runs, so they
must be supplied on every invocation, single-phase ones included. A
`--values` file is easier than repeating `--set`.
`githuborg` — are validated before any phase runs, so they must be supplied
on every invocation, single-phase ones included. A `--values` file is easier
than repeating `--set`.

- `productdomain` — NOT ASKED, default empty. The site goes live on
workers.dev; empty brands the reserved placeholder `<reponame>.example.com`
into `BASE_DOMAIN`, for an owner to replace when they attach a domain (the
site's README, "Custom domain"). Pass it only for a site that already has
its domain.

- `subdomain` — the workers.dev subdomain of the Cloudflare account you
deploy into. It is in every URL the phases probe. A console or
Expand Down
14 changes: 10 additions & 4 deletions repo-blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ inputs:
description: The site's display name (e.g. "Acme Uploads") — the page heading and its title.
productdomain:
type: string
required: true
default: ""
description: >-
The domain the site will answer on (e.g. acme.dev) — BASE_DOMAIN and the
custom-domain guidance. It does not need to exist: the site answers on
workers.dev from its first deploy.
The site's own domain, once it has one (e.g. acme.dev). NOT ASKED: the
site 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 `<reponame>.example.com` where the domain goes (BASE_DOMAIN
under each environment's `env:` in intent.yaml), so setting it later is
replacing that one string — the site's README, "Custom domain", says
how. The page builds its absolute links from the request it answers, so
nothing else follows it. Pass it with --set only to brand a hand-run
build with a domain it already has.
githuborg:
type: string
pattern: "^[A-Za-z0-9][A-Za-z0-9-]*$"
Expand Down
2 changes: 1 addition & 1 deletion specs/epics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ folder is the adoption; the merge creates the epic in the workspace.

| Epic | Cluster | Status | What it is |
|------|---------|--------|------------|
| [`blob-starter/`](./blob-starter/) | **BL** | ✅ Shipped (`baseline-v2`); live bootstrap pending | Vercel's Blob Next.js Starter, equivalent in code and function, on Cloudflare Workers with uploads stored in R2 — and an Orun baseline that instantiates it in one landing (BL4) |
| [`blob-starter/`](./blob-starter/) | **BL** | ✅ Shipped (`baseline-v3`); live bootstrap pending | Vercel's Blob Next.js Starter, equivalent in code and function, on Cloudflare Workers with uploads stored in R2 — and an Orun baseline that instantiates it in one landing (BL4) |

As-built ≠ intent: what shipped lives in each epic's `IMPLEMENTATION-STATUS.md`.
42 changes: 42 additions & 0 deletions specs/epics/blob-starter/IMPLEMENTATION-STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ the code departed from `design.md` or from the upstream template.
| BL3 — ready to instantiate | ✅ Shipped | [#4](https://github.com/sourceplane/blob-starter/pull/4) |
| BL4 — a baseline, in one landing | ✅ Shipped (offline-proven; no live bootstrap yet, risk BL-G) | [#5](https://github.com/sourceplane/blob-starter/pull/5) (BL-5), tagged `baseline-v1` |
| BL5 — the cirrus standard, SVG uploads closed | ✅ Shipped | [#6](https://github.com/sourceplane/blob-starter/pull/6) (BL-6), [#7](https://github.com/sourceplane/blob-starter/pull/7) (BL-7), tagged `baseline-v2` |
| BL6 — the domain is set later | ✅ Shipped | [#8](https://github.com/sourceplane/blob-starter/pull/8) (BL-8), tagged `baseline-v3` |

## Departures from the upstream template

Expand Down Expand Up @@ -144,6 +145,47 @@ complete. Mutation check: with `cloudflare` removed from
`inputs[subdomain].from is 'connection.cloudflare.workersSubdomain' but
spec.requires.integrations does not list cloudflare`; restored, it passes.

## The domain is set later (BL6, BL-8)

The console asked for the site's domain, with help text that said it did not
need to exist — and nothing in the build needed one: the site answers on
workers.dev from its first deploy, the page builds its absolute links (the
Open Graph image included) from the request it is answering, and the one
place the repository names the domain is `BASE_DOMAIN` in `intent.yaml`. A
domain is an owner's step after the bootstrap (README, "Custom domain"), so
the form no longer asks for it.

- `blueprint.yaml` declares no `productdomain` input; the console's Product
step asks for the site's name alone.
- `repo-blueprint.yaml`'s `productdomain` is optional, default empty. No hook,
probe or `when:` reads it — the only use is the `.rebrand/values.json`
template, which writes `""`. A hand-run build may still pass
`--set productdomain=` for a site that already has its domain.
- `rebrand.mjs` no longer requires it. Empty, it brands the reserved
placeholder `<reponame>.example.com` (RFC 2606 — never someone else's
domain) where the domain goes — `BASE_DOMAIN` in dev, stage and prod — so
setting it later is replacing one string; the product README and
`ai/context/operations.md` say so.
- `testing/fixtures/acme.json` carries no domain, so the leak gate, the
offline bootstrap and the e2e tier exercise exactly what a console build
supplies; `testing/rebrand.test.sh` pins the placeholder for an absent and
an empty domain; `baseline.yml`'s blueprint read sets no domain.

Nothing that needs a domain was removed — it waits for one.

Verified: `testing/{manifest,phases,coverage,rebrand,retouch,bootstrap-defer,wire}.test.sh`
green (rebrand: 33 checks, the two new ones included); `gen-component-docs.py
--check` green (3 components); `orun new --status` on `repo-blueprint.yaml`
with no domain (01-product pending, 81 files) and `testing/leak.test.sh` (81
files derived; 74 shipped sources name no factory path) at v2.58.11;
`testing/placement.test.sh` at v2.78.4, as Baseline CI runs it (81 tracked
files; cloudflare-r2 → web on stage and prod; the 02-docs merge plans 0
jobs; `--resume` changes nothing). The offline bootstrap of the fixture,
which names no domain, writes `"productdomain": ""` and brands
`acme-blob-uploads.example.com` into the site's three `BASE_DOMAIN` lines,
its README and its `operations.md` (5 lines, 3 files), with no
`blob-starter.example.com` left. `orun task check BL-8` complete.

## Verified (BL5)

- `testing/{manifest,phases,coverage,rebrand,retouch,bootstrap-defer,wire}.test.sh`
Expand Down
Loading
Loading