Skip to content

feat(bootstrap): a landing is verified once, the fleet deploys once, and a stopped build can be retried - #118

Merged
ruehowl merged 2 commits into
mainfrom
claude/tender-bell-gunxyb
Oct 25, 2026
Merged

ruehowl merged 2 commits into
mainfrom
claude/tender-bell-gunxyb

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Ports the measured wins from the Cloudflare-only baselines (cirrus-baseline, turso-starter) and fixes the two failures pullely/multi-tenant-saas hit on 2026-10-25. The budget goes from 84 minutes to 53; docs/phases/TIMINGS.md carries the arithmetic phase by phase, and says plainly that these are re-budgeted, not re-measured.

Faster

change what it buys
A bootstrap landing's PR runs plan alone (ci.yml skips lanes on orun/BASE-*), and the landing is checked locally (checks: local) the duplicate verify pass is gone. Measured: 04-workers' PR ran 46 jobs in 6m49s, every one of them again on the merge
The fleet deploys once, with its bindings — policy-worker's pre-deploy uploads a placeholder for every missing service-binding target (tooling/deploy/fleet-stubs.mjs) cycle-break.mjs and the whole 04-workers-restore phase are gone, and with them a landing, a convergence and a second fleet deploy (vela measured that restore convergence at 10m54s)
CI runs one job per lane (execution.lanes, maxLanes: 18, max-parallel: 19) with a shared pnpm store a fleet landing fits in one wave instead of waves of 8, and lanes stop re-downloading ~500 packages each
prod's promotion gate and dev's push-to-main lanes are deferred for the build, restored by 08-docs byte-for-byte prod stops waiting out stage on every component; dev's verifies stop taking runner slots from the deploys
background task plane, pollSeconds: 5, secrets: list, stack-tectonic 0.20.0 seconds per landing, and the 10007 first-deploy race retries instead of costing a rerun
04-workers no longer re-probes wiring the two phases before it just proved one less round trip, and one less preflight that can refuse a fresh build

Smoother

retouch.mjs (a re-run after a convergence that failed post-merge has a diff to land) · kiox removed, so products stop carrying a v2.15.0 provider pin · five integrations/reconcile hooks become two, one per connection, each keeping its per-key scope template · environments carry their description and live URLs · a tree naming no workspace fails ci.yml by name instead of an hour later in every lane · .baseline/product/deployment.md.

The retry failure

A build that stops between the pen's push and the merge leaves orun/<task>-<phase> on the remote. The retry commits a sibling of that commit, so the push is rejected non-fast-forward — deterministically, on every retry, for ever. On pullely/multi-tenant-saas every "Retry from 04-workers" died on that push without reaching one step of the phase's work.

Each landing now clears its own pen branch first (tooling/bootstrap/pen-reset.mjs). A branch already merged is left alone; nothing outside orun/ can be touched. testing/pen-reset.test.sh drives the whole chain against a real remote — including asserting that the push really is rejected without it.

Verification

  • orun new --status under the pinned CLI (v2.88.0) derives all 8 phases: every hook validated against the action registry, every narration template compiled.
  • Contract suite green, 11/11: manifest, phases, coverage, rebrand, leak, placement, and the four new ones — retouch, bootstrap-defer, fleet-stubs, pen-reset. baseline.yml runs eight of them.
  • A placed product carries tooling/deploy/fleet-stubs.mjs and does not carry tooling/bootstrap/.
  • The second commit fixes testing/placement.test.sh, which the floor bump turned red: it grepped for v2.58.x's repo gate: validate + plan --dry-run passed, and v2.88.0 runs the same gate but reports ✓ Verified intent valid · 44 components × 3 envs → 92 jobs. It now matches either wording and still fails when the gate is genuinely absent.
  • The CI run needed one re-run: a lane whose two components both passed (2 succeeded) then exited 1 on 1 remote log chunk(s) could not be delivered — platform log ingest, after the work was done. Green on attempt 2.

Floors

Bootstrap floor v2.88.0 (background preInstantiate, checks: local, the secrets: list); the product's ci.yml lane pin v2.78.4 (lanes, v2.76.0).

Not included

The prebuilt console artifact. It needs CA1/CA2 first: this console bakes NEXT_PUBLIC_DEPLOY_ENV into its build and DEPLOY_ENV functionally locks the API target, so one build cannot serve both environments. Porting it means a runtime-config refactor across ~9 console files plus new rebrand seams (rebrand.mjs matches the literal PRODUCT_NAME = "Lumen" source text, which the object form breaks). That is its own change, and 06-console is still budgeted here for a cold build — so there are ~8–12 more minutes available once it lands.

The catalog doc generator (tooling/catalog/gen-component-docs.mjs) is also not here: its templates are written for a Cloudflare-D1 data plane (PLATFORM_DB bindings, the d1-edit token, SQLite types, D1 migration failures) and --check showed it would rewrite 135 doc files unreviewed. The one line it would have fixed — every runbook claiming "the bootstrap's two-pass landing handles first boot", which this PR makes false — is corrected directly in all 13 affected runbooks.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH

…and a stopped build can be retried

Ports the measured wins from the Cloudflare-only baselines and fixes the two
failures the multi-tenant-saas build hit. The budget goes from 84 minutes to
53; docs/phases/TIMINGS.md carries the arithmetic, phase by phase.

Faster:
- A bootstrap landing's PR runs `plan` alone (ci.yml skips lanes on
  `orun/BASE-*`). The merge runs every lane on main a minute later, for real.
  Measured on pullely/multi-tenant-saas: 04-workers' PR ran 46 jobs in 6m49s,
  every one of them again on the merge.
- The fleet deploys ONCE, with its bindings. policy-worker's pre-deploy
  uploads a placeholder for every service-binding target that does not exist
  yet (tooling/deploy/fleet-stubs.mjs), so Cloudflare's 10143 cannot bite on a
  fresh account. cycle-break.mjs and the whole 04-workers-restore phase are
  gone, and with them a landing, a convergence and a second fleet deploy.
- CI runs one job per LANE (execution.lanes, maxLanes 18) with a shared pnpm
  store, instead of one job per orun job at max-parallel 8.
- prod's promotion gate and dev's push-to-main lanes are deferred for the
  build and restored by 08-docs, byte-for-byte.
- The task plane opens in the background; every landing is checked locally
  (`checks: local`) rather than by a runner; every watch polls at 5s.
- stack-tectonic 0.18.2 -> 0.20.0 (first-deploy 10007 retry, console smoke
  retries). 04-workers no longer re-probes wiring two phases just proved.

Smoother:
- retouch.mjs gives a re-run something to land when a convergence failed after
  its PR merged.
- kiox is gone: orun is pinned where it runs. Products stop carrying a
  v2.15.0 provider pin.
- Five `integrations/reconcile` hooks become two, one per connection, each
  keeping its per-key scope template (orun v2.87.0).
- Environments carry their description and live URLs; a tree that names no
  workspace fails ci.yml by name instead of an hour later in every lane.

The retry failure:
- A build that stops between the pen's push and the merge leaves
  `orun/<task>-<phase>` on the remote, and every retry commits a sibling of
  that commit, so the push is rejected non-fast-forward — deterministically,
  for ever. Each landing now clears its own pen branch first
  (tooling/bootstrap/pen-reset.mjs); a merged branch is left alone and nothing
  outside `orun/` can be touched. testing/pen-reset.test.sh drives the whole
  chain against a real remote.

The bootstrap floor is orun v2.88.0 (background preInstantiate, `checks:
local`, the `secrets:` list); the product's lane pin is v2.78.4 (lanes).
baseline.yml runs eight contract tests, four of them new.

NOT included: the prebuilt console artifact. It needs CA1/CA2 first — this
console bakes NEXT_PUBLIC_DEPLOY_ENV into its build and DEPLOY_ENV locks the
API target, so one build cannot serve both environments — plus new rebrand
seams. Its own change. 06-console is still budgeted for a cold build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
Bumping the bootstrap floor to v2.88.0 turned testing/placement.test.sh red:
it grepped the placement log for `repo gate: validate + plan --dry-run
passed`, which is how v2.58.x said it. v2.88.0 runs the same validate and
plan --dry-run and reports

    ✓ Verified    intent valid · 44 components × 3 envs → 92 jobs

so the gate was never lost — only renamed, and a rename should not be a red
tier. The check now matches either wording, and still fails when the gate is
genuinely absent, which is the property it exists for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
@ruehowl
ruehowl marked this pull request as ready for review October 25, 2026 10:09
@ruehowl
ruehowl merged commit b226495 into main Oct 25, 2026
85 of 86 checks passed
ruehowl pushed a commit that referenced this pull request Oct 25, 2026
…ailure

Main went red on the merge of #118. policy-worker's pre-deploy exited 1 on

    fleet-stubs: creating lumen-billing-worker-stage: HTTP 403
      code 10037, "You have exceeded the limit of 500 Workers on your account."

and because every binding holder waits on policy-worker with `mode: enforced`,
ten lanes went red on a step belonging to a component that was itself fine.
The placeholder was never needed by most of them.

A create that fails is now reported and skipped, not fatal. Each real deploy
then speaks for itself: a target genuinely still missing fails ITS OWN lane
with Cloudflare 10143, naming the worker that needs it, and an account with no
room fails the deploy that needs the room, with 10037. Both land on the
component an operator must act on, which is never policy-worker. The
existence check stays fatal when it answers neither 200 nor 404 — that one is
a safety property: a placeholder must never overwrite a real Worker the check
failed to see.

This does not make the convergence green. The account is at its 500-Worker
limit, so the deploys that need a new script cannot succeed either; that needs
Workers deleted on the account, which no change here can do. What it fixes is
one unmakeable placeholder taking the whole fleet down with it, and the error
landing on the wrong component.

Also, two failure modes made legible:
- 05-edge and 06-console said "the failing step says why" when the failing
  step was the URL probe and the convergence was green. They now distinguish
  the two, and name the usual cause: a `subdomain` that is not the Cloudflare
  account's workers.dev subdomain. A deploy lane smokes the URL wrangler
  actually returned, so a wrong `subdomain` passes every lane and first
  surfaces in a phase's verify, ~35 minutes in. Seen on a build carrying
  `test-lum`, which is not a claimed subdomain.
- BOOTSTRAP.md gains a troubleshooting row for each.

testing/fleet-stubs.test.sh drives the new path against a fake API that
answers every create as an account at its limit: the step exits 0, names each
placeholder it could not create, says a still-missing target will fail its own
deploy by error code, and records nothing as created.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
ruehowl added a commit that referenced this pull request Oct 25, 2026
…ailure (#119)

Main went red on the merge of #118. policy-worker's pre-deploy exited 1 on

    fleet-stubs: creating lumen-billing-worker-stage: HTTP 403
      code 10037, "You have exceeded the limit of 500 Workers on your account."

and because every binding holder waits on policy-worker with `mode: enforced`,
ten lanes went red on a step belonging to a component that was itself fine.
The placeholder was never needed by most of them.

A create that fails is now reported and skipped, not fatal. Each real deploy
then speaks for itself: a target genuinely still missing fails ITS OWN lane
with Cloudflare 10143, naming the worker that needs it, and an account with no
room fails the deploy that needs the room, with 10037. Both land on the
component an operator must act on, which is never policy-worker. The existence
check stays fatal when it answers neither 200 nor 404 — a placeholder must
never overwrite a real Worker the check failed to see.

This does not make lumen's own convergence green: the account is at its
500-Worker limit, so the deploys that need a new script cannot succeed either.
That needs Workers deleted on the account.

Also, two failure modes made legible:
- 05-edge and 06-console said "the failing step says why" when the failing
  step was the URL probe and the convergence was green. They now distinguish
  the two and name the usual cause: a `subdomain` that is not the Cloudflare
  account's workers.dev subdomain. A deploy lane smokes the URL wrangler
  actually returned, so a wrong `subdomain` passes every lane and first
  surfaces in a phase's verify.
- BOOTSTRAP.md gains a troubleshooting row for each.

testing/fleet-stubs.test.sh drives the new path against a fake API that
answers every create as an account at its limit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants