diff --git a/.baseline/product/README.md b/.baseline/product/README.md index d9b72d7..a553ae3 100644 --- a/.baseline/product/README.md +++ b/.baseline/product/README.md @@ -85,6 +85,7 @@ where a placeholder stood in for it, and deploys. **Who may frame the site.** On stage, every page the Worker renders says who may show it in a frame: `Content-Security-Policy: frame-ancestors 'self' +https://orun.work https://stage.orun.work https://orun-agent-web-stage.oruncloud.workers.dev https://orun-agent-web-prod.oruncloud.workers.dev http://localhost:*` — orun.work's preview pane, which shows the stage deploy, and orun.work run diff --git a/BOOTSTRAP.md b/BOOTSTRAP.md index 04c235f..f2bc4d4 100644 --- a/BOOTSTRAP.md +++ b/BOOTSTRAP.md @@ -196,7 +196,8 @@ orun new --blueprint repo-blueprint.yaml \ `src/routeTree.gen.ts` from them); the site's name is `apps/web/src/lib/site.ts`. Every merge to `main` redeploys. - **Framing**: the stage Worker sends `Content-Security-Policy: - frame-ancestors 'self' https://orun-agent-web-stage.oruncloud.workers.dev + frame-ancestors 'self' https://orun.work https://stage.orun.work + https://orun-agent-web-stage.oruncloud.workers.dev https://orun-agent-web-prod.oruncloud.workers.dev http://localhost:*`, so orun.work's preview pane (and orun.work run locally) can show the stage deploy in an iframe; prod and dev send no policy. The list is one map in diff --git a/README.md b/README.md index e4bd07c..e36a6ad 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ the cookie for a KV namespace. **Framing.** The stage Worker answers every page it renders with `Content-Security-Policy: frame-ancestors 'self' +https://orun.work https://stage.orun.work https://orun-agent-web-stage.oruncloud.workers.dev https://orun-agent-web-prod.oruncloud.workers.dev http://localhost:*` — orun.work's preview pane shows a site's stage deploy in an iframe, and diff --git a/ai/context/current.md b/ai/context/current.md index f5575cf..315d371 100644 --- a/ai/context/current.md +++ b/ai/context/current.md @@ -24,7 +24,7 @@ On stage, the Worker lets orun.work's preview pane frame it. | | | |---|---| -| Latest tag | `baseline-v1` (TS-3); TS-4 — the two-stage build and stage framing — is on `main` for `baseline-v2` | +| Latest tag | `baseline-v2` (TS-4: the two-stage build and stage framing); orun.work's domain in the framing list is on `main` for `baseline-v3` | | Proven live | No. Everything short of the platform is proven offline in Baseline CI (risk TS-A). The card's 5 minutes is an estimate | ## Where to read @@ -39,9 +39,8 @@ On stage, the Worker lets orun.work's preview pane frame it. ## Next -1. Cut `baseline-v2` and move the registry row to it (`tag`, - `expectedMinutes: 5`); the registry reads the card change as - `needs-review` (programme, stages, late-bound inputs). +1. Cut `baseline-v3` (orun.work's domain, `orun.work` and + `stage.orun.work`, may frame stage) and move the registry row to it. 2. Bootstrap one site from it against a workspace — code only, then live — and record its timings on stage in place of the estimate (closes TS-A; orun.work offers the baseline to apps only after that measurement). diff --git a/ai/context/open-risks.md b/ai/context/open-risks.md index dedc657..d0eb6cd 100644 --- a/ai/context/open-risks.md +++ b/ai/context/open-risks.md @@ -10,7 +10,7 @@ only what is still live, so it should be short. | TS-A | No live bootstrap yet: the repository created and linked, the Cloudflare token minted, a real `wrangler deploy` and the probes are unproven — nor the two-stage build's code-only stop and later go-live | OPEN | One bootstrap from `baseline-v2` against a workspace, code only then live, timed on stage | | TS-J | Going live later needs the site's checkout as the build's `--out`: `02-live` requires `01-scaffold` derived from the tree and lands from its git. A fresh, empty `--out` re-places the scaffold instead, and its landing is refused once `main` holds files the baseline does not (a code-only app's own work) | OPEN | The platform's go-live runs in a checkout of the app's `main` | | TS-K | Going live in the container that built the scaffold needs orun v2.90.0 (late-bound inputs); older ones refuse the real subdomain against the recorded placeholder | OPEN | v2.90.0 released and the runner's | -| TS-L | Stage's `frame-ancestors` list narrows framing from any origin (no header) to the listed ones: orun.work served from any other origin — a custom domain — cannot frame a stage site until it is listed and that site's stage redeploys | OPEN | orun.work's final origins in `apps/web/src/lib/framing.ts` before sites depend on them | +| TS-L | Stage's `frame-ancestors` list narrows framing from any origin (no header) to the listed ones: orun.work served from any other origin — a custom domain — cannot frame a stage site until it is listed and that site's stage redeploys | MITIGATED (baseline-v3) | orun.work's domain, `https://orun.work` and `https://stage.orun.work`, is listed in `apps/web/src/lib/framing.ts`; a site cut from baseline-v2 or earlier lists only the workers.dev origins until it takes v3 | Accepted, and worth knowing before you change them: TS-B (`wrangler.jsonc` is the built Worker, held to the Vite plugin's output by the end-to-end diff --git a/apps/web/README.md b/apps/web/README.md index d8a3bfb..d17b27f 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -20,6 +20,7 @@ The site's name — every page's `` — is in `src/lib/site.ts`. Who may show the site in a frame is in `src/lib/framing.ts`, per environment: on **stage**, every response the Worker renders carries `Content-Security-Policy: frame-ancestors 'self' +https://orun.work https://stage.orun.work https://orun-agent-web-stage.oruncloud.workers.dev https://orun-agent-web-prod.oruncloud.workers.dev http://localhost:*` (orun.work's preview pane, and orun.work run locally); prod, dev and a local diff --git a/apps/web/src/lib/framing.test.ts b/apps/web/src/lib/framing.test.ts index 1806771..0580797 100644 --- a/apps/web/src/lib/framing.test.ts +++ b/apps/web/src/lib/framing.test.ts @@ -4,6 +4,8 @@ import { DEPLOY_ENV, FRAME_ANCESTORS, frameAncestorsPolicy, withFramingPolicy } // orun.work's preview pane frames a site's stage deploy, from these origins. const ORUN_WORK = [ + 'https://orun.work', + 'https://stage.orun.work', 'https://orun-agent-web-stage.oruncloud.workers.dev', 'https://orun-agent-web-prod.oruncloud.workers.dev', ] diff --git a/apps/web/src/lib/framing.ts b/apps/web/src/lib/framing.ts index f71d844..a2fde79 100644 --- a/apps/web/src/lib/framing.ts +++ b/apps/web/src/lib/framing.ts @@ -24,7 +24,10 @@ export const FRAME_ANCESTORS: Readonly<Record<string, readonly string[]>> = { stage: [ "'self'", - // orun.work's preview pane, on its stage and prod deploys. + // orun.work's preview pane: its own domain (prod and stage), then the + // workers.dev origins the same deploys also answer on. + 'https://orun.work', + 'https://stage.orun.work', 'https://orun-agent-web-stage.oruncloud.workers.dev', 'https://orun-agent-web-prod.oruncloud.workers.dev', // orun.work run locally, for its development: any port. diff --git a/specs/epics/tanstack-start/IMPLEMENTATION-STATUS.md b/specs/epics/tanstack-start/IMPLEMENTATION-STATUS.md index e222cb2..cd16d3f 100644 --- a/specs/epics/tanstack-start/IMPLEMENTATION-STATUS.md +++ b/specs/epics/tanstack-start/IMPLEMENTATION-STATUS.md @@ -5,7 +5,7 @@ | TS0 — the spec | ✅ | TS-1 | | TS1 — TanStack Start on Workers | ✅ | TS-2 | | TS2 — a baseline | ✅ | TS-3, tagged `baseline-v1` | -| TS3 — scaffold, then live | ✅ on `main` | TS-4, to be tagged `baseline-v2` | +| TS3 — scaffold, then live | ✅ | TS-4, tagged `baseline-v2`; orun.work's domain in stage's framing list on `main` for `baseline-v3` | ## Departures from the upstream template diff --git a/specs/epics/tanstack-start/risks-and-open-questions.md b/specs/epics/tanstack-start/risks-and-open-questions.md index 671f913..b34d1f1 100644 --- a/specs/epics/tanstack-start/risks-and-open-questions.md +++ b/specs/epics/tanstack-start/risks-and-open-questions.md @@ -13,5 +13,5 @@ | TS-I | A custom domain is the owner's step: the site goes live on workers.dev, and attaching a domain needs zone permissions the brokered `workers-deploy` token does not carry | ACCEPTED | | TS-J | Going live later needs the site's checkout as the build's `--out`: `02-live` requires `01-scaffold` derived from the tree and lands from its git, and a fresh, empty `--out` re-places the scaffold, whose landing is refused once `main` holds files the baseline does not (a code-only app's own work) | OPEN — the platform's go-live runs in a checkout of the app's `main` | | TS-K | Going live in the container that built the scaffold needs orun v2.90.0, which exempts late-bound inputs from the resume rule; older ones refuse the real subdomain against the recorded placeholder (a fresh container records nothing) | OPEN — closes when v2.90.0 is the runner's | -| TS-L | Stage's `frame-ancestors` list narrows framing from any origin (no header at all) to the listed ones: orun.work served from another origin — a custom domain — cannot frame a stage site until it is listed and that site's stage redeploys | OPEN — orun.work's final origins listed in `apps/web/src/lib/framing.ts` before sites depend on them | +| TS-L | Stage's `frame-ancestors` list narrows framing from any origin (no header at all) to the listed ones: orun.work served from another origin — a custom domain — cannot frame a stage site until it is listed and that site's stage redeploys | MITIGATED (baseline-v3) — orun.work's domain (`https://orun.work`, `https://stage.orun.work`) is listed in `apps/web/src/lib/framing.ts`; a site cut from baseline-v2 or earlier needs v3 to be framed from it | | TS-M | A code-only site's manual deploy of stage or prod (Orunbase's Deploy button) is refused by `orun plan` — `environment stage is not activated by trigger github-push-main` — with a red run, not a notice | ACCEPTED — there is no credential to deploy with until the live stage; the run says why | diff --git a/testing/e2e.test.sh b/testing/e2e.test.sh index d5eb748..9356cb8 100755 --- a/testing/e2e.test.sh +++ b/testing/e2e.test.sh @@ -430,7 +430,8 @@ if s != 404 or "<p>Not Found</p>" not in nf or 'href="/demo/start/server-funcs"' # site's stage deploy in an iframe. Every response the Worker renders carries # the policy — a page, a 404, the API route, a server function; the static # files never reach the Worker and carry none. -ORUN_WORK = ("https://orun-agent-web-stage.oruncloud.workers.dev", +ORUN_WORK = ("https://orun.work", "https://stage.orun.work", + "https://orun-agent-web-stage.oruncloud.workers.dev", "https://orun-agent-web-prod.oruncloud.workers.dev") for path in ("/", "/demo/start/server-funcs", "/demo/start/ssr/spa-mode", "/no-such-page", "/demo/api/names"): _, h, _ = get(path)