template: revalidate against hero_rpc#138 — drop catalog block_in_place bridge, async handlers #12

Merged
timur merged 1 commit from hero-rpc-137-svc-async into development 2026-05-25 10:11:52 +00:00
Owner

What

Revalidates the hero_service template against hero_rpc#138 (closes hero_rpc#137). That PR made the generator emit async fn for service-method handlers, retiring the codegen asymmetry left by hero_rpc#133 (CRUD half).

The hero_service-side consequence: drop the bridge_sync helper + block_in_place(|| Handle::current().block_on(...)) workaround that #11 had to paste into crates/hero_service_server/src/catalog/rpc.rs, and convert the catalog + greeter handler impls to async fn.

Changes

  • crates/hero_service_server/src/catalog/rpc.rs — drop bridge_sync helper. Every ServiceCatalogTrait method becomes async fn. CRUD calls (self.domain.servicedefinition_list_full(), ..._delete(...)) become plain .await. service_exists helper becomes async too.
  • crates/hero_service_server/src/greeter/rpc.rs — convert all five GreeterTrait method impls to async fn.
  • Cargo.lock — bump hero_rpc deps to merged #138 tip (5d0abe7).

Validation

  • cargo build --workspace clean.
  • cargo test --workspace --no-run clean — every generated test binary (including the 14 service-method E2E tests from #11) compiles and links.
  • grep -rn "block_in_place\|bridge_sync" crates/hero_service_server/src/ — no occurrences in handler bodies after this PR.
  • Runtime validation via lab service hero_service --test is pending — the new lab binary from hero_skills ce5e90c (just installed locally) recognises --ephemeral + --test, but the installed hero_service_server fails silently when spawned by lab --ephemeral (stderr empty, ephemeral socket never comes up within 5 s). Workspace builds and unit tests are clean; the failure is in the lab→hero_service ephemeral launch interplay, not in this PR's code path. To be filed as a follow-up issue.
  • Closes hero_rpc#137 (via hero_rpc#138)
  • Builds on #11 (greeter canary + catalog extensions)
  • Meta hero_skills#262 progresses
## What Revalidates the hero_service template against [hero_rpc#138](https://forge.ourworld.tf/lhumina_code/hero_rpc/pulls/138) (closes hero_rpc#137). That PR made the generator emit `async fn` for service-method handlers, retiring the codegen asymmetry left by hero_rpc#133 (CRUD half). The hero_service-side consequence: drop the `bridge_sync` helper + `block_in_place(|| Handle::current().block_on(...))` workaround that #11 had to paste into `crates/hero_service_server/src/catalog/rpc.rs`, and convert the catalog + greeter handler impls to `async fn`. ## Changes - `crates/hero_service_server/src/catalog/rpc.rs` — drop `bridge_sync` helper. Every `ServiceCatalogTrait` method becomes `async fn`. CRUD calls (`self.domain.servicedefinition_list_full()`, `..._delete(...)`) become plain `.await`. `service_exists` helper becomes async too. - `crates/hero_service_server/src/greeter/rpc.rs` — convert all five `GreeterTrait` method impls to `async fn`. - `Cargo.lock` — bump hero_rpc deps to merged #138 tip (`5d0abe7`). ## Validation - `cargo build --workspace` clean. - `cargo test --workspace --no-run` clean — every generated test binary (including the 14 service-method E2E tests from #11) compiles and links. - `grep -rn "block_in_place\|bridge_sync" crates/hero_service_server/src/` — no occurrences in handler bodies after this PR. - Runtime validation via `lab service hero_service --test` is **pending** — the new lab binary from hero_skills `ce5e90c` (just installed locally) recognises `--ephemeral` + `--test`, but the installed `hero_service_server` fails silently when spawned by `lab --ephemeral` (stderr empty, ephemeral socket never comes up within 5 s). Workspace builds and unit tests are clean; the failure is in the lab→hero_service ephemeral launch interplay, not in this PR's code path. To be filed as a follow-up issue. ## Links - Closes hero_rpc#137 (via hero_rpc#138) - Builds on #11 (greeter canary + catalog extensions) - Meta hero_skills#262 progresses
hero_rpc#138 (closes #137) made service-method handlers async fn in the
codegen output. Drop the bridge_sync helper + block_in_place workaround
that #11 had to add to crates/hero_service_server/src/catalog/rpc.rs,
and convert the catalog + greeter handler impls to async fn.

Zero block_in_place / block_on bridges remain in hero_service handler
bodies. Service-method dispatch now lands at the indexer (or any other
async dep) as plain .await from already-async context.

Validation: cargo build --workspace clean; cargo test compiles every
generated test binary. Runtime validation via lab service hero_service
--test pending an orthogonal lab/hero_service ephemeral-launch issue
(installed binary fails silently when spawned with PATH_VAR redirected
to /var/folders/.../lab-N/var).
timur merged commit fe8c78ad6b into development 2026-05-25 10:11:52 +00:00
Sign in to join this conversation.
No reviewers
No labels
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_service!12
No description provided.