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
23 changes: 22 additions & 1 deletion .baseline/product/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ and how to operate it is in
| The todo store: the visitor's list in one httpOnly cookie | `apps/web/src/data/todos.ts` |
| The header and its navigation | `apps/web/src/components/Header.tsx` |
| Workers build and deploy contract | `apps/web/vite.config.ts`, `apps/web/wrangler.jsonc`, `apps/web/component.yaml` |
| Tests (the site's name, the todo store) | `apps/web/src/**/*.test.ts` (vitest) |
| The Worker's entry, and who may frame the site | `apps/web/src/server.ts`, `apps/web/src/lib/framing.ts` |
| Tests (the site's name, the todo store, the framing policy) | `apps/web/src/**/*.test.ts` (vitest) |

## Getting started

Expand Down Expand Up @@ -73,6 +74,26 @@ Cloudflare token and account id are brokered per run from the workspace's
Cloudflare connection; nothing provider-shaped is stored in the repository
or in GitHub.

**Before the site goes live.** A site whose code was built before its
Cloudflare account was connected deploys nothing yet: `intent.yaml` carries
a `# @deploys-deferred:…` marker where stage's and prod's
`- github-push-main` trigger goes, so a merge to `main` plans dev's verify
lane (the site built and dry-deployed) and nothing else, and its CI stays
green. Going live — connecting Cloudflare and running the build's live
stage — puts both lines back, writes your account's workers.dev subdomain
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-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
locally. Prod sends no policy. The list is one map per environment in
`apps/web/src/lib/framing.ts`: edit it and merge, and the next deploy of
that environment sends it. (Each deploy lane tells its build which
environment it is for, as `DEPLOY_ENV`; `component.yaml` names the
variable.)

**Deploy by hand.** Orunbase's **Deploy** button on a component, or **Run
workflow** on the CI workflow in GitHub's Actions tab (on `main`), runs
`ci.yml` for the environment and components you pick, and each one deploys
Expand Down
25 changes: 0 additions & 25 deletions .baseline/tasks/01-product.TaskContract.yaml

This file was deleted.

23 changes: 23 additions & 0 deletions .baseline/tasks/01-scaffold.TaskContract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Task contract template for the 01-scaffold landing.
# Unbound to a key on purpose: `orun.task/ensure@v1` seals and attaches it to
# the key the allocator issues. It lives under `.baseline/`, not `tasks/`,
# because `tasks/` is this repository's own work tree (`intent.yaml` `work:`),
# where an unkeyed contract is an error. gates: [] is a DECLARATION — merge
# alone finishes this task; nothing deploys, so there is no convergence for
# the plane to observe.
#
# The whole site in one landing, GitHub only: the scaffold stage of a build
# that splits at a declared stage (blueprint.yaml `spec.stages`). `affects`
# names COMPONENTS, by metadata.name — the site is one component, and its test
# runs inside it (vitest in apps/web).
apiVersion: orun.io/v1
kind: TaskContract
spec:
goal: The site's repository is born and linked, and the whole site lands in one pull request with its deploy lanes parked, so CI on main checks it and deploys nothing until the site goes live
affects:
- web
doneWhen:
- repo pushed, main pinned as default, workspace linked (orun cloud link)
- the whole site on main, branded, intent.yaml's stage and prod push activation deferred
- main's run green, planning no deploy
gates: []
19 changes: 19 additions & 0 deletions .baseline/tasks/02-live.TaskContract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Task contract template for the 02-live landing. See 01-scaffold's header.
#
# The live stage: what 01-scaffold landed, deployed. `affects` names
# COMPONENTS, by metadata.name: the phase's retouch hook reads this list to
# decide which component.yaml files get the redeploy marker, so the deploy set
# and the task plane's statement of the work are one list. gates: [] — the
# main convergence is the gate the bootstrap watches, not one the plane
# observes as a PR check.
apiVersion: orun.io/v1
kind: TaskContract
spec:
goal: The site is bound to its Cloudflare account's workers.dev subdomain, its deploy credentials are minted from the workspace's connection, and one convergence builds it with Cloudflare's Vite plugin and deploys it to stage and prod
affects:
- web
doneWhen:
- no placeholder subdomain left in the site; CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID exist
- main convergence green (build, deploy and smoke on stage and prod)
- the home page answers on both workers.dev URLs
gates: []
2 changes: 1 addition & 1 deletion .baseline/tasks/03-docs.TaskContract.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Task contract template for the 03-docs landing. See 01-product's header.
# Task contract template for the 03-docs landing. See 01-scaffold's header.
apiVersion: orun.io/v1
kind: TaskContract
spec:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jobs:
# names a packageManager, and then fails on a runner with no pnpm.
# This job installs nothing.
package-manager-cache: false
- name: Contract tests (manifest, phases, coverage, rebrand, retouch, bootstrap-defer)
- name: Contract tests (manifest, phases, coverage, rebrand, retouch, bootstrap-defer, subdomain)
run: |
set -euo pipefail
python3 -c 'import yaml' 2>/dev/null || pip install --quiet pyyaml
for t in manifest phases coverage rebrand retouch bootstrap-defer; do
for t in manifest phases coverage rebrand retouch bootstrap-defer subdomain; do
echo "── $t"
bash "testing/$t.test.sh"
done
Expand All @@ -65,8 +65,8 @@ jobs:
# registry, compiles every `when` and narration template, and writes
# nothing. Then the leak gate (what a site would carry) and the placement
# tier (the offline bootstrap: every phase placed and finished by the
# blueprint's own hooks, then the site's own `orun plan` for the 01-product
# merge).
# blueprint's own hooks, then the site's own `orun plan` for each landing's
# merge; and a code-only build stopped after 01-scaffold, taken live later).
blueprint:
runs-on: ubuntu-latest
steps:
Expand Down
Loading
Loading