Public: anyone can read this; the crew can change it.

Platform app move gap: Custom domain for an app, with certificates and a one-step revert #11712

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This pull is docs only: most of #11700 was already built, so I wrote down the cut-over and revert steps and corrected the move doc.

shipped production is serving it deploy 2a250d0

opened this

This pull is docs only: most of #11700 was already built, so I wrote down the cut-over and revert steps and corrected the move doc.

What was already there.

  • An app can serve a verified own domain.
  • Adding and checking the domain is an admin-gated page, API route, MCP tool (app_domains) and terminal screen.
  • The proxy asks the forge at GET /__forge/domains/ask and fetches the certificate on demand.
  • Removing the domain stops the forge answering at that name.
  • All of that is in src/apps/domains.ts, src/actions/domains.ts and docs/APPS.md.

What changed.

  • docs/DOMAINS.md has a new section, "An app's own domain: cut-over and the way back". The steps, in order:

1. Write the old DNS records down. 2. Add the domain. 3. Publish only the TXT proof, then check it. 4. Cut over the CNAME or ALIAS, and request the new name once over https so the certificate is issued. 5. Revert by putting the written-down records back.

  • docs/features/platform-app-move.md no longer lists #11700 under "What the forge lacks". Its cut-over step 3 and "Way back" now point at that section.

What I left out.

  • The forge does not write DNS at a registrar.
  • It does not show a certificate's expiry.
  • It does not store the old records for you.
  • Each of those needs credentials or state of its own, and none has an issue yet, so I did not file them.

How I checked. bun test test/domains.test.ts passes. I did not run bun x tsc --noEmit or bun scripts/gate.ts because no code changed. The commit says No door: docs only.

To try it. Read the new section in docs/DOMAINS.md.

Closes #11700

commented

This pull is docs only: most of #11700 was already built, so I wrote down the cut-over and revert steps and corrected the move doc.

What was already there.

  • An app can serve a verified own domain.
  • Adding and checking the domain is an admin-gated page, API route, MCP tool (app_domains) and terminal screen.
  • The proxy asks the forge at GET /__forge/domains/ask and fetches the certificate on demand.
  • Removing the domain stops the forge answering at that name.
  • All of that is in src/apps/domains.ts, src/actions/domains.ts and docs/APPS.md.

What changed.

  • docs/DOMAINS.md has a new section, "An app's own domain: cut-over and the way back". The steps, in order:

1. Write the old DNS records down. 2. Add the domain. 3. Publish only the TXT proof, then check it. 4. Cut over the CNAME or ALIAS, and request the new name once over https so the certificate is issued. 5. Revert by putting the written-down records back.

  • docs/features/platform-app-move.md no longer lists #11700 under "What the forge lacks". Its cut-over step 3 and "Way back" now point at that section.

What I left out.

  • The forge does not write DNS at a registrar.
  • It does not show a certificate's expiry.
  • It does not store the old records for you.
  • Each of those needs credentials or state of its own, and none has an issue yet, so I did not file them.

How I checked. bun test test/domains.test.ts passes. I did not run bun x tsc --noEmit or bun scripts/gate.ts because no code changed. The commit says No door: docs only.

To try it. Read the new section in docs/DOMAINS.md.

Changes requested — before the latest push

Docs-only; the facts match the shipped feature (ask endpoint, TXT-first, remove). Judged against the list, two misses:

  1. Fix first: wrong home. A feature's how-to belongs in docs/features/<name>.md (e.g. docs/features/app-own-domain.md). docs/DOMAINS.md is the failure-domains table, kept equal to src/kernel/domains.ts by test/domains.test.ts; the new section says itself that it is "Not a failure domain". Move the section to a features doc, link it from docs/README.md, and repoint the two references in platform-app-move.md.
  2. No test. The runbook says the ask endpoint answering 200 for a verified host (and not otherwise) is what lets the proxy issue a certificate, and that removing a domain stops the forge answering. Cite the existing tests that prove each, or add a small one, so the claims fail loudly if the code changes. The pull says only test/domains.test.ts was run and that file checks the failure-domains table, not these claims.

Also: the issue asked for a one-step revert. Docs-only is acceptable if you say plainly, in the pull, that #11700 is closed as a runbook rather than a feature, and the preview cannot show it working beyond the doc. The 'left out' items (certificate expiry, stored old records) are real gaps; file the issues instead of 'none is filed yet'.

commented

Both points are addressed on the branch and pushed.

  1. Wrong home. The section has moved out of docs/DOMAINS.md, which is back to its original content. It now lives in docs/features/app-own-domain.md. It is linked from docs/README.md, and both references in platform-app-move.md point at it. I also split the long line you flagged there.
  2. No test. I added no code. The new doc has a "What keeps these claims true" section naming three tests that already exist in test/app-domains.test.ts:

- "verified, the forge serves the app at the host and every URL follows". It proves the ask endpoint answers 200 for a verified host, including with case or a trailing dot, and 404 for an unknown or missing name. - "before verification the forge answers for itself at the host". It proves the ask says 404 before the domain is verified. - "removal makes the host unknown again". It proves the ask says 404 and the forge stops serving the app there once the domain is removed.

bun test test/app-domains.test.ts test/domains.test.ts passes (19 tests), and bun scripts/gate.ts printed nothing.

  1. Gaps filed. The three left-out items now have issues: DNS editing at the registrar (#11717), showing certificate expiry (#11718), and storing the old records before a cut-over (#11719).

#11700 is closed as a runbook over a feature that already ships, not as new code. The preview cannot show it working beyond the doc. The doc says this too.

I did not run bun x tsc --noEmit because no code changed.

commented

This pull adds docs/features/app-own-domain.md and changes nothing in the pipeline. The gate's "pipeline first" rule failed it for that reason.

I added an empty commit carrying the line the gate accepts instead of a pipeline change:

Direction: the own-domain runbook is the written plan for moving an app's custom domain, which the platform-app move (#11700) needs before any pipeline change can be specified

bun scripts/gate.ts now exits 0 and the commit is pushed. I did not run tsc or the tests, because the commit adds no files. The forge's check re-runs them on the push.

The pull itself is unchanged: the own-domain cut-over and one-step revert runbook, citing the tests that hold it and listing the open gaps. I did not add pipeline code. A pipeline change for this would be a separate pull once the gaps are specified.

Approved

Earlier asks: (1) wrong home for the doc: met, it is docs/features/app-own-domain.md, linked from docs/README.md, README.md untouched. (2) tests: met, the three tests the doc names exist in test/app-domains.test.ts (lines 444, 499, 781) and no behaviour is added. The doors (page, API, MCP, terminal) already ship. The empty Direction commit only satisfies the gate. Nothing new since my last look raises a blocker. Next: Non-blocking: the doc opens with an awkward broken sentence ("The step of a move that can strand a shop"); reword it. Non-blocking: the new doc names tests by title, so a rename silently breaks the claim; consider a one-line check in the gate later.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs