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
18 changes: 11 additions & 7 deletions .github/workflows/baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ jobs:

# Tier 1. THE BLUEPRINT, READ AND PLACED BY THE BINARY A BOOTSTRAP RUNS.
#
# Pinned at the bootstrap floor (BOOTSTRAP.md), not the product's lane pin:
# every test here reads YAML with PyYAML, which parses anything well-formed;
# Pinned at v2.96.0, not the product's lane pin: at or above the bootstrap
# floor (v2.88.0, BOOTSTRAP.md), and the first orun that reads a
# component's `spec.preview`, so the placement's `orun validate` checks the
# product's live preview too. Every test here reads YAML with PyYAML, which
# parses anything well-formed;
# only the pinned orun can say whether the document is one a bootstrap can
# run. `--status` parses it, validates every hook against the action
# registry, compiles every `when` and narration template, and writes
Expand All @@ -81,7 +84,7 @@ jobs:
- uses: actions/checkout@v6
- uses: sourceplane/orun-action@v1.2.0
with:
version: v2.88.0
version: v2.96.0
- uses: pnpm/action-setup@v4
with:
version: 10.12.1
Expand Down Expand Up @@ -126,9 +129,10 @@ jobs:
# orun stages, handed the stage wiring document; and the built Worker served
# over that project with no Stripe key — its smoke, every route, a sign-up,
# sign-out, sign-in and the account page through its own server actions, and
# the anon key refused every row the policies do not give it. Pinned at the
# bootstrap floor (v2.88.0): the offline bootstrap reads the blueprint, and
# the floor is newer than the product's lane pin (v2.78.4), which is all
# the anon key refused every row the policies do not give it. Pinned at
# v2.96.0, above the bootstrap floor (v2.88.0), the first orun that
# reads `spec.preview`: the offline bootstrap reads the blueprint, and
# the pin is newer than the product's lane pin (v2.78.4), which is all
# the lane steps need. The runner image carries PostgreSQL 16 (not started);
# the test starts its own on a random port.
product:
Expand All @@ -137,7 +141,7 @@ jobs:
- uses: actions/checkout@v6
- uses: sourceplane/orun-action@v1.2.0
with:
version: v2.88.0
version: v2.96.0
- uses: pnpm/action-setup@v4
with:
version: 10.12.1
Expand Down
21 changes: 21 additions & 0 deletions apps/web/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,27 @@ spec:
- profile: deploy
when:
triggerRef: github-push-main
# How the site runs itself for orun.work's live Preview tab
# (saas-parallel-baselining PB4): `orun preview` starts this, and a coding
# session keeps it running while it works, so the person watches it change
# as it is built. The dev server binds the box's loopback only, on a fixed
# port, and installs first, so a checkout the session has not installed yet
# still comes up. No Supabase project or Stripe account is wired in (nothing
# secret goes here): PREVIEW_USE_WRANGLER_VARS has `next dev` read the
# committed wrangler.jsonc's fixture project, as a dev-lane build does
# (next.config.mjs), so the pricing page renders its sample plans with
# checkout off, and sign-in renders but reaches no Supabase.
preview:
run:
- sh
- -c
- pnpm install --frozen-lockfile --prefer-offline --filter "@app/web..." && exec node_modules/.bin/next dev -H 127.0.0.1 -p 3000
port: 3000
path: /
env:
NODE_OPTIONS: --max-old-space-size=1024
NEXT_TELEMETRY_DISABLED: "1"
PREVIEW_USE_WRANGLER_VARS: "1"
parameters:
nodeVersion: "22"
pnpmVersion: "10.12.1"
Expand Down
26 changes: 24 additions & 2 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,30 @@ export default function nextConfig(phase) {
// resolve from the root node_modules.
output: 'standalone',
outputFileTracingRoot: path.join(__dirname, '../..'),
// Dev server only (`next build` ignores it): orun.work's live Preview tab
// loads `next dev` from the preview's own host, and Next.js refuses the
// hot reload and other /_next/* dev requests from an origin it is not told
// about. These are the preview's hosts, prod's and stage's.
allowedDevOrigins: ['*.orun-preview.app', 'preview-gateway-stage.oruncloud.workers.dev'],
experimental: {
// Dev server only: behind orun.work's live Preview the browser's Origin
// is the preview's host while `next dev` sees a local Host, and Next.js
// refuses a Server Action from an origin it is not told about. `next
// build` runs with NODE_ENV=production, so production keeps its
// same-origin check.
...(process.env.NODE_ENV === 'development'
? { serverActions: { allowedOrigins: ['*.orun-preview.app', 'preview-gateway-stage.oruncloud.workers.dev'] } }
: {})
},
// Only a production build reads the wrangler config: `next dev` keeps the
// template's own behaviour, `.env.local`.
env: phase === PHASE_PRODUCTION_BUILD ? publicBuildEnv() : {}
// template's own behaviour, `.env.local`. orun.work's live Preview is the
// one exception (apps/web/component.yaml's spec.preview sets
// PREVIEW_USE_WRANGLER_VARS): it reads the committed wrangler.jsonc as a
// dev-lane build does, the fixture project, so the pages render rather
// than fail to build a Supabase client. A value in `.env.local` still wins.
env:
phase === PHASE_PRODUCTION_BUILD || process.env.PREVIEW_USE_WRANGLER_VARS === '1'
? publicBuildEnv()
: {}
};
}
7 changes: 7 additions & 0 deletions intent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ compositions:
cloudflare-domain: stack-tectonic
db-migrate: stack-tectonic

# The live preview (saas-parallel-baselining PB4): the component orun.work's
# Preview tab shows while a coding session works on the site. Its own
# `spec.preview` (apps/web/component.yaml) says how it runs; `orun preview`
# runs it.
preview:
component: web

discovery:
roots:
- apps/
Expand Down
Loading