Skip to content

feat: the console asks for no domain — the domain is set later - #116

Merged
ruehowl merged 4 commits into
mainfrom
claude/brave-mccarthy-4l2qxb
Oct 22, 2026
Merged

ruehowl merged 4 commits into
mainfrom
claude/brave-mccarthy-4l2qxb

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

The product answers on workers.dev from its first deploy, every phase probes workers.dev, and the one component that attaches a domain (cloudflare-domain) ships parked, so nothing in the build needs a domain. With this change the console card stops asking for one. Everything that uses the domain stays where it is and carries a placeholder until an owner sets it. Ported from turso-starter #9.

It goes in the same release as #115: baseline-v30 was never pushed, and it gets pushed at this PR's merge commit.

What changes

  • Card (blueprint.yaml): the productdomain input is removed. apibaseurl is removed too, because it was derive: "https://api.{productdomain}" and a card can only derive from inputs it declares.

  • Build (repo-blueprint.yaml): productdomain is optional with default "". A hand-run build can still pass --set productdomain=. repo-blueprint.yaml keeps apibaseurl (default empty).

  • Rebrand: productdomain is no longer required. When it is empty, the reserved placeholder <reponame>.example.com (RFC 2606) goes everywhere lumen.app stood:

    • intent's BASE_DOMAIN and CONSOLE_CUSTOM_DOMAIN, plus the parked cloudflare-domain's baseDomain
    • api-edge's CONSOLE_CUSTOM_DOMAIN
    • identity-worker's OAUTH_ALLOWED_CONSOLE_ORIGINS, which still lists the workers.dev console, so sign-in keeps working
    • the notifications sender
    • billing's POLAR_SUCCESS_URL
    • the CORS test fixtures

    No component logic changed. Lumen's Supabase root sets no auth URLs.

  • CLI default API:

    • With no domain, it is the product's own prod edge, https://<brandSlug>-api-edge-prod.<subdomain>.workers.dev. This follows the worker-name rule for lumen-api-edge deployed --env prod.
    • With a domain given, it stays https://api.<domain>.
    • An explicit apibaseurl still overrides both.
  • cloudflare-domain (checked for the bug found in cirrus ci: re-trigger notifications-worker deploy (verify brokered CF token resolve) #32): no change needed. baseDomain and workerNamePrefix, their Terraform defaults and the README examples already name lumen.app and lumen-web-console-next, which match the console Worker's wrangler name. The rebrand therefore turns them into the product's placeholder and console Worker, and nothing asks an owner to set them by hand.

  • Shipped ai/context/operations.md: new section "Setting the domain later". It lists every place the domain goes, then the steps:

    1. Replace the placeholder (git grep -lF).
    2. Create the zone and restore the commented-out subscribe block.
    3. Verify the mail domain.
    4. Check Supabase auth URLs (none are set).
    5. Optionally re-point the CLI default.
    6. Merge, then run the docs flow.
  • hooks/render-deployment-docs.sh: an empty domain already skipped the custom-domain probes. The placeholder now counts as no domain too, and the stale "phase 07" text is gone.

  • Tests:

    • The fixture carries no domain.
    • placement.test.sh used to read the card's derive. It now checks the placed product directly: its DEFAULT_API_URL must match the branded api-edge's prod worker on workers.dev, and its intent must carry the placeholder. It refuses to pass when there is nothing to check.
    • rebrand.test.sh gains 9 checks: no domain, an empty domain, a given domain, and an explicit apibaseurl.
    • baseline.yml reads the blueprint with no domain.
  • Docs and records: BOOTSTRAP.md (examples, required inputs, troubleshooting row), docs/phases (README, 01-scaffold, and the required-inputs sentence on five pages), and a dated section in saas-bootstrap-factory/IMPLEMENTATION-STATUS.md.

Verified locally (orun 2.58.11, the CI pin)

check result
manifest, phases, coverage, rebrand all exit 0: 7 milestones, 9 phases, 65 modules, 45/45 components, rebrand 23 checks (14 before)
orun new --status with no productdomain exit 0
testing/leak.test.sh exit 0: 1103 files derived (unchanged)
testing/placement.test.sh exit 0: 1103 product files (unchanged); DEFAULT_API_URL = https://acme-cloud-api-edge-prod.acme.workers.dev; BASE_DOMAIN ×3 and CONSOLE_CUSTOM_DOMAIN ×2 read acme-cloud.example.com, and 10 files carry it
cloudflare-domain, branded with no domain baseDomain: acme-cloud.example.com, workerNamePrefix: acme-cloud-web-console-next (the console Worker); the same in the TF defaults and README; with brandSlug: acme, acme-web-console-next
mutation: old CLI rule rebrand 3 ✕, placement FAIL; restored, both pass
mutation: no placeholder rebrand 3 ✕, placement FAIL on BASE_DOMAIN ''; restored, both pass
the documented replacement, on a placed product 10 files → 0; BASE_DOMAIN: acme.dev
a second rebrand pass 0 files affected

🤖 Generated with Claude Code

https://claude.ai/code/session_01D8AmgTwmnp4M8mgmnS9aha

The `subdomain` input was typed by hand, though it belongs to the Cloudflare
account the same way its id does and has exactly one right answer. A wrong
value surfaced only after deploy, in CORS, OAuth origins, smoke checks and
the verify URLs. Ported from cirrus-baseline #30.

- blueprint.yaml: `subdomain` declares
  `from: connection.cloudflare.workersSubdomain`; the bootstrap door fills it
  from the connection the build is bound to, so the console renders no field
- testing/manifest.test.sh: cirrus's block, byte for byte — accepts the source
  and requires its provider in spec.requires.integrations (mutation-checked)
- repo-blueprint.yaml, BOOTSTRAP.md, docs/phases/01-scaffold.md and
  docs/phases/README.md: a hand-run build still passes --set subdomain
- saas-bootstrap-factory IMPLEMENTATION-STATUS: dated record (Lumen has no
  BE3 note or risk #13 to supersede)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D8AmgTwmnp4M8mgmnS9aha
…06-console, parked

`07-domain` was the one conditional phase: off unless `--set domain=true`,
landing a single component that ships parked (`subscribe.environments: []`),
so its convergence was a green run with nothing in it. The switch turned on a
component that is already off. Ported from cirrus-baseline #31; Lumen keeps
its landings, so the component folds into 06-console, the last landing that
converges a deploy and the one that places web-console-next.

- repo-blueprint.yaml: the `domain` input, its values.json key and the
  07-domain phase are gone; cloudflare-domain joins 06-console's modules
- blueprint.yaml: the programme lists seven milestones
- docs/phases/07-domain.md and tasks/07-domain.TaskContract.yaml deleted; what
  is still true (parked, v5 fence, zone first, restore the subscribe block) is
  a section of docs/phases/06-console.md and a row in ai/context/operations.md
- 06-console's contract leaves cloudflare-domain out of `affects` (parked)
- tests: phases.test.sh expects cloudflare-domain in 06-console; leak and
  placement no longer force `domain` on (1103 files placed, the identical set);
  the phased sequence places 08-docs after 06-console
- tests/fixtures/acme.json drops "domain": false
- records: saas-bootstrap-factory IMPLEMENTATION-STATUS section; a "Since
  then" note in saas-baseline-tracking

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D8AmgTwmnp4M8mgmnS9aha
The product answers on workers.dev from its first deploy and nothing in the
build needs a domain, so the console card no longer asks for one. Everything
that uses the domain stays where it is, carrying a placeholder until an owner
sets it. Ported from turso-starter #9.

- blueprint.yaml: no productdomain input, and no apibaseurl (it derived from
  {productdomain}; a card can only derive from inputs it declares)
- repo-blueprint.yaml: productdomain optional, default empty
- rebrand.mjs: productdomain no longer required; empty brands the reserved
  placeholder <reponame>.example.com where lumen.app stood (intent
  BASE_DOMAIN/CONSOLE_CUSTOM_DOMAIN, edge and identity origins, mail sender,
  billing success URLs); with no domain the CLI default is the prod edge,
  https://<brandSlug>-api-edge-prod.<subdomain>.workers.dev
- ai/context/operations.md: "Setting the domain later"
- render-deployment-docs.sh: the placeholder is no domain to probe
- tests: fixture carries no domain; placement checks the product's CLI
  default and placeholder instead of the card's derive; rebrand.test.sh
  covers no domain, an empty one and a given one; CI reads the blueprint
  with no domain
- docs: BOOTSTRAP.md, docs/phases; record in saas-bootstrap-factory
  (baseline-v30, with #115)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D8AmgTwmnp4M8mgmnS9aha
@ruehowl
ruehowl marked this pull request as ready for review October 22, 2026 04:00
@ruehowl
ruehowl merged commit 45d97f6 into main Oct 22, 2026
7 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