Skip to content

feat(baseline): lumen-payload as a Lumen-grade baseline — Multi-tenant Payload CMS (PB-1) - #30

Merged
ruehowl merged 1 commit into
mainfrom
orun/PB-1-baseline
Oct 30, 2026
Merged

ruehowl merged 1 commit into
mainfrom
orun/PB-1-baseline

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

lumen-payload becomes a Blueprint of itself, at the quality of the Lumen baseline (baseline-v32) it was born from. repo-blueprint.yaml places a branded product whose console is Payload CMS, blueprint.yaml is its card ("Multi-tenant Payload CMS"), and the baseline's own CI proves that a placed, branded product installs, typechecks and passes every suite.

The build

Lumen's eight phases. The CMS lands where its dependencies put it:

module phase why there
cloudflare-r2-cms 03-infrastructure reads nothing anyone publishes
cloudflare-hyperdrive-cms 03-infrastructure-database plans against supabase's outputs, like cloudflare-hyperdrive
cms, cms-tests 06-console binds what 03, 03-db and 05 publish; it is the console
web-console-next (redirect) 06-console depends on the CMS, so one convergence deploys the CMS first
  • 03 also mints CLOUDFLARE_R2_TOKEN (r2-data).
  • 06 probes the edge's and the CMS's /health for 200, and the console URL for 308 (the probe does not follow redirects).
  • A product starts from a "not rendered yet" deployment stub, not this repository's live record.
  • Lumen's prebuilt-console machinery is not carried over, because every product builds its own CMS.

The rebrand

tooling/rebrand/rebrand.mjs reads the baseline's own identity from .rebrand/values.json. It renames the platform word the CMS code uses (lumen, in every case-form) into the product's, and renames paths too: lib/lumen/, /auth/lumen/, LumenLogin.tsx, 206_cms_lumen_identity.

  • Field and column stay one name. The snake form is derived the way Payload derives a column from a field, so lumenUserId and lumen_user_id always match.
  • Rewritten migrations are re-sealed. The migration runner refuses a file that doesn't match its checksum, so the rebrand re-seals each migration it rewrote, and only those.

Gates

  • Tier 0 (baseline-contract): Lumen's contract tests, adapted.
    • rebrand.test.sh is rewritten for the new engine.
    • fleet-stubs now also accepts a binding holder whose every target is an enforced dependency.
  • Tier 1 (blueprint-parses): the parse, leak and placement gates.
  • Tier 2 (branded-fork, new): places and brands a product, then runs a frozen install, a typecheck of every package, Worker configs rendered from their fixtures, and every suite.

Tier 2 found four problems before any product hit them:

  • a test variable named lumen, now renamed;
  • the migration checksum, now re-sealed;
  • apps/cms bundles @saas/contracts without declaring it, so contracts is now a dependsOn edge;
  • the CMS's sign-in binding made cms the deepest service-binding chain, now recorded at 9 (the budget is 12).

The last two were already failing on main. Their suites are on quick-check, a profile that runs no tests (see docs/components/REVIEW.md).

Docs

  • BOOTSTRAP, including the owner's first-admin step.
  • docs/phases (06-console rewritten for the CMS; TIMINGS).
  • The product's README and AGENTS templates.
  • docs/components/REVIEW.md, regenerated for 49 components.
  • Baseline sections in README and AGENTS.
  • The lumen-payload-baseline spec.

The build time, 23 minutes, is derived, not timed end to end: Lumen's measured phases plus this repository's measured CMS deploys (6m06s–7m12s).

Verified locally

With orun v2.89.0 and v2.88.0 (the CI pin), each built from its tag:

  • all eight contract tests pass;
  • leak and placement pass;
  • branded-fork passes: 243 files rewritten and 41 paths renamed, then the install, typecheck and all 30 test tasks green.

The touched product suites pass too: cms 180, platform-limits 28, config-worker 216.

Orun-Task: PB-1


Generated by Claude Code

…t Payload CMS (PB-1)

lumen-payload becomes a Blueprint of itself, at the quality of the Lumen
baseline (baseline-v32) it was born from: repo-blueprint.yaml places a branded
product whose console is Payload CMS, blueprint.yaml is its card, and the
baseline's own CI proves a placed, branded product installs, typechecks and
passes every suite.

The build keeps Lumen's eight phases. The CMS lands where its edges put it:
cloudflare-r2-cms in 03-infrastructure (it reads nothing published),
cloudflare-hyperdrive-cms in 03-infrastructure-database (it plans against
supabase's outputs, like cloudflare-hyperdrive), and the CMS with its suite in
06-console, with the console URL's 308 redirect that dependsOn it. 03 mints
CLOUDFLARE_R2_TOKEN (r2-data) with its siblings; 06 probes the edge's and the
CMS's /health (200) and the console URL (308, not followed). A product starts
from a "not rendered yet" deployment stub, not this repository's live record.
Lumen's prebuilt-console machinery is not carried: the console here is the
CMS, which every product builds.

The rebrand engine reads the baseline's own identity from .rebrand/values.json
and renames the platform word the CMS code uses — lumen, in every case-form —
into the product's, PATHS INCLUDED (lib/lumen/, /auth/lumen/, LumenLogin.tsx,
206_cms_lumen_identity). The snake form is derived as Payload's adapter derives
a column from a field, so lumenUserId and lumen_user_id stay one name. A
migration the rebrand rewrote is re-sealed in the db manifest, since the runner
refuses a file that does not hash to its checksum.

Tier 2 (testing/branded-fork.test.sh, a new Baseline CI job) places and brands
a product and runs its frozen install, typecheck, fixture-rendered Worker
configs and every suite. It found, before any product did: a test variable
named `lumen` (now `person`); the migration checksum; and two failures this
repository already had that its own CI never ran (both suites are on
quick-check, which runs no tests) — the CMS bundles @saas/contracts without
declaring it (now a dependsOn edge), and the CMS's sign-in binding made it the
deepest service-binding chain (now recorded: cms, 9, under the budget of 12).

Also: fleet-stubs accepts a binding holder whose every target is an enforced
dependency; docs/phases (06-console rewritten for the CMS, TIMINGS with the
derived 23 minutes), BOOTSTRAP, the product's README/AGENTS templates,
docs/components/REVIEW.md regenerated for 49 components, README and AGENTS
sections on the baseline, and the lumen-payload-baseline spec. The build time
is derived, not timed end to end: Lumen's measured phases plus this
repository's measured CMS deploys.

Orun-Task: PB-1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG
@ruehowl
ruehowl marked this pull request as ready for review October 30, 2026 04:08
@ruehowl
ruehowl merged commit 1a82c7a into main Oct 30, 2026
9 checks passed
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