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
1 change: 1 addition & 0 deletions .baseline/product/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion BOOTSTRAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions ai/context/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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).
2 changes: 1 addition & 1 deletion ai/context/open-risks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions apps/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The site's name — every page's `<title>` — 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
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/lib/framing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
5 changes: 4 additions & 1 deletion apps/web/src/lib/framing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion specs/epics/tanstack-start/IMPLEMENTATION-STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion specs/epics/tanstack-start/risks-and-open-questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
3 changes: 2 additions & 1 deletion testing/e2e.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading