blueprint golden path broken: generator emits dead hero_theme git dep (hero_web_template.git → 404) #158

Open
opened 2026-06-15 08:05:11 +00:00 by timur · 1 comment
Owner

Goal

lab blueprint (the schema-driven scaffolder) must produce a workspace that builds, boots, and serves end-to-end. The canonical proof is examples/blueprinting/run.sh (scaffold a .oschemacargo build --workspace → boot server → drive every generated RPC method → teardown) and the fuller examples/crm/run.sh. Right now neither completes — they fail at the build step.

Reproduce

export PATH_ROOT=/tmp/lab_root && mkdir -p $PATH_ROOT
bash examples/blueprinting/run.sh
  • Step 2 — lab blueprint --schemas-dir scaffolds fine (54 files, 21 dirs).
  • Step 3 — cargo build --workspace fails:
error: failed to get `hero_theme` as a dependency of package `hero_widgets_admin`
  unable to update https://forge.ourworld.tf/lhumina_code/hero_web_template.git?branch=development
  ... git fetch ... (HTTP 301 → exit 128)

Root cause

The generator hard-codes the hero_theme crate from a repo that no longer exists:

  • Dead: https://forge.ourworld.tf/lhumina_code/hero_web_template.git → web 404, git fetch 301/401.
  • Emitted at two sites in crates/generator/src/build/scaffold.rs:
    • L1485 — generated <name>_admin/Cargo.toml
    • L1624 — generated <name>_web/Cargo.toml

hero_theme has since moved. hero_website_framework (which the same scaffold already depends on for hero_admin_lib) now resolves hero_theme from coopcloud_code/mycelium_dashboard_template_wip.git @ development (confirmed in its Cargo.lock, commit de4712a).

Fix

Repoint both emit sites to the live source so generated services match hero_website_framework:

hero_theme = { git = "https://forge.ourworld.tf/coopcloud_code/mycelium_dashboard_template_wip.git", branch = "development" }

(Flagging the _wip repo name — it's the de-facto current source the rest of the stack uses; a more permanent home may be wanted later.)

Validation plan

  1. Fix on development, push.
  2. Rebuild lab against updated blueprinter (cargo update -p blueprinter) and re-run examples/blueprinting/run.sh to green.
  3. Then examples/crm/run.sh (catches _admin/_web optional-non-string-field issues per its README).
  4. Iterate on any subsequent breakage (e.g. hero_indexer one-input noted in prior handoff).

Tracking the work to get the blueprint golden path green on development.

## Goal `lab blueprint` (the schema-driven scaffolder) must produce a workspace that **builds, boots, and serves** end-to-end. The canonical proof is `examples/blueprinting/run.sh` (scaffold a `.oschema` → `cargo build --workspace` → boot server → drive every generated RPC method → teardown) and the fuller `examples/crm/run.sh`. Right now neither completes — they fail at the build step. ## Reproduce ```bash export PATH_ROOT=/tmp/lab_root && mkdir -p $PATH_ROOT bash examples/blueprinting/run.sh ``` - ✅ Step 2 — `lab blueprint --schemas-dir` scaffolds fine (54 files, 21 dirs). - ❌ Step 3 — `cargo build --workspace` fails: ``` error: failed to get `hero_theme` as a dependency of package `hero_widgets_admin` unable to update https://forge.ourworld.tf/lhumina_code/hero_web_template.git?branch=development ... git fetch ... (HTTP 301 → exit 128) ``` ## Root cause The generator hard-codes the `hero_theme` crate from a **repo that no longer exists**: - Dead: `https://forge.ourworld.tf/lhumina_code/hero_web_template.git` → web 404, git fetch 301/401. - Emitted at two sites in `crates/generator/src/build/scaffold.rs`: - L1485 — generated `<name>_admin/Cargo.toml` - L1624 — generated `<name>_web/Cargo.toml` `hero_theme` has since moved. `hero_website_framework` (which the same scaffold already depends on for `hero_admin_lib`) now resolves `hero_theme` from `coopcloud_code/mycelium_dashboard_template_wip.git` @ `development` (confirmed in its `Cargo.lock`, commit `de4712a`). ## Fix Repoint both emit sites to the live source so generated services match `hero_website_framework`: ``` hero_theme = { git = "https://forge.ourworld.tf/coopcloud_code/mycelium_dashboard_template_wip.git", branch = "development" } ``` (Flagging the `_wip` repo name — it's the de-facto current source the rest of the stack uses; a more permanent home may be wanted later.) ## Validation plan 1. Fix on `development`, push. 2. Rebuild `lab` against updated `blueprinter` (cargo update -p blueprinter) and re-run `examples/blueprinting/run.sh` to green. 3. Then `examples/crm/run.sh` (catches `_admin`/`_web` optional-non-string-field issues per its README). 4. Iterate on any subsequent breakage (e.g. hero_indexer one-input noted in prior handoff). Tracking the work to get the blueprint golden path green on `development`.
Author
Owner

Progress — golden path now reaches a working server

Three generator fixes landed on development (all dependency-resolution blockers for the default scaffold):

  1. 9f49a30 — repoint scaffolded hero_theme to the live mycelium_dashboard_template_wip.git (old hero_web_template.git 404'd).
  2. 019236e — drop deleted hero_rpc2 from scaffolded _admin/_web (they already use the flat <name>_sdk client).
  3. 4bdb211 — migrate the scaffolded examples/ crate off hero_rpc2 to the flat SDK (connect_socket + <root>_list_full).
  4. <benches commit> — drop unused hero_rpc2 from scaffolded benches/.

Generator lib suite green (151 passed). With a lab rebuilt against these, lab blueprintcargo build now compiles core + server + sdk, and the generated server boots and serves correctly:

  • widget_set {"sid":"","data":{…}} on POST /api/widgets/rpc → created sid 0001.
  • Route layout is /api/{domain}/rpc, /health.json, /api/ping, /api/domains.json. CRUD is get/set/delete/list/list_full/exists/find (no new — create = set with empty sid).

Remaining to make the full examples/blueprinting/run.sh green

The _admin/_web UI crates never compiled before (resolution failed first); now exposed:

  1. Missing dep — admin/web main.rs use hero_lifecycle::base::* but don't declare hero_lifecycle (E0433).
  2. Route↔SDK drift — routes call client.widget_new(...) and import WidgetNewInput/WidgetCreate; the flat SDK only exposes widget_set/WidgetSetInput (E0432/E0599). Route emitter still assumes the old CRUD-8 new verb.
  3. Askama optional fields — templates render Option<String> without an HtmlSafe filter (E0599 askama_auto_escape). Matches the known "_admin/_web trip over optional non-string fields" note in examples/crm/README.md.
  4. Stale driverrun.sh posts to /rpc + /health and calls widget.new; should be /api/widgets/rpc, /health.json, widget_set.

Items 1–3 are generator (scaffold.rs / ui_emit.rs) codegen fixes; item 4 is the example driver.

## Progress — golden path now reaches a working server Three generator fixes landed on `development` (all dependency-resolution blockers for the default scaffold): 1. `9f49a30` — repoint scaffolded `hero_theme` to the live `mycelium_dashboard_template_wip.git` (old `hero_web_template.git` 404'd). 2. `019236e` — drop deleted `hero_rpc2` from scaffolded `_admin`/`_web` (they already use the flat `<name>_sdk` client). 3. `4bdb211` — migrate the scaffolded `examples/` crate off `hero_rpc2` to the flat SDK (`connect_socket` + `<root>_list_full`). 4. `<benches commit>` — drop unused `hero_rpc2` from scaffolded `benches/`. Generator lib suite green (151 passed). With a `lab` rebuilt against these, `lab blueprint` → `cargo build` now compiles **core + server + sdk**, and the **generated server boots and serves correctly**: - `widget_set {"sid":"","data":{…}}` on `POST /api/widgets/rpc` → created sid `0001`. - Route layout is `/api/{domain}/rpc`, `/health.json`, `/api/ping`, `/api/domains.json`. CRUD is get/set/delete/list/list_full/exists/find (no `new` — create = `set` with empty sid). ## Remaining to make the full `examples/blueprinting/run.sh` green The `_admin`/`_web` UI crates never compiled before (resolution failed first); now exposed: 1. **Missing dep** — admin/web `main.rs` use `hero_lifecycle::base::*` but don't declare `hero_lifecycle` (E0433). 2. **Route↔SDK drift** — routes call `client.widget_new(...)` and import `WidgetNewInput`/`WidgetCreate`; the flat SDK only exposes `widget_set`/`WidgetSetInput` (E0432/E0599). Route emitter still assumes the old CRUD-8 `new` verb. 3. **Askama optional fields** — templates render `Option<String>` without an HtmlSafe filter (E0599 `askama_auto_escape`). Matches the known "_admin/_web trip over optional non-string fields" note in `examples/crm/README.md`. 4. **Stale driver** — `run.sh` posts to `/rpc` + `/health` and calls `widget.new`; should be `/api/widgets/rpc`, `/health.json`, `widget_set`. Items 1–3 are generator (`scaffold.rs` / `ui_emit.rs`) codegen fixes; item 4 is the example driver.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
lhumina_code/hero_blueprint#158
No description provided.