Repository navigation
TS3: scaffold, then live — the build splits at a declared stage (saas-orun-work WA5) - #4
Merged
Merged
Conversation
…-orun-work WA5)
orun.work builds an app from this baseline in two stages, and an account
with no Cloudflare connection stops after the first. The one landing that
built and deployed the site (01-product) splits where its needs change:
- 01-scaffold (GitHub only): the whole tree placed, branded and landed in a
new, linked repository, stage's and prod's push-to-main activation parked
(tooling/bootstrap/deploys.mjs). Dev keeps its own, because orun refuses
a push plan no environment answers: a merge plans dev's verify lane, binds
no credential and deploys nothing. No GitHub connection probe — the link
check is the gate, and a managed-GitHub repository has no connection row.
- 02-live (Cloudflare): the late-bound subdomain bound wherever the scaffold
wrote the placeholder (tooling/bootstrap/subdomain.mjs), the deploy lanes
put back, the promotion gate and dev's lanes deferred, web retouched, the
two keys minted, one landing watched to green and probed.
- 03-docs: unchanged — records it and restores the gate and dev's lanes.
The card declares spec.stages {scaffold: 01-scaffold, live: 02-live} and
lateBound: true on subdomain (so does the build document); programme and
expectedMinutes (1 + 3 + 1) follow. A full build ends on baseline-v1's tree;
a code-only build taken live later ends on the full build's, byte for byte.
The stage Worker lets orun.work frame it: src/server.ts wraps TanStack
Start's handler and adds Content-Security-Policy: frame-ancestors from a
per-environment map (src/lib/framing.ts), the environment written in at
build time from DEPLOY_ENV (the component's environmentBuildVar). Prod and
dev send none.
Tests: the card's stages and late-bound rules mirrored from Orunbase's
parser and held to the build document; the stage rules (scaffold needs
GitHub only, live binds every late input and restores the lanes; every
deferral restored); deploys.mjs and subdomain.mjs; the offline bootstrap
for a full build (each merge's plan) and a code-only build taken live; the
stage Worker's framing header end to end.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PcpNWBtvn3y8id6vTP3Yz
ruehowl
marked this pull request as ready for review
October 31, 2026 12:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The baseline half of WA5 in Orunbase's
saas-orun-workepic (orun.work, an app builder on Orunbase). The build now splits at a declared stage, so an account with no Cloudflare connection gets a code-only app and can go live later.The phases
01-scaffold, GitHub only. It places and rebrands the code, creates the repository and lands it.tooling/bootstrap/deploys.mjs --deferparks the stage and prodgithub-push-maintriggers. A scaffold merge therefore plans one verify-only job,webon dev with no secrets bound, so CI onmainis green and deploys nothing.02-live, Cloudflare. Its first hook,subdomain.mjs --bind, replaces the late-bound placeholderyour-workers-subdomainin every tracked file it reaches, writing.rebrand/values.jsonlast so an interrupted run finishes on the next one. The hook is idempotent and refuses a bad value or a move between two real subdomains. The phase then:deploys.mjs --restore);03-docs, unchanged.A full build (no stop) ends with the same tree as
baseline-v1, apart from the framing files and the redeploy marker naming02-live.The card
spec.stages: {scaffold: 01-scaffold, live: 02-live}andlateBound: trueonsubdomain, in both the card and the build document. The build document keeps its default as the placeholder; orun v2.90.0 refuses to keep it in a run that doesn't stop.expectedMinutesgoes from 4 to 5 (an estimate until a build is timed on stage).Framing
The stage Worker sends
Content-Security-Policy: frame-ancestorsfor'self', the two orun.work origins (orun-agent-web-{stage,prod}.oruncloud.workers.dev) andhttp://localhost:*. Prod sends none.environmentBuildVar: DEPLOY_ENV).src/server.ts; the origins are one map insrc/lib/framing.ts.Verification
pnpm install --frozen-lockfile,typecheck,lint,test(19),build, andgen-component-docs.py --check.leak,placementande2etiers pass on orun v2.88.0, v2.89.0 and v2.90.0.placementbuilds a code-only site with--until 01-scaffold, takes it live, finds no placeholder left, and matches the full build's tree.blueprint-manifest.tsparses the card with stages andlateBound. Its change check againstbaseline-v1reportsneeds-review.After merge
baseline-v2, only once orun v2.90.0 is released: older runners ignoreORUN_BASELINE_UNTIL.tanstack-startrow in sourceplane/orun-cloud'sinfra/baselines-registry/baselines.yamltobaseline-v2withexpectedMinutes: 5.Generated by Claude Code