germination: front door (open-platform/www) never comes up — seeded _app-template has is_template=false, so create_app 422s "this is not a template repo" #234

Closed
opened 2026-08-26 20:30:50 +00:00 by benjivers · 2 comments
Collaborator

Symptom

After a clean germination (sovereign DigitalOcean deploy, deploy/do, single node), the front door is not up — https://www.<domain> returns 404 and no open-platform/www repo/app exists. The germination log shows the front-door step ran and failed:

==> growing the front door: open-platform/www → https://www.167-172-24-121.sslip.io (the bare template; no crew, no PR)
    front door: create_app open-platform/www failed: create_app failed: generate failed: 422 {"message":"this is not a template repo","url":".../api/swagger"}
    WARN: the front door is NOT up — the platform is otherwise healthy. Finish it later
Front door      : NOT UP

Root cause

front_door_grow() (bin/lib.sh) → create_app {owner:open-platform, name:www} → the MCP create_app uses Forgejo's generate-from-template API, which requires the source template repo to have is_template=true.

But the seeded template repo is not flagged as a template. Enumerating all repos on a fresh platform:

plat/_app-template   template=false   empty=false     <-- should be template=true
plat/agents          template=false
plat/ci-builder      template=false
plat/ci-runner       template=false
plat/gitops          template=false
plat/hello           template=false
plat/mcp             template=false
plat/mitosis         template=false
open-platform/gitops template=false

plat/_app-template exists and has content, but template=false, so every create_app / generate-from-template call 422s.

Impact

  • The front door (open-platform/www) never comes up on a sovereign deploy — contradicts the "every platform is born with a front door at www.<domain>" promise in deploy/README.md.
  • Broader: any user-initiated app creation via create_app or the forge's "Use this template" button also fails with the same 422, because the template repo isn't flagged. So this blocks building the first app too, not just the front door.

Fix

Seed plat/_app-template with is_template: true (set it at germination when the repo is created/pushed, e.g. PATCH /api/v1/repos/plat/_app-template {"template": true}, or set the flag in the repo-create call). Optionally have create_app/front_door_grow assert-and-set the flag before calling generate, so re-runs self-heal.

Workaround (verified path)

PATCH /api/v1/repos/plat/_app-template {"template": true}, then re-run the documented recovery: GITOPS_PUSH=... MCP_TOKEN=... front_door_grow; agents_resume.

Environment

plat/mitosis origin/main @ b0ea45d, deploy/do, single droplet s-4vcpu-8gb nyc3, k3s v1.31.5+k3s1, Forgejo 15. Front-door step ran ~26 min into germination.

## Symptom After a clean germination (sovereign DigitalOcean deploy, `deploy/do`, single node), the front door is **not up** — `https://www.<domain>` returns 404 and no `open-platform/www` repo/app exists. The germination log shows the front-door step ran and failed: ``` ==> growing the front door: open-platform/www → https://www.167-172-24-121.sslip.io (the bare template; no crew, no PR) front door: create_app open-platform/www failed: create_app failed: generate failed: 422 {"message":"this is not a template repo","url":".../api/swagger"} WARN: the front door is NOT up — the platform is otherwise healthy. Finish it later Front door : NOT UP ``` ## Root cause `front_door_grow()` (bin/lib.sh) → `create_app {owner:open-platform, name:www}` → the MCP `create_app` uses Forgejo's **generate-from-template** API, which requires the source template repo to have `is_template=true`. But the seeded template repo is **not flagged as a template**. Enumerating all repos on a fresh platform: ``` plat/_app-template template=false empty=false <-- should be template=true plat/agents template=false plat/ci-builder template=false plat/ci-runner template=false plat/gitops template=false plat/hello template=false plat/mcp template=false plat/mitosis template=false open-platform/gitops template=false ``` `plat/_app-template` exists and has content, but `template=false`, so every `create_app` / generate-from-template call 422s. ## Impact - The front door (`open-platform/www`) never comes up on a sovereign deploy — contradicts the "every platform is born with a front door at `www.<domain>`" promise in `deploy/README.md`. - Broader: **any** user-initiated app creation via `create_app` or the forge's "Use this template" button also fails with the same 422, because the template repo isn't flagged. So this blocks building the first app too, not just the front door. ## Fix Seed `plat/_app-template` with `is_template: true` (set it at germination when the repo is created/pushed, e.g. `PATCH /api/v1/repos/plat/_app-template {"template": true}`, or set the flag in the repo-create call). Optionally have `create_app`/`front_door_grow` assert-and-set the flag before calling generate, so re-runs self-heal. ## Workaround (verified path) `PATCH /api/v1/repos/plat/_app-template {"template": true}`, then re-run the documented recovery: `GITOPS_PUSH=... MCP_TOKEN=... front_door_grow; agents_resume`. ## Environment `plat/mitosis` `origin/main` @ `b0ea45d`, `deploy/do`, single droplet `s-4vcpu-8gb` nyc3, k3s `v1.31.5+k3s1`, Forgejo 15. Front-door step ran ~26 min into germination.
Owner

Root cause found: the published genesis seed (r603) predates the _app-template → app-template rename, and germinate's template-flag/visibility special-cases match only the NEW name — so the legacy repo got neither. Fixes in PR #242 (germinate handles both names, and an unflagged template is now FATAL at germination, not a WARN) and plat/mcp#63 (create_app self-heals the flag with platform auth and retries — your verified workaround, automated). The seed itself is refreshed by reseed #241, currently red on the coldstart gate — that failure is the remaining blocker for shipped seeds.

Root cause found: the published genesis seed (r603) predates the `_app-template → app-template` rename, and germinate's template-flag/visibility special-cases match only the NEW name — so the legacy repo got neither. Fixes in PR #242 (germinate handles both names, and an unflagged template is now FATAL at germination, not a WARN) and plat/mcp#63 (`create_app` self-heals the flag with platform auth and retries — your verified workaround, automated). The seed itself is refreshed by reseed #241, currently red on the coldstart gate — that failure is the remaining blocker for shipped seeds.
Owner

Closing: germinate fix merged (#242, gate-green against the broken r603 seed) and reseed r779 (#243, gate-green) is now the published seed — fresh deploys get plat/app-template with template=true from birth, and mcp 0.50.0's create_app self-heals the flag besides. For the existing platform from this report: the verified workaround (PATCH template:true) plus front_door_grow; agents_resume still applies, or redeploy from the current seed.

Closing: germinate fix merged (#242, gate-green against the broken r603 seed) and reseed r779 (#243, gate-green) is now the published seed — fresh deploys get `plat/app-template` with `template=true` from birth, and mcp 0.50.0's create_app self-heals the flag besides. For the existing platform from this report: the verified workaround (PATCH template:true) plus `front_door_grow; agents_resume` still applies, or redeploy from the current seed.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-platform/mitosis#234
No description provided.